Use Flags and Updating

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Use Flags and Updating

Hunter Jozwiak-2

Hi all. How do I get Portage to update all software to use my new USE flags? I made some modifications to the variable, and I want to make sure that all packages can use the flags.

Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Alexander Kapshuk
On 05/20/2014 02:37 PM, Hunter Jozwiak wrote:

Hi all. How do I get Portage to update all software to use my new USE flags? I made some modifications to the variable, and I want to make sure that all packages can use the flags.

emerge(1)
-N -- --newuse

Reply | Threaded
Open this post in threaded view
|

RE: Use Flags and Updating

Hunter Jozwiak-2

 

 

From: Alexander Kapshuk [mailto:[hidden email]]
Sent: Tuesday, May 20, 2014 7:44 AM
To: [hidden email]
Subject: Re: [gentoo-user] Use Flags and Updating

 

On 05/20/2014 02:37 PM, Hunter Jozwiak wrote:

Hi all. How do I get Portage to update all software to use my new USE flags? I made some modifications to the variable, and I want to make sure that all packages can use the flags.

emerge(1)
-N -- --newuse

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Alexander Kapshuk
On 05/20/2014 02:40 PM, Hunter Jozwiak wrote:

 

 

From: Alexander Kapshuk [[hidden email]]
Sent: Tuesday, May 20, 2014 7:44 AM
To: [hidden email]
Subject: Re: [gentoo-user] Use Flags and Updating

 

On 05/20/2014 02:37 PM, Hunter Jozwiak wrote:

Hi all. How do I get Portage to update all software to use my new USE flags? I made some modifications to the variable, and I want to make sure that all packages can use the flags.

emerge(1)
-N -- --newuse

Thank you.

No worries.

Here's what I usually run when updating the world.
Long version: emerge --ask --update --deep --with-bdeps=y --newuse @world
With '--with-bdeps=y' set in the file shown below:
grep bdeps /etc/portage/make.conf
EMERGE_DEFAULT_OPTS="--with-bdeps=y"

Short version: emerge -avuND @world
-a [--ask]
-v [--verbose]
-u [--update]
-N [--newuse]
-D [--deep]


Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

fruktopus
In reply to this post by Hunter Jozwiak-2
Am 20.05.2014 13:37, schrieb Hunter Jozwiak:
> Hi all. How do I get Portage to update all software to use my new USE
> flags? I made some modifications to the variable, and I want to make
> sure that all packages can use the flags.
>


Hi,

you can use the --newuse option of emerge, like this:

# emerge --newuse world

you should also take a look at --changed-use. This ignores irrelevant
changes since installation.

 ~frukto

Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Matti Nykyri
In reply to this post by Alexander Kapshuk
On May 20, 2014, at 14:49, Alexander Kapshuk <[hidden email]> wrote:

On 05/20/2014 02:40 PM, Hunter Jozwiak wrote:

 

 

From: Alexander Kapshuk [[hidden email]]
Sent: Tuesday, May 20, 2014 7:44 AM
To: [hidden email]
Subject: Re: [gentoo-user] Use Flags and Updating

 

On 05/20/2014 02:37 PM, Hunter Jozwiak wrote:

Hi all. How do I get Portage to update all software to use my new USE flags? I made some modifications to the variable, and I want to make sure that all packages can use the flags.

emerge(1)
-N -- --newuse

Thank you.

No worries.

Here's what I usually run when updating the world.
Long version: emerge --ask --update --deep --with-bdeps=y --newuse @world
With '--with-bdeps=y' set in the file shown below:
grep bdeps /etc/portage/make.conf
EMERGE_DEFAULT_OPTS="--with-bdeps=y"

Short version: emerge -avuND @world
-a [--ask]
-v [--verbose]
-u [--update]
-N [--newuse]
-D [--deep]

And how to remember this... Make it a name:

emerge -DuvaN @world

Human mind is a complex organ ;)

-- 
-Matti
yac
Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

yac
In reply to this post by Alexander Kapshuk
On Tue, 20 May 2014 14:49:17 +0300
Alexander Kapshuk <[hidden email]> wrote:

> Here's what I usually run when updating the world.
> Long version: emerge --ask --update --deep --with-bdeps=y --newuse
> @world With '--with-bdeps=y' set in the file shown below:
> grep bdeps /etc/portage/make.conf
> EMERGE_DEFAULT_OPTS="--with-bdeps=y"
>
> Short version: emerge -avuND @world
> -a [--ask]
> -v [--verbose]
> -u [--update]
> -N [--newuse]
> -D [--deep]
>
>
It's also good to use -t --unordered-display to see what pulls what and
resolve potential issues.

Then --keep-going so the whole thing doesn't fail just because one
package fails.

Then -k to use already built binary packages where applicable
(Actually, I'm not sure why this sometimes gets activated but I see it
from time to time)

Why do you run the the --width-bdeps=y ?

---
Jan Matějka        | Developer
https://gentoo.org | Gentoo Linux
GPG: A33E F5BC A9F6 DAFD 2021  6FB6 3EBF D45B EEB6 CA8B

signature.asc (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Alexander Kapshuk
In reply to this post by Matti Nykyri
On 05/20/2014 10:13 PM, Matti Nykyri wrote:
On May 20, 2014, at 14:49, Alexander Kapshuk <[hidden email]> wrote:

On 05/20/2014 02:40 PM, Hunter Jozwiak wrote:

 

 

From: Alexander Kapshuk [[hidden email]]
Sent: Tuesday, May 20, 2014 7:44 AM
To: [hidden email]
Subject: Re: [gentoo-user] Use Flags and Updating

 

On 05/20/2014 02:37 PM, Hunter Jozwiak wrote:

Hi all. How do I get Portage to update all software to use my new USE flags? I made some modifications to the variable, and I want to make sure that all packages can use the flags.

emerge(1)
-N -- --newuse

Thank you.

No worries.

Here's what I usually run when updating the world.
Long version: emerge --ask --update --deep --with-bdeps=y --newuse @world
With '--with-bdeps=y' set in the file shown below:
grep bdeps /etc/portage/make.conf
EMERGE_DEFAULT_OPTS="--with-bdeps=y"

Short version: emerge -avuND @world
-a [--ask]
-v [--verbose]
-u [--update]
-N [--newuse]
-D [--deep]

And how to remember this... Make it a name:

emerge -DuvaN @world

Human mind is a complex organ ;)

-- 
-Matti

I just put this into a shell function.

sed -n '/chkupd/,/}/p' .bash_profile
chkupd(){
    emerge --sync && emerge -avuND @world
}

Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Alexander Kapshuk
In reply to this post by yac
On 05/20/2014 11:56 PM, yac wrote:
On Tue, 20 May 2014 14:49:17 +0300
Alexander Kapshuk [hidden email] wrote:

Here's what I usually run when updating the world.
Long version: emerge --ask --update --deep --with-bdeps=y --newuse
@world With '--with-bdeps=y' set in the file shown below:
grep bdeps /etc/portage/make.conf
EMERGE_DEFAULT_OPTS="--with-bdeps=y"

Short version: emerge -avuND @world
-a [--ask]
-v [--verbose]
-u [--update]
-N [--newuse]
-D [--deep]


It's also good to use -t --unordered-display to see what pulls what and
resolve potential issues.

Then --keep-going so the whole thing doesn't fail just because one
package fails.

Then -k to use already built binary packages where applicable
(Actually, I'm not sure why this sometimes gets activated but I see it
from time to time)

Why do you run the the --width-bdeps=y ?

---
Jan Matějka        | Developer
https://gentoo.org | Gentoo Linux
GPG: A33E F5BC A9F6 DAFD 2021  6FB6 3EBF D45B EEB6 CA8B

After reading about the flag in the handbook, I thought I'd use it as well.

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1

Code Listing 3.11: Updating your system with dependencies

# emerge --update --deep @world

Still, this doesn't mean all packages: some packages on your system are needed during the compile and build process of packages, but once that package is installed, these dependencies are no longer required. Portage calls those build dependencies. To include those in an update cycle, add --with-bdeps=y:

Code Listing 3.12: Updating your entire system

# emerge --update --deep --with-bdeps=y @world

Since security updates also happen in packages you have not explicitly installed on your system (but that are pulled in as dependencies of other programs), it is recommended to run this command once in a while.


What would you recommend? Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Francesco Turco
> What would you recommend? Thanks.

I always use emerge -uDNav @world --with-bdeps=y --keep-going=y, as I
want to update *all* packages on my system. What's the point in keeping
on the system some packages that are deliberately not updated?

Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Lee-2
In reply to this post by Alexander Kapshuk
On Wed, May 21, 2014 at 04:49:57PM +0300, Alexander Kapshuk wrote:

> On 05/20/2014 10:13 PM, Matti Nykyri wrote:
> > On May 20, 2014, at 14:49, Alexander Kapshuk
> > <[hidden email] <mailto:[hidden email]>> wrote:
> >
> >> On 05/20/2014 02:40 PM, Hunter Jozwiak wrote:
> >>>
> >>>  
> >>>
> >>>  
> >>>
> >>> *From:*Alexander Kapshuk [mailto:[hidden email]]
> >>> *Sent:* Tuesday, May 20, 2014 7:44 AM
> >>> *To:* [hidden email]
> >>> *Subject:* Re: [gentoo-user] Use Flags and Updating
> >>>
> >>>  
> >>>
> >>> On 05/20/2014 02:37 PM, Hunter Jozwiak wrote:
> >>>
> >>>     Hi all. How do I get Portage to update all software to use my
> >>>     new USE flags? I made some modifications to the variable, and I
> >>>     want to make sure that all packages can use the flags.
> >>>
> >>> emerge(1)
> >>> -N -- --newuse
> >>>
> >>> Thank you.
> >>>
> >> No worries.
> >>
> >> Here's what I usually run when updating the world.
> >> Long version: emerge --ask --update --deep --with-bdeps=y --newuse @world
> >> With '--with-bdeps=y' set in the file shown below:
> >> grep bdeps /etc/portage/make.conf
> >> EMERGE_DEFAULT_OPTS="--with-bdeps=y"
> >>
> >> Short version: emerge -avuND @world
> >> -a [--ask]
> >> -v [--verbose]
> >> -u [--update]
> >> -N [--newuse]
> >> -D [--deep]
> >
> > And how to remember this... Make it a name:
> >
> > emerge -DuvaN @world
> >
> > Human mind is a complex organ ;)
> >
> > --
> > -Matti
>
> I just put this into a shell function.
>
> sed -n '/chkupd/,/}/p' .bash_profile
> chkupd(){
>     emerge --sync && emerge -avuND @world
> }
>
I run a script that syncs portage, updates @world, depcleans, revdep-rebuild
and finally runs dispatch-conf -- about once weekly. Keeps my system in fine
trim. :)


signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Rich Freeman
On Wed, May 21, 2014 at 10:10 PM,  <[hidden email]> wrote:
> I run a script that syncs portage, updates @world, depcleans, revdep-rebuild
> and finally runs dispatch-conf -- about once weekly. Keeps my system in fine
> trim. :)

This one is a gem - I forget where I saw it (likely planet, but maybe
it was on a list).  Stick it in your crontab.  I will warn you that
sometimes it chokes on its own output and obviously it can't build
binpkgs for anything more than one step down the dependency tree.
However, when my weekly chromium build runs at 2AM and I can just
install it (with -k) the next morning it is a nice thing indeed.  You
still get full control over USE flags/etc, but most of the convenience
of a binary distro.

#!/bin/sh

LIST=$(mktemp);

emerge -puD --changed-use --color=n --columns --quiet=y --with-bdeps=y
world | awk '{print $2}' > ${LIST};

for PACKAGE in $(cat ${LIST});
do
  printf "Building binary package for ${PACKAGE}... "
  emerge -uN --quiet-build --quiet=y --buildpkgonly ${PACKAGE};
  if [[ $? -eq 0 ]];
  then
    echo "ok";
  else
    echo "failed";
  fi
done

Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Marc Joliet
Am Wed, 21 May 2014 23:11:02 -0400
schrieb Rich Freeman <[hidden email]>:

> On Wed, May 21, 2014 at 10:10 PM,  <[hidden email]> wrote:
> > I run a script that syncs portage, updates @world, depcleans, revdep-rebuild
> > and finally runs dispatch-conf -- about once weekly. Keeps my system in fine
> > trim. :)
>
> This one is a gem - I forget where I saw it (likely planet, but maybe
> it was on a list).  Stick it in your crontab.  I will warn you that
> sometimes it chokes on its own output and obviously it can't build
> binpkgs for anything more than one step down the dependency tree.
> However, when my weekly chromium build runs at 2AM and I can just
> install it (with -k) the next morning it is a nice thing indeed.  You
> still get full control over USE flags/etc, but most of the convenience
> of a binary distro.
>
> #!/bin/sh
>
> LIST=$(mktemp);
>
> emerge -puD --changed-use --color=n --columns --quiet=y --with-bdeps=y
> world | awk '{print $2}' > ${LIST};
>
> for PACKAGE in $(cat ${LIST});
> do
>   printf "Building binary package for ${PACKAGE}... "
>   emerge -uN --quiet-build --quiet=y --buildpkgonly ${PACKAGE};
>   if [[ $? -eq 0 ]];
>   then
>     echo "ok";
>   else
>     echo "failed";
>   fi
> done
I think nowadays one would prefer --keep-going, which automatically resumes on
failure (and recomputes the dependency tree!), and prints a list of failed
packages when it's finished. However its output is more verbose than just "ok"
and "failed" (it'll print the build.log if it's only one package, IIRC).

--
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Neil Bothwick
In reply to this post by Rich Freeman
On Wed, 21 May 2014 23:11:02 -0400, Rich Freeman wrote:

> This one is a gem - I forget where I saw it (likely planet, but maybe
> it was on a list).  Stick it in your crontab.  I will warn you that
> sometimes it chokes on its own output and obviously it can't build
> binpkgs for anything more than one step down the dependency tree.
> However, when my weekly chromium build runs at 2AM and I can just
> install it (with -k) the next morning it is a nice thing indeed.  You
> still get full control over USE flags/etc, but most of the convenience
> of a binary distro.
>
> #!/bin/sh
>
> LIST=$(mktemp);
>
> emerge -puD --changed-use --color=n --columns --quiet=y --with-bdeps=y
> world | awk '{print $2}' > ${LIST};
One slight problem, it ignores slotted packages. I realise this is not a
big issue as you are simply trying to get the big packages built in
advance, If you drop the --columns and replace the awk call with

sed 's/.*\] \(\S*\).*/=\1/'

you will get properly versioned atoms.

Or you could try --keep-going as suggested by Marc - I've no idea whether
that will play nicely with --buildpkgonly.

Either way, it's an excellent idea and one for the GMN tips thread.


--
Neil Bothwick

Top Oxymorons Number 14: Temporary tax increase

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

J. Roeleveld
In reply to this post by Rich Freeman
On Wednesday, May 21, 2014 11:11:02 PM Rich Freeman wrote:

> On Wed, May 21, 2014 at 10:10 PM,  <[hidden email]> wrote:
> > I run a script that syncs portage, updates @world, depcleans,
> > revdep-rebuild and finally runs dispatch-conf -- about once weekly. Keeps
> > my system in fine trim. :)
>
> This one is a gem - I forget where I saw it (likely planet, but maybe
> it was on a list).  Stick it in your crontab.  I will warn you that
> sometimes it chokes on its own output and obviously it can't build
> binpkgs for anything more than one step down the dependency tree.
> However, when my weekly chromium build runs at 2AM and I can just
> install it (with -k) the next morning it is a nice thing indeed.  You
> still get full control over USE flags/etc, but most of the convenience
> of a binary distro.
>
> #!/bin/sh
>
> LIST=$(mktemp);
>
> emerge -puD --changed-use --color=n --columns --quiet=y --with-bdeps=y
> world | awk '{print $2}' > ${LIST};
>
> for PACKAGE in $(cat ${LIST});
> do
>   printf "Building binary package for ${PACKAGE}... "
>   emerge -uN --quiet-build --quiet=y --buildpkgonly ${PACKAGE};
>   if [[ $? -eq 0 ]];
>   then
>     echo "ok";
>   else
>     echo "failed";
>   fi
> done

Alternatively, set up a chroot to build the binpackages.
I do that for all my machines at home. That runs weekly.

--
Joost

Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Rich Freeman
In reply to this post by Marc Joliet
On Thu, May 22, 2014 at 3:54 AM, Marc Joliet <[hidden email]> wrote:
> I think nowadays one would prefer --keep-going, which automatically resumes on
> failure (and recomputes the dependency tree!), and prints a list of failed
> packages when it's finished. However its output is more verbose than just "ok"
> and "failed" (it'll print the build.log if it's only one package, IIRC).

Yup.  Upon reflection the whole script can be replaced by:
emerge -uvD --changed-use --color=n --with-bdeps=y --quiet-build
--buildpkgonly  --keep-going world | col -bx | mutt -s "world update"
[hidden email]

That will give you a decent report of what is new, build binary
packages, do it in parallel, and not recompute dependencies for every
package.

Rich

Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Rich Freeman
In reply to this post by Marc Joliet
On Thu, May 22, 2014 at 3:54 AM, Marc Joliet <[hidden email]> wrote:
> I think nowadays one would prefer --keep-going, which automatically resumes on
> failure (and recomputes the dependency tree!), and prints a list of failed
> packages when it's finished. However its output is more verbose than just "ok"
> and "failed" (it'll print the build.log if it's only one package, IIRC).

Hmm, after using this script for some time I found a problem with this
approach.  If you use --buildpkgonly and ---keep-going then emerge
won't build a single thing if anything in the list is missing a
build-time dependency.  The script I posted will try to emerge
everything individually so at least some of the packages will be
compiled.

That seems like a bug in --buildpkgonly.  If you use it with
--keep-going it should at least compile the packages that aren't
missing build-time options.  I'll file that as a bug if it isn't
already there...

Rich

Reply | Threaded
Open this post in threaded view
|

Re: Use Flags and Updating

Alan McKinnon-2
On 06/06/2014 12:44, Rich Freeman wrote:

> On Thu, May 22, 2014 at 3:54 AM, Marc Joliet <[hidden email]> wrote:
>> I think nowadays one would prefer --keep-going, which automatically resumes on
>> failure (and recomputes the dependency tree!), and prints a list of failed
>> packages when it's finished. However its output is more verbose than just "ok"
>> and "failed" (it'll print the build.log if it's only one package, IIRC).
>
> Hmm, after using this script for some time I found a problem with this
> approach.  If you use --buildpkgonly and ---keep-going then emerge
> won't build a single thing if anything in the list is missing a
> build-time dependency.  The script I posted will try to emerge
> everything individually so at least some of the packages will be
> compiled.
>
> That seems like a bug in --buildpkgonly.  If you use it with
> --keep-going it should at least compile the packages that aren't
> missing build-time options.  I'll file that as a bug if it isn't
> already there...



I don't think it's a bug, it's more like a difference in interpretation.
From the man page:


       --buildpkgonly (-B)
              Creates binary packages for all ebuilds processed  without
              actually merging the packages.  This comes with the caveat
              that all build-time dependencies must already  be  emerged
              on the system.
       --keep-going [ y | n ]
              Continue as much as possible after an error. When an error
              occurs,  dependencies are recalculated for remaining pack‐
              ages and any with unsatisfied dependencies  are  automati‐
              cally dropped. Also see the related --skipfirst option.


So, decisions about --buildpkgonly are made at the start of an emerge
and --keep-going kicks in only when an error occurs at the end, and the
former must have higher precedence than the latter.

It doesn't make sense to expect portage to change it's behaviour about
it's initial decisions just because you also have an entirely unrelated
option set that is only a convenience in the event of a build failure.
That seems to me too much of an unexpected side effect


--
Alan McKinnon
[hidden email]