Re: [gentoo-user] Use Flags and Updating
On Thu, May 22, 2014 at 3:54 AM, Marc Joliet mar...@gmx.de 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
Re: [gentoo-user] Use Flags and Updating
On 06/06/2014 12:44, Rich Freeman wrote: On Thu, May 22, 2014 at 3:54 AM, Marc Joliet mar...@gmx.de 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 alan.mckin...@gmail.com
Re: [gentoo-user] Use Flags and Updating
On Thu, May 22, 2014 at 3:54 AM, Marc Joliet mar...@gmx.de 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 y...@example.com 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
Re: [gentoo-user] Use Flags and Updating
Am Wed, 21 May 2014 23:11:02 -0400 schrieb Rich Freeman ri...@gentoo.org: On Wed, May 21, 2014 at 10:10 PM, ny6...@gmail.com 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 Description: PGP signature
Re: [gentoo-user] Use Flags and Updating
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 Description: PGP signature
Re: [gentoo-user] Use Flags and Updating
On Wednesday, May 21, 2014 11:11:02 PM Rich Freeman wrote: On Wed, May 21, 2014 at 10:10 PM, ny6...@gmail.com 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
Re: [gentoo-user] Use Flags and Updating
On 05/20/2014 10:13 PM, Matti Nykyri wrote: On May 20, 2014, at 14:49, Alexander Kapshuk alexander.kaps...@gmail.com mailto:alexander.kaps...@gmail.com wrote: On 05/20/2014 02:40 PM, Hunter Jozwiak wrote: *From:*Alexander Kapshuk [mailto:alexander.kaps...@gmail.com] *Sent:* Tuesday, May 20, 2014 7:44 AM *To:* gentoo-user@lists.gentoo.org *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 }
Re: [gentoo-user] Use Flags and Updating
On 05/20/2014 11:56 PM, yac wrote: On Tue, 20 May 2014 14:49:17 +0300 Alexander Kapshuk alexander.kaps...@gmail.com 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 Mate(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=2chap=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.
Re: [gentoo-user] Use Flags and Updating
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?
Re: [gentoo-user] Use Flags and Updating
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 alexander.kaps...@gmail.com mailto:alexander.kaps...@gmail.com wrote: On 05/20/2014 02:40 PM, Hunter Jozwiak wrote: *From:*Alexander Kapshuk [mailto:alexander.kaps...@gmail.com] *Sent:* Tuesday, May 20, 2014 7:44 AM *To:* gentoo-user@lists.gentoo.org *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 Description: Digital signature
Re: [gentoo-user] Use Flags and Updating
On Wed, May 21, 2014 at 10:10 PM, ny6...@gmail.com 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
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
RE: [gentoo-user] Use Flags and Updating
From: Alexander Kapshuk [mailto:alexander.kaps...@gmail.com] Sent: Tuesday, May 20, 2014 7:44 AM To: gentoo-user@lists.gentoo.org 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.
Re: [gentoo-user] Use Flags and Updating
On 05/20/2014 02:40 PM, Hunter Jozwiak wrote: *From:*Alexander Kapshuk [mailto:alexander.kaps...@gmail.com] *Sent:* Tuesday, May 20, 2014 7:44 AM *To:* gentoo-user@lists.gentoo.org *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]
Re: [gentoo-user] Use Flags and Updating
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
Re: [gentoo-user] Use Flags and Updating
On May 20, 2014, at 14:49, Alexander Kapshuk alexander.kaps...@gmail.com wrote: On 05/20/2014 02:40 PM, Hunter Jozwiak wrote: From: Alexander Kapshuk [mailto:alexander.kaps...@gmail.com] Sent: Tuesday, May 20, 2014 7:44 AM To: gentoo-user@lists.gentoo.org 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
Re: [gentoo-user] Use Flags and Updating
On Tue, 20 May 2014 14:49:17 +0300 Alexander Kapshuk alexander.kaps...@gmail.com 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 Description: PGP signature