Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-04 Thread Dale
Peter Humphrey wrote:
> On Saturday 04 Feb 2017 10:24:12 Neil Bothwick wrote:
>> On Sat, 04 Feb 2017 10:41:14 +0100, Helmut Jarausch wrote:
 emerge -n is the correct solution, although emerge -u may also work
 for
 you.
>>> Many thanks, Neil.
>>>
>>> Still, I don't see how this can help me in my situation.
>>>
>>> I'm trying to re-emerge packages which are already installed and where
>>> there isn't a new version in the tree (in most cases).
>>> So neither -u nor -n will do the job.
>> I see, you do want to rebuild everything, but only once. I have a script
>> that I use to rebuild everything only once, you could modify it to use
>> your list of files.
>>
>> #!/bin/bash
>>
>> EMERGE_ARGS="--oneshot --keep-going"
>>
>> usage() {
>>  echo -e "\nUsage: $(basename $0) [-f file] [-r category/package[-
> version]
>> [-h]" echo "-f re-emerge all packages older than this file"
>>  echo "-r re-emerge all packages older than this package"
>>  echo "-h Show this text"
>>  echo -e "\nAll other options are passed to the emerge command"
>>  echo -e "$*"
>>  exit
>>  }
>>
>> while getopts f:r:pvh ARG; do
>>  case "${ARG}" in
>>  f) REFFILE=${OPTARG} ;;
>>  r) REFFILE=$(ls -1 /var/db/pkg/${OPTARG}*/environment.bz2 | 
>> head -
> n 1)
>> ;; p) EMERGE_ARGS="${EMERGE_ARGS} --pretend" ;;
>>  v) EMERGE_ARGS="${EMERGE_ARGS} --verbose" ;;
>>  h) usage ;;
>>  esac
>>  done
>> shift $(expr ${OPTIND} - 1)
>>
>> [[ "${REFFILE}" ]] || usage "\nYou must specify a reference with -f or
>> -r\n" [[ -f ${REFFILE} ]] || usage "\n${REFFILE} not found\n"
>>
>> PKGLIST=$(mktemp -t mergeolderthan.)
>>
>>
>> find /var/db/pkg -name environment.bz2 ! -newer ${REFFILE} | sed -e
>> 's:/var/db/pkg/:=:' -e 's:/environment.bz2::' >|$PKGLIST
>>
>> cat ${PKGLIST} | xargs --no-run-if-empty emerge ${EMERGE_ARGS} && rm -i
>> ${PKGLIST}
> Not being much of a programmer nowadays, I just do this:
>
> $ alias emerj='sudo emerge --jobs=24 --load-average=48 --keep-going'
> $ emerj gcc && emerj glibc libtool
> $ emerj --exclude="gcc glibc libtool" system
> $ emerj --exclude="$(cat system.pkgs)" -e world
>
> ...in which I've previously listed the 43 packages installed by emerj system 
> in system.pkgs.
>


What I am about to mention is OLD.  Really OLD.  I used this script AGES
ago and it worked like a charm.  Others also used it.  I don't know if
it works or not with the current emerge.  I found the forum post on fgo. 

https://forums.gentoo.org/viewtopic-t-494331.html 

I'm posting in case it has some code that might interest you and be neat
to add to what you are currently doing.  It may be that one of you wants
to test this on something and see if it still works as is.  I'd be
cautious even tho it shouldn't do anything but rebuild stuff.   I don't
think it has any rm -rfv /* stuff in it.  :/ 

Y'all enjoy.  :-D

Dale

:-)  :-) 



Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-04 Thread Peter Humphrey
On Saturday 04 Feb 2017 10:24:12 Neil Bothwick wrote:
> On Sat, 04 Feb 2017 10:41:14 +0100, Helmut Jarausch wrote:
> > > emerge -n is the correct solution, although emerge -u may also work
> > > for
> > > you.
> > 
> > Many thanks, Neil.
> > 
> > Still, I don't see how this can help me in my situation.
> > 
> > I'm trying to re-emerge packages which are already installed and where
> > there isn't a new version in the tree (in most cases).
> > So neither -u nor -n will do the job.
> 
> I see, you do want to rebuild everything, but only once. I have a script
> that I use to rebuild everything only once, you could modify it to use
> your list of files.
> 
> #!/bin/bash
> 
> EMERGE_ARGS="--oneshot --keep-going"
> 
> usage() {
>   echo -e "\nUsage: $(basename $0) [-f file] [-r category/package[-
version]
> [-h]" echo "-f re-emerge all packages older than this file"
>   echo "-r re-emerge all packages older than this package"
>   echo "-h Show this text"
>   echo -e "\nAll other options are passed to the emerge command"
>   echo -e "$*"
>   exit
>   }
> 
> while getopts f:r:pvh ARG; do
>   case "${ARG}" in
>   f) REFFILE=${OPTARG} ;;
>   r) REFFILE=$(ls -1 /var/db/pkg/${OPTARG}*/environment.bz2 | 
> head -
n 1)
> ;; p) EMERGE_ARGS="${EMERGE_ARGS} --pretend" ;;
>   v) EMERGE_ARGS="${EMERGE_ARGS} --verbose" ;;
>   h) usage ;;
>   esac
>   done
> shift $(expr ${OPTIND} - 1)
> 
> [[ "${REFFILE}" ]] || usage "\nYou must specify a reference with -f or
> -r\n" [[ -f ${REFFILE} ]] || usage "\n${REFFILE} not found\n"
> 
> PKGLIST=$(mktemp -t mergeolderthan.)
> 
> 
> find /var/db/pkg -name environment.bz2 ! -newer ${REFFILE} | sed -e
> 's:/var/db/pkg/:=:' -e 's:/environment.bz2::' >|$PKGLIST
> 
> cat ${PKGLIST} | xargs --no-run-if-empty emerge ${EMERGE_ARGS} && rm -i
> ${PKGLIST}

Not being much of a programmer nowadays, I just do this:

$ alias emerj='sudo emerge --jobs=24 --load-average=48 --keep-going'
$ emerj gcc && emerj glibc libtool
$ emerj --exclude="gcc glibc libtool" system
$ emerj --exclude="$(cat system.pkgs)" -e world

...in which I've previously listed the 43 packages installed by emerj system 
in system.pkgs.

-- 
Regards
Peter




Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-04 Thread Helmut Jarausch

On 02/04/2017 09:09:03 AM, J. Roeleveld wrote:
On February 3, 2017 9:32:53 PM GMT+01:00, Helmut Jarausch  
 wrote:

>On 02/03/2017 07:06:51 PM, J. Roeleveld wrote:
>> On February 3, 2017 6:30:52 PM GMT+01:00, Helmut Jarausch
>>  wrote:
>>
>> How come you are installing 3000 packages in 1 go?
>> Is this a new install? Or are you updating?
>>
>> My update command doesn't even cover more than 1 line on my mobile.
>>
>
>I had strange errors with some programs (e.g. gimp) and I suspect
>something is broken
>after I have switched to gcc-6.3.0 and glibc-2.24.
>Therefore I try to rebuild all packages which have been installed
>before that change.
>
>Helmut

There is a GCC upgrade guide in the gentoo pages. It starts with  
upgrading the toolchain. Then doing an 'emerge -e @world'.


If you want to make sure everything is installed using that. This  
would be the safest method.


Specifying all these packages manually makes the dependency checks  
for portage difficult. Even RPM based distros have left rpm-hell  
behind since yum got usable.


Thanks Joost!

Unfortunately such a simple method doesn't work for me.
My hobby is to maintain an unusual Gentoo system.

I have a large local overlay and several other overlays here.

I have packages which are not in the tree,
I have (had to generate) duplicates of packages which (all) do run  
under Python-3.5 but have only python3_4 in PYTHON_COMPAT.
There is a similar problem  with Ruby packages which are still not  
specified for Ruby-2.4.

And more problems which are caused by gcc-6.3.0 and glibc-2.24.

Helmut




Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-04 Thread Neil Bothwick
On Sat, 04 Feb 2017 10:41:14 +0100, Helmut Jarausch wrote:

> > emerge -n is the correct solution, although emerge -u may also work  
> > for
> > you.  
> 
> 
> Many thanks, Neil.
> 
> Still, I don't see how this can help me in my situation.
> 
> I'm trying to re-emerge packages which are already installed and where  
> there isn't a new version in the tree (in most cases).
> So neither -u nor -n will do the job.

I see, you do want to rebuild everything, but only once. I have a script
that I use to rebuild everything only once, you could modify it to use
your list of files.

#!/bin/bash

EMERGE_ARGS="--oneshot --keep-going"

usage() {
echo -e "\nUsage: $(basename $0) [-f file] [-r 
category/package[-version] [-h]"
echo "-f re-emerge all packages older than this file"
echo "-r re-emerge all packages older than this package"
echo "-h Show this text"
echo -e "\nAll other options are passed to the emerge command"
echo -e "$*"
exit
}

while getopts f:r:pvh ARG; do
case "${ARG}" in
f) REFFILE=${OPTARG} ;;
r) REFFILE=$(ls -1 /var/db/pkg/${OPTARG}*/environment.bz2 | 
head -n 1) ;;
p) EMERGE_ARGS="${EMERGE_ARGS} --pretend" ;;
v) EMERGE_ARGS="${EMERGE_ARGS} --verbose" ;;
h) usage ;;
esac
done
shift $(expr ${OPTIND} - 1)

[[ "${REFFILE}" ]] || usage "\nYou must specify a reference with -f or -r\n"
[[ -f ${REFFILE} ]] || usage "\n${REFFILE} not found\n"

PKGLIST=$(mktemp -t mergeolderthan.)


find /var/db/pkg -name environment.bz2 ! -newer ${REFFILE} | sed -e 
's:/var/db/pkg/:=:' -e 's:/environment.bz2::' >|$PKGLIST

cat ${PKGLIST} | xargs --no-run-if-empty emerge ${EMERGE_ARGS} && rm -i 
${PKGLIST}


-- 
Neil Bothwick

RAM = Rarely Adequate Memory


pgpays5c32bPV.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-04 Thread Helmut Jarausch

On 02/03/2017 09:53:52 PM, Frank Steinmetzger wrote:

On Fri, Feb 03, 2017 at 09:32:53PM +0100, Helmut Jarausch wrote:
> On 02/03/2017 07:06:51 PM, J. Roeleveld wrote:
> > On February 3, 2017 6:30:52 PM GMT+01:00, Helmut Jarausch
> >  wrote:
> >
> > How come you are installing 3000 packages in 1 go?
> > Is this a new install? Or are you updating?
> >
> > My update command doesn't even cover more than 1 line on my  
mobile.

> >
>
> I had strange errors with some programs (e.g. gimp) and I suspect
> something is broken
> after I have switched to gcc-6.3.0 and glibc-2.24.
> Therefore I try to rebuild all packages which have been installed
> before that change.

When I am in such a situation, I let emerge print out the package  
list to be
built (in the order it intends to merge them), put that list into a  
file and

edit it a bit so I can use it in the following command:

emerge -1O $(sed -n '1,100p' packagelist)


Thanks Frank for that hint.
It would make using a large command file obsolete IFF all wents through.
But in my experience emerge fails again and again with some package.
Now, I have to remove these package and those which have been  
successfully emerged from my list.


Helmut.




Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-04 Thread Helmut Jarausch

On 02/03/2017 10:49:47 PM, Neil Bothwick wrote:

On Fri, 03 Feb 2017 18:30:52 +0100, Helmut Jarausch wrote:

> when I emerge many packages (currently more than 3000), emerge  
nearly

> never succeeds.
> Yes, I'm using the option --keep-going but this doesn't help most of
> the time.
>
> I have the complete emerge command in one file which has lots of  
lines.

> Now I have the problem to remove those packages from this file which
> have been successfully emerged.
>
> Currently I have written a Python program to scan  
/var/log/emerge.log

> to extract packages which have been
> emerged and which then removes these from my original file.
> This still needs some manual tweaking in the case when a packages  
has

> to be installed more than once (into different slots).
>
> Is there a more elegant solution to this probably most common  
problem?


emerge -n is the correct solution, although emerge -u may also work  
for

you.



Many thanks, Neil.

Still, I don't see how this can help me in my situation.

I'm trying to re-emerge packages which are already installed and where  
there isn't a new version in the tree (in most cases).

So neither -u nor -n will do the job.
Helmut.



Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-04 Thread J. Roeleveld
On February 3, 2017 9:32:53 PM GMT+01:00, Helmut Jarausch  
wrote:
>On 02/03/2017 07:06:51 PM, J. Roeleveld wrote:
>> On February 3, 2017 6:30:52 PM GMT+01:00, Helmut Jarausch  
>>  wrote:
>> 
>> How come you are installing 3000 packages in 1 go?
>> Is this a new install? Or are you updating?
>> 
>> My update command doesn't even cover more than 1 line on my mobile.
>> 
>
>I had strange errors with some programs (e.g. gimp) and I suspect  
>something is broken
>after I have switched to gcc-6.3.0 and glibc-2.24.
>Therefore I try to rebuild all packages which have been installed  
>before that change.
>
>Helmut

There is a GCC upgrade guide in the gentoo pages. It starts with upgrading the 
toolchain. Then doing an 'emerge -e @world'.

If you want to make sure everything is installed using that. This would be the 
safest method.

Specifying all these packages manually makes the dependency checks for portage 
difficult. Even RPM based distros have left rpm-hell behind since yum got 
usable.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-03 Thread Neil Bothwick
On Fri, 03 Feb 2017 18:30:52 +0100, Helmut Jarausch wrote:

> when I emerge many packages (currently more than 3000), emerge nearly  
> never succeeds.
> Yes, I'm using the option --keep-going but this doesn't help most of  
> the time.
> 
> I have the complete emerge command in one file which has lots of lines.
> Now I have the problem to remove those packages from this file which  
> have been successfully emerged.
> 
> Currently I have written a Python program to scan /var/log/emerge.log  
> to extract packages which have been
> emerged and which then removes these from my original file.
> This still needs some manual tweaking in the case when a packages has  
> to be installed more than once (into different slots).
> 
> Is there a more elegant solution to this probably most common problem?

emerge -n is the correct solution, although emerge -u may also work for
you.


-- 
Neil Bothwick

Do evangelists do more than lay people?


pgp2HkRqxO_iU.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-03 Thread Frank Steinmetzger
On Fri, Feb 03, 2017 at 09:32:53PM +0100, Helmut Jarausch wrote:
> On 02/03/2017 07:06:51 PM, J. Roeleveld wrote:
> > On February 3, 2017 6:30:52 PM GMT+01:00, Helmut Jarausch  
> >  wrote:
> > 
> > How come you are installing 3000 packages in 1 go?
> > Is this a new install? Or are you updating?
> > 
> > My update command doesn't even cover more than 1 line on my mobile.
> > 
> 
> I had strange errors with some programs (e.g. gimp) and I suspect  
> something is broken
> after I have switched to gcc-6.3.0 and glibc-2.24.
> Therefore I try to rebuild all packages which have been installed  
> before that change.

When I am in such a situation, I let emerge print out the package list to be
built (in the order it intends to merge them), put that list into a file and
edit it a bit so I can use it in the following command:

emerge -1O $(sed -n '1,100p' packagelist)

No need to keep convoluted scripts and you can do it piece by piece just by
changing the start and end line in the sed command.
-- 
Gruß | Greetings | Qapla’
Please do not share anything from, with or about me with any social network.

“Any sufficiently advanced bug is indistinguishable from a feature.”
— Rich Kulawiec


signature.asc
Description: Digital signature


Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-03 Thread Helmut Jarausch

On 02/03/2017 07:06:51 PM, J. Roeleveld wrote:
On February 3, 2017 6:30:52 PM GMT+01:00, Helmut Jarausch  
 wrote:


How come you are installing 3000 packages in 1 go?
Is this a new install? Or are you updating?

My update command doesn't even cover more than 1 line on my mobile.



I had strange errors with some programs (e.g. gimp) and I suspect  
something is broken

after I have switched to gcc-6.3.0 and glibc-2.24.
Therefore I try to rebuild all packages which have been installed  
before that change.


Helmut




Re: [gentoo-user] [FAQ] How to recover from an unsuccessful build

2017-02-03 Thread J. Roeleveld
On February 3, 2017 6:30:52 PM GMT+01:00, Helmut Jarausch  
wrote:
>Hi,
>
>when I emerge many packages (currently more than 3000), emerge nearly  
>never succeeds.
>Yes, I'm using the option --keep-going but this doesn't help most of  
>the time.
>
>I have the complete emerge command in one file which has lots of lines.
>Now I have the problem to remove those packages from this file which  
>have been successfully emerged.
>
>Currently I have written a Python program to scan /var/log/emerge.log  
>to extract packages which have been
>emerged and which then removes these from my original file.
>This still needs some manual tweaking in the case when a packages has  
>to be installed more than once (into different slots).
>
>Is there a more elegant solution to this probably most common problem?
>
>Many thanks for  some hints,
>Helmut

How come you are installing 3000 packages in 1 go?
Is this a new install? Or are you updating?

My update command doesn't even cover more than 1 line on my mobile.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.