# Update 0.1.4.0_beta10 [git] --toolchain, --perl

## steveL

You can now get ebuilds (including a git ebuild) at:

http://weaver.gentooexperimental.org/update-dl-install.html

Manual method: (honestly just use the git ebuild;) This will be updated soon, once we have feedback on current version.

wget http://weaver.gentooexperimental.org/src/update/update-20121210.tar.bz2

md5sum update-20121210.tar.bz2 

MD5: 9428c80ebeece7e47489d0786bbf8fb6

tar xjf update-20121210.tar.bz2

cd update-20121210

make install

If you prefer to keep a manual git clone (this will make a git directory 'update' in your current working directory):

```
git clone git://weaver.gentooexperimental.org/update.git update
```

Bug reports: http://weaver.gentooexperimental.org/trac/update/

-- or come and chat in #friendly-coders on chat.freenode.net

The script is effectively just a wrapper to emerge (apart from needing to use -i to install to world.) It always runs an emerge -pv first so you can see what is about to happen, and any USE or SLOT changes (this is of course recommended practice.)

Using it on its own as update (or by shortcut eg update -s to sync first) means it will emerge -uD --changed-use world (or @system @world if you're on portage-2.2), then check GLSAs, depclean and revdep-rebuild. It will then run the config-updater if needed (one of: etc-proposals cfg-update dispatch-conf or etc-update - you can set your own in /etc/update; they are searched in that order, but just putting in configUpdater=/path/blah will override.)

update -h is your friend ;) update --help explains a bit more, and the long-options like --python.

To install something, use update -ia pkg.

It works with --jobs/-j in config, or at command-line. For single or toolchain packages, or if you're not using --jobs, or for revdep-rebuilds, haskell and python updates, you'll see that it makes it much easier to read einfo and ewarns. (This is useful if you want more output than --jobs, nicely filtered.) It also deals with failed packages by leaving them til the end and retrying. Any packages in the list which would need a failed package are also deferred til the end, when another pass will be made over all failed pkgs. It stops when either all the packages have been successfully emerged, or when no packages could be emerged in the pass. 

This version has list and USE editing in conjunction with a dialog-based list editor. USE editing is only for single-file package.use and it complains if the pkg (or the slot being emerged) is listed twice. This covers my uses fine; we will add multi-file/multi-line soon, it's just not something I've needed. There is also special toolchain handling when you use -e. I've used this a couple of times already. It also does unmasking based on portage output, prompting you to confirm an unmask of required packages (which you can then unmask just for that version, or the slot/package name.)

We've been working on getting ABI upgrades automated, and it works fine. It picks up whenever a package needs a revdep-rebuild and also has a config file (/etc/warning) for more complicated cases like libpng. Since I have been advocating binhosts for a while, it seemed like a good time to make sure it worked ok. This script will deal nicely with binhosts across the web. (We needed this to test the ABI upgrades in chroot without constantly recompiling; it really is nice :D It's really odd to watch portage install packages as quickly as rpms on other systems.)

You just set PORTAGE_BINHOST and PKGDIR in make.conf (see man make.conf for info) Eg:

```
PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/amd64-stable/"

PKGDIR="/var/pkg"
```

is what I would use for amd64. http://tinderbox.dev.gentoo.org/default-linux/ is the officially-unsupported one with less packages, but more secure compilation options.

Then you run with -g or -G. You can also put binHost=1 or binOnly=1 in /etc/update to do this on every run. See the new help for more details (update -h --help and -h config are three separate options.

You can also specify additional binhosts in <dir>/binHosts -- default dir is /root/emerge. It will use the portage binhost first, then check the hosts listed in the binHosts file, one per line. Thus we can use the gentoo tinderbox by default, and fall back to the experimental one for desktop or missing packages. We removed the genpkgindex support, since many web binhosts don't generate the file; we may add this back later. update -h config

Critical packages are protected from removal, see criticalPkg in update -h config; pre and post etc actions are new (testing appreciated, as ever.) If you want to add custom error handling, see update -h error (blame drescherjm ;)

It's been in development since January 2007, and it's been tested to death ;)

We've also debugged it on a couple of clean installs over screen, as well as in a chroot. It really does make life easier.

HTH,

igli#friendly-coders@chat.freenode.net

----------

## hyakuhei

Its really interesting, giving it a spin now.

Looks like a typo on line 492.

Cheers

-Rob

----------

## steveL

 *hyakuhei wrote:*   

> Its really interesting, giving it a spin now.
> 
> Looks like a typo on line 492.

 Thanks for trying it.

Yeah it does dunnit?

```
done < <(grep '^\[.*[fF].*\]' "$emergeFile"|sed 's_\[[^/]*\] __g')
```

< input redirector <(..) process substitution as input to the while loop. Took me ages to get that out of #bash ;) It's the only way to avoid a subshell and still filter the output, afaik. It's used much more later in the script in installPkg.

edit: it's process subst, not cmd subst which is $(cmd) which is the new (approved ;) way to do `cmd` (nests better, yadda yadda..)

edit2: an example of nesting (thanks to twkm on #bash) is:

```
latestKernel=$(set -- $(urpmi --fuzzy kernel 2>&1 |grep -iE "^kernel-2.6"|awk -F '.' '{ print $4 }' | sort -n | awk -F 'mdv' '{ print $1 }'); echo ${!#})
```

edit3: It turns out this is most likely due to running script with 'sh update'; when run as sh BASH goes into POSIX mode aiui; it doesn't support all the bashisms that the script needs. So if you aren't sure about chmod u+x'ing it, run it with 'bash update'.Last edited by steveL on Tue Jul 03, 2007 2:57 pm; edited 1 time in total

----------

## steveL

This is output from a recent update (October 2011: upgrade of texlive from 2008 to 2011) to show unmasking behaviour, with a large set to unmask.

Note that I only have to confirm the unmask of one package, dev-texlive/texlive-latex, for it to also unmask all dependencies. Additionally since I used 'p' to always unmask the package or slot, not its version, there is nothing more to ask me.

```
Total: 296 packages (181 upgrades, 92 new, 4 in new slots, 19 reinstalls, 2 uninstalls), Size of downloads: 829,824 kB

Conflict: 14 blocks

The following keyword changes are necessary to proceed:

#required by dev-tex/latex-beamer-3.10-r1, required by app-text/texlive-2011, required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-latex-2011 ~amd64

#required by app-text/texlive-2011[publishers], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-publishers-2011 ~amd64

#required by app-text/texlive-2011[doc,linguas_en], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-documentation-english-2011 ~amd64

#required by dev-tex/dot2texi-3.0, required by app-text/texlive-2011[graphics], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-latexrecommended-2011 ~amd64

#required by app-text/texlive-2011[linguas_en,linguas_en_GB], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-langenglish-2011 ~amd64

#required by app-text/texlive-core-2011-r4, required by dev-texlive/texlive-formatsextra-2011, required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-tex/bibtexu-3.71_p20110705 ~amd64

#required by dev-texlive/texlive-formatsextra-2011, required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=app-text/texlive-core-2011-r4 ~amd64

#required by app-text/texlive-core-2011-r4, required by dev-texlive/texlive-formatsextra-2011, required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=app-text/dvipsk-5.991_p20110705 ~amd64

#required by dev-texlive/texlive-mathextra-2011, required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-fontsrecommended-2011 ~amd64

#required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-fontsextra-2011 ~amd64

#required by app-text/texlive-2011[xetex], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-xetex-2011 ~amd64

#required by dev-texlive/texlive-texinfo-2011, required by app-text/texlive-2011, required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-genericrecommended-2011 ~amd64

#required by app-text/texlive-2011[doc,linguas_fr], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-documentation-french-2011 ~amd64

#required by dev-texlive/texlive-latexextra-2011, required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-pictures-2011 ~amd64

#required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-genericextra-2011 ~amd64

#required by app-text/texlive-2011[linguas_de], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-langgerman-2011 ~amd64

#required by app-text/texlive-2011, required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-metapost-2011 ~amd64

#required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-plainextra-2011 ~amd64

#required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-mathextra-2011 ~amd64

#required by app-text/texlive-2011, required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-texinfo-2011 ~amd64

#required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-formatsextra-2011 ~amd64

#required by dev-texlive/texlive-science-2011, required by app-text/texlive-2011[science], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-pstricks-2011 ~amd64

#required by app-text/texlive-2011[science], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-science-2011 ~amd64

#required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-bibtexextra-2011 ~amd64

#required by app-text/texlive-core-2011-r4, required by dev-texlive/texlive-formatsextra-2011, required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=app-text/ps2pkm-1.5_p20110705 ~amd64

#required by app-text/texlive-2011[xml], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-htmlxml-2011 ~amd64

#required by app-text/texlive-2011, required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-fontutils-2011 ~amd64

#required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-latexextra-2011 ~amd64

#required by dev-texlive/texlive-documentation-english-2011, required by app-text/texlive-2011[doc,linguas_en], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-documentation-base-2011 ~amd64

#required by app-text/texlive-2011[-linguas_eu,linguas_fr], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-langfrench-2011 ~amd64

#required by app-text/texlive-2011[doc,linguas_de], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-documentation-german-2011 ~amd64

#required by app-text/texlive-2011[context], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-context-2011 ~amd64

#required by dev-tex/luatex-0.70.1, required by app-text/texlive-core-2011-r4, required by dev-texlive/texlive-formatsextra-2011, required by app-text/texlive-2011[extra], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-libs/kpathsea-6.0.1_p20110705 ~amd64

#required by dev-texlive/texlive-langgerman-2011, required by app-text/texlive-2011[linguas_de], required by app-doc/doxygen-1.7.3[latex], required by app-text/htmltidy-20090325-r1[doc], required by dev-lang/php-5.3.8[tidy], required by www-servers/lighttpd-1.4.29-r3[php], required by @selected, required by @world (argument)

>=dev-texlive/texlive-basic-2011 ~amd64

NOTE: This --autounmask behavior can be disabled by setting

      EMERGE_DEFAULT_OPTS="--autounmask=n" in make.conf.

@ Unmask only dev-texlive/texlive-latex ver 2011?

 N to unmask slot/pkg V to always unmask version, P to always unmask pkg/slot

(Y n v p) P

* Checking dev-texlive/texlive-latex

# Adding dev-texlive/texlive-latex to package.keywords

* Checking dev-texlive/texlive-publishers

# Adding dev-texlive/texlive-publishers to package.keywords

* Checking dev-texlive/texlive-documentation-english

# Adding dev-texlive/texlive-documentation-english to package.keywords

* Checking dev-texlive/texlive-latexrecommended

# Adding dev-texlive/texlive-latexrecommended to package.keywords

* Checking dev-texlive/texlive-langenglish

# Adding dev-texlive/texlive-langenglish to package.keywords

* Checking dev-tex/bibtexu

# Adding dev-tex/bibtexu to package.keywords

* Checking app-text/texlive-core

# Adding app-text/texlive-core to package.keywords

* Checking app-text/dvipsk

# Adding app-text/dvipsk to package.keywords

* Checking dev-texlive/texlive-fontsrecommended

# Adding dev-texlive/texlive-fontsrecommended to package.keywords

* Checking dev-texlive/texlive-fontsextra

# Adding dev-texlive/texlive-fontsextra to package.keywords

* Checking dev-texlive/texlive-xetex

# Adding dev-texlive/texlive-xetex to package.keywords

* Checking dev-texlive/texlive-genericrecommended

# Adding dev-texlive/texlive-genericrecommended to package.keywords

* Checking dev-texlive/texlive-documentation-french

# Adding dev-texlive/texlive-documentation-french to package.keywords

* Checking dev-texlive/texlive-pictures

# Adding dev-texlive/texlive-pictures to package.keywords

* Checking dev-texlive/texlive-genericextra

# Adding dev-texlive/texlive-genericextra to package.keywords

* Checking dev-texlive/texlive-langgerman

# Adding dev-texlive/texlive-langgerman to package.keywords

* Checking dev-texlive/texlive-metapost

# Adding dev-texlive/texlive-metapost to package.keywords

* Checking dev-texlive/texlive-plainextra

# Adding dev-texlive/texlive-plainextra to package.keywords

* Checking dev-texlive/texlive-mathextra

# Adding dev-texlive/texlive-mathextra to package.keywords

* Checking dev-texlive/texlive-texinfo

# Adding dev-texlive/texlive-texinfo to package.keywords

* Checking dev-texlive/texlive-formatsextra

# Adding dev-texlive/texlive-formatsextra to package.keywords

* Checking dev-texlive/texlive-pstricks

# Adding dev-texlive/texlive-pstricks to package.keywords

* Checking dev-texlive/texlive-science

# Adding dev-texlive/texlive-science to package.keywords

* Checking dev-texlive/texlive-bibtexextra

# Adding dev-texlive/texlive-bibtexextra to package.keywords

* Checking app-text/ps2pkm

# Adding app-text/ps2pkm to package.keywords

* Checking dev-texlive/texlive-htmlxml

# Adding dev-texlive/texlive-htmlxml to package.keywords

* Checking dev-texlive/texlive-fontutils

# Adding dev-texlive/texlive-fontutils to package.keywords

* Checking dev-texlive/texlive-latexextra

# Adding dev-texlive/texlive-latexextra to package.keywords

* Checking dev-texlive/texlive-documentation-base

# Adding dev-texlive/texlive-documentation-base to package.keywords

* Checking dev-texlive/texlive-langfrench

# Adding dev-texlive/texlive-langfrench to package.keywords

* Checking dev-texlive/texlive-documentation-german

# Adding dev-texlive/texlive-documentation-german to package.keywords

* Checking dev-texlive/texlive-context

# Adding dev-texlive/texlive-context to package.keywords

* Checking dev-libs/kpathsea

# Adding dev-libs/kpathsea to package.keywords

* Checking dev-texlive/texlive-basic

# Adding dev-texlive/texlive-basic to package.keywords

Not rebuilding dev-libs/libusb-1.0.8 USE="-debug -doc -static-libs%"

Not rebuilding sys-devel/libtool-2.4-r1 USE="-test% -vanilla"

Not rebuilding x11-apps/xmessage-1.0.3 USE="(-debug%)"

Not rebuilding sys-devel/llvm-2.8-r2 USE="(-alltargets%) -debug libffi -llvm-gcc -multitarget% -ocaml -test -udis86"

Not compiling www-client/firefox-7.0.1-r1

** Installing 291/296 packages

* Uninstall dev-texlive/texlive-latex3(2008) before dev-texlive/texlive-latexrecommended(2011)

* Uninstall dev-tex/translator(1.00) before dev-tex/latex-beamer(3.10-r1)

@ About to cancel? Y to proceed, E to edit list(N y e) Y
```

Now, that's what I call handy.  :Wink: Last edited by steveL on Tue Jul 16, 2013 12:16 am; edited 3 times in total

----------

## steveL

This shows what happens when you just run update on its own:

```
update

Emerging -uDN world then running revdep-rebuild.

You will be asked for confirmation; CTRL-C to abort at any time.

Resolving...

These are the packages that would be merged, in order:

Calculating world dependencies... done!

[ebuild  N    ] app-text/iso-codes-0.58  4,322 kB

[ebuild   R   ] media-sound/jack-audio-connection-kit-0.101.1-r1  USE="alsa jack-tmpfs* mmx netjack portaudio sndfile sse (-altivec) -caps (-coreaudio) -cpudetection -debug -doc -oss" 0 kB

[ebuild   R   ] gnome-extra/libgsf-1.14.2  USE="bzip2 python -debug -doc -gnome (-static%)" 0 kB

[ebuild  N    ] x11-libs/libwnck-2.16.2  USE="-debug -doc" 457 kB

[ebuild   R   ] gnome-base/libgnomecanvas-2.14.0  USE="X -debug -doc (-static%)" 0 kB

[ebuild  N    ] x11-libs/libsexy-0.1.10  USE="-debug -doc" 379 kB

[ebuild  N    ] x11-misc/notification-daemon-0.3.6-r1  USE="-debug" 393 kB

[ebuild  N    ] x11-libs/libnotify-0.4.3  USE="-doc" 381 kB

[ebuild   R   ] gnome-extra/zenity-2.16.2  USE="libnotify* -debug" 0 kB

[ebuild     U ] app-office/openoffice-2.1.0-r1 [2.1.0] USE="branding cairo cups dbus eds gstreamer gtk java kde ldap odk pam sound webdav -binfilter -debug -firefox -gnome -seamonkey" LINGUAS="en_GB -af -ar -as_IN -be_BY -bg -bn -bs -ca -cs -cy -da -de -el -en -en_US -en_ZA -es -et -fa -fi -fr -gu_IN -he -hi_IN -hr -hu -it -ja -km -ko -lt -lv -mk -nb -nl -nn -nr -ns -or_IN -pa_IN -pl -pt -pt_BR -ru -rw -sh_YU -sk -sl -sr_CS -st -sv -sw_TZ -ta_IN -te_IN -tg -th -ti_ER -tn -tr -ts -ur_IN -ve -vi -xh -zh_CN -zh_TW -zu" 4,157 kB

Total: 10 packages (1 upgrade, 5 new, 4 reinstalls), Size of downloads: 10,087 kB

Not compiling app-office/openoffice.

About to cancel (y to proceed)?

** Installing app-text/iso-codes-0.58 - 1 of 9.

Downloading iso-codes-0.58.tar.bz2

(586.70 KB/s) - `/usr/portage/distfiles/iso-codes-0.58.tar.bz2' saved [4425093/4425093]

* Automake used for the package (1.9.6) differs from

* the installed version (1.10).

>>> Emerging (1 of 1) app-text/iso-codes-0.58 to /

** app-text/iso-codes-0.58 installed successfully.

Packages installed so far: 1 of 1.      8 remaining.

** Rebuilding media-sound/jack-audio-connection-kit-0.101.1-r1 - 2 of 9.

* including support for experimental netjack, see http://netjack.sourceforge.net/

Patching:..done

>>> Emerging (1 of 1) media-sound/jack-audio-connection-kit-0.101.1-r1 to /

** media-sound/jack-audio-connection-kit-0.101.1-r1 installed successfully.

Packages installed so far: 2 of 2.      7 remaining.

** Rebuilding gnome-extra/libgsf-1.14.2 - 3 of 9.

Patching:done

* Installing GNOME 2 GConf schemas

>>> Emerging (1 of 1) gnome-extra/libgsf-1.14.2 to /

** gnome-extra/libgsf-1.14.2 installed successfully.

Packages installed so far: 3 of 3.      6 remaining.

** Installing x11-libs/libwnck-2.16.2 - 4 of 9.

Downloading libwnck-2.16.2.tar.bz2

(508.91 KB/s) - `/usr/portage/distfiles/libwnck-2.16.2.tar.bz2' saved [467230/467230]

Patching:done

* Installing GNOME 2 GConf schemas

>>> Emerging (1 of 1) x11-libs/libwnck-2.16.2 to /

** x11-libs/libwnck-2.16.2 installed successfully.

Packages installed so far: 4 of 4.      5 remaining.

** Rebuilding gnome-base/libgnomecanvas-2.14.0 - 5 of 9.

Patching:done

* Installing GNOME 2 GConf schemas

>>> Emerging (1 of 1) gnome-base/libgnomecanvas-2.14.0 to /

** gnome-base/libgnomecanvas-2.14.0 installed successfully.

Packages installed so far: 5 of 5.      4 remaining.

** Installing x11-libs/libsexy-0.1.10 - 6 of 9.

Downloading libsexy-0.1.10.tar.gz

(489.24 KB/s) - `/usr/portage/distfiles/libsexy-0.1.10.tar.gz' saved [387337/387337]

Patching:done

* Installing GNOME 2 GConf schemas

>>> Emerging (1 of 1) x11-libs/libsexy-0.1.10 to /

** x11-libs/libsexy-0.1.10 installed successfully.

Packages installed so far: 6 of 6.      3 remaining.

** Installing x11-misc/notification-daemon-0.3.6-r1 - 7 of 9.

Downloading notification-daemon-0.3.6.tar.gz

(513.67 KB/s) - `/usr/portage/distfiles/notification-daemon-0.3.6.tar.gz' saved [402426/402426]

Patching:.done

* Installing GNOME 2 GConf schemas

>>> Emerging (1 of 1) x11-misc/notification-daemon-0.3.6-r1 to /

** x11-misc/notification-daemon-0.3.6-r1 installed successfully.

Packages installed so far: 7 of 7.      2 remaining.

** Installing x11-libs/libnotify-0.4.3 - 8 of 9.

Downloading libnotify-0.4.3.tar.gz

(486.48 KB/s) - `/usr/portage/distfiles/libnotify-0.4.3.tar.gz' saved [389402/389402]

>>> Emerging (1 of 1) x11-libs/libnotify-0.4.3 to /

** x11-libs/libnotify-0.4.3 installed successfully.

Packages installed so far: 8 of 8.      1 remaining.

** Rebuilding gnome-extra/zenity-2.16.2 - 9 of 9.

Patching:.done

* Installing GNOME 2 GConf schemas

>>> Emerging (1 of 1) gnome-extra/zenity-2.16.2 to /

** gnome-extra/zenity-2.16.2 installed successfully.

** All packages compiled successfully

Configuring search environment for revdep-rebuild

Checking reverse dependencies...

Packages containing binaries and libraries broken by a package update

will be emerged.

Collecting system binaries and libraries... done.

  (/root/.revdep-rebuild.1_files)

Collecting complete LD_LIBRARY_PATH... done.

  (/root/.revdep-rebuild.2_ldpath)

Checking dynamic linking consistency...

 done.

  (/root/.revdep-rebuild.3_rebuild)

Assigning files to ebuilds... Nothing to rebuild

Evaluating package order... done.

  (/root/.revdep-rebuild.5_order)

Dynamic linking on your system is consistent... All done.

Skipped update to: app-office/openoffice

```

NB: There may be an issue with using this to install (update -i) in that we've had a report of it installing deps to world as well; so just use it for updating at the moment.

----------

## steveL

Minor update to fix bug above.

----------

## steveL

 *steveL@portage m-l wrote:*   

> The changes so far planned are to give full dependency information without two pretend emerges, switch to Bash 3.2
> 
> regexes, better CTRL-C handling, and some more sensible handling of blockers:
> 
> <dev>: I think it'd be great to have an optional feature to not unmerge until the new package is built when dealing with blockers.
> ...

 

So we're thinking to add that stuff; any other things you think should be added, please post in this topic, as we're going to start work on the next version soon.

----------

## steveL

Man that took a while ;)

Now it's working with 3.2 we can start to move ahead with the fun stuff ;D

----------

## steveL

Minor bugfix as it wasn't handling no-rebuild packages (showed up as php insisted on rebuild due to apache use flag being obsolesced, and i had only built it the day before..) Thanks to jakub and kloeri for bugfixing python  :Smile: 

----------

## desultory

Moved from Documentation, Tips & Tricks to Unsupported Software.

Edit: And back.Last edited by desultory on Mon Jun 18, 2007 2:17 am; edited 1 time in total

----------

## steveL

Er sorry about that, posted it in same forum as Guenther's script (which probably got moved too after I had it bookmarked.)

----------

## deefster

Great script, although it fails on packages with fetch restriction.

ex.

```

dev-java/java-sdk-docs-1.5.0-r1

```

----------

## steveL

 *deefster wrote:*   

> Great script, although it fails on packages with fetch restriction.

 

Bleh, sorry about that; did you try with -f ? I'll have a look at it tomorrow (after some shuteye :) Sorry for inconvenience.

----------

## steveL

OK fixed, it was using the old file format there. This is what happens with fetch-restriction btw (using this is an example):

```
# update -ia java-sdk-docs

Resolving...

These are the packages that would be merged, in order:

Calculating dependencies  ..... ..... ..... ... done!

[ebuild  N F  ] dev-java/java-sdk-docs-1.5.0-r1  45,109 kB

Total: 1 package (1 new), Size of downloads: 45,109 kB

Fetch Restriction: 1 package (1 unsatisfied)

Installing to world

Targets: java-sdk-docs.

** update: You have fetch restricted packages which need to be downloaded.

* Please download jdk-1_5_0-doc.zip from

* http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk-1.5.0-doc-oth-JPR&SiteId=JSC&TransactionId=noreg

* and place it in /usr/portage/distfiles named as

* jdk-1_5_0-doc-r1.zip. Notice the r1. Because Sun changes the doc zip file

* without changing the filename, we have to resort to renaming to keep

* the md5sum verification working existing and new downloads.

*

* If emerge fails because of a md5sum error it is possible that Sun

* has again changed the upstream release, try downloading the file

* again or a newer revision if available. Otherwise report this to

* http://bugs.gentoo.org/67266 and we will make a new revision.

```

And after downloading the file (using -r to resume; note you could add -v or -q to r):

```
~ # update -r

resume: This will attempt to emerge all packages listed in /root/emerge/emergeList.

Installing to world

Targets: java-sdk-docs.

[ebuild  N F  ] dev-java/java-sdk-docs-1.5.0-r1  45,109 kB

There were fetch-restricted packages..

About to proceed (N to cancel)?

** Installing dev-java/java-sdk-docs-1.5.0-r1 - 1 of 1.

Installing dev-java/java-sdk-docs-1.5.0-r1 to world.

Completed compile

>>> Recording dev-java/java-sdk-docs in "world" favorites file...

** dev-java/java-sdk-docs-1.5.0-r1 installed successfully.

** All packages compiled successfully

```

HTH.

----------

## tanderson

Hey, I am trying to get this working so I downloaded the code.

However, I am getting a syntax error:

```
./emerge.sh: line 730: unexpected argument `(' to conditional binary operator

./emerge.sh: line 730: syntax error near `(['

./emerge.sh: line 730: `                                elif [[ $l =~ ([0-9]*%) ]]; then echo -en "\r${BASH_REMATCH[1]}"'

```

Any idea what is up with that?

----------

## steveL

```
./emerge.sh: line 730: unexpected argument `(' to conditional binary operator

./emerge.sh: line 730: syntax error near `(['

./emerge.sh: line 730: `                                elif [[ $l =~ ([0-9]*%) ]]; then echo -en "\r${BASH_REMATCH[1]}"'

```

Man sorry about that; it's working fine on my stable install, but looks like the kind of thing you might get on Bash 3.1. (Regex changes were the major problem for getting the thing working in 3.2.) I've posted an updated version that should work okay on 3.1 as well (i had to add yet another regex variable at line 560.. I really don't like what they did to regexes in 3.2 </rant>)

If you still get errors please post them (as I'm curious anyhow) and try updating to 3.2 with emerge.

----------

## tanderson

No, I am running bash-3.2.

I don't know though, maybe I was running 3.1 when I had that error. However, I now have this problem:

Anyway, it is working great now. Thanks!

----------

## steveL

Er just to let you know there may be a minor bug with toolchain handling; I'll get it fixed tonight. I'm having a weird error with samba, passing LDFLAGS incorrectly, but it's a good example of the error handling:

```
 ~ # update

Emerging -uDN world then running revdep-rebuild.

You will be asked for confirmation; CTRL-C to abort at any time.

Resolving...

These are the packages that would be merged, in order:

Calculating world dependencies  ..... ..... ..... ....... done!

[ebuild     U ] media-libs/freetype-2.3.4-r2 [2.3.3] USE="X zlib -bindist -debug -doc" 1,445 kB

[ebuild   R   ] dev-lang/php-5.2.2-r1  USE="apache2 berkdb bzip2 calendar cdb cli crypt curl curlwrappers doc flatfile ftp gd gdbm iconv imap java-external kerberos ldap libedit mhash mssql mysql mysqli ncurses odbc pcre posix postgres reflection session sharedext simplexml soap sockets spell spl sqlite ssl sysvipc threads tidy tokenizer truetype unicode wddx xml xmlreader xmlrpc xmlwriter xpm xsl zip zlib -adabas -bcmath -birdstep -cgi -cjk -concurrentmodphp -ctype -db2 -dbase -dbmaker -debug -discard-path -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filter -firebird -force-cgi-redirect -frontbase -gd-external -gmp -hash -inifile -interbase -iodbc -ipv6 -json -ldap-sasl -mcve -msql -nls -oci8 -oci8-instant-client -pcntl -pdo -pdo-external -pic -qdbm -readline -recode -sapdb -sharedmem -snmp -solid -suhosin -sybase -sybase-ct -yaz -zip-external (-apache%)" 0 kB

[ebuild     U ] net-fs/samba-3.0.24-r2 [3.0.24] USE="cups fam kerberos ldap pam python readline syslog -acl -async -automount -caps -doc -examples -oav -quotas (-selinux) -swat -winbind" LINGUAS="-ja -pl" 0 kB

[ebuild     U ] dev-util/git-1.5.2 [1.5.1.5] USE="curl doc gtk perl tk webdav -bash-completion -emacs -mozsha1 (-ppcsha1)" 1,777 kB

[ebuild     U ] app-office/openoffice-2.2.0 [2.1.0] USE="branding cairo cups dbus eds gstreamer gtk java kde ldap mono%* odk pam sound webdav -binfilter -debug -firefox -gnome -seamonkey" LINGUAS="en_GB -af -ar -as_IN -be_BY -bg -bn -br% -bs -ca -cs -cy -da -de -dz% -el -en -en_US -en_ZA -eo% -es -et -fa -fi -fr -ga% -gl% -gu_IN -he -hi_IN -hr -hu -it -ja -km -ko -ku% -lt -lv -mk -ml_IN% -mr_IN% -nb -ne% -nl -nn -nr -ns -or_IN -pa_IN -pl -pt -pt_BR -ru -rw -sh_YU -sk -sl -sr_CS -ss% -st -sv -sw_TZ -ta_IN -te_IN -tg -th -ti_ER -tn -tr -ts -uk% -ur_IN -ve -vi -xh -zh_CN -zh_TW -zu" 228,380 kB

Total: 5 packages (4 upgrades, 1 reinstall), Size of downloads: 231,601 kB

Not rebuilding (1) dev-lang/php

Not compiling app-office/openoffice.

Removing /root/emerge/failList

About to cancel (Y to proceed)?

** Upgrading to media-libs/freetype-2.3.4-r2 from 2.3.3 - 1 of 3.

Downloading freetype-2.3.4.tar.bz2

(2.60 KB/s) - `/usr/portage/distfiles/freetype-2.3.4.tar.bz2' saved [1277929/1277929]

Downloading ft2demos-2.3.4.tar.gz

(2.07 KB/s) - `/usr/portage/distfiles/ft2demos-2.3.4.tar.gz' saved [201627/201627]

Patching:.....done

* Elibtoolize: unix

Patching:..done

* module: truetype  (Windows/Mac font files with extension *.ttf or *.ttc)

* module: type1     (Postscript font files with extension *.pfa or *.pfb)

* module: cff       (OpenType fonts with extension *.otf)

* module: cid       (Postscript CID-keyed fonts, no known extension)

* module: pfr       (PFR/TrueDoc font files with extension *.pfr)

* module: type42    (Type 42 font files with no known extension)

* module: winfnt    (Windows bitmap fonts with extension *.fnt or *.fon)

* module: pcf       (pcf bitmap fonts)

* module: bdf       (bdf bitmap fonts)

* module: sfnt      (helper module for TrueType & OpenType formats)

* module: autofit   (automatic hinting module)

* module: pshinter  (Postscript hinter module)

* module: raster    (monochrome bitmap renderer)

* module: smooth    (anti-aliased bitmap renderer)

* module: smooth    (anti-aliased bitmap renderer for LCDs)

* module: smooth    (anti-aliased bitmap renderer for vertical LCDs)

* module: gxvalid   (TrueTypeGX/AAT validation module)

* module: otvalid   (OpenType validation module)

* module: psaux     (Postscript Type 1 & Type 2 helper module)

* module: psnames   (Postscript & Unicode Glyph name handling)

Completed compile

Uninstalling media-libs/freetype-2.3.3

** media-libs/freetype-2.3.4-r2 installed successfully.

** Upgrading to net-fs/samba-3.0.24-r2 from 3.0.24 - 2 of 3.

Patching:................done

!!! ERROR: net-fs/samba-3.0.24-r2 failed.

!!! SAMBA make everything error

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/log/portage/net-fs:samba-3.0.24-r2:20070521-201408.log'.

Completed compile

** net-fs/samba-3.0.24-r2 failed to install.

** Upgrading to dev-util/git-1.5.2 from 1.5.1.5 - 3 of 3.

Checking dependencies..done

Downloading git-1.5.2.tar.bz2

(2.26 KB/s) - `/usr/portage/distfiles/git-1.5.2.tar.bz2' saved [1180424/1180424]

Downloading git-manpages-1.5.2.tar.bz2

(3.70 KB/s) - `/usr/portage/distfiles/git-manpages-1.5.2.tar.bz2' saved [138905/138905]

Downloading git-htmldocs-1.5.2.tar.bz2

(2.11 KB/s) - `/usr/portage/distfiles/git-htmldocs-1.5.2.tar.bz2' saved [499796/499796]

Patching:...done

* new build flags or prefix

* new Tcl/Tk interpreter location

* new locations or Tcl/Tk interpreter

* These additional scripts need some dependencies:

*   git-archimport   : dev-util/tla

*   git-cvsimport    : >=dev-util/cvsps-2.1

*   git-svnimport    : dev-util/subversion(USE=perl)

*   git-svn          : dev-util/subversion(USE=perl) dev-perl/libwww-perl

*   git-quiltimport  : dev-util/quilt

*   git-cvsserver    : dev-perl/DBI dev-perl/DBD-SQLite

*   git-instaweb     : || ( www-servers/lighttpd net-www/apache(SLOT=2) )

*   git-send-email   : USE=perl

*   git-remote       : USE=perl

Completed compile

Uninstalling dev-util/git-1.5.1.5

** dev-util/git-1.5.2 installed successfully.

net-fs/samba-3.0.24-r2: tail -n30 /var/log/portage/net-fs:samba-3.0.24-r2:20070521-201408.log

Retrying 1 package:

        net-fs/samba-3.0.24-r2

.

** Upgrading to net-fs/samba-3.0.24-r2 from 3.0.24 - 1 of 1.

Patching:................done

!!! ERROR: net-fs/samba-3.0.24-r2 failed.

!!! SAMBA make everything error

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/log/portage/net-fs:samba-3.0.24-r2:20070521-204355.log'.

Completed compile

** net-fs/samba-3.0.24-r2 failed to install.

No packages compiled successfully on this run, aborting..

Run revdep-rebuild?

About to cancel (Y to proceed)?

Configuring search environment for revdep-rebuild

Checking reverse dependencies...

Packages containing binaries and libraries broken by a package update

will be emerged.

Collecting system binaries and libraries... done.

  (/root/.revdep-rebuild.1_files)

Collecting complete LD_LIBRARY_PATH... done.

  (/root/.revdep-rebuild.2_ldpath)

Checking dynamic linking consistency...

  broken /usr/lib/gpac/gm_ffmpeg_in.so (requires  libavformat.so.50)

 done.

  (/root/.revdep-rebuild.3_rebuild)

Assigning files to packages...

  /usr/lib/gpac/gm_ffmpeg_in.so -> media-video/gpac

 done.

  (/root/.revdep-rebuild.4_packages_raw, /root/.revdep-rebuild.4_package_owners)

Cleaning list of packages to rebuild... done.

  (/root/.revdep-rebuild.4_packages)

Assigning packages to ebuilds... done.

  (/root/.revdep-rebuild.4_ebuilds)

Evaluating package order... done.

  (/root/.revdep-rebuild.5_order)

Dynamic linking on your system is consistent... All done.

Please check /root/emerge/failList and /root/emerge/failReasons.

Compiling modules/getdate.c with -fPIC

Compiling modules/vfs_cap.c with -fPIC

Compiling modules/vfs_expand_msdfs.c with -fPIC

Compiling modules/vfs_shadow_copy.c with -fPIC

Compiling modules/CP850.c with -fPIC

Compiling modules/CP437.c with -fPIC

Compiling auth/auth_script.c with -fPIC

Compiling pam_smbpass/pam_smb_auth.c with -fPIC

Compiling pam_smbpass/pam_smb_passwd.c with -fPIC

Compiling pam_smbpass/pam_smb_acct.c with -fPIC

Compiling pam_smbpass/support.c with -fPIC

PYTHON_OBJS="dynconfig.po param/loadparm.po param/params.po lib/sharesec.po lib/version.po lib/charcnv.po lib/debug.po lib/fault.po lib/getsmbpass.po lib/interface.po lib/md4.po lib/interfaces.po lib/pidfile.po lib/replace.po lib/replace1.po lib/repdir.po lib/timegm.po lib/signal.po lib/system.po lib/sendfile.po lib/time.po lib/ufc.po lib/genrand.po lib/username.po lib/util_pw.po lib/access.po lib/smbrun.po lib/bitmap.po lib/crc32.po lib/snprintf.po lib/dprintf.po lib/xfile.po lib/wins_srv.po lib/util_str.po lib/clobber.po lib/util_sid.po lib/util_uuid.po lib/util_unistr.po lib/util_file.po lib/data_blob.po lib/util.po lib/util_sock.po lib/sock_exec.po lib/util_sec.po lib/talloc.po lib/substitute.po lib/fsusage.po lib/ms_fnmatch.po lib/select.po lib/messages.po lib/tallocmsg.po lib/dmallocmsg.po libsmb/smb_signing.po lib/md5.po lib/hmacmd5.po lib/arc4.po lib/iconv.po nsswitch/wb_client.po nsswitch/wb_common.po lib/pam_errors.po intl/lang_tdb.po lib/adt_tree.po lib/gencache.po tdb/tdb.po tdb/spinlock.po tdb/tdbutil.po tdb/tdbback.po lib/module.po lib/events.po lib/ldap_escape.po lib/secdesc.po lib/util_seaccess.po lib/secace.po lib/secacl.po lib/socket_wrapper.po libads/krb5_errs.po lib/system_smbd.po lib/audit.po lib/dummysmbd.po lib/dummyroot.po libsmb/clientgen.po libsmb/cliconnect.po libsmb/clifile.po libsmb/clikrb5.po libsmb/clispnego.po libsmb/asn1.po libsmb/clirap.po libsmb/clierror.po libsmb/climessage.po libsmb/clireadwrite.po libsmb/clilist.po libsmb/cliprint.po libsmb/clitrans.po libsmb/clisecdesc.po libsmb/clidgram.po libsmb/clistr.po libsmb/cliquota.po libsmb/clifsinfo.po libsmb/clidfs.po libsmb/smberr.po libsmb/credentials.po libsmb/pwd_cache.po libsmb/clioplock.po libsmb/errormap.po libsmb/clirap2.po libsmb/doserr.po rpc_parse/parse_prs.po rpc_parse/parse_misc.po rpc_parse/parse_sec.po libsmb/nterr.po libsmb/dcerpc_err.po libsmb/smbdes.po libsmb/smbencrypt.po libsmb/ntlm_check.po libsmb/ntlmssp.po libsmb/ntlmssp_parse.po libsmb/ntlmssp_sign.po libsmb/unexpected.po libsmb/namecache.po libsmb/nmblib.po libsmb/namequery.po libsmb/conncache.po libads/dns.po rpc_parse/parse_lsa.po rpc_parse/parse_net.po rpc_parse/parse_reg.po rpc_parse/parse_rpc.po rpc_parse/parse_samr.po rpc_parse/parse_srv.po rpc_parse/parse_wks.po rpc_parse/parse_ds.po rpc_parse/parse_spoolss.po rpc_parse/parse_dfs.po rpc_parse/parse_echo.po rpc_parse/parse_shutdown.po rpc_parse/parse_svcctl.po rpc_parse/parse_eventlog.po rpc_parse/parse_buffer.po rpc_parse/parse_ntsvcs.po registry/reg_objects.po rpc_client/cli_lsarpc.po rpc_client/cli_samr.po rpc_client/cli_netlogon.po rpc_client/cli_srvsvc.po rpc_client/cli_wkssvc.po rpc_client/cli_dfs.po rpc_client/cli_reg.po rpc_client/cli_pipe.po rpc_client/cli_spoolss.po rpc_client/cli_spoolss_notify.po rpc_client/cli_ds.po rpc_client/cli_echo.po rpc_client/cli_shutdown.po rpc_client/cli_svcctl.po passdb/pdb_get_set.po passdb/passdb.po passdb/pdb_interface.po passdb/util_wellknown.po passdb/util_builtin.po passdb/pdb_compat.po passdb/util_unixsids.po passdb/lookup_sid.po passdb/login_cache.po passdb/pdb_ldap.po passdb/pdb_nds.po passdb/pdb_smbpasswd.po passdb/pdb_tdb.po lib/account_pol.po lib/privileges.po lib/util_nscd.po groupdb/mapping.po passdb/secrets.po passdb/machine_sid.po libads/kerberos.po libads/ads_status.po lib/smbldap.po lib/smbldap_util.po" \

        PYTHON_CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer -falign-jumps=4 -falign-labels=4 -falign-loops=4 -D_SAMBA_BUILD_ -DHAVE_CONFIG_H  -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLDAP_DEPRECATED  -O2 -march=athlon-xp -pipe -fomit-frame-pointer -falign-jumps=4 -falign-labels=4 -falign-loops=4 -D_SAMBA_BUILD_  -I/var/tmp/portage/net-fs/samba-3.0.24-r2/work/samba-3.0.24/source/iniparser/src -Iinclude -I/var/tmp/portage/net-fs/samba-3.0.24-r2/work/samba-3.0.24/source/include -I/var/tmp/portage/net-fs/samba-3.0.24-r2/work/samba-3.0.24/source/tdb  -I. -DHAVE_CONFIG_H  -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLDAP_DEPRECATED -I/var/tmp/portage/net-fs/samba-3.0.24-r2/work/samba-3.0.24/source -D_SAMBA_BUILD_    " \

        LIBS="-Wl,-rpath -Wl,/usr/lib -O1 -Wl,-O1 -lcrypt -lresolv -lresolv -lnsl -ldl -lldap -llber   -L/usr/lib -Wl,-rpath -Wl,/usr/lib -O1  -L/usr/lib -Wl,-rpath -Wl,/usr/lib -O1 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -ldl -lldap -llber " \

                python python/setup.py build

Unknown entry '-O1' in $LIBS variable passed to setup.py

make: *** [python_ext] Error 1

make: *** Waiting for unfinished jobs....

!!! ERROR: net-fs/samba-3.0.24-r2 failed.

Call stack:

  ebuild.sh, line 1615:   Called dyn_compile

  ebuild.sh, line 972:   Called qa_call 'src_compile'

  ebuild.sh, line 44:   Called src_compile

  samba-3.0.24-r2.ebuild, line 128:   Called die

!!! SAMBA make everything error

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/log/portage/net-fs:samba-3.0.24-r2:20070521-204355.log'.

Skipped app-office/openoffice

```

You'll see it carried on with the other packages, in this case dev-util/git, checking that samba wasn't a dependency that git needed first. Then at the end, it retried samba which failed again. Since no packages were installed on that run, it stopped, and asked if I wanted to run the revdep (since there had been an error.) It did that, then printed out the last part of the error log for samba. If multiple packages had failed, it would have given me a list of tail commands to run to see the same output for each package, based on its logfile. (If you have PORT_LOGDIR="/path" in make.conf;  I have it set at /var/log/portage which is standard.)

That's plenty for me to report a bug with (as well as my emerge --info of course :)

----------

## swimmer

Very nice script indeed  :Smile: 

Is there a possibility to support cfg-update as well since this is my favorite config-updater?

I tried already to put "/usr/bin/cfg-update -u" in line 48 but it was not well received  :Wink: 

Greetz

swimmer

----------

## swimmer

Since I'm not really a bash guru I did not dare to fix it myself initially but hey I'll give it a try anyway  :Wink: 

Here's my patch created with "diff -n":

```
d904 1                                                                                                                                                                             

a904 5                                                                                                                                                                             

            if [[ $configUpdater == '/usr/bin/cfg-update' ]]; then                                                                                                                 

                $configUpdater -u                                                                                                                                                  

            else                                                                                                                                                                   

                $configUpdater                                                                                                                                                     

            fi                    
```

Could you check whether it's ok and perhaps implement it?

Thanks for the good work

swimmer

----------

## steveL

 *swimmer wrote:*   

> Since I'm not really a bash guru I did not dare to fix it myself initially but hey I'll give it a try anyway ;-)

 

Cool! It's always good to dive in :)

 *Quote:*   

> Here's my patch created with "diff -n":
> 
> ```
> d904 1                                                                                                                                                                             
> 
> ...

 

Done; it's on line 919 in the new version (and you'll see on l 957 that i changed it to use a path lookup rather than the /usr/sbin directory.) I added a regex so you don't see the message on every ebuild (unless you use -v of course.) There's a coupla bugfixes too.

 *Quote:*   

> Thanks for the good work

 

Thanks for the feedback; cfg-update looks nice too, never tried it before :D

----------

## steveL

Just a minor tweak, as portage was being downgraded due to a bug that doesn't affect me USE="-*" destroys USE_EXPAND variables and according to the ChangeLog, 2.2.8 fixed some other bugs. So I added an environment variable check for $SKIP, which can be used to specify additional packages to skip on a temporary basis.

You can either use:

```
SKIP=sys-apps/portage update

update -r
```

Or, if you notice a package and want to skip it with resume you can do so eg:

```
update

export SKIP=sys-apps/portage

update -r
```

assuming that you cancelled the first update on seeing the downgrade message. Note that if SKIP is set at the time of resolving eg SKIP='foo/blah baz/bar' update then any resume will not need the variable set. You can also set it as above, after the initial resolve, but it will then need to be set for every resume (hence the export).

Please note that SKIP is only for temporary fixes and is not recommended as a general solution; the nc (no compile) and nr (no rebuild) arrays at the top of the script are for more permanent changes.

There was also a minor fix to the cfgUpdate regex to catch both types of message.

----------

## steveL

Hi,

  Bugfix to sort out blocker handling; we haven't had a block in ages so we didn't realise it wasn't working  :Embarassed:  Anyhow fixed now, and sorted out SKIP so you can actually skip more than one package eg with SKIP='cat-foo/bar cat-baz/qux' update.

  Good time to show how blockers are handled (basically it's up to you whether to continue, skipping the blocked package.) Hopefully for the next release we'll have the blockers sorted out automatically.

```
# update

Emerging -uDN world then running revdep-rebuild.

You will be asked for confirmation; CTRL-C to abort at any time.

Resolving...

These are the packages that would be merged, in order:

Calculating world dependencies  ..... ..... ..... ........ done!

[ebuild     U ] app-arch/cpio-2.7-r2 [2.7-r1] USE="-nls" 0 kB

[ebuild     U ] app-arch/gzip-1.3.12 [1.3.11] USE="-nls -pic -static" 452 kB

[ebuild     U ] sys-apps/hdparm-7.3 [6.9-r1] 60 kB

[ebuild     U ] dev-db/sqlite-3.3.17 [3.3.12] USE="tcl -debug -doc -nothreadsafe -soundex%" 2,062 kB

[ebuild     U ] media-libs/libexif-0.6.16 [0.6.15] USE="-doc -nls" 676 kB

[ebuild     U ] sys-apps/ed-0.5 [0.4] 53 kB

[ebuild     U ] sys-apps/man-pages-2.53 [2.44] USE="-nls" 1,756 kB

[ebuild     U ] sys-apps/diffutils-2.8.7-r2 [2.8.7-r1] USE="-nls -static" 0 kB

[ebuild     U ] sys-apps/coreutils-6.9-r1 [6.7-r1] USE="-acl -nls (-selinux) -static -xattr" 5,307 kB

[ebuild  N    ] dev-haskell/quickcheck-1.0-r1  USE="-doc -profile" 1,969 kB

[ebuild     U ] dev-haskell/html-1.0-r1 [1.0] USE="-doc% -profile%" 0 kB

[ebuild     U ] x11-wm/blackbox-0.70.1 [0.70.0] USE="truetype -debug -nls" 481 kB

[ebuild   R   ] dev-lang/php-5.2.2-r1  USE="apache2 berkdb bzip2 calendar cdb cli crypt curl curlwrappers doc flatfile ftp gd gdbm iconv imap java-external kerberos ldap libedit mhash mssql mysql mysqli ncurses odbc pcre posix postgres reflection session sharedext simplexml soap sockets spell spl sqlite ssl sysvipc threads tidy tokenizer truetype unicode wddx xml xmlreader xmlrpc xmlwriter xpm xsl zip zlib -adabas -bcmath -birdstep -cgi -cjk -concurrentmodphp -ctype -db2 -dbase -dbmaker -debug -discard-path -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filter -firebird -force-cgi-redirect -frontbase -gd-external -gmp -hash -inifile -interbase -iodbc -ipv6 -json -ldap-sasl -mcve -msql -nls -oci8 -oci8-instant-client -pcntl -pdo -pdo-external -pic -qdbm -readline -recode -sapdb -sharedmem -snmp -solid -suhosin -sybase -sybase-ct -yaz -zip-external (-apache%)" 0 kB

[ebuild     U ] net-fs/samba-3.0.24-r3 [3.0.24] USE="cups fam kerberos ldap pam python readline syslog -acl -async -automount -caps -doc -examples -oav -quotas (-selinux) -swat -winbind" LINGUAS="-ja -pl" 0 kB

[ebuild     U ] x11-libs/cairo-1.4.6 [1.4.4] USE="X directfb svg -debug -doc -glitz -xcb" 3,108 kB

[ebuild     UD] dev-lang/ghc-6.4.2 [6.6] USE="X%* doc openal%* opengl%* test%*" 7,953 kB

[ebuild     U ] x11-libs/gtk+-2.10.13 [2.10.12] USE="X jpeg tiff -debug -doc -xinerama" 14,809 kB

[ebuild     U ] dev-util/darcs-1.0.9 [1.0.8-r1] USE="doc" 1,035 kB

[ebuild     U ] gnome-extra/evolution-data-server-1.8.3-r5 [1.8.3-r4] USE="kerberos ldap nntp ssl -debug -doc -ipv6 -keyring -krb4" 0 kB

[ebuild     U ] app-office/openoffice-2.2.1 [2.1.0] USE="branding cairo cups dbus eds gstreamer gtk java kde ldap mono%* odk pam sound webdav -binfilter -debug -firefox -gnome -seamonkey" LINGUAS="en_GB -af -ar -as_IN -be_BY -bg -bn -br% -bs -ca -cs -cy -da -de -dz% -el -en -en_US -en_ZA -eo% -es -et -fa -fi -fr -ga% -gl% -gu_IN -he -hi_IN -hr -hu -it -ja -km -ko -ku% -lt -lv -mk -ml_IN% -mr_IN% -nb -ne% -nl -nn -nr -ns -or_IN -pa_IN -pl -pt -pt_BR -ru -rw -sh_YU -sk -sl -sr_CS -ss% -st -sv -sw_TZ -ta_IN -te_IN -tg -th -ti_ER -tn -tr -ts -uk% -ur_IN -ve -vi -xh -zh_CN -zh_TW -zu" 229,048 kB

[blocks B     ] >=dev-lang/ghc-6.6 (is blocking dev-haskell/html-1.0)

Total: 20 packages (17 upgrades, 1 downgrade, 1 new, 1 reinstall, 1 block), Size of downloads: 268,761 kB

Not rebuilding (1) dev-lang/php.

Not compiling app-office/openoffice.

Not compiling net-fs/samba.

* 17 in total.

** 1 Downgrade:

[     UD]       dev-lang/ghc-6.4.2      [6.6]   USE="X%* doc openal%* opengl%* test%*"  7,953 kB

There are blocking packages:.

[blocks B     ] >=dev-lang/ghc-6.6 (is blocking dev-haskell/html-1.0)

Skipping: dev-haskell/html-1.0

About to cancel (Y to proceed)?

Not rebuilt: dev-lang/php

Skipped: app-office/openoffice net-fs/samba

dev-haskell/html-1.0 blocked by >=dev-lang/ghc-6.6

```

And yeah, this is because I've been running unstable, masked software. Apart from cases like that, I have had no blockers with Gentoo for ages.

----------

## steveL

Just an example of the kind of info I always used to miss (and an idea of how we might make the -q output look):

```

** 1 Downgrade:

[     UD]       app-portage/eix-0.8.8   [0.9.1] USE="sqlite"    0 kB

About to cancel (Y to proceed)?

** Downgrading app-portage/eix-0.8.8 - 2 of 10.

* As of >=eix-0.5.4, "metadata" is the new default cache.

* It's independent of the portage-version and the cache used by portage.

** Upgrading to net-misc/neon-0.26.3 from 0.26.1-r1 - 4 of 10.

Downloading neon-0.26.3.tar.gz

(112.64 KB/s) - `/usr/portage/distfiles/neon-0.26.3.tar.gz' saved [789289/789289]

* Elibtoolize: neon-0.26.3

Patching:.done

* Enabling SSL library thread-safety using POSIX threads...

* There are new features in this version; please beware that

* upstream considers the socks support experimental.  If you

* experience test failures (eg, bug 135863) then try rebuilding

* glibc.

* Neon has a policy of breaking API across versions, this means

* that any packages that link against neon will be broken after

* updating. They will remain broken until they are ported to the

* new API. You can downgrade neon to the previous version by doing:

*   emerge --oneshot '<net-misc/neon-0.26'

* You may also have to downgrade any packages that have already been

* ported to the new API.

Completed compile

** Upgrading to sys-apps/hal-0.5.9-r1 from 0.5.7.1-r5 - 5 of 10.

Downloading hal-0.5.9.tar.gz

(304.12 KB/s) - `/usr/portage/distfiles/hal-0.5.9.tar.gz' saved [1587364/1587364]

* Determining the location of the kernel source code

* Found kernel source directory:

*     /usr/src/linux

* Found sources for kernel version:

*     2.6.20-gentoo-r8

Patching:...........................................done

* Eautoreconf: hal-0.5.9

* Elibtoolize: hal-0.5.9

Patching:.done

* The HAL daemon needs to be running for certain applications to

* work. Suggested is to add the init script to your start-up

* scripts, this should be done like this :

* `rc-update add hald default`

* Looking for automounting support? Add yourself to the plugdev group

** Installing dev-libs/apr-util-1.2.8 - 7 of 10.

Downloading apr-util-1.2.8.tar.gz

(101.95 KB/s) - `/usr/portage/distfiles/apr-util-1.2.8.tar.gz' saved [646379/646379]

* Elibtoolize: conftools

Patching:..done

* Found db version 4.5

* Found db version 4.5

Completed compile

** Upgrading to dev-util/subversion-1.3.2-r4 from 1.3.2-r3 - 8 of 10.

* Using: sun-jdk-1.5

Patching:...........done

* Elibtoolize: ac-helpers

Patching:..done

* Subversion Server Notes

* -----------------------

* If you intend to run a server, a repository needs to be created using

* svnadmin (see man svnadmin) or the following command to create it in

* /var/svn:

*     emerge --config =dev-util/subversion-1.3.2-r4

* If you upgraded from an older version of berkely db and experience

* problems with your repository then run the following commands as root:

*     db4_recover -h /var/svn/repos

*     chown -Rf apache:apache /var/svn/repos

* Subversion has multiple server types, take your pick:

*  - svnserve daemon:

*    1. edit /etc/conf.d/svnserve

*    2. start daemon: /etc/init.d/svnserve start

*    3. make persistent: rc-update add svnserve default

*  - svnserve via xinetd:

*    1. edit /etc/xinetd.d/svnserve (remove disable line)

*    2. restart xinetd.d: /etc/init.d/xinetd restart

*  - svn over ssh:

*    1. Fix the repository permissions:

*         groupadd svnusers

*         chown -R root:svnusers /var/svn/repos/

*         chmod -R g-w /var/svn/repos

*         chmod -R g+rw /var/svn/repos/db

*         chmod -R g+rw /var/svn/repos/locks

*    2. create an svnserve wrapper in /usr/local/bin to set the umask you

*       want, for example:

*          #!/bin/bash

*          umask 002

*          exec /usr/bin/svnserve "$@"

*  - http-based server:

*    1. edit /etc/conf.d/apache2 to include both "-D DAV" and "-D SVN"

*    2. create an htpasswd file:

*       htpasswd2 -m -c /var/svn/conf/svnusers USERNAME

* If you intend to use svn-hot-backup, you can specify the number of

* backups to keep per repository by specifying an environment variable.

* If you want to keep e.g. 2 backups, do the following:

* echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion

* echo 'SVN_HOTBACKUP_NUM_BACKUPS=2' >> /etc/env.d/80subversion

** Upgrading to app-emulation/wine-0.9.39 from 0.9.38 - 9 of 10.

Downloading wine-0.9.39.tar.bz2

(126.37 KB/s) - `/usr/portage/distfiles/wine-0.9.39.tar.bz2' saved [12093172/12093172]

Patching:.done

* ~/.wine/config is now deprecated.  For configuration either use

* winecfg or regedit HKCU\Software\Wine

** Upgrading to dev-util/git-1.5.2.2 from 1.5.2.1 - 10 of 10.

Downloading git-manpages-1.5.2.2.tar.bz2

(75.06 KB/s) - `/usr/portage/distfiles/git-manpages-1.5.2.2.tar.bz2' saved [139718/139718]

Downloading git-1.5.2.2.tar.bz2

(71.51 KB/s) - `/usr/portage/distfiles/git-1.5.2.2.tar.bz2' saved [1190255/1190255]

Downloading git-htmldocs-1.5.2.2.tar.bz2

(93.11 KB/s) - `/usr/portage/distfiles/git-htmldocs-1.5.2.2.tar.bz2' saved [505023/505023]

Patching:.done

* new build flags or prefix

* new Tcl/Tk interpreter location

* new locations or Tcl/Tk interpreter

* These additional scripts need some dependencies:

*   git-archimport   : dev-util/tla

*   git-cvsimport    : >=dev-util/cvsps-2.1

*   git-svnimport    : dev-util/subversion(USE=perl)

*   git-svn          : dev-util/subversion(USE=perl) dev-perl/libwww-perl dev-perl/TermReadKey

*   git-quiltimport  : dev-util/quilt

*   git-cvsserver    : dev-perl/DBI dev-perl/DBD-SQLite

*   git-instaweb     : || ( www-servers/lighttpd net-www/apache(SLOT=2) )

*   git-send-email   : USE=perl

*   git-remote       : USE=perl

```

I've missed out some packages that had nothing interesting of course. It's a good way of seeing what's going on in the tree imo, stuff you miss when there are thousands of lines of compiler output. Note that you can do something similar with portage's bashrc and iirc the MAKE var, but it's not as nice imo (although it is something to explore) since you direct to /dev/null and lose the log aiui.

----------

## mudrii

steveL

Thank you for the interesting and useful script I will jump to play with it 

Regards

----------

## steveL

 *mudrii wrote:*   

> Thank you for the interesting and useful script I will jump to play with it.

 

Yay! Thanks mudrii, it's always nice to hear someone likes what you've done :D It looks a bit mushy under screen but it does still run fine; I guess we should really sort that out as a priority as well, since it is so helpful to be able to log into someone's machine and sort it out via screen.

Just for ref about screen over ssh: Never allow root login, just make a user acct, allow the person to login as that (after opening a port on your router) and change root pw temporarily, so they can su and run screen -x. Ofc they can still do whatever they want as root so make sure you trust em :) but changing root pw after they've left and closing the port are the two things one should do.

----------

## steveL

Woops i forgot about the -x option which is for use on servers; it appears fine under screen. Be aware you don't get asked and also it will log to system log as well as disable X Terminal title bar updates (implicit -c console mode.) You only see output about configuration. (It's designed to be sent to a logfile.)

HTH.

----------

## bmichaelsen

How about adding an option that calls "eclean packages" or "eclean distfiles" after the update?

----------

## steveL

 *bmichaelsen wrote:*   

> How about adding an option that calls "eclean packages" or "eclean distfiles" after the update?

 

Sounds like a great idea; I've been `persuaded' (that uberpinguin tsk tsk ;) to add layman -S and update-eix. The new portage changes mean that there's some other tweaks needed, all of which mean we are leaning towards a config file, rather than asking users to edit the script. Should be done in a week or so (the new sync is lovely.) Ranjit wants to sort out revdep-rebuild as well, so we'll probably have to add the capability to merge any list of packages the user specifies (apparently it's the same thing, and will also give us the module-rebuild stuff.) I don't personally think that'll make it this time.. ;) Heh, who cares?! Gentoo ROCKS! :P

----------

## foolosophy

Shouldn't this script be added to the bugzilla as a suggestion?

I am a total ignorant, but maybe it would be nice to see this implemented officialy. At least, as a portage optional feature.

----------

## kugutsumen

I love your wrapper! You should create an ebuild for it.

It would be cool if you could have an option to email its output.

One of the thing that usually annoys me with gentoo is that I always miss important build notes when I do an emerge -u world.

How do people usually deal with that? There used to be a program that kept track of them but I can't remember its name.

Edit: another thing that could be useful is to highlight services in /etc/init.d that have been updated and should be restarted.

----------

## desultory

 *kugutsumen wrote:*   

> One of the thing that usually annoys me with gentoo is that I always miss important build notes when I do an emerge -u world.
> 
> How do people usually deal with that?

 By using the logging capabilities present in Portage.

----------

## Pol

Thanks for your script, it's really what I was missing when I needed to upgrade during the night and the compilation failed because of that or that...

You really should improve it and make a nice documentation and to make an ebuild!

Thanks again

----------

## ryker

 *Pol wrote:*   

> Thanks for your script, it's really what I was missing when I needed to upgrade during the night and the compilation failed because of that or that...
> 
> You really should improve it and make a nice documentation and to make an ebuild!
> 
> Thanks again

 

That's a pretty vague comment.  What do you think needs improvement?  The script works pretty good for me, and the '-h' switch shows all the documentation I need.  I agree, an ebuild would be easier for people to install and also upgrade.  Should be an extremely easy ebuild to make.

----------

## Dan

Great script, I only changed the emerge --sync to eix-sync...

```

((syncFirst)) && {

        msg '** Syncing portage tree and eix .. this will take a while ;)'

        eix-sync || abort 'Unable to sync tree'

        msg '** Completed eix-sync'

}

```

----------

## bunkacid

this is a great script.

i made an ebuild for it.

/sys-apps/update/update-0.1.3.3d-r1.ebuild 

```
# Copyright 1999-2007 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: $

inherit eutils

DESCRIPTION="Update - emerge the way we like it ;)"

HOMEPAGE="http://forums.gentoo.org/viewtopic-t-546828.html"

SRC_URI="http://phpfi.com/241954?download"

# License of the package.  This must match the name of file(s) in

# /usr/portage/licenses/.  For complex license combination see the developer

# docs on gentoo.org for details.

LICENSE=""

SLOT="0"

KEYWORDS="~x86"

IUSE=""

DEPEND="app-shells/bash \

        sys-apps/portage"

RDEPEND="${DEPEND}"

src_unpack() {

        mkdir -p $S

        cp $DISTDIR/241954\?download $S/update

#       wget http://phpfi.com/241954?download -O update

}

src_install() {

        dosbin $S/update

}

```

----------

## steveL

Thanks for the ebuild, really nice idea; I was thinking of doing one at some point, so we can specify portage-utils and gentoolkit as required deps. gentoolkit should be on everybody's system as should portage-utils. We don't actually use q in the program atm since it's not guaranteed to be there, but it'd make things easier.

Beta of update is here: http://phpfi.com/255656 if you want to test it out; bear in mind we are still coding the maintenance stuff (new revdep-rebuild in ~ gentoolkit and adding other stuff as per url.) MD5: 70bfd3a6d38e5aa6ab5aed1b8a53e662

The sync is much nicer, but for some reason it isn't running eix-sync. We're working on fixing that today, though, as well as the glsa and depclean bits (don't know if those'll be finished today mind.. ;) update --stop is really cool too ;) Bear in mind it saves a default config to /etc/update which we'll hose for the production release. (Thereafter I am reliably informed it'll handle upgrades, but this is first version with a config and we're more worried about getting the new stuff sorted for this release than ensuring a beta config is upgraded nicely.)

Sorry for the delays, we got held up by linux-headers being newer than running kernel, and Ranjit insisted on coding a check for it. Grrr ;) Honestly, isn't USE flag editing more important?!

HTH,

steveL.

dosbin $S/update should be "$S"/update btw; /msg greybot quotes on irc.freenode.org (links is a good one too ;)

----------

## keenblade

Nice script. One suggestion if it is not already there. For laptops, I think it is useful fetching all the sources before actual emerging (compiling) starts. So we don't need to stay online during the update process. Even a shutdown at the and would be great. To achieve that I usually use this:

```
emerge --sync && emerge -vauDNf world && emerge -vuDN world && cfg-update -v -a -u && shutdown -h now
```

Can I get this functionality with update script?

----------

## steveL

Yeah just add -f to the flags and it'll fetch first. update -h  :Wink: 

----------

## keenblade

 *steveL wrote:*   

> Yeah just add -f to the flags and it'll fetch first. update -h 

 

Actully at first I tried "update --help" then "update -h" but they gave me this;

Making /root/emerge as it does not exist

About to proceed (N to cancel)?

Then I thought help option does not work and tries to update, thus pressed N. Stupid me  :Smile: 

And one bug. If I run revdep-rebuild within update it fails with this:

```

* All prepared. Starting rebuild

emerge --oneshot -X =dev-java/swt-3.3_rc4 =x11-drivers/nvidia-drivers-100.14.11

..........

usage: emerge [options]

emerge: error: no such option: -X

```

If I just run revdep-rebuild, it just works.

Thanks.

----------

## bunkacid

 *steveL wrote:*   

> Thanks for the ebuild, really nice idea;
> 
> ...
> 
> dosbin $S/update should be "$S"/update btw; /msg greybot quotes on irc.freenode.org (links is a good one too 

 

Thanks for the ebuild tip.  Here is an updated ebuild with the dependencies set.  Also I made the SRC_URI more variable. 

sys-apps/update/update-0.1.3.3d-r2.ebuild

```

# Copyright 1999-2007 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: $

inherit eutils

DESCRIPTION="Update - emerge the way we like it ;)"

HOMEPAGE="http://forums.gentoo.org/viewtopic-t-546828.html"

PHPFI=255656

SRC_URI="http://phpfi.com/$PHPFI?download"

# License of the package.  This must match the name of file(s) in

# /usr/portage/licenses/.  For complex license combination see the developer

# docs on gentoo.org for details.

LICENSE=""

SLOT="0"

KEYWORDS="~x86"

IUSE=""

DEPEND="app-shells/bash \

        sys-apps/portage \

        app-portage/gentoolkit \

        app-portage/portage-utils"

RDEPEND="${DEPEND}"

src_unpack() {

        mkdir -p $S

        cp "$DISTDIR"/$PHPFI\?download "$S"/update

#       wget http://phpfi.com/$PHPFI?download -O update

}

src_install() {

        dosbin "$S"/update

}

```

----------

## bunkacid

found a bit of a bug.

update will hang with the app-emulation/virtualbox-additions

it asks for confirmation of a license agreement.

----------

## bunkacid

i think there also needs to be a --skipfirst option when resuming.

----------

## steveL

 *keenblade wrote:*   

>  *steveL wrote:*   Yeah just add -f to the flags and it'll fetch first. update -h  
> 
> Actully at first I tried "update --help" then "update -h" but they gave me this;
> 
> Making /root/emerge as it does not exist
> ...

 

Not at all, stupid us; we'll fix that for the release version (sorry we decided to stop work on it for a couple of days, as we're burnt-out, and just have a nice weekend.) It is confusing I agree.

 *Quote:*   

> And one bug. If I run revdep-rebuild within update it fails with this:
> 
> ```
> 
> * All prepared. Starting rebuild
> ...

 

Yeah that's the new revdep-rebuild which uses package names by default (and no longer supports the switch). I think FuzzyRay is adding it back in for backwards-compatibility, but the beta version I posted does not use -X any more (since there's no need.)

It's better to go by package name and not version, as sometimes the old version will have been deleted from the tree, and in any case we want the "best-visible" (ie latest, according to settings) version.

----------

## steveL

 *bunkacid wrote:*   

> found a bit of a bug.
> 
> update will hang with the app-emulation/virtualbox-additions
> 
> it asks for confirmation of a license agreement.

 

Yeah that's the same problem as with games (it did that to me when I installed EnemyTerritory and really freaked me out!) I am not sure how we get round it; I was told those kinds of ebuilds (interactive) are not supposed to be in the tree. (If they are OFC, they can not be in stable.) Ideas welcome!

 *Quote:*   

> i think there also needs to be a --skipfirst option when resuming.

 

Yeah I guess you're right; I was trying to avoid long options (I coded the options check using getopts, and using long-options means a different mechanism [/msg greybot faq easily]) but we're running out of letters so I guess we should, heh. You can use SKIP='cat/pkg cat/pkg' update in the meantime, although it's better to do:

```
export SKIP='cat/pkg cat/pkg'

update blah
```

since the export means it applies to all subsequent updates from the same shell.

Thanks for the new version of the ebuild  :Smile: 

----------

## bunkacid

 *steveL wrote:*   

> You can use SKIP='cat/pkg cat/pkg' update in the meantime, although it's better to do:
> 
> ```
> export SKIP='cat/pkg cat/pkg'
> 
> ...

 

It doesn't work for the -r resume though.  :Sad: 

Editing the ~/emerge/emergeList and removing virtualbox-additions works.

----------

## steveL

 *bunkacid wrote:*   

> It doesn't work for the -r resume though. :(
> 
> Editing the ~/emerge/emergeList and removing virtualbox-additions works.

 

Ugh sorry, I could have sworn that worked here last week :) Could you outline what you'd like to be able to do in this situation? ATM you should be able to add virtual-additions to noCompile in /etc/update, but it'd be cooler if we start discussing what users want here and then we can just implement that, without having to argue on the best approach (man coders can be so annoying.. ;) Any other suggestions you have are welcome too. I really want to add autounmask and ufed support for myself.

BTW we tested it on a fresh 2007.0 install yesterday, and it turns out there we added some new regexes which are incompatible with BASH 3.1 (although ofc 3.2 is in stable, guess which one's on the install disk?) An emerge bash sorted that problem, but there were some weird things happening, I think to do with the expat upgrade, but noxHand had to go to school today (aww ;) so we can't work on his box till later. (I'm just glad he's come back to Gentoo from *cough* Ubuntu. ;) So we'll sort the regexes and do some more testing in the next day or two (I know the depclean is unfinished for one, and module-rebuild is untested since we didn't upgrade kernel as we 'had' to do the kernel-header check..)

TBH Ranjit told me not to put the beta in the thread, but I was getting stressed out about this as it's been taking up too much time.. *sigh* meh I hate it when he's right! ;p Ah well, at least I didn't put it at the top of the thread i guess.

Thanks for the feedback (and the ebuild ofc!) and for bearing with us while we get it working.

----------

## waldzwerg

Great Script! Found one little bug: when i manually start a second emerge during the update run the portage message 'waiting for portage lockfile' (or something similar) causes it to stop with a message like 

```
 ** update: Dependency Error - x11-libs/motif-config-0.10 requires waiting which is not in the install list!
```

Which is actually rather funny.   :Wink: 

----------

## bunkacid

 *steveL wrote:*   

> Could you outline what you'd like to be able to do in this situation? ... I really want to add autounmask and ufed support for myself.
> 
> 

 

I guess removing the offending line from the emergeList file isn't proper.

For the noCompile, if it's not too much trouble, how about a file with the atoms one per line instead of an array in a file just like portage is configured with masks and USE.

autounmask support would be quite neat.  I haven't found a USE flag editor I can stand.  My /etc/portage/package.use is hand crafted and quite large at ~300 lines last checked.  I'm sure much of it could be consolidated, but that's another thread.

----------

## steveL

 *bunkacid wrote:*   

> I guess removing the offending line from the emergeList file isn't proper.

 Nah it's a dirty hack ;P Main problem is that it will only affect that merge, and not subsequent ones.

 *Quote:*   

> For the noCompile, if it's not too much trouble, how about a file with the atoms one per line instead of an array in a file just like portage is configured with masks and USE.

 

It's not particularly hard; how about if we allow that format and also an array? Ebuilds are pure BASH already and we both think it's a good idea to get people into mucking about with BASH. So user could either set noCompile=('cat/pkg' 'cat/pkg') or 

```
noCompile="cat/pkg

cat/pkg

"
```

 which is simpy a long string as far as BASH is concerned. We can enforce the line separation with IFS=$'\n' before we process it. (The last " can be on the line before ofc, it's just easier to edit if you don't have to worry about it.)

 *Quote:*   

> autounmask support would be quite neat.  I haven't found a USE flag editor I can stand.  My /etc/portage/package.use is hand crafted and quite large at ~300 lines last checked.  I'm sure much of it could be consolidated, but that's another thread.

 

Yeah we use package.use much more than make.conf, but we setup with ufed at the beginning. It's easy enough for us just to echo the local ones to the file and use ufed for the global ones. After all, why reinvent the wheel? We'd only be doing a dialog the same way in any case, so let someone else maintain it  :Razz: 

----------

## keenblade

```
** You can turn off tips with gentooNovice=0 in the config file.
```

It does not work. I have a file /etc/update. In the file there is no "gentooNovice=0", but "novice=0". I tried putting "gentooNovice=0" but tips don't go. I already tried renaming the file to /etc/update.conf. Also tried placing the file to /etc/conf.d. 

I use sys-apps/update-0.1.4.0_beta1

----------

## steveL

Sorry about that, should be fixed in new version.

----------

## keenblade

 *steveL wrote:*   

> Sorry about that, should be fixed in new version.

 

Thanks a lot. update-0.1.4.0_beta2 works just fine.

----------

## bunkacid

I'm getting the following error when running update -vve

I'm using versions, 0.1.3.3d 

```
** update: Unknown install type: ebuildRsys-devel/gcc-3.4.6-r2UE="(-altivec)-bootstrap-boundschecking-build-d-doc-ortran-gcj-gtkhardened-ip28-ip32r10k-multilib-multislot(-n32)(-n64)nls-nocxx-nopie-nossp-objc-test-vanilla"

[ebuild   R   ] sys-devel/gcc-3.4.6-r2  USE="(-altivec) -bootstrap -boundschecking -build -d -doc -fortran -gcj -gtk hardened -ip28 -ip32r10k -multilib -multislot (-n32) (-n64) nls -nocxx -nopie -nossp -objc -test -vanilla" 

```

and 0.1.4.0_beta2

```
** update: Unknown install type: ebuildUsys-kernel/linux-headers-2.6.212.6.17-r2UE="(-gcc64%)"

[ebuild     U ] sys-kernel/linux-headers-2.6.21 [2.6.17-r2] USE="(-gcc64%)" 

```

----------

## steveL

 *bunkacid wrote:*   

> I'm getting the following error when running update -vve

 

Oh man, that's awful! Sorry, looks like a problem in checkType(); we had a similar issue which i thought we fixed. Is it only with -vv (which seems really odd to me) or is it with standard -e as well?

-vv is more for troubleshooting an ebuild that doesn't work (it echoes all lines from the build, so it's not much different to running emerge, although still using the list from update.) It still needs to be fixed, ofc; we're meeting up later this evening to do a bit of work on --depclean so we'll look at it then. Sorry for inconvenience.

BTW if you can, please log into irc.freenode.org channel #friendly-coders to talk to us about fixing stuff, as it makes the whole process a lot quicker. My nick is igli (though I won't be there for another 5 or 6 hours today, I'm always there when I'm online.)

----------

## 12345moon12345

Hi,

love your script.

I would like to see this feature added: after all the emerges run prelink -av automatically ( or maybe with an extra setting)

bye,

Victor

----------

## bunkacid

 *steveL wrote:*   

> Is it only with -vv (which seems really odd to me) or is it with standard -e as well?
> 
> BTW if you can, please log into irc.freenode.org channel #friendly-coders to talk to us about fixing stuff, as it makes the whole process a lot quicker. My nick is igli (though I won't be there for another 5 or 6 hours today, I'm always there when I'm online.)

 

The error is with standard -e as well.

I'll try and meet up with you on IRC sometime this week.  My nick is px on freenode.

thanks again!

----------

## bunkacid

a word of warning.

if you have EMERGE_DEFAULT_OPTS set in your make.conf, be sure not to include "--quiet"

This fixed my error I was having above.

----------

## Dan

```
[blocks B     ] <sys-fs/device-mapper-1.02.19-r1 (is blocking sys-fs/udev-114)

!! sys-fs/device-mapper is not in the list

Press Y to unmerge <sys-fs/device-mapper-1.02.19-r1, any other key to skip sys-fs/udev-114, CTRL-C to quit. (y/N)?

** You can turn off tips with novice=0 in the config file.

```

It would be really nice if the script just chose to upgrade device-mapper before udev instead of defaulting to remove it.

 :Smile: 

----------

## steveL

 *Dan wrote:*   

> 
> 
> ```
> [blocks B     ] <sys-fs/device-mapper-1.02.19-r1 (is blocking sys-fs/udev-114)
> 
> ...

 

Hmm it would do if device-mapper were being upgraded in the list to a newer version, before udev. As it's not in the list, it would still block udev by the time we come to install it.

For instance I get this (as we're still working on putting in mechanism for expat fix for next time.)

```
! There are blocking packages:

[blocks B     ] <kde-base/kdesktop-3.5.6-r1 (is blocking kde-base/kdebase-kioslaves-3.5.7-r1)

[blocks B     ] <=kde-base/kmail-3.5.6-r1 (is blocking kde-base/libkdepim-3.5.7-r1)

Upgrading kde-base/kdesktop to 3.5.7 from 3.5.5-r1 before emerge of kde-base/kdebase-kioslaves-3.5.7-r1

Upgrading kde-base/kmail to 3.5.7-r2 from 3.5.5-r2 before emerge of kde-base/libkdepim-3.5.7-r1

Toolchain- sys-kernel/linux-headers is being upgraded

        This requires a rebuild of glibc afterwards which will be done by this script.

About to proceed (Y/n)?

```

Since kdesktop and kmail are being upgraded, the blocks will be overcome by the time we come to install kioslaves/libkdepim.

----------

## swimmer

These are the problems I run against in 0.1.4.0_beta2:

* if I do "update -vp <package>" I get this error

```
/usr/local/bin/update: line 2478: helpV: command not found
```

* this morning there was only 1 package to be updated and typing in "update" (which is an alias for "update -D") started the job immediately without asking me - not really how I like things to work :-/

Greetz

swimmer

----------

## steveL

 *bunkacid wrote:*   

> a word of warning.
> 
> if you have EMERGE_DEFAULT_OPTS set in your make.conf, be sure not to include "--quiet"
> 
> This fixed my error I was having above.

 

Nice one, bunkacid; you said you'd wait for the next version, so I didn't put out a bugfix. Beta_2a is a really minor fix, and so the existing 2a will now be 2b (it has a much nicer interface for large resumes, which I think might make a good default for non-verbose use.) --depclean will be beta_3 and when that's all working nicely we'll put out a release.

Anyhow, it should work ok with --quiet in EMERGE_DEFAULT_OPTS now; it'll automatically set the -q option.Last edited by steveL on Fri Aug 31, 2007 9:50 am; edited 1 time in total

----------

## steveL

 *swimmer wrote:*   

> * if I do "update -vp <package>" I get this error
> 
> ```
> /usr/local/bin/update: line 2478: helpV: command not found
> ```
> ...

 

These are fixed in beta_2a; just for you swimmer  :Razz: 

----------

## steveL

 *12345moon12345 wrote:*   

> I would like to see this feature added: after all the emerges run prelink -av automatically ( or maybe with an extra setting)

 

Yeah that makes sense. I had a look at http://www.gentoo.org/doc/en/prelink-howto.xml and it says it installs a daily cron script, but it would be better to do it at the end of the whole upgrade, glsa-check, depclean, revdep process imo. I don't know much about it: this topic talks about using symlinks -drv /  before prelink -av but this bug says:

 *2007-01-21 -- jakub wrote:*   

> prelink doesn't work w/ KDE, we know about it, noone's maintaining prelink and noone's working on it, look for prelink alternatives instead.

 

I'm guessing symlinks only needs to be run on install. Any info would be much appreciated, especially on usage of prelink.

 */etc/conf.d/prelink wrote:*   

> # Change to
> 
> # PRELINK_NOEMER_CHECK_INTERVAL=0
> 
> # if you want to disable the portage database timestamp
> ...

 

seems to imply that there's no real need. Anyhow, let me know which options (-mR are in config and look good, R maybe for server use?)

----------

## Diredicker

Isn't it better to use the total amount of packages that should be installed in the script?

Packages installed so far: 16 of 16.    7 remaining 

Packages installed so far: 17 of 17.    6 remaining 

Shouldn't it say 

Packages installed so far: 16 of 23.    7 remaining 

Packages installed so far: 17 of 23.    6 remaining 

Notice the difference?

 *Quote:*   

> 
> 
> Packages installed so far: 16 of 16.    7 remaining
> 
> * Downloading poppler-0.5.4.tar.gz
> ...

 

It is just a suggestion   :Very Happy: 

----------

## steveL

 *Diredicker wrote:*   

> Isn't it better to use the total amount of packages that should be installed in the script?
> 
> Packages installed so far: 16 of 16.    7 remaining 
> 
> Packages installed so far: 17 of 17.    6 remaining 
> ...

 

Heh, welp asked the same thing when he came over for GUK. The reason for that is, if any have failed it would say eg:

Packages installed so far: 14 of 16.    7 remaining 

Packages installed so far: 15 of 17.    6 remaining 

The xterm titlebar should show the information you're referring to. 16 of 23. 7 remaining is kinda insulting user intelligence though  :Wink:  I prefer the way it is now as you get more info and you quickly see how many packages are left when you glance at the window during a long emerge. I often haven't even noticed something has failed until I spot that the numbers don't match. (Then I scan for the fail list.)

 *Quote:*   

> It is just a suggestion  

 

Heh, they're always welcome  :Very Happy:  If you still thinks it would be more useful, I guess we could add it as a config var. TBH though we need to split this script up as it's getting kinda excessive  :Wink: 

----------

## ryz

Just running update without flags works like a charm but if I add the -s flag I get this result:

 *Quote:*   

> 
> 
> lonestar ~ # update -s
> 
> **Emerging -uDN world then running maintenance.
> ...

 

Seems that it ads an extra '-'

----------

## steveL

 *ryz wrote:*   

> Just running update without flags works like a charm but if I add the -s flag I get this result:
> 
> emerge: error: no such option: --uDNpv
> 
> Seems that it ads an extra '-'

 

Do you have anything in EMERGE_DEFAULT_OPTS in make.conf? I didn't actually test the fix for --quiet, but if there's anything else (especially -u*) it'll bork. If you want that from update, the easiest way is to use alias update='update -u'

Other than that, nfc atm.

----------

## ryz

 *steveL wrote:*   

> 
> 
> Do you have anything in EMERGE_DEFAULT_OPTS in make.conf? I didn't actually test the fix for --quiet, but if there's anything else (especially -u*) it'll bork. If you want that from update, the easiest way is to use alias update='update -u'
> 
> Other than that, nfc atm.

 

Sorry but I do not set EMERGE_DEFAULT_OPTS at all in my make.conf I see if I have time to debug it a little more later on.

----------

## ryz

I have run the script with the '-x' flag given to bash and belowe you can see a short transcript from that run. The problem seems to come from this line 

```
[[ $param ]] && param="-$param"
```

 at line number 234. I do not under stand what the extra -n comes from in 

```
[[ -n -uDN ]]
```

 since param is set to just -uDN. But i have to confess that I am not an bash guru.

```

+ hasEIX=0

+ let ask=pretend=quiet=verbose=install=syncFirst=doRevdep=doGLSA=doDepclean=force=doKdeps=doKmods=0

+ let doEmerge=1

+ param=

+ f=()

+ fR=()

+ t=()

+ pf=0

+ '[' 1 -lt 1 ']'

+ [[ 1 -eq 1 ]]

+ [[ -s = -* ]]

+ [[ ! -s = *[^sqvpaFSCRM-]* ]]

+ target=world

+ param=-uDN

+ [[ -s = *[FSCRM]* ]]

+ [[ -s = *M* ]]

+ checkFlags -s

+ getopts :eapqvurnDNbBgGkKcimsfFlRSChxXWYz opt

+ case $opt in

+ syncFirst=1

+ getopts :eapqvurnDNbBgGkKcimsfFlRSChxXWYz opt

+ (( ask&&pretend ))

+ (( quiet&&verbose ))

+ (( resume ))

+ (( server&&(ask||pretend) ))

+ (( server&&verbose>1 ))

+ (( doKmods ))

+ (( doKdeps ))

+ (( doKernel&&(doKmods||doKdeps) ))

+ (( fetchOnly ))

+ [[ -n -uDN ]]

+ param=--uDN

+ macro

```

----------

## ppurka

 *ryz wrote:*   

> I have run the script with the '-x' flag given to bash and belowe you can see a short transcript from that run. The problem seems to come from this line 
> 
> ```
> [[ $param ]] && param="-$param"
> ```
> ...

 That is just bash using the test whether $param is nonzero.  [[ $param ]] is just the short form for [[ -n $param ]].

----------

## ryz

I have found the problem. First param is set to "-uDN" and then it calls checkFlags which ads another minus '-'. Either param should just be set to uDN or checkFlags has to check that if param is not empty that it does not already has an minus in front.

```

elif [[ $# -eq 1 && $1 = -* && ! $1 = *[^sqvpaFSCRM-]* ]]; then

   target='world'

   param='-uDN'

   if [[ $1 = *[FSCRM]* ]]; then

      doEmerge=0

      target=[none]

   fi

   [[ $1 = *M* && $1 = *[SCR]* ]] && msg 'M covers all maintenance options'

   checkFlags "$1"

```

----------

## steveL

```

elif [[ $# -eq 1 && $1 = -* && ! $1 = *[^sqvpaFSCRM-]* ]]; then

   target='world'

   param='-uDN'

   if [[ $1 = *[FSCRM]* ]]; then

      doEmerge=0

      target=[none]

   fi

   [[ $1 = *M* && $1 = *[SCR]* ]] && msg 'M covers all maintenance options'

   checkFlags "$1"

```

This is only for shortcut usage (ie no target, so implicit world) and only options have nothing to do with tree (ie no -uDN required.) If you specify world it will only use the options you choose.

----------

## swimmer

Hmm - it happens to me on one (of three) system that if one package fails to compile/install the chain seemed to be borked ...

```
!! media-gfx/splashutils-1.5.1.1 failed to install.

! Failed so far: media-gfx/splashutils-1.5.1.1

Checking dependencies..done

** update: Dependency Error - media-video/dvdrip-0.98.8 requires [0.98.6] which is not in the install list!
```

It happened t ome quite often the last days on this system because splashutils does not build on it but I'm not sure whether the same happens as well on the other systems ... is this a known issue to you guys?

Greetz

swimmer

----------

## steveL

 *ryz wrote:*   

> Either param should just be set to uDN or checkFlags has to check that if param is not empty that it does not already has an minus in front.

 

Yeah you're right, sorry wasn't thinking.

----------

## steveL

 *swimmer wrote:*   

> Hmm - it happens to me on one (of three) system that if one package fails to compile/install the chain seemed to be borked ...
> 
> ```
> !! media-gfx/splashutils-1.5.1.1 failed to install.
> 
> ...

 

No it's not, thanks for reporting it swimmer; if you're on IRC, ask us in #friendly-coders but we'll put this on the list to sort out. We should get some failures from expat update ;)

Edit: do you have --verbose in your EMERGE_DEFAULT_OPTS by any chance? It looks like it's mistaking a prior version for an incoming one. There was another bug there, but I don't think that's what triggered that output.

Try this one md5sum: 564f32bb3ba84851b4a5a16d2cbda953

wget http://phpfi.com/261019?download -O /sbin/update; md5sum /sbin/update

I added a check for --verbose as well as --quiet, and it should now go up or down with -v or -q from there. (You could always do -vv or -qq but now they'll start off at -v or -q based on EMERGE_DEFAULT_OPTS in make.conf; so if it's set at --verbose and you use -q it'll go down to normal.)

HTH.

----------

## steveL

 *ryz wrote:*   

> I have found the problem. First param is set to "-uDN" and then it calls checkFlags which ads another minus '-'. Either param should just be set to uDN or checkFlags has to check that if param is not empty that it does not already has an minus in front.

 

Absolutely right; we did have this changed in working version (and I think I mentioned it to bunkacid on irc) but I totally forgot to put it into the beta release. My bad :S Sorry for not being awake before either ;)

```

elif [[ $# -eq 1 && $1 = -* && ! $1 = *[^sqvpaFSCRM-]* ]]; then

   target='world'

   param='-uDN'

   if [[ $1 = *[FSCRM]* ]]; then

      doEmerge=0

      target=[none]

   fi

   [[ $1 = *M* && $1 = *[SCR]* ]] && msg 'M covers all maintenance options'

   checkFlags "$1"

```

All we did was move the last two lines up to the beginning of that block. beta_2b has this change (post above.) If it tests ok, I'll put it in original post.

Edit: Thanks for the bugfixing btw, sorry for hassle. set -x is good isn't it? :D (help set and help shopt)

----------

## swimmer

 *steveL wrote:*   

> No it's not, thanks for reporting it swimmer; if you're
> 
> on IRC, ask us in #friendly-coders but we'll put this on the list to
> 
> sort out. We should get some failures from expat update 
> ...

 

Hi Steve  :Smile: 

I do not use --verbose in my EMERGE_DEFAULT_OPTS ... but thanks for the fast 

response and solution offered  :Smile: 

I downloaded beta2b and will use it - the only problem is that I solved my 

problem with splashutils and the emerge chain is now clean again ... no more 

testcase :-/ Sorry about that.

Thanks again for the fast work

swimmer

----------

## steveL

 *swimmer wrote:*   

> I do not use --verbose in my EMERGE_DEFAULT_OPTS ... but thanks for the fast 
> 
> response and solution offered :)
> 
> I downloaded beta2b and will use it - the only problem is that I solved my 
> ...

 

Hmm OK, that's odd then. I tried testing by setting it to fail automatically and it seemed to be ok; one problem was if one of the pkgs was blocked due to dep failing (eg device-mapper/udev) but it was giving us a message and had the package name highlighted. I'll tweak that for next beta.

----------

## steveL

Beta 2c, minor bugfix for resume display bug. While I was there, took new resume code from development version, as it was written a while ago, and has been refined a bit as well. I really like it-- you'll only see it when there's more than 10 packages to emerge. They are sorted according to category, with the categories in order of emerge, nicely coloured. Toolchain and rebuilds are broken out of the compact listing:

```
dev-libs        Upgrade         expat libIDL

                New             fcgi

                Upgrade         openssl

sys-fs          Upgrade         device-mapper udev

media-sound     Upgrade         alsa-headers lame alsa-utils alsa-tools timidity++

sys-apps        Upgrade         busybox ed parted man-pages debianutils

app-arch        Upgrade         tar

media-libs      Upgrade         libpng libvorbis alsa-lib alsa-oss gstreamer openexr openal smpeg flac gst-plugins-base

sys-devel       Upgrade         gettext autoconf libtool

net-misc        Upgrade         rsync

                New             mDNSResponder

                Upgrade         curl openssh

dev-java        New             java-sdk-docs

app-admin       Upgrade         eselect-oodict

                New             apache-tools

app-text        Upgrade         multitail sgml-common

Rebuild         aspell          USE="gpm -examples% -nls"

                Upgrade         poppler gnome-doc-utils tetex

sys-kernel      New             gentoo-sources

dev-perl        Upgrade         XML-Parser

                New             XML-LibXML-Common

                Upgrade         XML-SAX

                New             XML-LibXML

                Upgrade         XML-Simple

perl-core       Upgrade         Test-Simple

virtual         New             perl-Test-Simple

gnome-base      Upgrade         gnome-mime-data libbonobo libglade gconf gnome-keyring librsvg gnome-vfs libgnome libgnomeprint libgnomeprintui libbonoboui

 libgnomeui

dev-lang        Upgrade         tcl tk mono

Rebuild         ghc             USE="doc -bash-completion% -binary -ghcbootstrap"

x11-proto       Upgrade         inputproto compositeproto

net-libs        Upgrade         libpcap libnfsidmap

app-doc         Upgrade         xorg-docs

sys-process     Upgrade         psmisc

dev-scheme      Upgrade         gambit

x11-libs        Upgrade         libX11 libXi libXtst libXcomposite libXfont startup-notification fltk cairo pango libwnck vte

app-crypt       Upgrade         mit-krb5

x11-apps        Upgrade         iceauth setxkbmap xhost xrandr xinit

app-portage     Upgrade         eix kuroo

media-gfx       New             nvidia-cg-toolkit

                Upgrade         sane-backends

www-misc        Upgrade         htdig

dev-util        Upgrade         bouml catalyst gtk-doc devhelp quilt glade git bzr bzrtools

x11-misc        Upgrade         shared-mime-info icon-naming-utils

dev-cpp         Upgrade         libxmlpp

dev-dotnet      Upgrade         libgdiplus

x11-terms       Upgrade         xterm

x11-wm          Upgrade         fluxbox

x11-themes      Upgrade         gnome-icon-theme

dev-python      Upgrade         setuptools pyorbit

                New             PyQt

                Upgrade         pycurl gnome-python

net-dns         Upgrade         libidn

media-video     Upgrade         realplayer

gnome-extra     Upgrade         zenity evolution-data-server

media-plugins

Rebuild         libvisual-plugins USE="alsa gtk jack mplayer opengl -debug -esd (-gstreamer%*)"

                Upgrade         gst-plugins-alsa gst-plugins-oss gst-plugins-xvideo gst-plugins-x

kde-base        Upgrade         kdelibs libkonq kdesu libkdenetwork libkmime kdebase-data kghostview kcminit kpersonalizer ktnef cervisia kate librss

 khotkeys kcheckpass ksmserver kwin kreadconfig ksplashml mimelib libksieve kdeaddons-docs-konq-plugins quanta kcalc kde-i18n nsplugins kmenuedit

 kcachegrind klinkstatus kimagemapeditor kommander kompare kfilereplace libkcal kicker knewsticker kfind kdepasswd kate-plugins kicker-applets

 knewsticker-scripts kdepim-kioslaves certmanager kdeprint kpdf kcontrol khelpcenter konsole kdesdk-kioslaves kdm kmail libkdepim libkpimidentities kontact

 kaddressbook knotes knode kaddressbook-plugins kdesktop kdebase-kioslaves kdebase-startkde konqueror kviewshell kdvi konq-plugins

net-irc         Upgrade         konversation

net-nds

Rebuild         openldap        USE="berkdb crypt gdbm kerberos odbc perl readline sasl ssl tcpd -debug -ipv6 -minimal -overlays -samba* (-selinux) -slp -smbkrb5passwd"

dev-php         Upgrade         roadsend-php

app-emulation   Upgrade         wine

x11-base        Upgrade         xorg-server

x11-drivers     Upgrade         xf86-input-mouse xf86-video-nv

www-servers     Upgrade         lighttpd apache

dev-haskell     New             regex-base regex-posix regex-compat filepath

                Upgrade         mtl

* 205 in total

! There are blocking packages:

[blocks B     ] <kde-base/kdesktop-3.5.6-r1 (is blocking kde-base/kdebase-kioslaves-3.5.7-r1)

[blocks B     ] <=kde-base/kmail-3.5.6-r1 (is blocking kde-base/libkdepim-3.5.7-r1)

Upgrading kde-base/kdesktop to 3.5.7 from 3.5.5-r1

Upgrading kde-base/kmail to 3.5.7-r2 from 3.5.5-r2

About to proceed (Y/n)?

```

It looks much nicer on screen. Yes I still need to do expat, update is going to do it all for me thanks! ;P

----------

## swimmer

Hi SteveL, 

the error/bug is back!  :Smile: 

```
tj portage # update

** Emerging -uDN world then running revdep-rebuild

[...]

!! media-libs/alsa-lib-1.0.15_rc2 failed to install.

Packages installed so far: 5 of 6.      2 remaining

! Failed so far: media-libs/alsa-lib-1.0.15_rc2

Checking dependencies..done

** update: Dependency Error - media-sound/alsa-utils-1.0.15_rc1 requires [1.0.14] which is not in the install list!
```

Version=0.1.4.0_beta2c

I use the same version on 4 PC's and alsa-lib failed on every single of them but the error above only showed up on *one* of them?!?

The only difference that I can see is that I use EMERGE_DEFAULT_OPTS="--color y" on the 'erroneous' PC - I'll disable it for now and will see if that has any influence ...

And there are more strange differences: after compiling all the packages *except* alsa-lib the update process stops on 3 of 4 PC's - only on 1 (not the same with the error above btw.) asks if I want to continue with a revdep-rebuild. Strange ...

EDIT: Stupid me, on the PC's revdep-rebuild does not come in I have an alias for update: "update -D" :-/ Is emerge -aUDNR still default?

Greetz

swimmer

PS: I normally download the script on my main PC and distribute it via scp to the others - should be no difference ...Last edited by swimmer on Tue Sep 18, 2007 9:17 am; edited 1 time in total

----------

## swimmer

Ok - after commenting out EMERGE_DEFAULT_OPTS="--color y" the script works as presumed - it even asks if I want to continue with a revdep-rebuild  :Wink: 

As far as I can see the script handles only "--quiet" and "--verbose" - very other option specified let's it bail out ...

HTH

swimmer

----------

## steveL

 *swimmer wrote:*   

> the error/bug is back! :)

 

Oh noes! ;P Glad it got sorted; added support for --color in EMERGE_DEFAULT_OPTS.

 *Quote:*   

> Is emerge -aUDNR still default?

 

Yeah, as long as you don't specify a target (like world/system or some package) and only use (any of) the following options: sqvpaFSR.

 *Quote:*   

> I normally download the script on my main PC and distribute it via scp to the others - should be no difference ...

 

None at all, it's just a text file. I think bunkacid had an ebuild, but we're not too worried about that til we get this version finished. Still got to do the config file update at some point, never mind depclean, prelink, eclean blah blah blah ;)

 *Quote:*   

> As far as I can see the script handles only "--quiet" and "--verbose" - very other option specified let's it bail out ... 

 

OK I've added --color y/n (or Y/N) support (found a small bug in resume while I was looking at this, when you're resuming after the main install has happened, or there never was a main install.) This was a little bit tricky because of the interaction with NOCOLOR, but hopefully it should all be good. I won't put it on front page til tested (gotta go out now, so can't stress it atm.)

md5: e537c100060fe7603bcb0c7864ea3757 http://phpfi.com/263554

wget http://phpfi.com/263554?download -O /sbin/update

Wrt to the other options, can you specify which ones break it? It's a PITA checking them TBH.

Thanks for your troubleshooting, Swimmer, hope this one works better ;)

----------

## swimmer

Ok - thanks for your fast reaction!

I'll be away the next 10 days so no time to troubleshoot  :Wink: 

Greetz

swimmer

----------

## steveL

 *swimmer wrote:*   

> I'll be away the next 10 days so no time to troubleshoot ;-)

 

No worries; have a good one! :-)

----------

## Pol

Hello,

I have found a small bug...

When there are no more place left on the device, the script hang ... without exiting...

I discovered it when I did a genlop -c on a update of bzip  :Wink: 

----------

## steveL

 *Pol wrote:*   

> I have found a small bug...
> 
> When there are no more place left on the device, the script hang ... without exiting...
> 
> I discovered it when I did a genlop -c on a update of bzip 

 

Thanks for the bug report, Pol. You mean if the hard disk (with /var/tmp/portage on it) is out of room? Hmm that's not good. Does emerge exit in that situation?

----------

## Pol

 *steveL wrote:*   

>  *Pol wrote:*   I have found a small bug...
> 
> When there are no more place left on the device, the script hang ... without exiting...
> 
> I discovered it when I did a genlop -c on a update of bzip  
> ...

 

Hello,

Yes emerge exit  :Wink: 

I use tmpfs (http://gentoo-wiki.com/TIP_Speeding_up_portage_with_tmpfs) and when /var/tmp/portage is full, thing that happens sometimes... the script does nothing... it doesn't exit, emerge does.

Thx for that script btw, it's very nice!

Bye

----------

## steveL

 *Pol wrote:*   

>  *steveL wrote:*   Thanks for the bug report, Pol. You mean if the hard disk (with /var/tmp/portage on it) is out of room? Hmm that's not good. Does emerge exit in that situation? 
> 
> Yes emerge exit ;)

 

OK I'll have a look at this tonight and we'll have something fixed in a couple of days, tops.

 *Quote:*   

> I use tmpfs (http://gentoo-wiki.com/TIP_Speeding_up_portage_with_tmpfs) and when /var/tmp/portage is full, thing that happens sometimes... the script does nothing... it doesn't exit, emerge does.

 

OK, you should know that the -m option does this too. size=256 should be in /etc/update and is the default, giving you 256MB of tmpfs. You can ofc set it to whatever you like (I haven't tested it for ages, but nothing's changed with it, so I don't see why it should have stopped working :)

 *Quote:*   

> Thx for that script btw, it's very nice!

 

You're very welcome!

----------

## steveL

New version. Gah didn't fix the outta space thing yet, sorry. This one has major changes (it's the one we've been working on for the last couple of months while only minor fixes have been going out.) As ever, bug reports welcome :)

----------

## lowtexx

hi,

I found a problem in the new 0.1.4.0_beta3a version.

After an error I get the message:

```

!! No packages compiled successfully on this run, aborting.

/sbin/update: line 623: needMaint: command not found

```

needMaint seems to be defined. Is this a known problem?

cu

lowtexx

----------

## steveL

 *lowtexx wrote:*   

> I found a problem in the new 0.1.4.0_beta3a version.
> 
> After an error I get the message:
> 
> ```
> ...

 

Hi lowtexx it hasn't shown before, but it is a bug. This should have fixed it:

wget http://dev.gentooexperimental.org/~igli/src/update/update-20071121 -O /sbin/update

md5sum: 026ff7fee5953d37f4a6f5c43ea7b794

HTH.

Serves me right for messing about with aliases ;p

----------

## palchen

I am stuck! The script stops while trying to install parted-1.8.7. I cannot emerge that version parted either but can emerge parted-1.8.8.

Would you please tell me where to change the package version as referenced by the update script?

Thanks a mill.

----------

## Naib

 *palchen wrote:*   

> I am stuck! The script stops while trying to install parted-1.8.7. I cannot emerge that version parted either but can emerge parted-1.8.8.
> 
> Would you please tell me where to change the package version as referenced by the update script?
> 
> Thanks a mill.

 

if you just type emerge parted -vp what does it display

----------

## palchen

 *Naib wrote:*   

>  *palchen wrote:*   I am stuck! The script stops while trying to install parted-1.8.7. I cannot emerge that version parted either but can emerge parted-1.8.8.
> 
> Would you please tell me where to change the package version as referenced by the update script?
> 
> Thanks a mill. 
> ...

 

This is what is displayed - thanks for the reply (I'm a noob with emerge ...)

emerge -vp parted

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] sys-apps/parted-1.8.8  USE="nls readline -debug -device-mapper (-selinux)" 0 kB

When the script hung on installing parted-1.8.7 I stopped the script and tried an emerge and it too hung while trying to download parted-1.8.7.

I figured that the repository had changed as this world update had been running for about 20hrs. I did an emerge --sync (my bad I guess).

emerge -av parted does however install 1.8.8 which the update script tries to downgrade and hangs at the download stage?

----------

## Naib

ok so it sounds more like a src download issue.

"update" is at its core a wrapper around emerge (a very clever wrapper I might add  :Wink:  ) so when you type "update foo" what it eventually does is "emerge foo" (sorry steveL for reducing the script to its core).

So two interesting things here

1) there is no timeout/retries on the source (iirc there is an /etc/make.conf option)

2) portage is trying to install a version of parted that is, as far as your profile is concerned, depreciated

The only reason why an older version of a certain package is being pulled in/installed is because another application has got a setting that say "no newer versions"

What is the EXACT line you are typing when you are using update and also what is the output of emerge world -uvDp <= this might show what the real package that is giving issues is

----------

## palchen

What is the EXACT line you are typing when you are using update 

simply "update"

and also what is the output of emerge world -uvDp <= this might show what the real package that is giving issues is[/quote]

emerge world -uvDp

These are the packages that would be merged, in order:

Calculating world dependencies |

!!! Multiple versions within a single package slot have been 

!!! pulled into the dependency graph:

x11-base/xorg-server:0

  ('ebuild', '/', 'x11-base/xorg-server-1.4-r4', 'merge') pulled in by

    ('ebuild', '/', 'net-misc/vnc-4.1.2-r5', 'merge')

  ('ebuild', '/', 'x11-base/xorg-server-1.4.0.90', 'merge') pulled in by

    ('installed', '/', 'x11-drivers/xf86-input-elographics-1.1.0', 'nomerge')

    ('ebuild', '/', 'x11-drivers/ati-drivers-8.443.1-r1', 'merge')

    ('ebuild', '/', 'x11-drivers/xf86-input-magellan-1.1.1', 'merge')

    (and 77 more)

The script has been running for about 20hrs so I guess the above comes from that.

Then all the packages are listed with the following at the bottom:

Total: 359 packages (335 upgrades, 2 downgrades, 20 new, 2 in new slots), Size of downloads: 1,629,406 kB

An "emerge -av =parted-1.8.7" also fails while trying to download while an "emerge -av parted" pulls in 1.8.8??

----------

## Naib

ok type this:

update -p

need to see what update is trying to pull in AND in what order and for what reason. This is more a package dependency issue just causing problems with update/portage

----------

## palchen

[quote="Naib"]ok type this:

update -p

Not compiling www-client/mozilla-firefox-2.0.0.11

Not compiling app-office/openoffice-2.3.1

* 362 in total

** 2 Downgrades:

        app-admin/equo-0.9.21 [9999-r2]

        net-wireless/wpa_supplicant-0.5.8 [0.6.0-r10]   USE="dbus gnutls gsm madwifi qt3 qt4 readline ssl"

  wpa_supplicant-0.5.7.ebuild, wpa_supplicant-0.5.8.ebuild,

  wpa_supplicant-0.6.0.ebuild:

  wpa_supplicant requires libs from /usr so it's moving back. Symlinks are in

  place so that baselayout still works.

Toolchain: sys-kernel/linux-headers is being upgraded

! sys-kernel/linux-headers (2.6.23) is newer than running kernel (2.6.22)

 - so it will not be installed; upgrade your kernel first

@ Not compiling sys-libs/glibc-2.7-r1

@ Not compiling sys-kernel/linux-headers-2.6.23-r2

dev-libs/expat-2.0.0 does not match from (<2) - you might wish to edit /etc/warning.

# The list of packages to be emerged is saved in /root/emerge/emergeList

# Skipped: www-client/mozilla-firefox-2.0.0.11 app-office/openoffice-2.3.1

sys-kernel/linux-headers (2.6.23) is newer than running kernel (2.6.22)

This is the only difference with the previous posting. There are 362 apps, do you want me to post all of the results?

I need some sleep and will continue this tomorrow.

Making a data backup   :Smile: 

Thanks for your assistance.

----------

## steveL

 *palchen wrote:*   

> An "emerge -av =parted-1.8.7" also fails while trying to download while an "emerge -av parted" pulls in 1.8.8??

 

If it's really just the download stage you can download the file from ftp://ftp.gnu.org/gnu/parted/parted-1.8.7.tar.bz2 [1] and save it in /usr/portage/distfiles.

1.8.7 is marked unstable on most architectures, and 1.8.8 has been out for quite some time. Your best bet to sort this out is to log onto irc.freenode.org and ask in #gentoo, or we're in #friendly-coders. This really is a tree issue (the xorg thing is one too.) As Naib, said update is simply a fancy wrapper for emerge; as you've seen the problems show when you run vanilla emerge. (Not that update never borks; it just tends to shout with two red exclamation marks when something serious happens, and real bugs usually have a stack trace.)

To really see what's pulling it in, run emerge -puDNt world but do not post it directly here; it'll be pages and pages of output, and it takes some deciphering. Use a pastebin (I'd save it for a month) and post the link here or on irc.

You'll more likely get a quicker result on IRC tbh; there are always hundreds of people in #gentoo who are willing to help, and they're always up on what's going on in the tree.

[1] http://www.gnu.org/software/parted/ has link to mirrors, btw, if you need a nearer one.

----------

## swimmer

I have a recurring problem with update-0.1.4.0_beta3b when upgrading linux-headers:

```
Toolchain: sys-kernel/linux-headers is being upgraded

        This requires a rebuild of glibc afterwards which will be done by this script.

@ About to cancel, Y to proceed (y/N)?

** Toolchain: upgrading linux-headers

* Checking dependencies for sys-kernel/linux-headers-2.6.23-r3..done

[Toolchain] Upgrading sys-kernel/linux-headers

* Downloading gentoo-headers-2.6.23-5.tar.bz2

* (50.48 KB/s) - `/usr/portage/distfiles/gentoo-headers-2.6.23-5.tar.bz2' saved [8185]

* Patching:done

* Patching:done

* Patching:done

* Patching:done

* Patching:done

* Patching:done

* Patching:done

** Compiling Source ...

** Installing sys-kernel/linux-headers-2.6.23-r3

** Uninstalling sys-kernel/linux-headers-2.6.23-r2

** sys-kernel/linux-headers-2.6.23-r3 installed successfully.

Packages installed so far: 1 of 1.      14 remaining

* Checking dependencies for sys-libs/glibc..done

! Toolchain: sys-libs/glibc not in list

!! update: !! sys-kernel/linux-headers-2.6.23-r3 has been emerged; it is important that you emerge glibc ASAP. -- Emerge of sys-libs/glibc failed.
```

This happens on 3 systems (2 x86 & 1 amd64) ...

Greetz

swimmer

----------

## steveL

Damn sorry about that swimmer, it's supposed to deal with that ok. Ah well regression ftl :)

Quick workaround is just to update glibc and then carry on.

You should still be able (i hope) to use update -1 glibc if you want to use update -r afterwards for the original list. (It should work for any 0-9 and means it uses a subdirectory for that run, which can also be resumed.)

I'll look into sorting that asap.

----------

## ryker

I finally found this thread again.  I don't know why, but I have a really hard time finding it.  I know I could create a bookmark, but that would be too easy.  :Wink: 

This script really needs an ebuild so it's easy for everyone to find it and update to the latest version.

I noticed that there is a new version on the server: 20080109.  I'm giving it a run right now.  So far so good.

Thanks again for all of your hard work.

----------

## LXj

Thanks for the script, overlay is highly needed  :Wink: 

Two suggestions:

1. There should be a more clear explanation of -i option. And actually a man-like listing of all non-emerge options

2. Please show the current time for ** messages. Currently I always run your script in one console and tail -f /var/log/emerge.log | formatlog in another (formatlog is my script which converts dates in emerge.log to readable format)

Edit: Also, a question: how am I supposed to upgrade glibc? This script just skips it...

----------

## ryker

 *LXj wrote:*   

> Thanks for the script, overlay is highly needed 
> 
> Two suggestions:
> 
> 1. There should be a more clear explanation of -i option. And actually a man-like listing of all non-emerge options
> ...

 

Agree with your suggestions.

It looks like your answer to upgrading glibc is two posts above.  :Wink: 

----------

## m_gustafsson

One question...

What is the function of the noCompile in /etc/update?

On my computer I don't want to have gnome-extra/gnome-screensaver installed so I put it into the parenthesis after no-compile:

```
# cat /etc/update | grep noCompile

# These are: noCompile, noRebuild, and noDowngrade

noCompile=(gnome-extra/gnome-screensaver)
```

but still it is among the ebuilds that will be emerged if I run:

```
# update 

** Emerging -uDN world then running revdep-rebuild.

** Resolving..

These are the packages that would be merged, in order:

Calculating world dependencies  ... done!

[ebuild  N    ] gnome-extra/gnome-screensaver-2.20.0  USE="opengl pam -debug

```

Thanks for a nice script  :Smile: 

----------

## m_gustafsson

Hmm, sorry for my other post   :Embarassed: 

The script does of course do what was expected...

It just lists all ebuilds that would be updated etc, and the a bit further down it says that gnome-screensaver is skipped.

Sorry...

----------

## steveL

Hi guys, glad people are still using this. Just to say sorry; I've got a stinking flu, and am unable to code atm. Development has been a bit slower over last couple of months, but we should have a new version out soon.

@ryker: yeah somehow looking for 'update' doesn't narrow things down ;) I was hoping to put an ebuild together once 0.1.4 is finished (just depclean and bugfixing to go.) I'll post a preview for the pkgcore i/f once I'm feeling a bit better and have fixed a glitch in it (that's why that version was on server, ryker, it was for uberpinguin to add pmerge, which he's done nicely! :D) And yeah, I know we still need to fix the tmpfs thing and add highlighting of errors.

@LXj: Hmm, ok, we'll add the timing thing. Have you used -l at all? Not sure about it logging via syslog (which is normally /var/log/messages) maybe it should be writing to a user-defined file? (default to /var/log/update or w.e) I have nfc about a man page tbh.

@m_gustafsson: heh np, thanks for using it :-)

----------

## OmSai

I absolutely love using this script  :Mr. Green: 

THANK YOU!

Got this error after autounmasking though -

```
# update -s 

** Emerging -uDN world then running revdep-rebuild.

# You will be asked for confirmation; CTRL-C to abort at any time

** Syncing portage tree

** Updating eix

 * Removing old portage-cache in /var/cache/edb/dep ...                   [ ok ]

 * Running emerge --metadata ...                                          [ ok ]

 * Copying old /var/cache/eix cache to /var/cache/eix.previous ...        [ ok ]

 * Running update-eix ...                                                 [ ok ]

Diffing databases (12396 - 12398 packages)

[>]   == app-antivirus/klamav (0.41 -> 0.42): KlamAV is a KDE frontend for the ClamAV antivirus.

[*>]  == app-emulation/vmware-server ([M]~1.0.3.44356 ~1.0.4.56528 -> 1.0.4.56528): VMware Server for Linux

[>]   == app-i18n/man-pages-ja (20060415-r2 -> 20070515): A collection of manual pages translated into Japanese

[>]   == app-i18n/man-pages-pl (20051024 -> 20070628): A collection of Polish translations of Linux manual pages.

[U]   == dev-libs/libmowgli (0.6.0@02/25/08; 0.6.0 -> 0.6.1): High-performance C development framework. Can be used stand-alone or as a supplement to GLib.

[*>]  == media-gfx/xsvg (~0.2.1 -> 0.2.1): a command line viewer for SVG files

[>]   == sys-fs/mdadm (2.6.2 -> 2.6.4): A useful tool for running RAID systems - it can be used as a replacement for the raidtools

[U]   == sys-libs/readline (5.2_p7@12/31/07; 5.2_p7 -> 5.2_p12-r1): Another cute console display library

[<]   == www-apps/mediawiki (1.8.5(1.8.5)!m 1.11.1(1.11.1) -> 1.11.1(1.11.1)): The MediaWiki wiki web application (as used on wikipedia.org)

[U]   == www-client/mozilla-launcher (1.56@10/13/07; 1.56 -> 1.58): Script that launches mozilla or firefox

[>]   == www-servers/lighttpd (1.4.18 -> 1.4.18-r1): Lightweight high-performance web server

[>]   == x11-terms/roxterm (1.7.4 -> 1.9.1): A terminal emulator designed to integrate with the ROX environment

[N]   >> dev-embedded/urjtag (~0.8): tool for communicating over JTAG with flash chips, CPUs, and many more (fork of openwince jtag)

[N]   >> media-libs/rubberband (~1.0.1): An audio time-stretching and pitch-shifting library and utility program

** Resolving..

These are the packages that would be merged, in order:

Calculating world dependencies  ..

!!! Problem resolving dependencies for app-misc/freemind

!!! All ebuilds that could satisfy "dev-java/xsd2jibx" have been masked.

!!! One of the following masked packages is required to complete your request:

- dev-java/xsd2jibx-0.2a_beta (masked by: ~amd64 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or 

refer to the Gentoo Handbook.

(dependency required by "app-misc/freemind-0.9.0_beta15" [ebuild])

!!! Depgraph creation failed.

** Do you want to unmask the following packages?

app-misc/freemind-0.9.0_beta15

** Autounmask (Y/n)?

 autounmask version 0.21 (using PortageXS-0.02.07 and portage-2.1.4.4)

 * Using repositories:

     /usr/portage

     /usr/local/portage

 * Using package.keywords file: /etc/portage/package.keywords

 * Using package.unmask file: /etc/portage/package.unmask

 * Unmasking app-misc/freemind-0.9.0_beta15 and its dependencies.. this might take a while..

 * Added 'dev-java/xsd2jibx ~amd64' to /etc/portage/package.keywords

 * Added 'dev-java/jibx ~amd64' to /etc/portage/package.keywords

 * Added 'dev-java/hoteqn ~amd64' to /etc/portage/package.keywords

 * Added 'dev-java/simplyhtml ~amd64' to /etc/portage/package.keywords

 * Added 'dev-java/groovy ~amd64' to /etc/portage/package.keywords

 * Added 'dev-java/asm ~amd64' to /etc/portage/package.keywords

 * Added 'dev-java/xstream ~amd64' to /etc/portage/package.keywords

 * done!

/sbin/update: line 1563: quitPhase: command not found

System is up to date.
```

It wrongly says "up to date" instead of doing the pending updates, or the packages it just unmasked.

----------

## steveL

Yeah that's fixed in the 20080109 version, om; sorry forgot about the bug.

http://dev.gentooexperimental.org/~igli/src/update/update-20080109

md5: 65218b557aad0d4f875d46944c18d1a0

I'll post it as link in main post (it has the same version number but I don't think anyone will mind ;)

edit: got in trouble with work for new version as I borrowed some ideas and code (it's half-mine anyhow! well ok not the best half..) Nearly ready, and they agreed we can put it out under CC Attribution-NonCommercial-ShareAlike so it shouldn't affect anyone. At least we'll be able to use the full lib for 0.1.5 so that'll make things a lot quicker to code. Meh, I hate this crap.

----------

## drescherjm

@steveL 

Thanks for such a useful tool. I just recently found this last week when you mentioned it in another thread.

----------

## drescherjm

I am not sure if this is one of the goals of the update script or not but I have began adding a very important feature for myself. The feature is about limited recovery of failed packages. Since I manage dozens of gentoo boxes I see some errors that are very easily fixed in a predictable way and I have always wanted to have a script do some of this for me instead of the ebuild failing then some manual steps for me to do to recover.

One such failure is:

```
x86_64-pc-linux-gnu-g++ -O2 -ffast-math -march=k8 -O2 -pipe -fomit-frame-pointer -msse3 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -o .libs/codeblocks app.o appglobals.o compilersettingsdlg.o crashhandler.o dlgabout.o dlgaboutplugin.o environmentsettingsdlg.o infopane.o main.o prefix.o printdlg.o scriptconsole.o scriptingsettingsdlg.o splashscreen.o startherepage.o -pthread  -L/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/src/wxAUI /var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/src/wxAUI/.libs/libwxaui.a /usr/lib64/libgtk-x11-2.0.so /usr/lib64/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libpangoft2-1.0.so /usr/lib64/libpango-1.0.so /usr/lib64/libcairo.so /usr/lib64/libfontconfig.so /usr/lib64/libfreetype.so /usr/lib64/libxml2.so /usr/lib64/libpng12.so -lm -lz /usr/lib64/libXrender.so /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so /usr/lib64/libglib-2.0.so -L/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/sdk /var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/sdk/.libs/libcodeblocks.so -L/usr/lib64 -L/usr/X11R6/lib64 -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_dbgrid-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_odbc-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -lpthread -ldl

/usr/lib64/libwx_gtk2u_adv-2.8.so: undefined reference to `g_assertion_message_expr'

collect2: ld returned 1 exit status

distcc[24706] ERROR: compile (null) on localhost failed

make[3]: *** [codeblocks] Error 1

make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/src'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/src'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src'

make: *** [all-recursive] Error 1

 *

 * ERROR: dev-util/codeblocks-2.0_pre4866 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 3064:  Called die

 * The specific snippet of code:

 *       emake || die "emake failed"

 *  The die message:

 *   emake failed

 *

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/environment'.

 * This ebuild is from an overlay: '/usr/local/portage/gentoo-overlay/'

 *

```

In this failure the error line is:

```
/usr/lib64/libwx_gtk2u_adv-2.8.so: undefined reference to `g_assertion_message_expr'
```

Which can easily be found by looking at the bottom 30 lines and using grep.

The fix for this error is very simple. Strip that line down to 

```
/usr/lib64/libwx_gtk2u_adv-2.8.so
```

And then do an equery belongs on that file to find out what package or packages this file is from. Then inject these into the list of things to emerge in the script before the current failed package and force update not to terminate if no packages were built on this pass.

I have this working in my modified update script and it has saved me for over 20 packages on my home desktop. I did run the update script on a few machines at work to update them to current and it never failed once. However I know from the code there that if the injected package to rebuild does not fix the problem it will be injected again at each pass. This could easily be fixed by adding the injected packages to a file and a grep to make sure it is not already there but I did not do that yet.

Here is the complete run with the modifyied update:

```
# /root/shell-scripts/update codeblocks

** Resolving..

These are the packages that would be merged, in order:

Calculating dependencies  ... done!

[ebuild   R   ] dev-util/codeblocks-2.0_pre4866  USE="contrib unicode -debug" 0 kB [1]

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Portage tree and overlays:

 [0] /usr/portage

 [1] /usr/local/portage/gentoo-overlay

Checking dev-util/codeblocks-2.0_pre4866        dev-util/codeblocks-2.0_pre4866

** Rebuilding dev-util/codeblocks

* ${ESVN_OPTIONS} contains -r, this usage is unsupported. Please

* see ${ESVN_REPO_URI}

* subversion update start -->

*      repository: svn://svn.berlios.de/codeblocks/trunk

*    working copy: /usr/portage/distfiles/svn-src/codeblocks-2.0_pre4866/trunk

* QA Notice: USE Flag 'vanilla' not in IUSE for dev-util/codeblocks-2.0_pre4866

* Patching:done

** Compiling Source ...

* Code::Blocks source tree has been configured. *

* ERROR: dev-util/codeblocks-2.0_pre4866 failed.

* Call stack:

*               ebuild.sh, line   49:  Called src_compile

*             environment, line 3064:  Called die

* The specific snippet of code:

*       emake || die "emake failed"

*  The die message:

*   emake failed

* If you need support, post the topmost build error, and the call stack if relevant.

* A complete build log is located at '/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/build.log'.

* The ebuild environment file is located at '/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/environment'.

* This ebuild is from an overlay: '/usr/local/portage/gentoo-overlay/'

/usr/lib64/libwx_gtk2u_adv-2.8.so: undefined reference to `g_assertion_message_expr'

R x11-libs/wxGTK-2.8.7.1-r1 x11-libs/wxGTK-2.8.7.1-r1 0

These are the packages that would be merged, in order:

Calculating dependencies ... done!

[ebuild   R   ] x11-libs/wxGTK-2.8.7.1-r1  USE="X doc gnome odbc opengl -debug -gstreamer -pch -sdl" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

emerge -pv =x11-libs/wxGTK-2.8.7.1-r1

x11-libs/wxGTK-2.8.7.1-r1

!! dev-util/codeblocks-2.0_pre4866 failed to install.

! Failed so far: x11-libs/wxGTK-2.8.7.1-r1 dev-util/codeblocks-2.0_pre4866

!! 1 packages, 2 processed.

x11-libs/wxGTK-2.8.7.1-r1: tail -n30 /var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/build.log

dev-util/codeblocks-2.0_pre4866: tail -n30 /var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/build.log

@ Retrying 2 packages:

  x11-libs/wxGTK-2.8.7.1-r1, dev-util/codeblocks-2.0_pre4866

Checking x11-libs/wxGTK-2.8.7.1-r1      x11-libs/wxGTK-2.8.7.1-r1

** Rebuilding x11-libs/wxGTK - 1 of 2

* Checking wxPython-src-2.8.7.1.tar.bz2 RMD160 SHA1 SHA256

* Unpacking wxPython-src-2.8.7.1.tar.bz2 to x11-libs/wxGTK-2.8.7.1-r1

* Patching:.......done

** Compiling Source ...

** Installing x11-libs/wxGTK-2.8.7.1-r1

** x11-libs/wxGTK-2.8.7.1-r1 installed successfully.

Checking dev-util/codeblocks-2.0_pre4866        dev-util/codeblocks-2.0_pre4866

** Rebuilding dev-util/codeblocks - 2 of 2

* ${ESVN_OPTIONS} contains -r, this usage is unsupported. Please

* see ${ESVN_REPO_URI}

* subversion update start -->

*      repository: svn://svn.berlios.de/codeblocks/trunk

*    working copy: /usr/portage/distfiles/svn-src/codeblocks-2.0_pre4866/trunk

* QA Notice: USE Flag 'vanilla' not in IUSE for dev-util/codeblocks-2.0_pre4866

* Patching:done

** Compiling Source ...

* Code::Blocks source tree has been configured. *

** Installing dev-util/codeblocks-2.0_pre4866

** dev-util/codeblocks-2.0_pre4866 installed successfully.

** All packages compiled successfully

2 passes were required.
```

A second failure case where a fix is easy comes from using confcache. I know for a fact that confcache does not work with every package so rebuilding an entire system it may cause failures for 2 to 5 packages. This failure the in last few lines of the log you will find "econf failed". Although this is not the only cause for econf failed in my case it is the most common. The fix for this (although it is not in my modified update) is to rebuild the package with FEATURES="-confcache" 

And finally. Building the docs for packages fail for probably 4 to 10 packages on my systems. One such package is net-misc/iputils. It would be nice to see the emerge retried with USE="-doc" in the case that it is detected that a doc build fails.

----------

## steveL

 *drescherjm wrote:*   

> I am not sure if this is one of the goals of the update script or not but I have began adding a very important feature for myself. The feature is about limited recovery of failed packages. Since I manage dozens of gentoo boxes I see some errors that are very easily fixed in a predictable way and I have always wanted to have a script do some of this for me instead of the ebuild failing then some manual steps for me to do to recover.

 

Yes it is one of the goals, John, and what you've done in your modifications is excellent!

 *Quote:*   

> A second failure case where a fix is easy comes from using confcache. I know for a fact that confcache does not work with every package so rebuilding an entire system it may cause failures for 2 to 5 packages. This failure the in last few lines of the log you will find "econf failed". Although this is not the only cause for econf failed in my case it is the most common. The fix for this (although it is not in my modified update) is to rebuild the package with FEATURES="-confcache"

 

That sounds like another useful one, and we already check FEATURES. Could you add that too, or in any case can you get in touch with us on irc.freenode.org in #friendly-coders? (I'm igli.) This last one could be made optional, but I think the first one should always run, since it's clear which lib needs upgrading. If neither case trigger, we need the tail output to go through a colourisation.

 *Quote:*   

> And finally. Building the docs for packages fail for probably 4 to 10 packages on my systems. One such package is net-misc/iputils. It would be nice to see the emerge retried with USE="-doc" in the case that it is detected that a doc build fails.

 

Yeah that's a nice one; it'll help with fresh installs as well. New version we're working on now has USE handling, but the data has been there for a while in the flags array. It'd be cool to have this stuff integrated for the final version of 0.1.4. :-)

----------

## drescherjm

BTW, thanks for your comments.   :Smile: 

Here is my diff based on the previous release 20071121

A few notes. I am by no means a bash guru more like a long time windows programmer who has had very limited bash programming. Also one of the fixes in here is an update for revdep-rebuild to work with the ~ version of getntoolkit which had a problem with the color option.

```
# diff -Naru /home/john/update /root/shell-scripts/update

--- /home/john/update   2008-02-29 12:26:25.000000000 -0500

+++ /root/shell-scripts/update  2008-02-24 23:40:44.000000000 -0500

@@ -458,13 +458,16 @@

 # fail pkg [silent]

 fail() {

-       echo "$1" >> "$failFile"

-       failList+=("$1")

        [[ $logFile ]] && {

+               process_reasons

                fR+=("$1: tail -n30 $logFile")

                echo "$1: tail -n30 $logFile" >> "$reasonsFile"

                logFile=

        }

+

+       echo "$1" >> "$failFile"

+       failList+=("$1")

+

        if [[ $emergeFile = $warnList ]]; then

                grep -qF "$1" "$mainEmergeFile" && let pA++

        fi

@@ -473,6 +476,79 @@

        ((round)) || log "$1 failed"

 }

+process_reasons() {

+       tail -n30 $logFile > $dir/lastFailure

+       grep failure $dir/lastFailure

+       grep undefined $dir/lastFailure

+

+#      grep undefined $dir/lastFailure | awk '{ print $1 }' | uniq | grep : | sed 's/://' | xargs -n1 -i equery belongs {} | head -1 >> "$failFile"

+       fail_other `grep undefined $dir/lastFailure | awk '{ print $1 }' | uniq | grep : | sed 's/://' | xargs -n1 -i equery belongs {}`

+

+       echo $failList

+}

+

+CpArray_Mac() {

+# Assignment Command Statement Builder

+

+    echo -n 'eval '

+    echo -n "$2"                    # Destination name

+    echo -n '=( ${'

+    echo -n "$1"                    # Source name

+    echo -n '[@]} )'

+

+# That could all be a single command.

+# Matter of style only.

+}

+

+declare -f CopyArray                # Function "Pointer"

+CopyArray=CpArray_Mac               # Statement Builder

+

+InsertArray() {

+

+# Input the array named $1.

+# Insert string $2.

+# Pos to insert $3

+

+    [ -z "$3" ] &&  return;

+

+    local n=$3

+

+    local -a TMP

+

+    local -a First

+

+    $($CopyArray $1 First)

+    TMP=( ${First[@]:0:n} $2 ${First[@]:n} )

+    $($CopyArray TMP $1)

+}

+

+fail_other() {

+       until [ -z "$1" ]  # Until all parameters used up . . .

+       do

+                InsertArray buildType "R" $p

+               InsertArray list "$1" $p

+               InsertArray oldVer "$1" $p

+               InsertArray sizes "0" $p

+

+               echo -n "${buildType[p]}" "${list[p]}" "${oldVer[p]}" "${sizes[p]}"

+

+               let p++

+               let added++

+               fR+=("$1: tail -n30 $logFile")

+               echo "$1: tail -n30 $logFile" >> "$reasonsFile"

+

+               emerge -pv ="$1" 2> /dev/tty |tee >(stripList >> "$emergeFile")

+               echo emerge -pv ="$1" 2> /dev/tty |tee >(stripList >> "$emergeFile")

+

+#              emerge -pv ="$1" | grep USE >> "$emergeFile"

+

+               echo "$1" >> "$failFile"

+               failList+=("$1")

+               shift

+       done

+

+}

+

 installedNow=()

 # installed pkg [silent]

 installed() {

@@ -812,7 +888,7 @@

 # - if Setup, won't check list at all

 checkType() {

 local l idx= line=

-       #echo "Checking $*"

+       echo "Checking $*" "$TAB$1"

        old=

        new=

        pfx=

@@ -3019,7 +3095,7 @@

                done # next in list

                ((p==tot)) || errMsg "$tot packages, $p processed."

                # Stop when can't install anything

-               ((n)) || { reportFailure; return 1; }

+               ((n+added)) || { reportFailure; return 1; }

                # Installed something; any failures?

                f=${#failList[@]}

                if ((f)); then

@@ -3116,7 +3192,8 @@

 revdepR() {

        startPhase "$how"

 #      echo "$# args: $*"

-       revdep-rebuild -i -pq "$@" $colourOpt 2>/dev/null | tee "$usrFile"

+       echo revdep-rebuild -i -pq "$@"

+       revdep-rebuild -i -pq "$@" 2>/dev/null | tee "$usrFile"

        r=$PIPESTATUS

        ((r)) && { checkCTRLC $r revdep 'Unable to resolve revdep-rebuild'; quitPhase; }

        grep -qF "$OK" "$usrFile" || {

@@ -4319,6 +4396,7 @@

 p=0

 # n = num successfully compiled

 n=0

+added=0

 if ((resume)); then

        pf=${#failList[@]}

        if ((pf>=tot)); then { pf=0; failList=(); fR=(); }

```

----------

## OmSai

 *steveL wrote:*   

> Yeah that's fixed in the 20080109 version, om; sorry forgot about the bug.
> 
> http://dev.gentooexperimental.org/~igli/src/update/update-20080109
> 
> md5: 65218b557aad0d4f875d46944c18d1a0

 

Almost fixed  :Razz: 

I get the y/N message this time around after auto-unmasking, but no prompt.  The script just exits.

```
# update -s

** Emerging -uDN world then running revdep-rebuild.

# You will be asked for confirmation; CTRL-C to abort at any time

** Syncing portage tree [getting file list] ..

-----------------8<-----------------8<-----------------8<-----------------------------

]0;Resolving emerge -uDN world** Resolving..

These are the packages that would be merged, in order:

Calculating world dependencies  . 

!!! Problem resolving dependencies for app-misc/freemind

!!! All ebuilds that could satisfy ">=dev-java/junit-3.8.2:0" have been masked.

!!! One of the following masked packages is required to complete your request:

- dev-java/junit-3.8.2-r1 (masked by: ~amd64 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or 

refer to the Gentoo Handbook.

(dependency required by "dev-java/groovy-1.5.4" [ebuild])

!!! Depgraph creation failed.

** Do you want to unmask the following packages?

dev-java/junit-3.8.2-r1

dev-java/groovy-1.5.4

** Autounmask (Y/n)?

y

 autounmask version 0.21 (using PortageXS-0.02.07 and portage-2.1.4.4)

 * Using repositories:

     /usr/portage

     /usr/local/portage

 * Using package.keywords file: /etc/portage/package.keywords

 * Using package.unmask file: /etc/portage/package.unmask

 * Unmasking dev-java/junit-3.8.2-r1 and its dependencies.. this might take a while..

 * Added 'dev-java/junit ~amd64' to /etc/portage/package.keywords

 * done!

]0;Resolving emerge -uDN world** Resolving..

These are the packages that would be merged, in order:

Calculating world dependencies ... done!

[ebuild     U ] dev-python/sip-4.7.3 [4.7.1] USE="-debug" 436 kB 

[ebuild     U ] dev-java/junit-3.8.2-r1 [3.8.1-r3] USE="-doc -source" 451 kB 

[ebuild  N    ] dev-java/jline-0.9.91  USE="-doc -source -test" 733 kB 

[ebuild  N    ] dev-java/ant-antlr-1.7.0  0 kB 

[ebuild  N    ] dev-java/bsf-2.4.0-r1  USE="python -doc -examples -javascript -source -tcl" 293 kB 

[ebuild     U ] dev-java/groovy-1.5.4 [1.0-r1] USE="(-bsf%)" 6,738 kB 

[ebuild     U ] net-p2p/transmission-1.0.6 [1.0.4] USE="gtk" 4,134 kB 

Total: 7 packages (4 upgrades, 3 new), Size of downloads: 12,783 kB

* 7 in total

@ About to cancel, Y to proceed (y/N)?

#
```

Thanks again

----------

## steveL

 *om wrote:*   

> Almost fixed :P
> 
> I get the y/N message this time around after auto-unmasking, but no prompt.  The script just exits.

 

Hmm if I'm honest I didn't test that properly (it used to wfm, promise ;) autounmask was kinda sucky so I backported the new version:

wget -O /sbin/update http://dev.gentooexperimental.org/~igli/src/update/update-20080110

md5: 34f58f3afaa39fb0bb4e23c93ab931f1

Still not totally happy with it in that it does -n for stuff in world/listed on cmd-line, no parameter for others, but the -n will filter down to deps; maybe we shouldn't do it for cmd-line stuff unless it's in world or about to be?

We should be able to separate out the target and unmask it ourselves if it's simple, with no versions, etc.. Sets in 2.2 will have to factor into this at some point. We'll get there ;-)

@John: Thanks for the patch; we'll definitely have that functionality, perhaps implemented slightly differently. New version is nearly ready; we'll add it once the USE editor's finished, along with other error stuff. I'll break out a diff for that part when we add it, so you can see how your spec is incorporated.

Here's some docs you might like:

 *friendlyToaster wrote:*   

> 
> 
> man bash | http://bash-hackers.org/wiki/doku.php?id=scripting:basics | http://wooledge.org/mywiki/BashGuide | http://wooledge.org/mywiki/BashFAQ | http://wooledge.org/mywiki/BashPitfalls | http://www.shelldorado.com/ | and of course | http://forum.bash-hackers.org/ ;)

 

----------

## drescherjm

 *Quote:*   

> Thanks for the patch; we'll definitely have that functionality, perhaps implemented slightly differently. New version is nearly ready; we'll add it once 
> 
> the USE editor's finished, along with other error stuff. I'll break out a diff for that part when we add it, so you can see how your spec is incorporated.
> 
> Here's some docs you might like: 

 

 :Smile: 

Thank You. I fully expected my code to be modified. I know this feature is difficult to test and I wrote the patch based on a few cases that happened to me a while upgrading machines at home and at work a few weeks back so if you have any questions what I was trying to accomplish with parts of the patch I can help there. One thing I would like to mention is that in a few cases the injection was absolutely necessary. I mean when rebuilding a library to fix the first breakage you may hit other libraries that have the same problem.

----------

## steveL

 *drescherjm wrote:*   

> Thank You. I fully expected my code to be modified. I know this feature is difficult to test and I wrote the patch based on a few cases that happened to me a while upgrading machines at home and at work a few weeks back so if you have any questions what I was trying to accomplish with parts of the patch I can help there. One thing I would like to mention is that in a few cases the injection was absolutely necessary. I mean when rebuilding a library to fix the first breakage you may hit other libraries that have the same problem.

 

Yeah that makes a lot of sense; hopefully we can start to work on this stuff now the list editing is almost done ;P

[edit: old pre-release deleted]

NB: This is work in-progress. It works fine for USE editing with single package.use file; we'll add the directory code soon. There should be some other bugs fixed, eg in ABI rebuilding, plus it works with pkgcore (although pkgcore doesn't display fetch sizes.) List editing is the best bit though :-)Last edited by steveL on Tue Mar 18, 2008 5:38 am; edited 1 time in total

----------

## achimh

I just came across your script, the last version of it to be exact.

I gave it a try, albeit I did a emerge -uDN world yesterday.

So out of curiosity I tried update without any parameters nevertheless.

One package that does not work is alsa-sound, no suprise I know about this, I deselected in the update list editor, and the next question whether I not want to continue with the update I answered with 'Y'. The next question:

```
@ Nothing selected. Do you want to quit? (y/N)?
```

When I type 'y' it does not quit, update list editor is shown.

When I type 'N' it quits.

Little bit strange, isn't it?    :Very Happy: 

I will give it again a shot when there is something substantial to update on my box.

----------

## steveL

 *achimh wrote:*   

> 
> 
> ```
> @ Nothing selected. Do you want to quit? (y/N)?
> ```
> ...

 

Heh indeed, Achim, it is; I'll get on to it later today.

----------

## steveL

wget -O /sbin/update http://dev.gentooexperimental.org/~igli/src/update/update-20080318

bbc0df8c73621f85e19a4fe322e822ca  /sbin/update

same version, sue me ;)

----------

## OmSai

Are there any plans to support dispatch-conf, the official Portage config file updater?

The backups that dispatch-conf makes are not ignored by update -

```
# update -s

!! You have 123 config file updates pending!

--------8<----------------8<----------------

** About to cancel, Y to proceed, E to edit list (N y e) N

! Config file updates pending

# cfg-update -l

Searching for updates...

No ._cfg0000_* files found...

# dispatch-conf
```

EDIT: looks like update is reading these files -

```
#cd /var/lib/cfg-update/backups

#ls -laR | grep '._old-cfg_' | wc -l

124

#ls -laR | grep '._new-cfg_' | wc -l

124
```

----------

## ryker

 *OmSai wrote:*   

> Are there any plans to support dispatch-conf, the official Portage config file updater?...

 

Sorry, this is a little off topic, but I couldn't resist commenting on that.  I don't see anywhere in the handbook, dispatch-conf touted as the 'official' config file updater.  AFAIK etc-update is still the closest thing to an 'official' config file updater.  I really don't care at all for dispatch-conf.  If I had to vote for a config file updater, I would say cfg-update beats them all, hands down.

----------

## steveL

 *ryker wrote:*   

>  *OmSai wrote:*   Are there any plans to support dispatch-conf, the official Portage config file updater?... 
> 
> Sorry, this is a little off topic, but I couldn't resist commenting on that.  I don't see anywhere in the handbook, dispatch-conf touted as the 'official' config file updater.  AFAIK etc-update is still the closest thing to an 'official' config file updater.  I really don't care at all for dispatch-conf.  If I had to vote for a config file updater, I would say cfg-update beats them all, hands down.

 

LMAO that was hilarious! Sorry i'm in a silly mood today, and that just cracked me up. I've been using etc-proposals for over a year, but have to say I prefer dispatch-conf out of the box; I just couldn't get my head round cfg-update. Here's a tip on setting up dispatch-conf btw. It'd be good to have some similar info for cfg-update I guess; I just love the way etc-proposals pops up in whichever desktop I'm on with a nice QT4 (could be gtk) GUI. It runs nicely from cmd-line as well when your X is borked ;)

To answer your question OmSai, you just need to set configUpdater=dispatch-conf in /etc/update. update -h config will always show you the latest config settings with their defaults.

----------

## OmSai

 *steveL wrote:*   

> To answer your question OmSai, you just need to set configUpdater=dispatch-conf in /etc/update. update -h config will always show you the latest config settings with their defaults.

 Thank you!

----------

## Sysa

I think it would be useful to have MD5 checksums together with the source file (e.g. update-20080110 and update-20080110.md5, warning-20071019 and warning-20071019.md5, etc) in the main repository.

----------

## creidiki

Nice script - I was wondering what the exact correct order of toolchain rebuild is? I'm trying to do something that takes care of that for paludis  :Smile: 

----------

## drescherjm

Anyone set update to work with bash completion?

----------

## steveL

Bleh just to let you know that update isn't dead (though I feel like it ;) I've been offline for a few weeks.

@Sysa: yeah when we get this version finished (bugs, depclean and bit more error-handling) we'll do an ebuild for sunrise.

@creidiki: If you haven't seen it check out Guenther's upgrade script which has a good discussion as well as emwrap.sh (both are mentioned by update if there's a X.Y.z upgrade for gcc.) Opinions vary, but you're looking at least at gcc, glibc, binutils, linux-headers; auto{hell} and the like come into it (considering upgrade) wrt full rebuild as well.

We have added hooks for paludis, but I don't know the options. Development version of script is kinda in flux atm, but it'd be cool to finish paludis support so we could compare and contrast (pkgcore seems to be working with it fine.)

@drescherjm: Never used it tbh; how would that work given that it's pretty much all short flags?

Anyhow, thanks for using it, sorry for hiatus. Should have a new version by next week.

----------

## drescherjm

 *Quote:*   

> @drescherjm: Never used it tbh; how would that work given that it's pretty much all short flags? 

 

What I miss most that if I type emerge -av sa and hit tab the bash completion gives me a list of all packages that start with sa to choose from. Similar to tab completion for filenames.

----------

## creidiki

 *steveL wrote:*   

> @creidiki: If you haven't seen it check out Guenther's upgrade script which has a good discussion as well as emwrap.sh (both are mentioned by update if there's a X.Y.z upgrade for gcc.) Opinions vary, but you're looking at least at gcc, glibc, binutils, linux-headers; auto{hell} and the like come into it (considering upgrade) wrt full rebuild as well.
> 
> We have added hooks for paludis, but I don't know the options. Development version of script is kinda in flux atm, but it'd be cool to finish paludis support so we could compare and contrast (pkgcore seems to be working with it fine.)

 

I'd love to swap notes when you're done with the next version, though I never planned to release my script - it was mainly something to hack in scheme to keep me sane during my java university course last trimester  :Smile: 

I'll take a look at those links you mentioned.

Currently I'm running:

  linux-headers glibc binutils (gmp mpfr) gcc glibc binutils (gmp mpfr) gcc

GMP and MPFR are dependent on the version of gcc detected, and - for versions

earlier than 4.3 - whether the fortran USE-flag is enabled.

After that I add libstdc++-v3 or gcc 3.3 if detected.

Do you really think AutoHELL/libtool are necessary, given that they're running on interpreters? It might be a good idea to rebuild m4, however ... *ponders*

----------

## steveL

 *creidiki wrote:*   

> I'd love to swap notes when you're done with the next version, though I never planned to release my script - it was mainly something to hack in scheme to keep me sane during my java university course last trimester :)

 

Heh, well feel free to drop by #friendly-coders on irc.freenode.org if you want to chat about it. If you're into scheme, I'm sure hkBst would love to hear from you; he's normally in #gentoo-lisp (there isn't a scm channel yet.) There's #scheme #bigloo and #chicken too; #roadsend-php is a php compiler built using scheme/bigloo.

 *Quote:*   

> Currently I'm running:
> 
>   linux-headers glibc binutils (gmp mpfr) gcc glibc binutils (gmp mpfr) gcc
> 
> GMP and MPFR are dependent on the version of gcc detected, and - for versions
> ...

 

Well it's more a case of if stuff gets updated, although with autoHell newer versions can be problematic. It'd be cool to work on a list to build on an -e world or system though; update has had auxTC (around line 89) for a while which is: zlib gnuconfig gcc-config patch m4 flex binutils-config bison binutils autoconf libtool gettext, but it's not being used yet; it's just where I'm gathering stuff (and I'd like to do binutils a couple of times at least.) Maybe we could work on that?

----------

## steveL

OK, new version with improved toolchain handling for -e system|world|foo:

wget -O /sbin/update http://dev.gentooexperimental.org/~igli/src/update/update-20080430

Current MD5:  a640aaa196a735f7e417a6ac2fa9438a

It's been streamlined internally so it should be more efficient. As ever, any bugs can be reported in #friendly-coders on irc.freenode.org if you want a quick response, or in this thread. Once it's been tested and debugged I'll put it on front page.

Blame creidiki for this one ;)

Anyone using portage-2.2 yet? I'm reinstalling laptop atm using update -e system; the toolchain handling is nice :D

Oh I added category exclusions using catx array in /etc/update (see update -h config). I think we need to update /etc/warning for baselayout and openRC too, since they need user attendance. If there's anything else that should go in there let us know.

edit: fixed a typo which meant post-install actions weren't getting run.

edit2: deglitching sometimes need quite tricky changes ;p

edit3: more bugfixes, should be pretty close now.

edit4: fix glsa option, thanks Mats.

edit5: changed it back to old one as 0505 was buggy; 0507 is below and does autounmask but needs work on USE editing (will be done soon.)Last edited by steveL on Thu May 08, 2008 12:27 pm; edited 5 times in total

----------

## steveL

 *drescherjm wrote:*   

> What I miss most that if I type emerge -av sa and hit tab the bash completion gives me a list of all packages that start with sa to choose from. Similar to tab completion for filenames.

 

Wow that sounds cool! No reason we couldn't use same config for update, although I've never used completion. Some of the folks in #bash use it though. The bash man page is confusing, but does have lots of info.

http://tiswww.tis.case.edu/~chet/bash/bashref.html is pretty good too, if you haven't seen it. I'd be glad to help getting it going but I'm not going to take responsibility for doing so, simply as I've never used it. If you want to collaborate on it (it helps to talk about stuff ime) you know the channel ;)

----------

## m_gustafsson

Hi,

I am using update version 0.1.4.0_pre and it works fine  :Smile: 

One question though... 

It seems like execution of GLSA check has changed from -S to -A.

```
# update -h

=================================================================

            update

     an emerge wrapper to cut cruft and retry failed packages

=================================================================

 Usage: update <options> [target list]

 Options: -eapqvurnDNo[bB][gG][kK]imsfFlRCSMhxXWYzc

          -eapunDNo[bB][kK][gG] : same as emerge

   update --version for version string

=================================================================

   -a ask before installing

   -s sync first (does eix if installed)

   -S sync only sync tree and quit

   -f fetch files first (no parallel-fetch)

   -F fetch only quit after fetching

   -i install target/s to world

   (use emerge -q --depclean <pkg> to uninstall)

   -r resume (after -p|a, ctrl-c, or halt)

   -m use tmp-fs for build

   -c disable colour

   -A GLSA check -- after update
```

But I can't get it to work...

```
# update -A

 Usage: update <options> [target list]

 Options: -eapqvurnDNo[bB][gG][kK]imsfFlRCSMhxXWYzc

or update -h or -? (command-line) or --help for help.

!! update: Unknown option -A chosen.
```

/Mats

----------

## steveL

Oops sorry about that Mats. Try this one:

[edit: dead link]

edit: changed link as older one was much buggier (transition.) This version still needs work on USE editing (we changed the internals a lot) but does autounmask and has some of the lib code from work. We'll get this feature complete and working then start cutting the script back.

edit2: oops forgot to change md5.Last edited by steveL on Mon May 12, 2008 4:31 am; edited 3 times in total

----------

## steveL

Oh BTW autounmask infinite loop is hitting me atm; quick workaround given by Marco Clocchiatti is, in /usr/bin/autounmask, at line 42:

```
#my $arch                = $pxs->getArch(); # comment line 42

my $arch                = 'amd64'; # put here your arch.
```

----------

## steveL

[edit: dead link]

USE editing has regressed, but this gets rid of need for autounmask (and dependency on perl) as I just couldn't get it working on amd64/core2. [edit this is fixed I had an old debug line in that skipped USE editing doh]

A good example is: update -ia xmonad # if you're not into haskell as that needs a couple of other things unmasked.

[If you do want to emerge it, I suggest you

echo dev-lang/ghc >> /etc/portage/package.keywords

..as well.]Last edited by steveL on Mon May 12, 2008 4:30 am; edited 1 time in total

----------

## m_gustafsson

Steve, thanks for your quick reply   :Very Happy: 

Best regards, Mats

----------

## steveL

You're welcome Mats :-) Here's a better version, which does unmask (just did startkde-3.5.9 which was about 10 or 12 dependents as well) and USE editing is back.

[edit: dead link]

This is nearly done (I hope!) so once any UI changes are done, I'll post it to front page. Really need to do the error detection and check what's up with tmpfs. I'd like to finish cleaning up the backend some more as well, though my partner-in-crime reckons we should just switch it all over to the lib code. We'll see.Last edited by steveL on Mon May 12, 2008 4:29 am; edited 1 time in total

----------

## steveL

wget -O /sbin/update http://dev.gentooexperimental.org/~igli/src/update/update-20080512

md5sum /sbin/update

Current md5: 696359e55c0a6b104009e90cca36d65e

It's getting close to "release" (ie push to front page) so speak now if you found any bugs :)

Next version will be error analysis (and that tmpfs thing I feel bad about that, it's been on list for ages.) Then I need depclean and once that's working we'll call 0.1.4 done and move on to using lib code and focus on portage 2.2.

edit: portage d/l output changed.

----------

## swimmer

Installed it and it works so far but spits out this error msg after installing all packages:

```
/usr/local/bin/update: line 4037: restoreTitle: command not found
```

Greetz

swimmer

Edit: After running revdep-rebuild (as part of the script) it spits out a similar msg:

```
/usr/local/bin/update: line 2285: restoreTitle: command not found
```

----------

## steveL

Hi swimmer, yeah noticed that today; version on front page (Griz's; same URL) has just changed; there was some USE glitching (barfed if you edit global USE, resolve then change it back) as well. Still has minor UI wrinkle: displays as changed when you just view the USE, but installing ok.

Also added short atom form for easy unmask; eg update -ia kview-3.5.9 (reinstalling machine it was doing my fingers no good typing kde-base over and over ;)

----------

## steveL

Bump bugfix was quite a bad one, due to new Merging and temp title stuff. There's a hard to trigger bug in USE editing which we need to sort out before we move on. Might be a couple of days.

----------

## drescherjm

I am still using my patched version of update 0.1.4.0_beta3b to support rebuilding libraries with unresolved symbols and I found that with this version I can not stop gcc from rebuilding even though I have it in my /etc/update

```
Total: 485 packages (1 upgrade, 1 in new slot, 483 reinstalls), Size of downloads: 84 kB

Fetch Restriction: 1 package

Portage tree and overlays:

 [0] /usr/portage

 [1] /usr/local/JMDGentooOverlay/gentoo-overlay

 [2] /usr/portage/local/layman/masterdriverz

Not compiling sys-devel/gcc-config-1.4.0-r4

Not rebuilding (1)

Not compiling www-client/mozilla-firefox-bin-2.0.0.14

Not compiling sys-kernel/gentoo-sources-2.6.25-r4

Not compiling sys-devel/gcc-4.2.3

Not compiling sys-libs/glibc-2.6.1

* 485 in total

Checking dev-libs/expat-2. Warn         dev-libs/expat-2.

Checking dev-libs/expat-2. Warn         dev-libs/expat-2.

** Toolchain: rebuilding portage

* Checking dependencies for sys-apps/portage-2.1.4.4..done

Checking sys-apps/portage-2.1.4.4 Toolchain     sys-apps/portage-2.1.4.4

[Toolchain] Rebuilding sys-apps/portage

* Checking portage-2.1.4.tar.bz2 RMD160 SHA1 SHA256

* Checking portage-2.1.4.4.patch.bz2 RMD160 SHA1 SHA256

* Unpacking portage-2.1.4.tar.bz2 to sys-apps/portage-2.1.4.4

* Unpacking portage-2.1.4.4.patch.bz2 to sys-apps/portage-2.1.4.4

* Patching:.done

* Setting portage.VERSION to 2.1.4.4 ...

** Compiling Source ...

** Installing sys-apps/portage-2.1.4.4

* If you have an overlay then you should remove **/files/digest-* files

* (Manifest1) because they are no longer supported. If earlier versions

* of portage will be used to generate manifests for your overlay then you

* should add a file named manifest1_obsolete to the root of the repository

* in order to disable generation of the Manifest1 digest files.

* For help with using portage please consult the Gentoo Handbook

* at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3

** sys-apps/portage-2.1.4.4 installed successfully.

Packages installed so far: 1 of 1.      484 remaining

** Toolchain: rebuilding gcc

* Checking dependencies for sys-devel/gcc-4.2.3..done

Checking sys-devel/gcc-4.2.3 Toolchain  sys-devel/gcc-4.2.3

[Toolchain] Rebuilding sys-devel/gcc

update: user cancelled: Install sys-devel/gcc-4.2.3

* Terminating..done.

# Skipped: sys-devel/gcc-config-1.4.0-r4 [R]  www-client/mozilla-firefox-bin-2.0.0.14 sys-kernel/gentoo-sources-2.6.25-r4 sys-devel/gcc-4.2.3 sys-libs/glibc-2.6.1

```

Is this known?

----------

## drescherjm

 *steveL wrote:*   

>  *drescherjm wrote:*   What I miss most that if I type emerge -av sa and hit tab the bash completion gives me a list of all packages that start with sa to choose from. Similar to tab completion for filenames. 
> 
> Wow that sounds cool! No reason we couldn't use same config for update, although I've never used completion. Some of the folks in #bash use it though. The bash man page is confusing, but does have lots of info.
> 
> http://tiswww.tis.case.edu/~chet/bash/bashref.html is pretty good too, if you haven't seen it. I'd be glad to help getting it going but I'm not going to take responsibility for doing so, simply as I've never used it. If you want to collaborate on it (it helps to talk about stuff ime) you know the channel 

 

For gentoo bash completion this is handled with 

app-shells/gentoo-bashcomp

and is configurable with 

eselect bashcomp

I am not sure how  (and do not have the time) to extend this to work with update. I was hoping that someone had already done this and not as much asking for a new feature.

----------

## Naib

There exists an ebuild for this (and the warning's file). Am trying to get it into sunrise atm since there is no point manually fetching an ebuild for something like this

----------

## StephanX

Hello,

as I accidentally deleted my /usr/share/apps folder, I wanted to emerge -e world.

Unfortunately, update -e does not work for me. I get the following output:

```
Total: 470 packages (470 reinstalls), Size of downloads: 1,622 kB

Portage tree and overlays:

 [0] /usr/portage

 [1] /usr/portage/local/layman/font-overlay

!! update: Bad param to compare: sys-apps/shadow

Internal error in verCompare(5107) :operMatch(3833) :isABI(695) :readList(3285) :getList(3243) :checkList(3571) :checkListRetry(5533) : line 6943
```

Btw., I am using that file: http://dev.gentooexperimental.org/~igli/src/update/update-20080607. Anyways, the same output occurs, when I use update-20080605.

Any hints?

----------

## deefster

update version: 0.1.4_pre

update =app-emulation/virtualbox-additions-1.6.2

The install appears to hang.  It is actually prompting to read and accept a license prior to installation.

A case like this is fairly rare, but I thought I'd report it just the same.

Also, a general feature request:

It would be nice to see the download progress that you get when using emerge.

I've been using this script since 0.1.3.2 and love it. 

Thanks,

Darren

----------

## UberPinguin

Just tried out latest update, SteveL.  I really like the new feedback method - showing the currently-running build command is a nice compromise between being informative and eliminating cruft.  Well done!  :Cool: 

@StephenX: You have a buggy version of update.  It has been repaired, and the link is updated.  Try again  :Smile: 

@drescherjm: Try update -h error.  And isn't it about time you joined us on IRC? irc.freenode.net/#friendly-coders

@deefster: update does have a progress bar.  Are you using axel by chance?  We're a bit stuck on the vbox stuff and are looking for ideas.

@all: Sorry for the buggy versions.  We should have the normal flow of things back on track soon.

----------

## drescherjm

 *Quote:*   

> And isn't it about time you joined us on IRC? irc.freenode.net/#friendly-coders 

 

I am a bit overextended at the moment so I can not take on any additional work.

----------

## ryker

I've noticed pkgcore mentioned a couple times in this thread.  Is it possible to use pkgcore with this update script instead of emerge?  I've glanced at the script and I see a variable '$resolver' with a reference to pkgcore and palaudis.  I tried setting 'resolver="pkgcore" in /etc/update, but that didn't work.

----------

## UberPinguin

 *ryker wrote:*   

> I've noticed pkgcore mentioned a couple times in this thread.  Is it possible to use pkgcore with this update script instead of emerge?  I've glanced at the script and I see a variable '$resolver' with a reference to pkgcore and palaudis.  I tried setting 'resolver="pkgcore" in /etc/update, but that didn't work.

 Yes.  Use your favorite editor to modify /etc/update, and add a emerge=pmerge line.  This will cause update to use pkgcore for both the dependency resolution and the package installation.  Alternatively, you can set emerge=smerge.  This will cause update to use pkgcore for dependency resolution, but use portage for the actual package installs.

----------

## ryker

 *UberPinguin wrote:*   

>  *ryker wrote:*   I've noticed pkgcore mentioned a couple times in this thread.  Is it possible to use pkgcore with this update script instead of emerge?  I've glanced at the script and I see a variable '$resolver' with a reference to pkgcore and palaudis.  I tried setting 'resolver="pkgcore" in /etc/update, but that didn't work. Yes.  Use your favorite editor to modify /etc/update, and add a emerge=pmerge line.  This will cause update to use pkgcore for both the dependency resolution and the package installation.  Alternatively, you can set emerge=smerge.  This will cause update to use pkgcore for dependency resolution, but use portage for the actual package installs.

 

Thank you.

----------

## deefster

On Griz's version from the front page, it looks like some messages slip through the filter for libtool.

I'm guessing it's not by design, so I'm reporting it.

```
** Rebuilding dev-libs/DirectFB - 19 of 25

* Checking DirectFB-0.9.25.1.tar.gz

* Unpacking DirectFB-0.9.25.1.tar.gz to dev-libs/DirectFB-0.9.25.1

* Patching:...done

** Compiling Source ...

/bin/sh ../../libtool --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include            -I../../lib            -/bin/sh ../../libtool --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include            -I../../lib            -/bin/sh ../../libtool --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include            -I../../lib            -/bin/sh ../../libtool --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../includelib -DDATADI-I../../libare/dire..  -/bin/sh ../../libtool --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../includelib -DDATADI-I../../libare/dire..  -/bin/sh ../../libtool --mode=compile 

---snip----

* Each DirectFB update in the 0.9.xx series

* breaks DirectFB related applications.

* Please run "revdep-rebuild" which can be

* found by emerging the package 'gentoolkit'.

```

Last edited by deefster on Thu Aug 14, 2008 1:44 pm; edited 1 time in total

----------

## steveL

Oops, sorry deefster, I posted updated version online (try !update in #friendly-coders or in pm to bot [no ! req'd]) but you can't browse that directory from web, and I've been offline in terms of Gentoo for a while (Gentoo politics wrt asshat {ex,}devs can be bad for your career..;) so didn't get the version on here updated. TBH I thought it was in the 0721 version I first put on the bot. My bad, apologies: normal service is now resumed.. ;-)

@drescherjm: None of us use bash-completion, so if you want it done, you're gonna have to come online and "play the client" or it ain't gonna happen. From what I've seen it should be simple since Gentoo has bash-completion helpers, and in any case we simply want it to use the same formulation as emerge (minus --long-opts). Give time to get time or wait til someone else feels motivated to put in half an hour.. ;-)

----------

## drescherjm

 *Quote:*   

> @drescherjm: None of us use bash-completion, so if you want it done, you're gonna have to come online and "play the client" or it ain't gonna happen. 

 

This is not a high priority item at the moment but I will still try to find the time sometime in the next few months.

----------

## steveL

Hmm that one wasn't very good.. new version should be much more stable (there were some unmask fixes plus an adjustment to toolchain so it does python before portage/pkgcore, or w/e the PM-deps are set to; for paludis I have no clue, so if you use it let us know.) Some other minor fixes I'm sure, but overall it seems to be working a lot better. Famous last words.. ;p

HTH.

PS: deefster can you edit your post so there's less libtool cruft filling the page? ta :-)

----------

## deefster

@steveL

done.

On a separate topic, I read somewhere that update supports (or will support) update-live-ebuilds.  Is that true?  If so, what are the flags to spawn update-live-ebuilds?

----------

## steveL

Ta deefster.

 *deefster wrote:*   

> On a separate topic, I read somewhere that update supports (or will support) update-live-ebuilds.  Is that true?  If so, what are the flags to spawn update-live-ebuilds?

 

It's more the other way round: ule calls update as another "package manager" (which made me feel good about it as a wrapper.;) I posted a config file so that ule will call update correctly a while back. Should be fairly simple for you to play with; let us know if you need anything changed on the update side.

It would be nice to have it built in, but afaict the functionality should be in portage soon enough.

----------

## deefster

cool, it works

I had tried it before, and it wasn't calling update like I thought it should.  I believe the issue was that I hadn't been using update when I originally installed the live ebuilds, so it defaulted to the original program (emerge).

I ended up setting FORCE_DEFAULT_EMERGE_PROGRAM in ule.conf

----------

## steveL

Bugfix, should be more stable wrt to USE flag editing.

I'm getting a strange bug with checkType failing, I think this might be due to the dropCache setting (trying with it at 0 now) so if you have any issues with packages suddenly being skipped (you'll see a debug output with checkType in red) try setting dropCache=0 in /etc/update.

----------

## deefster

I've noticed an issue with GLSA not picking up changes.  It lists applicable GLSA's then reports 0. 

Is this a known issue?

Version=0.1.4.0_pre3

```

** Checking GLSAs.. this will take a while ;)

* GLSA  200808-05

[Upgrade] net-misc/dhcp-3.1.1 [3.0.3-r9]

* GLSA  200808-09

[Upgrade] net-nds/openldap-2.3.43 [2.3.41]

* GLSA  200807-16

[Upgrade] dev-lang/python-2.4.4-r14 [2.5.2-r6]

# There are no GLSAs to install.

```

----------

## Naib

The update script has been pushed to a git server

git clone git://weaver.gentooenterprise.com/update.git

A trac's to capture bugs and request is being setup at the moment to aid in tracing bugs and bug resolving

http://weaver.gentooenterprise.com/update

When I/we/them/??? get around it an overlay might also get made to capture this and a few other projects

----------

## steveL

 *deefster wrote:*   

> I've noticed an issue with GLSA not picking up changes.
> 
> Is this a known issue?

 

Yeah sorry about that deefster (been in the bot for a bit) should be fixed in Griz's version on front page. Just working on warning for e2fsprogs-libs (requires yet more infrastructure) and user-configured actions after install of pkg (atm it only does ones immediately after the package has installed.) BTW, feel free to drop by #friendly-coders if you should need something fixed at any point. Sometimes I'm a bit slow to upload, especially if it's going through changes, but bot always has latest testing version (/msg friendlyToaster update).

----------

## steveL

Source files have all been moved to this directory: http://weaver.gentooenterprise.com/src/update/ which is browseable in case you need to try an older version or want to check what the latest one is.

----------

## steveL

Fix for bug #1 Yay we have a trac :D

Bug reports should be filed here for better management and collaboration: http://weaver.gentooenterprise.com/update/

Keep telling us stuff you'd like, etc in this thread, if you're not sure how to frame it as an enhancement, or you just want to chat about it first. Positive feedback is good too ;p

Yes we know portage 2.2 support (eg --jobs) could be better, but we're trying to get all the features so far working; at least -C (--depclean) is functional finally and I haven't forgotten the tmpfs thing, Pol.

We'll probably do a rewrite for 0.1.5 to fully exploit portage 2.2, since --keep-going means we shouldn't need the continuation algorithm anymore.

edit: doh! it's -C for depClean and -A for glsALast edited by steveL on Sat Sep 06, 2008 5:38 am; edited 1 time in total

----------

## swimmer

Thank you very much for the always ongoing development & improvements!!!

Even using stable portage it's a pleasure to have update helping me keep the system clean & lean  :Wink: 

Best regards

swimmer

----------

## steveL

Thanks very much swimmer, that kinda comment makes it much more fun to code :D

----------

## deefster

Feature request to capture and print out the output from portage when a package has fetch restriction.

```
>>> Emerging (1 of 1) app-emulation/virtualbox-ose-additions-2.0.2 to /

!!! app-emulation/virtualbox-ose-additions-2.0.2 has fetch restriction turned on.

!!! This probably means that this ebuild's files must be downloaded

!!! manually.  See the comments in the ebuild for more information.

 * Please download the package from:

 *

 * http://download.virtualbox.org/virtualbox/2.0.2/VBoxGuestAdditions_2.0.2.iso

 *

 * and then put it in /usr/portage/distfiles

 * Fetch failed for 'app-emulation/virtualbox-ose-additions-2.0.2'

```

----------

## Naib

 *deefster wrote:*   

> Feature request to capture and print out the output from portage when a package has fetch restriction.
> 
> ```
> >>> Emerging (1 of 1) app-emulation/virtualbox-ose-additions-2.0.2 to /
> 
> ...

 

open a bug at the update trac's  :Wink: 

----------

## steveL

Hmm if it's not doing that already it's a regression deefster; that functionality has been in it from near the beginning (first page of thread.) Please file a bug and it won't get forgotten.

----------

## m_gustafsson

Hi,

I use cfg-update together with update, and it has been working very good for quite a while, but now I always get the below message after update has run revdep-rebuild:

```
...

Dynamic linking on your system is consistent... All done. 

** Running cfg-update

cfg-update: missing valid options

Try `cfg-update --help' for more information.
```

It seems like update is not running:

```
# cfg-update -u
```

Am I doing anything wrong?

/Mats

----------

## steveL

 *m_gustafsson wrote:*   

> It seems like update is not running:
> 
> ```
> # cfg-update -u
> ```
> ...

 

No Mats, not at all. I imagine it's a problem with cfg-update changing location; atm we only run it with -u if the etcUpdater is /usr/bin/cfg-update; it's line 5482 here, in function checkConfigUpdates(); it'll be easier to search for that function as my version is in the middle of being worked on. You could make that line:

```
if [[ $etcUpdater = */cfg-update ]]; then

   "$etcUpdater" -u 
```

and see if that helps.

Edit: we will of course add that fix to the one we're working on atm.

----------

## m_gustafsson

Hi,

I did the change and run it, but of course there were no config files to be updated, so I don't know if it works.

One strange thing though is that cfg-update is located in /usr/bin:

```
# which cfg-update

/usr/bin/cfg-update
```

/Mats

----------

## steveL

 *m_gustafsson wrote:*   

> I did the change and run it, but of course there were no config files to be updated, so I don't know if it works.
> 
> One strange thing though is that cfg-update is located in /usr/bin:
> 
> 

 

Er doh, that test should just be: [[ $etcUpdater = cfg-update ]] as it only saves the utility name (that's quick fix, not sure if it's worth saving the whole path.) Sorry for mess-up.

----------

## m_gustafsson

Thanks!

I will give it a try   :Smile: 

/Mats

----------

## m_gustafsson

steveL,

just wanted to let you know that the fix is working   :Smile: 

Thanks!

/Mats

----------

## steveL

Excellent! Thanks for letting me know, Mats. There is a newer version in git, if you feel brave ;-) I'll probably push it out as a pre-release in a few days, barring any surprises. Need to fix the tmpfs thing and then finish on 0.1.4.

----------

## Grilo

New update and portage 2.2. I have updated my portage and ran a script due to installing kde4 but now the update cannot write to my package.mask/unmask as those are now directories as im ran the script to switch from file to directories. does anyone know how to switch update to work with the new sets function in portage 2.2?

thank you for your time.

Grilo[/url]

----------

## steveL

 *Grilo wrote:*   

> New update and portage 2.2. I have updated my portage and ran a script due to installing kde4 but now the update cannot write to my package.mask/unmask as those are now directories as im ran the script to switch from file to directories. does anyone know how to switch update to work with the new sets function in portage 2.2?

 

Um it's not the sets (update handles those afaik) so much as the directory use and unmask; did you get an appropriate error message about that?

I don't use directories for those so just left the logic in place to handle them (ie stub functions) when it came up, which would need a bit more code (USE editing has only been what I'd call stable for the last month or so.) If you search for: ((pUseisDir)) (yes it's wrongly capitalised on 'Is', meh we'll fix it soon;) you should find the functions (about line 2000) for that setup. ATM they're pretty much just copies of the single-dir cases. You're welcome to patch those (they haven't been changed in ages and no-one else is working on them) or if you want log on to #friendly-coders on irc.freenode.org and we'll do it collaboratively.

You might want to work from the git version, details are on the trac site; but as I mentioned that part of the code won't change under you if you want to work on it.

----------

## kittykat

Hi there,

I am trying to run /sbin/update

and it has three fetch restrictions. 

It doesn't tell me information of where to download fetch-restrictions from (which a normal emerge would) - and I have put these in the "SKIP" environment variable, and yet they are not being skipped.

The failing of these fetch restrictions is not ignored whilst it carries on with what it _can_ do - instead it simply ends with an error.

Is any of this fixable with a flag that I am yet to notice, or with a config file edit of some sort, or could future versions do this?

thanks very much!

----------

## kittykat

update:

I did 

export SKIP="blah/blah blah/blah" 

for the packages that had failed dependancies - and it now seems to be skipping everything. 

I then attempted to unset SKIP and setting SKIP to "" but in both instances it still seems to be skipping everything...

thank you

----------

## steveL

 *kittykat wrote:*   

> I did 
> 
> export SKIP="blah/blah blah/blah" 
> 
> for the packages that had failed dependancies - and it now seems to be skipping everything. 
> ...

 

Whoops :-) Sorry haven't used SKIP since we first put it in. I'll take a look tonight.

----------

## steveL

Fix for SKIP and eix-sync on portage 2.2.

Can you give some output of the fetch-restriction problem kittykat?

----------

## deefster

http://weaver.gentooenterprise.com/update

I went there to file a bug...

Basically, looks like there's an issue in the list handling for a blocked package:

```

** Installing 11/21 packages

! There are blocking packages:

! sys-libs/ss (is blocking sys-libs/e2fsprogs-libs-1.41.2)

@ Press Y to unmerge sys-libs/ss, any other key to skip sys-libs/e2fsprogs-libs-1.41.2, CTRL-C to quit. (y/N)?N

/usr/local/sbin/update: line 1039: sys-libs/e2fsprogs-libs-1.41.2: division by 0 (error token is "-libs-1.41.2")

@ About to cancel? Y to proceed, E to edit list(N y e)

```

Using Version=0.1.4.0_pre5 pulled down from git on 10/10

Using

----------

## steveL

Hi deefster, sorry it's changed to http://weaver.gentooenterprise.com/trac/update now, edited front page to reflect that.

 *deefster wrote:*   

> 
> 
> Basically, looks like there's an issue in the list handling for a blocked package:
> 
> ```
> ...

 

Yeah I'm getting some wierd "unexpected" errors; looking at code it calls skipCompile with pkg names and not indexes which is wrong. We reworked all the blocker stuff, so I'll try and fix it myself tonight, if not I'll bug Ranjit tomorrow. Heh he was obviously tired on that part (which is good in one sense, cos now I get to tease him about it;) I have a feeling it might be me "simplifying" skipCompile tho.

Meantime, you need to take sys-libs/ss and sys-libs/com_err out of world file (/var/lib/portage/world) and then portage should get past the block automatically. (It's the bug that was on front page for quite a while.)

----------

## notHerbert

I think the -e option is nice, and useful.  I always found it rather strange that gcc is emerged  near the end of an emerge -e system/@system, or bootstrap.sh.

I shall definitely use this next time I need to do a system emptytree emerge,  i.e a new installation.

Thanks a bunch.   :Smile: 

BTW: your script called me an l33t ricer, you know, because of the tilde.  It reminds me of the Sid caveat "If it breaks you get to keep both pieces."    :Cool: 

----------

## swimmer

 *steveL wrote:*   

> [...]Meantime, you need to take sys-libs/ss and sys-libs/com_err out of world file (/var/lib/portage/world) and then portage should get past the block automatically. (It's the bug that was on front page for quite a while.)

 

Not quite ... I have neither sys-libs/ss nor sys-libs/com_err in my world file and still get those blockers with the latest update (from git). There has to be something else which causes those blockers (no, I don't have mit-krb5 installed).

Greetz

swimmer

----------

## notHerbert

Nor should they be in world really, because sys-libs/ss and sys-libs/com_err come with the stage* tarball. Now e2fsprogs-libs replaces them but not without some apparent aggravation.

----------

## steveL

 *swimmer wrote:*   

> I have neither sys-libs/ss nor sys-libs/com_err in my world file and still get those blockers with the latest update (from git). There has to be something else which causes those blockers (no, I don't have mit-krb5 installed). 

 

OK this is most likely because you are running stable portage so the blocker won't be resolved automatically. You could try:

update portage-2.2_rc12 and it should give you the option of unmasking just that version.

I'm sorry I didn't do the warning for it, I thought it had all been fixed in the tree, so just took the front-page alert down after a few more weeks. Really we need to allow checks on state of system which I put to one side for a bit.

 *notHerbert wrote:*   

> I think the -e option is nice, and useful.  I always found it rather strange that gcc is emerged  near the end of an emerge -e system/@system, or bootstrap.sh.
> 
> I shall definitely use this next time I need to do a system emptytree emerge,  i.e a new installation.
> 
> Thanks a bunch.  :)

 

You're very welcome :-)

 *Quote:*   

> BTW: your script called me an l33t ricer, you know, because of the tilde.  It reminds me of the Sid caveat "If it breaks you get to keep both pieces."   8)

 

Lol, never heard it with 'both' only as "you get to pick up the pieces." That "leet boy ricer" thing was for jakub; I take it/hope you got the messages about how to disable it? Getting it to allow my funky ld flags was fun. ;-)

I've got the blocker thing working a bit better on 2.2 (the output changed recently) so will get it to handle e2fsprogs-libs for me at least (build the binpkg before uninstalling) ATM it would just uninstall before building, but we might as well try the build of a binpkg first, in the general case, I reckon.

One could poke holes in that, but if it works I'm using it ;p

----------

## notHerbert

I gave update -e @system a go.  Me like   :Smile:   :Smile: 

I also used your recipe to adjust my ldflags.  Me like that too   :Smile:   :Smile: 

I feel like a born-again Gentooer.   :Laughing: 

----------

## steveL

Nice one notHerbert :D

Yeah I love the -e toolchain stuff, even if I do say so myself :-) It's designed to handle bringing an old system/stage install up to date as well; eg if binutils has been upgraded it'll be built both before and after gcc (look for auxRB in the code if you're interested or want to add something to that list; first occurrence is where to plug in, others are where it gets used, ie the more complex toolchain handling.)

edit: To handle e2fsprogs-libs block, just do emerge -auDN mit-krb5 e2fsprogs on portage 2.2; you can use update portage-2.2_rc13 to unmask just the latest version if you want.

----------

## notHerbert

 *steveL wrote:*   

> edit: To handle e2fsprogs-libs block, just do emerge -auDN mit-krb5 e2fsprogs on portage 2.2; you can use update portage-2.2_rc13 to unmask just the latest version if you want.

 

We had that one 2 months ago on tilde boxes, which now leaves us free to help others.  :Wink: 

----------

## steveL

 *notHerbert wrote:*   

> We had that one 2 months ago on tilde boxes, which now leaves us free to help others. :wink:

 

Heh, I admire the spirit (and the motivation) but think it'd be better be directed into Arch-Testing which needs a mostly-stable box, with selective unmasking. That's also a much nicer way to run a box imo, since you're more reasonably sure about where the bugs are.

I'd heard about that block ages ago too (that's why it was on front-page for so long.) I got told everything was hunky-dory, but it turned out that required unstable portage, and ofc I didn't see it as I'm on stable <most other stuff> and have been worrying more about keeping update working with changing portage versions than some bug that was "fixed in-tree". ;-) Seriously, though, think about becoming an AT if you have time to help; that'll help packages get in quicker.

You can test in a chroot if you really must run a l337-boi system.. ;p

----------

## notHerbert

Thank you steveL. 

In fact I've already looked at the AT guide, and for sure I still need a couple more years of school to qualify.   :Smile: 

----------

## steveL

 *notHerbert wrote:*   

> I still need a couple more years of school to qualify.  :)

 

pfft, welp was a dev when he was 16. If you can find and file bugs, especially if you can add a patch (you'd be surprised how minor many of those turn out to be) you'll be useful. You'd need more time to be a full dev, but AT isn't that much work for someone who runs unstable imo.

So long as they can be weaned onto using package.keywords ;) which is what update's supposed to help with. eg update -a --recover if you lose your package.keywords also works for a machine that you've switched profile on. But like I said, you don't need to do that and can use a chroot for AT work.

@all:

NB Do NOT do this for real until you've finished a full update including revdep with no problems. Remember: they're your pieces, don't expect us to stick 'em back together ;-)

----------

## notHerbert

 *steveL wrote:*   

> @all:
> 
> NB Do NOT do this for real until you've finished a full update including revdep with no problems. Remember: they're your pieces, don't expect us to stick 'em back together 

 

At home on a for fun box  where it doesn't matter if it breaks, for someone who enjoys the challenge of fixing a Gentoo box without re-installing is fine.

I saw in a thread today somebody using a tilde box at work!  Not a good idea unless you want a new job.   :Very Happy: 

----------

## steveL

 *notHerbert wrote:*   

> I saw in a thread today somebody using a tilde box at work!  Not a good idea unless you want a new job.  :D

 

Heh, apparently some people use ~ on headless servers and then complain when they can't get access.. you have to wonder at the mentality ;)

@all: Sorry hasn't been any progress, we've been busy with work stuff, will get a new one out by this weekend; block handling is being reworked.

----------

## ppurka

Is there a reason why update -h config only shows results if update is in /sbin? I modified the script to replace /sbin/update with $(dirname $0)/$(basename $0) and it worked fine.   :Razz: 

By the way, I made an elementary zsh completion for update, maybe someone will find it useful. I have named the file _update

```
#compdef update

local local_options

if (( $words[(I)(--help|--version)] )); then

    return 0

elif [[ $words[-1] == -h ]]; then

    _arguments -s -S \

        '( --help )-h[Show help text]:help options:( config error )' \

        && return 0

fi

local_options=(

    '-1[emerge --oneshot]'

   '-A[GLSA check -- after update]'

   '-C[depclean   -- after GLSA !experimental]'

   '-E[edit go straight to listEdit mode]'

   '-F[fetch only quit after fetching]'

   '-M[maintenance -- run GLSA, depclean, revdep]'

   '-R[revdep-rebuild -- after update/ install]'

   '-S[sync only sync tree and quit]'

   '-W[rebuild kernel modules (uses module-rebuild)]'

   '-X[force toolchain downgrade]'

   '-Y[rebuild kernel deps like hal (config)]'

   '-a[ask before installing]'

   '-c[disable colour]'

   '-f[fetch files first (no parallel-fetch)]'

    '( --help )-h[Show help text]:help options:( config error )'

    '( -h )--help[Explanation of update]'

   '-i[install target/s to world]'

   '-l[log via syslog]'

   '-m[use tmp-fs for build]'

   '-r[resume (after -p|a, ctrl-c, or halt)]'

   '-s[sync first (does eix if installed)]'

    '(-v)-q[Show less compile output]'

    '(-q)-v[Show more compile output]'

    '--version[Show version number of update]'

   '-x[server/ automated : implies -lfc, no spinner]'

   '-z[skip checks -- with emerge -p output:]'

)

if compset -P '(\\|)(>=|<=|<|>|=)'; then

    _arguments -s \

        $local_options \

        '*:portage:_gentoo_packages available_versions' \

        && return 0

else

    _arguments -s \

        $local_options \

        '*:portage:_gentoo_packages available' \

        && return 0

fi
```

I don't know much about zsh completions, just looked at a website online and tried to figure it out. A lot of ideas and code are taken from the already installed completion functions.  :Very Happy: 

To use this completion function, I have appended the following in /etc/zsh/zprofile

```
fpath=( /etc/zsh/self-functions $fpath )
```

Finally, I have put the above _update file in /etc/zsh/self-functions.

----------

## steveL

 *ppurka wrote:*   

> Is there a reason why update -h config only shows results if update is in /sbin? I modified the script to replace /sbin/update with $(dirname $0)/$(basename $0) and it worked fine.  :P

 

Hmm, it's kinda the same reason as dir is now /root/emerge instead of $HOME; uberpinguin said he wanted it more secure, for installs for end-users (his wife I think;) You should be able to use "$prog" instead of "$(basename $0)" anywhere in the script (including config file); it's set to ${0##*/} (we don't need basename in BASH usually; see http://wooledge.org:8000/BashFAQ/073 or /msg greybot basename on freenode.) Might be worth sticking that in a var at beginning of file so admin can override. kk config file, but have you looked at update -h config recently? It's getting silly man ;p

 *Quote:*   

> By the way, I made an elementary zsh completion for update

 

That rocks ppurka, nice one :-) I might even try zsh when I get some timeout, just to see what that's like.

----------

## ppurka

 *steveL wrote:*   

> You should be able to use "$prog" instead of "$(basename $0)" anywhere in the script (including config file); it's set to ${0##*/}

 Thanks. I think I will change that to simply $0  :Razz: 

If update is not in the $PATH, then simply using $prog will fail.  *Quote:*   

>  kk config file, but have you looked at update -h config recently? It's getting silly man ;p

 Actually, I wanted to see what was present in that help option. That was when I had to make the changes to the script  :Very Happy:  *Quote:*   

> That rocks ppurka, nice one  I might even try zsh when I get some timeout, just to see what that's like.

 It is really good. I have zsh as my default shell, and I was primarily missing package name completions. Hence the _update file  :Very Happy: 

----------

## steveL

 *ppurka wrote:*   

> Thanks. I think I will change that to simply $0 :P
> 
> If update is not in the $PATH, then simply using $prog will fail.

 

Heh, best check out http://wooledge.org/mywiki/BashFAQ/028

I was just pointing out that we're far more likely to use foo=${bar##*/} than foo=$(basename "$bar") in BASH and indeed POSIX SH nowadays; I understand basename can do a bit more, but it's not needed most of the time, and the parameter expansion is a lot quicker.

POSIX command-line API

 *Quote:*   

> Hence the _update file :D

 

Heh, collaboration FTW :D

----------

## deefster

Feature request - 

I saw this in a recent GWN: http://www.gentoo.org/news/en/gmn/20080930-newsletter.xml

You can check which running processes need to be restarted after an emerge.

For example, I just ran this command on my system:

```

$: lsof | grep 'DEL.*lib' | cut -f 1 -d ' ' | sort -u

cupsd

firefox

smbd

```

----------

## JackieKu

Hi, I'm using 0.1.4.0_pre5, I got some problems about "-r" (resume). It seems 'update' wipes out state files when it receives signals. So I can't resume it after I press Ctrl+C or 'update --stop'. Is it intent by behavior (which is not the same with emerge), or it is a bug?

----------

## iMike

I get 

```
!! update: WARN Format Error for 

>=sys-apps/shadow-4.1.2   <4.1.2   ''   ''   ''   ''   Shadow has new pam USE which may be required for reboot, and requires admin review of /etc/login.def

 -- Nothing to build
```

 when using Update 0.1.4_pre5 on a MIPs (default/linux/mips/2008.0 *) and Portage 2.1.6.2.  Yesterday I got the same sort of error on openrc 0.4.0.  Just to see if it was something specific to openrc, I did a normal old "emerge" on it and then found the next items in the list (shadow) now gives me the above error.  Unfortunately, update gives up with this warning and forces me back to using "emerge."  Anyway to get update working again?  Is this a bug in update?

----------

## steveL

Ooh nice one deefster, will look at that this week.

JackieKu that's a bug; if it's keywords or package.mask that was fixed a while back in git, along with a bit more support for --recover when resuming. Sorry I've just been pushing there as things have been hectic last few months and I haven't had any of the usual help (QA and coding both.)

git clone git://weaver.gentooenterprise.com/update.git will get you the latest one (in subdir 'update' of cwd). It should be fairly robust, as only minor tweaks have been added since then. If you can test it and let us know how you get on, that'll be great: I'll push that one out if you don't spot anything major (besides the issue Mike's pointed out which will be fixed before I push it to front page.) saveLog (blame Zorry;) is the only new feature.

iMike: yeah that's a bug, damn. Workaround is just comment out that line in /etc/warning or delete it if you're past the issue. (Make sure you've asked in #gentoo or your system may not reboots aiui.) Interesting, as I updated the ABI stuff, though I seem to recall uberp mentioning that one. I'll bbl and will get on it in next 24 (might take a day or so more to get done, depends on how much work is flying at me.)

What we really need is more people adding warnings somehow; I held off on the e2fslibs thing as I was told it had been sorted, but would have been worth just having the blocker in there from day one; easy enough to delete it once it was done. Hmm update -s should check if there's a new warning or indeed a new update (maybe have a release branch for that.. meh I'm useless at vcs.)

Happy New Year to you all and thanks for the feedback :-) Damn, I've missed the forums in the last few weeks..

BTW there's some BASH tips here and two posts further down, if anyone's interested in learning more; http://phpfi.com/385434 is the earliest backup of update I have, and I think I might go back to that to rework it for 2.2. So, if you feel like hacking, just do it; you can't break anyone else's system ;-) most that'll happen is emerge will get called to install something which can be CTRL-C'ed.

----------

## rickj

http://phpfi.com/ seems to be down at present

----------

## rickj

This is the best updater I've seen.

One minor point - am I missing something, or does the present script defeat parallel fetching? It appears to download each item as it comes to it, regardless of the parallel-fetch option in make.conf.

----------

## ppurka

 *rickj wrote:*   

> This is the best updater I've seen.
> 
> One minor point - am I missing something, or does the present script defeat parallel fetching? It appears to download each item as it comes to it, regardless of the parallel-fetch option in make.conf.

 That is probably because it passes each package one at a time to emerge. Since emerge does not get more than one package, parallel fetch is never activated.

You can give the -f argument to fetch all the files first.

----------

## rickj

Right, ppurka, thanks - that's very clear.

What is really going on here is that this script was written to anticipate the --quiet mode of the newest emerge, back in the day when emerge was unreasonably prolix. The result shows more output than the latest emerge quiet mode, but hugely less than the old emerge "show everything you can get" style. I quite like the compromise in update, which is informative, but fairly terse.

----------

## StephanX

 *steveL wrote:*   

> 
> 
> Sounds like a great idea; I've been `persuaded' (that uberpinguin tsk tsk  to add layman -S and update-eix. 

 

Sorry about this old quote, but is this implemented yet? I mean the "layman -S" prior to or right after "emerge --sync"? 

Cheers,

 Stephan

----------

## jmbsvicetto

 *StephanX wrote:*   

>  *steveL wrote:*   
> 
> Sounds like a great idea; I've been `persuaded' (that uberpinguin tsk tsk  to add layman -S and update-eix.  
> 
> Sorry about this old quote, but is this implemented yet? I mean the "layman -S" prior to or right after "emerge --sync"? 
> ...

 

steveL asked me to convey the following:

 *steveL wrote:*   

> basically eix does all the layman stuff
> 
> i think i added sth to do what he wanted (if no eix)
> 
> ah it's in update --help (added workaround, but layman and eix was mentioned there before)

 

----------

## swimmer

Hmm - why does SteveL ask you to convey something? Is this script still maintained? Haven't had any updates in the repository for quite some time ... 

And since I'm writing here anyway: I have problems to change use-flags in the list of updates ... I always get this error:

```

 Select flags for media-libs/lcms

 Current package.use: None

 ┌────────────────────────────────────────────────────────┐

 │ [*] media-libs  !! Unknown: Unable to find: media-libs │

 └────────────────────────────────────────────────────────

```

This is just an example and happens with every package on which I'd like to 

change the use-flags ...

Greetz

swimmer

----------

## Naib

 *swimmer wrote:*   

> Hmm - why does SteveL ask you to convey something? Is this script still maintained? Haven't had any updates in the repository for quite some time ... 
> 
> 

 

Well because he is a muppet and hasn't got his desktop fixed in MONTHS!!!! and since he relies on cookies to login he can't login to the forums - iirc he has recently asked for his passwd to be reset 

as to is it being maintained, yes it is. This script of SteveL is key to another project he is working on so it is in his best interest to keep it upto date

git log shows last commit was on the 21st of Feb

 *swimmer wrote:*   

> 
> 
> And since I'm writing here anyway: I have problems to change use-flags in the list of updates ... I always get this error:
> 
> ```
> ...

  ill point him to this thread when he next logs into irc

----------

## Naib

And its back

http://weaver.gentooexperimental.org/src/update/update-20110116.tar.bz2

----------

## keenblade

 *Naib wrote:*   

> And its back
> 
> http://weaver.gentooexperimental.org/src/update/update-20110116.tar.bz2

 

I can't reach the site:

The domain name weaver.gentooexperimental.org could not be resolved.

----------

## steveL

 *keenblade wrote:*   

> 
> 
> I can't reach the site:
> 
> The domain name weaver.gentooexperimental.org could not be resolved.

 

Yeah we've had some teething DNS problems; it should be working now, or in the next 24hours if DNS caches need to catch up.

This version (and older) has a slight problem with -C (depclean) which is run automatically after the usual -uDN world and glsa-check, before revdep-rebuild, when you give no target to install. Basically the world file needs to be alphabetically sorted, but it's not approved to edit it directly so we should call the installer (default: emerge) to do it. We'll add that in next day or two, and then I'll edit the front-post.

Regards,

steveL.

----------

## Naib

 *keenblade wrote:*   

>  *Naib wrote:*   And its back
> 
> http://weaver.gentooexperimental.org/src/update/update-20110116.tar.bz2 
> 
> I can't reach the site:
> ...

 

http://213.131.245.114/src/update/update-20110116.tar.bz2  until DNS sorts itself out

----------

## steveL

There's a bug in that version ("there are no ebuilds to satisfy "uDNpv".) This: http://weaver.gentooexperimental.org/src/update/update-20110117.tar.bz2 fixes it.

----------

## Hammad

Me too facing some problem, although have copied the directly these threads, anyway trying to check, may be i had written something before it that is not working with it.   :Smile: 

----------

## steveL

 *Hammad wrote:*   

> Me too facing some problem, although have copied the directly these threads, anyway trying to check, may be i had written something before it that is not working with it.  :)

 

That should be fixed in the 0117 version. Let us know if you have the same (or another) problem again :)

With respect to the depclean issue,

 *steveL wrote:*   

> Basically the world file needs to be alphabetically sorted

 

that's not true; we weren't considering versions kept and slots. The slotting issue has led to us having to deal with slots for ebuilds no longer in tree, which we can get from /var/db/pkg/ since they only come up for installed packages which are no longer in tree. So, we're working on that and will have a new version soon.

----------

## steveL

depclean now checks the slot for the package and deals fine with ebuilds no longer in tree. (I came across this with gentoo-sources.) I've pushed the new version to front post. It's at: http://weaver.gentooexperimental.org/src/update/update-20110204.tar.bz2

Hopefully we'll get the bug tracker working again soon.

Regards,

steveL.

----------

## steveL

New version: http://weaver.gentooexperimental.org/src/update/update-20110207.tar.bz2

md5sum: cc3194140d0f4b16f2e4b59795291ab4 

There's a problem with installing to world in prior versions; packages are only installed as pkg:slot even when only pkg is given. Further, the 20110204 release wasn't installing anything to world. Earlier versions I'm not sure about. Either way, if you've been using this to install to world, check your world file. The slot issue appears to be a relatively recent change to portage, as my old laptop has lots of stuff in world, all installed by update.

You should also review eg /etc/portage/package.keywords and .unmask etc on a regular basis. I have some unmasking stuff done by update going back to June 08(!) on my laptop, in keywords for ~arch packages; often just for one version which will already be obsolete.

----------

## Kelly

cool, 10x

----------

## iMike

Thanks for the effort!  I've been using update almost since the beginning.  Still works great!

----------

## Jennel

 *hyakuhei wrote:*   

> Its really interesting, giving it a spin now.
> 
> Looks like a typo on line 492.
> 
> Cheers
> ...

 

Good but not enough! need more improvement!

----------

## steveL

 *iMike wrote:*   

> Thanks for the effort!  I've been using update almost since the beginning.  Still works great!

 

Thanks :D that's always the best feeling, when someone says they like your work.

 *Jennel wrote:*   

> Good but not enough! need more improvement!

 

You realise that error was due to it being run under sh and not bash? And that it was _ages_ ago? ;)

Anyway, there's a new version linked on front page.

Sorry I haven't been about and that the DNS was down. It's now pointing at a new server, so hopefully it'll stay up. We'll sort the bug tracker out soon as well.

Be aware that you can't set -j or --jobs in EMERGE_DEFAULT_OPTS as it messes with the output displayed by update. That option is next on the agenda; rather than just masking it, I'd like to use it properly, along with --keep-going.

----------

## iMike

Once again, thank you for the good work!  Looks like your current update solves the recent problems like

```
Internal error in checkType(1837) :installList(5797) : line 8537

!! update: Unknown install type for dev-python/sqlalchemy-0.7.1: U~
```

Now, no problems using under Gentoo portage 2.1.10.3 and Funtoo variant 2.3-r4!

You made my day!   :Very Happy: 

----------

## steveL

 *iMike wrote:*   

> Once again, thank you for the good work!  Looks like your current update solves the recent problems like
> 
> ```
> Internal error in checkType(1837) :installList(5797) : line 8537
> 
> ...

 

Yeah I was actually chasing that bug when interactive packages came up (triggering the same error.)

 *iMike wrote:*   

> Now, no problems using under Gentoo portage 2.1.10.3 and Funtoo variant 2.3-r4!
> 
> You made my day!  :D

 

Glad to be of help :-)

The bug tracker is back up btw:

http://weaver.gentooexperimental.org/trac/update/

----------

## steveL

Just to let you know we have a new homepage, thanks to Griz64:

http://weaver.gentooexperimental.org/update.html

..from where you can get ebuilds for both the latest tar.bz2 release and a live update-9999.ebuild using git.

I've added an eixSyncFlags config variable (to git) as unstable eix doesn't like -m any more; use eixSyncFlags='-MN' or eixSyncFlags='-M0 -N' in /etc/update if you're on unstable eix.

One of those will become the default when current (0.22.5) eix is no longer around. I'm not sure what -M0 vs -M does, as I'm still on stable; the error message from the new versions says to use -M0 instead of -m. We'll leave that config variable as an option, since things might change in the future, and you might want to change how eix-sync is run.

BTW don't add -q (unless you really want to;) as that's normally added when -q or -x is used to update.

Another thing to note is that (in git) we now install to /usr; the script has been changed to allow its install anywhere and it looks for the lib file (libIgli;) in /usr/share or /usr/lib (old) or current directory (or you can export libIgli='/some/path' before running.) So, I recommend:

rm -f /lib/libIgli  /usr/lib/libIgli

after you've installed from either the ebuild or make install in the git checkout, if you have an existing version.

edit: now installs to /usr/shareLast edited by steveL on Mon Oct 14, 2013 10:01 pm; edited 1 time in total

----------

## schwarzygesetzlos

A great tool! Really works fine!

----------

## steveL

Thanks schwarzygesetzlos :-)

Just to let you know I've pushed a couple of bugfixes to git (emerge default option processing had an extra $ on line 8253 and it was bailing on portage-9999 version.)

I've been offline for a couple of weeks, but I am getting back to sorting out the new portage autounmask and then --jobs support.

----------

## iMike

Just noticed your new page with a regular ebuild.  Is there any chance you might consider putting this in an overlay (e.g., git.overlays.gentoo.org) so we could just pick it up by adding the overlay in layman instead of needing to put it in our own local overlay?

/iMike

----------

## Naib

yes update is getting some long overdue loven

as to overlay, the 9999 ebuild is the prefered so an overlay isn't needed, but if specific releases occur (as well as other weaver projects) then yes an overlay is worth concidering 

https://weaver.gentooexperimental.org/trac/update

----------

## steveL

Just to let you know I've pushed a new release to help with the libpng-1.5 ABI upgrade, for those who haven't done it already. This also brings in quite a few bugfixes since last release in August, if you're not using the live ebuild.

Portage --jobs support is much better, tho it still needs a bit of tweaking as I haven't had a package fail on me yet while using it, so I'm not even sure what that looks like. It also needs to pick up on config updates, which I'll fix in next few days; I just wanted to get the ABI fix out to people who don't upgrade every day or two.

Meantime the libpng upgrade is handled pretty effectively imo. The only bit you'll need, after the whole shebang including world update (after ABI and its revdep) and main depclean/ revdep (ie: after update -s or update -r has run to completion), is to run the command from the forum post about it (slightly modded; all on one line):

```
pkg=$(find /usr -type f \( -name '*.la' -o -name '*.pc' -o -name '*-config' -o -name '*.pm' \) -exec grep -qF png14 {} \; -exec qfile -CSq {} + | uniq ); echo "$pkg"

```

If that outputs any package:slot's (there were only two here, after all the packages update had already sorted out) then run:

```
update $pkg
```

I'd run another update -CR after that, just to make sure (for some reason kword didn't get picked up til then here.)

Be careful to let the ABI upgrades run to completion; only start again with update -r once you've seen [ABI Stage N] running. We need to make it more robust; at the moment it'll get rid of the ABI files if you start another update: if libpng has been upgraded (and it's only the second in a whole load that do) then it won't come to the program's attention again.

As usual, bug reports welcome.

----------

## steveL

Just to show you what the ABI output looks like (so you can see what stuff gets upgraded for libpng; note I am on a KDE box):

```

** update ABI Upgrade -- Packages:

x11-libs/gdk-pixbuf-2.24.0-r1

media-libs/libpng-1.5.5

x11-libs/cairo:0 x11-libs/gdk-pixbuf:2

* Before Revdep:

x11-libs/gtk+:2 app-doc/doxygen:0 app-text/dvipdfm:0 app-text/dvipng:0 app-text/ghostscript-gpl:0 app-text/poppler:0 app-text/texlive-core:0 app-text/xdvipdfmx:0 dev-lang/php:5.3 dev-tex/luatex:0 kde-base/kdelibs:4 kde-base/ksplash:4 media-gfx/autotrace:0 media-gfx/graphviz:0 media-gfx/imagemagick:0 media-gfx/pstoedit:0 media-gfx/tuxpaint:0 media-libs/gd:2 media-libs/ming:0 media-libs/plotutils:0 media-libs/sdl-image:0 media-sound/timidity++:0 net-analyzer/rrdtool:0 net-print/cups:0 sys-libs/slang:0 www-client/firefox:0 x11-libs/qt-gui:4

** Revdep Libraries:

 libpng14.so.14

@ Proceed with ABI Upgrades (after toolchain) (Y/n)?Y

```

----------

## steveL

Just to let you know I've pushed an update to the git repo which deals with new default --quiet-build=y setting in emerge. This only affects the output when you're not using --jobs or -j in default-opts, or you run update with -j1 (or --jobs=1 if you like that sorta thing;)

I've also improved the list editor, primarily so we can reselect packages skipped by the configuration. There are a couple of display tweaks; eg package description in USE editor as well as main list (check the status bar if you don't know what I'm on about.)

In addition useless C++ rebuilds are skipped along with the usual suspects (ie: if you have not set skipUseless=0 in /etc/update and don't pass --build-useless to update.) This is for the recent removal of nocxx flag in favour of cxx across the board. Don't worry: it's perfectly safe! It's tied to a very tight formula, of the only change being cxx%* addition at the same time as (-nocxx%) or -nocxx. The latter is for gcc which is keeping the flag during the transition precisely for people like us who don't want to rebuild it for no use.

I'd like to roll this into a release so please try it out if you're using the git ebuild and shout if something breaks. If you want anything fixed bug reports are better, especially if you want something unusual done for your own needs (file as 'enhancement') or you want to be able to chase it along. ;-)

----------

## iMike

I get: 

```
AttributeError: Cannot find an implementation of the "IPasswordHashMethod" interface named "HtDigestHashMethod". Please update the option account-manager.hash_method in trac.ini.
```

 when trying to log in to trac for bug reporting, so I will leave this report here.  When building (some?) packages with the java flag, I get when using the update script: 

```
! Failed so far: dev-vcs/subversion-1.6.17

! -1 packages, 1 processed.

    return w.wrap(text)

  File "/usr/lib/python2.7/textwrap.py", line 321, in wrap

    return self._wrap_chunks(chunks)

  File "/usr/lib/python2.7/textwrap.py", line 250, in _wrap_chunks

    raise ValueError("invalid width %r (must be > 0)" % self.width)

ValueError: invalid width -27 (must be > 0)

 * 

 * Can't run java-config --help

 * Have you upgraded python recently but haven't

 * run python-updater yet?

 * ERROR: dev-vcs/subversion-1.6.17 failed (setup phase):

 *   Can't run java-config --help

 * 

 * Call stack:

 *                  ebuild.sh, line  84:  Called pkg_setup

 *   subversion-1.6.17.ebuild, line 133:  Called java-pkg-opt-2_pkg_setup

 *      java-pkg-opt-2.eclass, line  47:  Called java-pkg_init

 *        java-utils-2.eclass, line 2155:  Called die

 * The specific snippet of code:

 *              die "Can't run java-config --help"

 * 

```

.  However, the same packages compile without problem just using regular emerge.

----------

## steveL

Hi iMike,

Sorry I've been offline last couple of months. I don't have java on my system but I've looked at what subversion wants, and I'll play with it now. I'm going to use the opportunity to add a rough ebuild data thing to the dialog, so I can look at deps for virtual/java as I'd like to be able to quickly see what my options are without having to dig out the ebuild.

I pushed an update to git yesterday that deals with SLOT-blockers as I was getting hit on the KDE upgrade. (I was in the middle of other stuff, so it took a while to sort it out.)

There's also a small fix to deal with the new kernel-3 series. Effectively all 2.6 and 3.x kernels are the same for purposes of system upgrades, so linux-headers 2.6.39 is fine on kernel 3.1 and linux-headers 3.1 are fine on 3.2. (This doesn't affect versioning, so 3.1 headers will still not be allowed on a 2.6.39 kernel as usual, to avoid headers which provide symbols the kernel doesn't know about.)

With respect to the java thing, I have a feeling if you ran:

```
while read -r line; do printf '%s\n' "$line"; done < <(emerge subversion 2>&1)
```

then you'd get a similar error. I reckon it's to with the command being run without a terminal on stdout or stderr, in other words.

I'm guessing that's why the python textrap.py script is getting a negative self.width for the width of the window. Really it should default to a sane value like 80, as this means java-config can't be run as part of a script. java-config could check for it itself, I suppose, but it's something I'd fix at the lower layer, as that's what is allowing the value in.

If the above does give you an error (I'll know in a while when I get through all the preliminary installation) then we'll probably best file a bug against java-config which devs can punt upstream if they agree. Even if I work round it for update (which I'm kinda wondering about, given that parallel builds would need to be broken up) it's going to stop any script which wraps emerge as above from working; and I know zmedico takes scripting with emerge seriously.

----------

## schwarzygesetzlos

Just wanted to ask about any updates for update.  :Wink:  Last non-git ebuild is a year old.

----------

## steveL

Hi schwarzygesetzlos,

  Yeah, sorry about that, I tend to just work on the git version. I have been feeling for a while I should put out a release, so thanks for prodding me (I couldn't believe it's been over a year though ;) Anyhow, here it is: update-20121210.ebuild

I haven't made any changes and been using that version quite happily for a couple of weeks, so it's a good time to release it. God only knows what bugs have been fixed in that time :-)

Also, I have some changes I've been wanting for ages, to sort out gcc-config on upgrade (there's an old code branch in the git repo that has a prior attempt at it, that I completely forgot about til I reviewed recently) which I haven't put in (they're sitting in a WIP branch locally) as I haven't had a gcc upgrade to test them with. I'll push them to git though, now that a release is out, as it's disabled by default atm, til I can be sure it does the right thing.

Bear in mind that you need to use repoman manifest nowadays to get the digest. I guess we really should think about doing an overlay, but I have nfc how to set up what iMike suggested, if I'm honest about it.

Anyway, HTH, and thanks again for prodding me. It's nice to know people are using it :-)

Regards,

steveL.

----------

## schwarzygesetzlos

 *steveL wrote:*   

> 
> 
> Anyway, HTH, and thanks again for prodding me. It's nice to know people are using it 
> 
> 

 

No prob. Nice to know people are writing and updating it!   :Wink: 

----------

## geki

hi, steveL!

I am testing update-20121210 right now and am amused about this.  :Surprised: 

 *Quote:*   

> ! LDFLAGS apart from: '-Wl,O1' '-Bdirect' '-Wl,-z,now' '-Wl,-z,relro' '-Wl,--sort-common' and '-Wl,--as-needed'
> 
> ! are not supported. You have additional flags: " -Wl,--hash-style=gnu "

 this one is harmless.

I do not know if I found a bug or feature running

 *Quote:*   

> # update -acuD @world

  and: edit the list, deselect all entries with space, press enter results in update of all packages.

well, maybe these are fixed in git already.

anyway, thank you for the console-based package selection. that will save a bit of my time updating my box!  :Smile: 

----------

## steveL

 *geki wrote:*   

> I am testing update-20121210 right now and am amused about this. :o 
> 
>  *Quote:*   ! LDFLAGS apart from: '-Wl,O1' '-Bdirect' '-Wl,-z,now' '-Wl,-z,relro' '-Wl,--sort-common' and '-Wl,--as-needed'
> 
> ! are not supported. You have additional flags: " -Wl,--hash-style=gnu " this one is harmless.

 

Yeah that one's fixed in git: I didn't realise it was that recently, I thought it was before that version went out. Maybe it was just on my mind for ages (the code was really crufty, practically from when update started.)

 *Quote:*   

> I do not know if I found a bug or feature running
> 
>  *Quote:*   # update -acuD @world  and: edit the list, deselect all entries with space, press enter results in update of all packages.

 

Hehe I'd definitely call that a bug. There are checks in a couple of places to ensure we haven't skipped everything, or bail out, so clearly something's not right. It should be smarter if you've skipped them all in edit list, so I'll take a look at that today or tomorrow, and put out a fixed version. There's been a couple of other bugfixes in git recently so it's needed. Thanks for letting me know, geki.

 *Quote:*   

> anyway, thank you for the console-based package selection. that will save a bit of my time updating my box! :)

 

I'm glad you like it :-) It's my favourite part of update; though I don't use it that often, when I do, I really appreciate it, especially USE editing.

Hmm reminds me we still need to handle a package.use directory instead of file. It's just such a PITA to do properly, since we need to account for the same package in several places, possibly with conflicting settings. But it is more and more common; crossdev for instance requires it.

----------

## anomalyst

I posted a bug report (#16) on this but was hoping some one in the forum might have an answer faster

 here is snippet for a script I am building to add 'update' to a raspberry PI post install

```
if [ -e /etc/make.conf ]

then

    MCF=/etc/make.conf

else

    MCF=/etc/portage/make.conf

fi #?-make location is in etc/portage

cp $MCF /var/save/$MCF

echo "source /usr/local/portage/layman/make.conf" >>$MCF

# edit the make.conf file for layman itself

# so that layman is aware of YOUR personal repositories

export PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"

```

In http://weaver.gentooexperimental.org/update-dl-install.html the commentary indicates an edit should be made but the code is just a variable assignment (I added the export prefix)

So, I am asking should the assignment be appended to make.conf in the same fashion as the "source" statement?

I attached the full script (untested) to populate an SD card for installation of gentoo on a raspberry PI (I call it pitoo) to the ticket.

I have already made revsions since.   :Rolling Eyes: 

----------

## steveL

 *anomalyst wrote:*   

> So, I am asking should the assignment be appended to make.conf in the same fashion as the "source" statement?

 Yes that's fine (and as you have it, after the layman source.) You don't need 'export' in make.conf, as it's actually parsed by python shlex (i think it's called) and portage will export them as needed (eg CFLAGS from make.conf is exported to the ebuild environment.)

Let us know how you get on. :-)

--

I'll push a new release soon, promise. Can't really avoid it, as I accidentally committed all my work-in-progress to master, so have to get it working correctly. Thankfully, Griz verified it still works for normal usage.

----------

## anomalyst

Thanx for the quick reply. I'll revise (and test) & update the ticket with the new script. Feel free to add the script to your git repo and/or extract the appropriate lines to use stand-alone,  if I dont do it (probably be a while,  I got other irons in the fire) lemme know if u think it needs more priority from me.

Best Regards, Bob

----------

## geki

what is the status of a new/fixed version?

somehow I cannot disable linux-headers upgrade via edit anymore.

although disabled, it wants to install the headers.

let's see if a package enforces this upon me ...

----------

## steveL

Hi Geki,

  Thanks for prodding me. linux-headers is considered "toolchain" so handled specially: for instance you can't downgrade it, nor can you upgrade it to a version newer than the running kernel. Additionally when you upgrade linux-headers, update always adds glibc and does it immediately after. But it sounds like yours is a standard tree issue, to sort out via emerge config.

  Anyhow your post prompted me to return my attention to update, so thanks. Unfortunately, I've just hit a new bug: I'm trying to just get my machine upgraded, with the --toolchain option working, so I can look at the other things that need to be done. You can see it's been a while, since I have 516 packages to install ;-) If you look closely, you'll see at the end it's trying to set USE=icu for media-libs/harfbuzz-0.9.18-r1 (a texlive dep: this is the texlive-2013 upgrade.) Somehow it's got the package name with a comment after it, which is new.  Looking at unmaskAutoUSE() it's getting the right info from the file for the package and flag name, so I just have to track down where the comment data in the version-specific line has come from, and strip it then.

@anomalyst

 I didn't really take in what you were doing, though what I said is still right: you can edit the make.conf externally however you wish. update reloads its settings if the make.conf changes: you can see the settings that we save in /root/emerge/Backup/makeSettings, by default; /root/emerge is the dir=... setting in /etc/update. It checks for both /etc/make.conf and /etc/portage/make.conf. I've just (a week or two ago) added some more support code in git for ROOT and PORTAGE_CONFIGROOT when not '/' which should make the kind of thing you're doing a bit easier.

  One thing to be aware of is that directory ordering in PORTDIR_OVERLAY is the reverse to how it reads: ie the last in the list takes priority if all other things are equal (and only if they are equal) for "best-visible" calculation. I'm sure you know that, but it's a caveat that   I have to point out, just in case.

  chroot support had been on my mind for a while; update has always respected the two variables in terms of reading config, but now all the files it saves will (hopefully) be under the same target ROOT. The reason update has always picked up on those is because we needed to build in chroot when first adding /etc/warning support (ABI upgrades.) They aren't needed so much any more, thankfully, in the full extensive version, which was to get our machines through the expat upgrade, though the mechanism itself is still useful. Nowadays, principally udev, though the forthcoming openrc-0.12 upgrade is going in.

  That work led to the installer, that I have to bring up to date. So your script looks interesting, since I've done the other side of it: downloading a stage, using dialogs to setup partitions, then chrooting and running update to bring the base up to date. Once you've done your kernel and rebooted, you just do the rest of the install as usual, though it's a lot nicer when update is the porcelain to emerge, ime. We stopped there because our machines were all done, and the next step was to use lspci -k to start kernel config, which at the time was not in stable. So I found your script most stimulating, as it's doing a similar thing: sfdisk is sweet isn't it? :) though from a totally automated point of view. Our one is much more focussed on being interactive, though you can drop predefined files in, to copy across automatically.

  I'm busy for the next couple of days, but I will get some time on Wednesday or Thursday for more complex stuff. The new bug will be fixed by then, I imagine, or it'll be the first thing I sort out. Once my machine is upgraded with a correct toolchain, I'll look at your script and how we might interface: if it helps, there's an (undocumented) -H option for update that we use under the installer: it's short for 'Human' basically, and means "even though you think you're automated (and you are) we need to display our info to a Human" ;) It also means we ignore a couple of dependencies like dialog, since we're in bootstrap.

  It's undocumented because it's specifically designed for our installer, and it can change whenever we need it to, without breaking other people's scripts. Try it though: it should make the display a lot nicer for your script. Just be aware it may change; though if you like, those can be changes you helped design. ;-)

Regards,

steveL.

----------

## steveL

Ah I see what you mean now Geki. I've been working on update today, and just pushed some fixes to stuff that was stopping me upgrading. (I could have got round them with emerge, but that would have meant I lost the test-cases to fix the bugs with.)

I'm glad I took the time to go slowly with the harfbuzz thing: it turned out I needed to change the default cacheDir setting, since portage has been md5-cache only for quite a while. That's what was triggering it looking for the SLOT in the ebuild, instead of the cache, which is where it was picking up the comment from (that's sorted now as well, ofc.) So that should make things a bit quicker for all of us.

I think that just got missed, as I remember spending ages waiting for md5-cache to be the default. Also, there was a problem with blockers, which are slotted, which I hit with php. The ebuild was gone from tree, so I spent a while thinking it was another issue with getSlot. The fixes were pretty small in the end, as usual, but that area has always been hard to debug; so I made it a bit easier for next time.

Anyhow, I've just hit it not allowing me to proceed with toolchain upgrade because I need to upgrade my kernel before I can do kernel-headers. Picking up on --exclude is an option, although i feel loathe to add yet more code, when my inclination is to keep the rigour of the check, as it only kicks in if linux-headers is in the list, and upgrading to it would be unsafe. Other than that, if you want to do something past the envelope, you should be doing it directly with emerge. I'll have a think about it, as I get my machine updated.

----------

## geki

if I get you right, I just have to mask newer linux-headers. lets see ...

----------

## steveL

 *geki wrote:*   

> if I get you right, I just have to mask newer linux-headers.

 

Yeah that will work, in terms of it not coming up in the list, though I'm not sure it's something you want on a permanent basis.

There is always the SKIP envvar for temporary situations, or ofc the noCompile array in /etc/update if you never want update to handle a package, unless you tell it to explicitly on the command-line (see: update -h config.) So if you just want to avoid linux-headers for one run, you'd use SKIP=sys-kernel/linux-headers update or just export it in the terminal session you're running update from. It sounds more like you want it in noCompile though, and that should definitely work or it's a bug that needs fixing immediately.

```
** Skipping sys-kernel/linux-headers-3.9 - in $SKIP
```

SKIP's been there since the beginning (as has noCompile), and it could no doubt use some tweaking, so if you find a way it could be better, tell me and I'll try to implement it. It was only ever meant as an emergency measure, so it requires the full category: looking at it, it would be more useful if it could skip on package name as well. Back when we added it, we actually had CATX iirc for category exclusions, though we don't any more, and the idea was to do more on skipping, but then we added the dialog (E) to skip stuff, and left SKIP as a "left-string" match; eg: 

```
export SKIP='dev-perl/ sys-devel/gcc-4.7. dev-lang/python-2'
```

BTW if you want to sort things out a bit more quickly at whatever point, login to IRC: chat.freenode.net and /join #friendly-coders; my nick is igli. IME it usually helps to chat real-time about what needs changing, do it there and then, and then rework in collaboration with someone who actually needs the use-case; they tend to know exactly what needs to happen, and what is or isn't needed.

Sometimes it's hard to get that right, when you're just making your best effort to guess what would be useful, and experience leads you to be cautious; you can end up implementing a whole chunk of code that no-one ever uses, which is a waste of CPU time as well as your own. ;)

I'm online most of the time; if not, Griz64 is the QA meister for update, though he's really our infra guru, so he knows it inside out and is always on the latest git version (at least half the bugfixes start with him poking me on IRC) and there's a quite a few Gentoo users in there (the people who started it are all #gentoo-chat regulars.)

For ref, if you need to take something out of the command-line target, edit /root/emerge/target (/root is default dir setting); I just did that to get the SKIP output, though I started with update linux-headers glibc (since SKIP is a glob match, targets specified on the cli, are not considered. I guess we could tweak that to always skip exact package name matches.)

----------

## steveL

Well, I've finally finished the first cut of --toolchain; it's currently in git (along with a few other fixes.) Oh I also enabled update --perl in line with --python and --haskell, since Griz was on-hand to QA it.

My last --deep world, according to /var/log/emerge.log was on January 06, 2013, (ie 8 months ago!) and I've finally set it off again, after upgrading my kernel, since linux-headers were blocked as above (by design), then the following from update --toolchain

```

** Resolving --toolchain..

These are the packages that would be merged, in order:

Calculating dependencies  .... ... done!

[ebuild     U  ] sys-devel/gnuconfig-20130111 [20120818] 51 kB

[ebuild   R    ] sys-devel/gcc-config-1.7.3  0 kB

[ebuild   R    ] sys-devel/binutils-config-3-r3  0 kB

[ebuild   R    ] sys-devel/patch-2.6.1  USE="-static {-test}" 0 kB

[ebuild     U  ] sys-devel/autoconf-wrapper-13 [12] 0 kB

[ebuild     U  ] sys-devel/automake-wrapper-9 [7] 0 kB

[ebuild   R    ] sys-devel/m4-1.4.16  USE="-examples" 0 kB

[ebuild   R    ] dev-libs/gmp-5.0.2_p1  USE="cxx -doc -static-libs" 0 kB

[ebuild     U  ] dev-libs/mpfr-3.1.1 [3.0.1_p4] USE="-static-libs%" 0 kB

[ebuild     U  ] dev-libs/mpc-1.0.1 [0.8.2] USE="-static-libs%" 610 kB

[ebuild     U  ] sys-devel/gettext-0.18.2 [0.18.1.1-r3] USE="-acl -cvs cxx -doc -emacs git -java nls openmp -static-libs" 15,330 kB

[ebuild     U  ] sys-devel/make-3.82-r4 [3.82-r3] USE="nls -static" 0 kB

[ebuild     U  ] sys-devel/flex-2.5.37 [2.5.35_p10] USE="nls -static {-test}" 1,273 kB

[ebuild   R    ] sys-devel/bison-2.4.3  USE="nls -static" 0 kB

[ebuild   R    ] dev-lang/perl-5.12.4-r1  USE="berkdb -build -debug -doc gdbm -ithreads" 0 kB

[ebuild     U  ] sys-devel/autoconf-2.69:2.5 [2.68:2.5] USE="-emacs -multislot%" 1,187 kB

[ebuild  NS    ] sys-devel/automake-1.13.4:1.13 [1.11.6:1.11, 1.12.6:1.12] 1,416 kB

[ebuild   R    ] sys-devel/libtool-2.4-r1:2  USE="{-test} -vanilla" 0 kB

[ebuild   R    ] sys-libs/zlib-1.2.7  USE="minizip -static-libs" 0 kB

[ebuild     U  ] dev-lang/python-3.2.5-r2:3.2 [3.2.3:3.2] USE="-build -doc -examples gdbm -hardened% -ipv6 ncurses readline sqlite ssl threads tk (wide-unicode) -wininst xml" 9,020 kB

[ebuild     U  ] sys-devel/binutils-2.23.1 [2.22-r1] USE="cxx -multislot -multitarget nls -static-libs {-test} -vanilla zlib" 20,966 kB

[ebuild     U  ] sys-apps/portage-2.2.1 [2.1.11.50] USE="-build -doc -epydoc (ipc) (-pypy2_0) -python2 -python3 (-selinux) -xattr" LINGUAS="(-pl%) -ru" PYTHON_TARGETS="(-pypy2_0) -python2_6% python2_7%* python3_2%* (-python3_3) (-python3_4)" 881 kB

[ebuild   R    ] sys-devel/gcc-4.6.3:4.6  USE="(-altivec) cxx -doc (-fixed-point) fortran -gcj -graphite gtk (-hardened) (-libssp) -lto% mudflap (multilib) -multislot nls -nopie -nossp nptl -objc -objc++ -objc-gc openmp -regression-test% (-test%) -vanilla" 24 kB

[ebuild     U  ] sys-kernel/linux-headers-3.9 [3.4-r2] 3,614 kB

[uninstall     ] media-sound/alsa-headers-1.0.25

[blocks b      ] media-sound/alsa-headers ("media-sound/alsa-headers" is blocking sys-kernel/linux-headers-3.9)

Total: 24 packages (13 upgrades, 1 in new slot, 10 reinstalls, 1 uninstall), Size of downloads: 54,368 kB

Conflict: 1 block

* 24 in total

! media-sound/alsa-headers-1.0.25 seems to have gone from tree, no changelog in overlays or portage

@ media-sound/alsa-headers: blocks sys-kernel/linux-headers-3.9

* Uninstall media-sound/alsa-headers(1.0.25) before sys-kernel/linux-headers(3.9)

[Toolchain] sys-kernel/linux-headers-3.9 [3.4-r2]

[Toolchain] adding glibc-2.15-r3

[TC] sys-devel/gcc-4.6.3 first built: Sat Feb  9 22:46:54 2013

+ adding dev-libs/gmp-5.0.2_p1: Wed Feb 29 05:15:16 2012 [used by gcc]

[Toolchain] dev-libs/gmp-5.0.2_p1

@ gcc deps changing ABI [requires glibc]

+ dev-libs/mpfr-3.1.1 [required by gcc]

[Toolchain] dev-libs/mpfr-3.1.1 [3.0.1_p4]

+ dev-libs/mpc-1.0.1 [required by gcc]

[Toolchain] dev-libs/mpc-1.0.1 [0.8.2]

* Checking dependencies for sys-devel/gcc-4.6.3..  done.

[Toolchain] sys-devel/gcc-4.6.3

+ adding sys-libs/zlib-1.2.7: Mon Oct  1 03:26:06 2012

[Toolchain] sys-libs/zlib-1.2.7

+ adding sys-devel/gnuconfig-20130111

[Toolchain] sys-devel/gnuconfig-20130111 [20120818]

+ adding sys-devel/gcc-config-1.7.3: Mon Aug 13 06:19:06 2012

[Toolchain] sys-devel/gcc-config-1.7.3

+ adding sys-devel/autoconf-2.69

[Toolchain] sys-devel/autoconf-2.69 [2.68]

+ adding sys-devel/autoconf-wrapper-13

[Toolchain] sys-devel/autoconf-wrapper-13 [12]

+ adding sys-devel/automake-1.13.4

[Toolchain] sys-devel/automake-1.13.4

+ adding sys-devel/automake-wrapper-9

[Toolchain] sys-devel/automake-wrapper-9 [7]

+ adding sys-devel/binutils-config-3-r3: Wed Jun 27 21:50:18 2012

[Toolchain] sys-devel/binutils-config-3-r3

+ adding sys-devel/binutils-2.23.1

[Toolchain] sys-devel/binutils-2.23.1 [2.22-r1]

@ ABI change of sys-devel/binutils [2.22-r1 -> 2.23.1] requires glibc

+ adding sys-devel/flex-2.5.37

[Toolchain] sys-devel/flex-2.5.37 [2.5.35_p10]

+ adding sys-devel/patch-2.6.1: Wed Feb 29 03:00:13 2012

[Toolchain] sys-devel/patch-2.6.1

+ adding sys-devel/m4-1.4.16: Wed Jun 27 21:50:09 2012

[Toolchain] sys-devel/m4-1.4.16

+ adding sys-devel/make-3.82-r4

[Toolchain] sys-devel/make-3.82-r4 [3.82-r3]

+ adding sys-devel/bison-2.4.3: Sun Jul 31 04:35:43 2011

[Toolchain] sys-devel/bison-2.4.3

+ adding sys-devel/libtool-2.4-r1: Tue Oct 11 06:48:08 2011

[Toolchain] sys-devel/libtool-2.4-r1

+ adding sys-devel/gettext-0.18.2

[Toolchain] sys-devel/gettext-0.18.2 [0.18.1.1-r3]

+ adding sys-apps/portage-2.2.1

[Toolchain] sys-apps/portage-2.2.1 [2.1.11.50]

+ adding dev-lang/python-3.2.5-r2

[Toolchain] dev-lang/python-3.2.5-r2 [3.2.3]

+ adding dev-lang/perl-5.12.4-r1: Mon Oct 10 02:01:39 2011

[Toolchain] dev-lang/perl-5.12.4-r1

[Toolchain] adding glibc-2.15-r3 [again]

[TC] 26 toolchain packages

* C compiler will be installed

* OS headers will be installed, followed by libc

* libc will be installed again post-toolchain

@ About to cancel? Y to proceed, E to edit list(N y e) Y

TC: upgrading linux-headers - before glibc

[TC] Upgrading linux-headers from 3.4-r2 to 3.9

^C

update: user cancelled: install sys-kernel/linux-headers

* Terminating...done
```

 I cancelled because it wasn't uninstalling alsa-headers before trying to emerge linux-headers.

This turned out to be an oversight in toolchain handling, so it was important to fix it. And to be sure it worked across resume, since when we have a toolchain target (that is update --toolchain with no named target, much like we default to world/@system @world in normal usage) there is no package data at all in the usual list files. Again this fixed an issue with previous code, since the custom -e handling uses the same setup.

If you use update -r --toolchain then it will only do the toolchain packages in the saved list. Don't forget you can use a numeric flag ie -[0-9] in wildcard terms, for a temporary output run, with its own set of list files etc, exactly as under your main /root/emerge directory (or whatever you set dir to in the config).

Similarly, if you give it a target with --toolchain, it will resolve that target (or targets or sets) and then do only the toolchain packages in that list. You can see above that the default target, assesses the state of all toolchain packages against the compiler. linux-headers upgrades always pull in glibc (as you've probably seen, since that's been the case for a few years.) In the above case, many things which are important to compilation had not been built for ages, let alone with the current compiler (that's what the dates are about. Yes this may be superfluous for *-config, but it's easier not to do a check than bolt-it in afterward.) 

compiler deps (gmp, mpfr, mpc by default for gcc) must also have been in place when the compiler was last built, as well as checking for ABI changes (minor upgrades are simply built without triggering a rebuild of gcc.) Other packages are tested against its first-built time, and the sequence is as we define it in our configuration (cf: update -h config.)

libc deps (default to binutils as seen above) changing ABI trigger a further rebuild of glibc. This is the modern equivalent of the old "build everything twice" metaphor applied only to gcc and glibc. You can set libc_deps to an empty value in /etc/update but note that a compiler rebuild as above will still trigger a glibc rebuild.

Sorry, but if you want to play it unsafe, use emerge at the command-line to do it. KK, press E and skip the last glibc (or anything else;)

Hmm the above looks a bit verbose; think I'll swap "Toolchain" with "TC" in the output soon.

[edit:] Remove DEBUG sequence, since it's in next post. typos

update -P does not work correctly; stick with update @preserved-rebuild for now.

typo last update was in Jan 2013, not 2012. ;)Last edited by steveL on Mon Sep 23, 2013 9:57 pm; edited 5 times in total

----------

## steveL

So I got the resume working:

```
# update -r

** These are the packages in the emerge list:

 Toolchain: Resuming..

[ebuild     U  ] sys-kernel/linux-headers-3.9 [3.4-r2] 3,614 kB

[ebuild   R    ] sys-libs/glibc-2.15-r3  USE="[TC] Automated rebuild"

[ebuild   R    ] dev-libs/gmp-5.0.2_p1  USE="cxx -doc -static-libs" 0 kB

[ebuild     U  ] dev-libs/mpfr-3.1.1 [3.0.1_p4] USE="-static-libs%" 0 kB

[ebuild     U  ] dev-libs/mpc-1.0.1 [0.8.2] USE="-static-libs%" 610 kB

[ebuild   R    ] sys-devel/gcc-4.6.3:4.6  USE="(-altivec) cxx -doc (-fixed-point) fortran -gcj -graphite gtk (-hardened) (-libssp) -lto% mudflap (multilib) -multislot nls -nopie -nossp nptl -objc -objc++ -objc-gc openmp -regression-test% (-test%) -vanilla" 24 kB

[ebuild   R    ] sys-libs/zlib-1.2.7  USE="minizip -static-libs" 0 kB

[ebuild     U  ] sys-devel/gnuconfig-20130111 [20120818] 51 kB

[ebuild   R    ] sys-devel/gcc-config-1.7.3  0 kB

[ebuild     U  ] sys-devel/autoconf-2.69:2.5 [2.68:2.5] USE="-emacs -multislot%" 1,187 kB

[ebuild     U  ] sys-devel/autoconf-wrapper-13 [12] 0 kB

[ebuild  NS    ] sys-devel/automake-1.13.4:1.13 [1.11.6:1.11, 1.12.6:1.12] 1,416 kB

[ebuild     U  ] sys-devel/automake-wrapper-9 [7] 0 kB

[ebuild   R    ] sys-devel/binutils-config-3-r3  0 kB

[ebuild     U  ] sys-devel/binutils-2.23.1 [2.22-r1] USE="cxx -multislot -multitarget nls -static-libs {-test} -vanilla zlib" 20,966 kB

[ebuild     U  ] sys-devel/flex-2.5.37 [2.5.35_p10] USE="nls -static {-test}" 1,273 kB

[ebuild   R    ] sys-devel/patch-2.6.1  USE="-static {-test}" 0 kB

[ebuild   R    ] sys-devel/m4-1.4.16  USE="-examples" 0 kB

[ebuild     U  ] sys-devel/make-3.82-r4 [3.82-r3] USE="nls -static" 0 kB

[ebuild   R    ] sys-devel/bison-2.4.3  USE="nls -static" 0 kB

[ebuild   R    ] sys-devel/libtool-2.4-r1:2  USE="{-test} -vanilla" 0 kB

[ebuild     U  ] sys-devel/gettext-0.18.2 [0.18.1.1-r3] USE="-acl -cvs cxx -doc -emacs git -java nls openmp -static-libs" 15,330 kB

[ebuild     U  ] sys-apps/portage-2.2.1 [2.1.11.50] USE="-build -doc -epydoc (ipc) (-pypy2_0) -python2 -python3 (-selinux) -xattr" LINGUAS="(-pl%) -ru" PYTHON_TARGETS="(-pypy2_0) -python2_6% python2_7%* python3_2%* (-python3_3) (-python3_4)" 881 kB

[ebuild     U  ] dev-lang/python-3.2.5-r2:3.2 [3.2.3:3.2] USE="-build -doc -examples gdbm -hardened% -ipv6 ncurses readline sqlite ssl threads tk (wide-unicode) -wininst xml" 9,020 kB

[ebuild   R    ] dev-lang/perl-5.12.4-r1  USE="berkdb -build -debug -doc gdbm -ithreads" 0 kB

[ebuild   R    ] sys-libs/glibc-2.15-r3  USE="[TC] Automated rebuild"

[TC] 26 toolchain packages

* 26 in total

! media-sound/alsa-headers-1.0.25 seems to have gone from tree, no changelog in overlays or portage

@ media-sound/alsa-headers: blocks sys-kernel/linux-headers-3.9

* Uninstall media-sound/alsa-headers(1.0.25) before sys-kernel/linux-headers(3.9)

[TC] Uninstalling =media-sound/alsa-headers-1.0.25

media-sound/alsa-headers: 1.0.25 none none 

All selected packages: media-sound/alsa-headers-1.0.25

>>> Waiting 5 seconds before starting...

>>> (Control-C to abort)...

>>> Unmerging in:  5 4 3 2 1 

>>> Unmerging (1 of 1) media-sound/alsa-headers-1.0.25...

TC: upgrading linux-headers - before glibc

[TC] Upgrading linux-headers from 3.4-r2 to 3.9

* Checking gentoo-headers-base-3.9.tar.xz .. [OK]

* Checking gentoo-headers-3.9-1.tar.xz .. [OK]

+ Unpacking gentoo-headers-base-3.9.tar.xz

+ Unpacking gentoo-headers-3.9-1.tar.xz

* Patching:..............done

+ Compiling Source ... 

+ Completed compile of linux-headers-3.9

[TC] sys-kernel/linux-headers-3.9 installed successfully.

Packages installed so far: 1 of 1.      25 remaining

[TC] TC: rebuilding sys-libs/glibc- after linux-headers

[TC] Rebuilding sys-libs/glibc-2.15-r3

* Checking glibc-2.15.tar.xz .. [OK]

* Checking glibc-ports-2.15.tar.xz .. [OK]

* Checking glibc-2.15-patches-23.tar.bz2 .. [OK]

% Checking gcc for __thread support ...

% Checking kernel version (3.10.7 >= 2.6.9) ...

% Checking linux-headers version (3.9.0 >= 2.6.9) ...

+ Unpacking glibc-2.15.tar.xz

+ Unpacking glibc-ports-2.15.tar.xz

+ Unpacking glibc-2.15-patches-23.tar.bz2

* Patching:................................................................................................................................done

% Using GNU config files from /usr/share/gnuconfig

+ Compiling Source ... 

% Building glibc for ABIs: x86 amd64

%             ABI:   x86

%          CBUILD:   x86_64-pc-linux-gnu

%           CHOST:   x86_64-pc-linux-gnu

%         CTARGET:   x86_64-pc-linux-gnu

%      CBUILD_OPT:   i686-pc-linux-gnu

%     CTARGET_OPT:   i686-pc-linux-gnu

%              CC:   x86_64-pc-linux-gnu-gcc -m32

%         ASFLAGS:

%          CFLAGS:   -pipe -g3 -ggdb -march=native -O2 -fno-strict-aliasing
```

Sit back and wait and my toolchain is all nicely consistent. At this point info ld stops working so I take the hint, and reboot.

Next I found a bug in revdep library detection (not handling quotes properly due to a typo, but let's take the opportunity to deal with spaces and pick up revdep libs more consistently), and this led to the circular revdep issue; I tracked that down to revdep-rebuild wanting to rebuild libraries with preserved-rebuild libs in them; these are held-over from the last installation, but counted as part of the current (or next) version of the package: so ofc rebuilding them doesn't work since portage continues to preserve the lib, and revdep continues to think it's a dud.

This only applies when you follow the emerge warning to use revdep-rebuild --library '/usr/lib64/libfoo.so.1' && rm .. for example; I think the manual message is to avoid a preserved-rebuild loop. Luckily the 3 packages with preserved libs were precisely the gcc deps, so when the other two came up as the only consumers of libgmp.so.3 I knew something was up (since they were upgraded after it was rebuilt with new(ish;) gcc.) I've raised it in #gentoo-portage and hopefully it'll be fixed soon (revdep should not treat a preserved lib as being a current object.) The python rewrite will be default from next version, so after that's bedded down hopefully this bug will get sorted.

edit: this isn't standard preserved-rebuild message.Last edited by steveL on Sat Sep 14, 2013 5:46 pm; edited 1 time in total

----------

## steveL

So what came next, once I was sure there was no weird linkage going on with toolchain things? (And I'd got some sleep;-) The usual tree-chasing basically, just a few things compressed into one upgrade, including an improvement in USE flag editing.

Standard update -s came up with a couple of blockers. First off, ncurses got a new tinfo flag, and openrc needed to be compiled with it off (I think; I lost the terminal output, so I'm going off emerge.log and eix output for what's there now.) update ncurses took care of that.

texlive-langgerman-2012 was blocking the upgrade to texlive-2013, despite the new version being in the list, so for the time being I simply used emerge -Cq texlive-langgerman (remember: update doesn't have an uninstall option: we don't shield you from emerge, since if you don't know how to use it properly you will not be able to troubleshoot anything at all.) Note that -cq is the normal uninstall switch, which is dependency aware. However since it's dependency-aware, it won't remove a package that's in-use (ie depended on by another package, or in world/system.)

Additionally sysvinit was holding back openrc and udev (iirc) and util-linux needed upgrading for something else, so I simply hit update sysvinit util-linux to get past those. (update does not install to world unless you tell it to with -i.)

Then I tried update -aU system but only 2 packages showed up (note i'd forgotten -u ;) and it was worse with --bdep, so I just used update system and let it skip useless rebuilds, using the old logic. That got the list down from 40 to 16 packages and meant I could proceed knowing my base system was up to date. (Stuff like bash; again a reboot was in order.)

The next bit was me playing with USE-flags, basically, and seeing what new stuff was coming in. I had a slight issue with qtsql, since the KDE desktop profile now sets the mysql flag on for that package. This was a suspect area, since we had logic to detect "default" in UI (dialog) as what the package is currently coming in with, ie the default if we don't change anything, but the logic for deciding what flags to set is separate, and uses IUSE from the ebuild. I'd wrestled with it before, but came to a hackish compromise that allowed me to at least switch off a profile-set flag. Even if I do force this one off globally at some point. Basically we now always accept an off setting from the user if the package is currently going to have the flag on, according to emerge. Previously (as here) the global being off, would be enough for it to assume the setting would be off.

That needs a bit of refinement, as ever, but it is an iterative improvement on what was there before. (or I would have had to set the flag manually, by editing package.use.) I also fixed up error handling under --jobs: if you skip an ebuild then that can cause emerge to error out. In my case, I have firefox in noCompile, so it only gets updated when I use update firefox, not on every upgrade that comes in (since it takes forever and uses over 15G of disk space.) But the installed firefox had a dependency on sqlite with fts3 USE-flag, which sqlite-3.8.0 does not have. So I was getting an error, only I couldn't see it, apart from "0 Jobs of  compiled" and then a die message that no packages were compiled. That's fixed; (I actually only noticed it as I was trying to update udev without lvm2, which didn't work either. So that was my testcase; it was only when I got the error output that I saw the firefox/sqlite issue.)

And off we go: 

```
** Running: emerge --changed-use --with-bdeps y -uD1 --jobs=3 @system @world

  Emerge  256 Upgrading qtxmlpatterns from 4.8.2 to 4.8.4

* done: dev-vcs/git-1.8.1.5

Jobs: 1 running (255/476 done.) Load: 1.18, 1.29, 1.44
```

 :-)

So my advice is: get the machine to a point where emerge can do update -uU system usually by doing --toolchain first (if it's been a while: that's what it's intended for, as well as ensuring everything is built with the current compiler, headers, libc etc.)

Then see what's stopping the world update and preferably upgrade pieces that are causing conflicts; in the worst case remove a dependency that isn't important (and if you don't know, ask in #gentoo.) You may have to skip an additional package or two: for instance I ended up simply skipping sqlite in addition to firefox, and letting everything else go.

Note skipping does not (usually) mean use of SKIP; it just means deselecting the package from the dialog list. Hit 'e' (or 'E') to see that when it asks if you want to proceed with the build.

And make sure you run dispatch-conf before you reboot, as well as revdep-rebuild. (update makes sure you do that, of course, though you can't always get through revdep-rebuilds, so try to find out what's happening under the hood: man revdep-rebuild. In my case I confirmed the issue with ldd /usr/lib64/libmpfr.so.1 for example, which told me it was the preserved lib that had the linkage to the old gmp lib.)

There are of course things to improve with toolchain handing, especially slotted packages like python, which applies to all types of update. Now we have --perl in place, that's also in toolchain, and they trigger the relevant cleaner/update when they change ABI. ghc is rebuilt when gcc changes ABI. Again, that needs to be added so --haskell will be picked up even when gcc isn't being rebuilt.

Constructive feedback and ideas for improvement welcome.

HTH,

steveL.

----------

## steveL

Minor bump, as I fixed a couple of bugs.

If it's working okay for everyone for the next couple of weeks, I'll wrap the changes into an ebuild. Though we really should set up an overlay, since waiting a year between releases is no good.

----------

## steveL

Just so you don't think I'm neglecting this (or an ebuild) I am very close to finishing off --toolchain. The recent perl difficulties, led me to wanting this dependency conflict handled automatically, which entailed handling all of them (3 types that I know about so far) generically, including when ABI warnings happen for packages that aren't in the resultant list. This shows the problem:

```
~ # update -aT

** Resolving --toolchain..

These are the packages that would be merged, in order:

Calculating dependencies  ....... ... done!

[ebuild     U  ] sys-devel/gnuconfig-20131128 [20130111] 45 kB

[ebuild   R    ] sys-devel/gcc-config-1.7.3  0 kB

[ebuild   R    ] sys-devel/binutils-config-3-r3  0 kB

[ebuild   R    ] sys-devel/patch-2.6.1  USE="-static {-test}" 0 kB

[ebuild   R    ] sys-devel/autoconf-wrapper-13  0 kB

[ebuild   R    ] sys-devel/automake-wrapper-9  0 kB

[ebuild   R    ] sys-devel/m4-1.4.16  USE="-examples" 0 kB

[ebuild   R    ] dev-libs/gmp-5.1.2  USE="cxx -doc -pgo -static-libs" 0 kB

[ebuild   R    ] dev-libs/mpfr-3.1.2-r1  USE="-static-libs" 0 kB

[ebuild   R    ] dev-libs/mpc-1.0.1  USE="-static-libs" 0 kB

[ebuild     U  ] sys-devel/gettext-0.18.3.2 [0.18.2] USE="-acl -cvs cxx -doc -emacs git -java ncurses%* nls openmp -static-libs" ABI_X86="(-32) (64%*) (-x32)" 15,810 kB

[ebuild   R    ] sys-devel/make-3.82-r4  USE="nls -static" 0 kB

[ebuild   R    ] sys-devel/flex-2.5.37  USE="nls -static {-test}" 0 kB

[ebuild   R    ] sys-devel/bison-2.4.3  USE="nls -static" 0 kB

[ebuild   R    ] dev-lang/perl-5.12.4-r1  USE="berkdb -build -debug -doc gdbm -ithreads" 0 kB

[ebuild   R    ] sys-kernel/linux-headers-3.9  0 kB

[ebuild   R    ] sys-devel/autoconf-2.69:2.5  USE="-emacs -multislot" 0 kB

[ebuild   R    ] sys-devel/autoconf-2.13:2.1  0 kB

[ebuild   R    ] sys-devel/automake-1.13.4:1.13  0 kB

[ebuild   R    ] sys-devel/automake-1.12.6:1.12  0 kB

[ebuild   R    ] sys-devel/libtool-2.4.2:2  USE="-static-libs {-test} -vanilla" 0 kB

[ebuild   R    ] sys-libs/zlib-1.2.8-r1  USE="minizip -static-libs" ABI_X86="(-32) (64) (-x32)" 0 kB

[ebuild   R    ] dev-lang/python-2.7.5-r3:2.7  USE="-berkdb -build -doc -examples gdbm -hardened -ipv6 ncurses readline sqlite ssl threads tk (wide-unicode) -wininst xml" 0 kB

[ebuild     U  ] dev-lang/python-3.3.3:3.3 [3.3.2-r2:3.3] USE="-build -doc -examples gdbm -hardened -ipv6 ncurses readline sqlite ssl threads tk -wininst xml" 11,788 kB

[ebuild     U  ] sys-devel/binutils-2.23.2 [2.23.1] USE="cxx -multislot -multitarget nls -static-libs {-test} -vanilla zlib" 20,949 kB

[ebuild     U  ] sys-apps/portage-2.2.8-r1 [2.2.7] USE="-build -doc -epydoc (ipc) (-pypy2_0) -python2 -python3 (-selinux) -xattr" LINGUAS="-ru" PYTHON_TARGETS="(-pypy2_0) -python2_6 python2_7 -python3_2 python3_3 (-python3_4)" 855 kB

[ebuild   R    ] sys-devel/gcc-4.6.3:4.6  USE="(-altivec) -awt% cxx -doc (-fixed-point) fortran -gcj -graphite (-gtk%*) (-hardened) (-libssp) (-lto%) -mudflap* (multilib) -multislot nls -nopie -nossp nptl -objc -objc++ -objc-gc openmp -regression-test -vanilla" 0 kB

[ebuild   R    ] sys-devel/gcc-4.7.3-r1:4.7  USE="(-altivec) -awt% cxx -doc (-fixed-point) fortran -gcj -go -graphite (-gtk%*) (-hardened) (-libssp) (-lto%) -mudflap* (multilib) -multislot nls -nopie -nossp nptl -objc -objc++ -objc-gc openmp -regression-test -vanilla" 43 kB

Total: 28 packages (5 upgrades, 23 reinstalls), Size of downloads: 49,487 kB

! Dependency conflict:

! conflict: dev-lang/perl:0

! dev-lang/perl:0: dev-lang/perl-5.16.3 blocked [ebuild scheduled for merge]

!! TC: dev-lang/perl-5.16.3 is ABI blocked

! dev-lang/perl: conflict: dev-perl/HTTP-Negotiate-6.0.0 [installed]

! dev-lang/perl: conflict: dev-perl/HTML-Parser-3.690.0 [installed]

! dev-lang/perl: conflict: dev-perl/Net-Daemon-0.480.0 [installed]

! dev-lang/perl: conflict: dev-perl/PlRPC-0.202.0 [installed]

! dev-lang/perl: conflict: dev-perl/libwww-perl-6.30.0 [installed]

! dev-lang/perl: conflict: dev-perl/File-MimeInfo-0.150.0 [installed]

! dev-lang/perl: conflict: dev-perl/WWW-RobotRules-6.10.0 [installed]

* 28 in total

[TC] sys-devel/gcc-4.7.3-r1 first built: Thu Oct 17 14:15:54 2013

* checking gcc-config 4.7.3

[TC] sys-devel/gcc-4.7.3-r1  last built: Sat Dec  7 10:19:57 2013

~ adding dev-libs/gmp-5.1.2: Sat Dec  7 07:49:42 2013 [used by gcc]

[TC] dev-libs/gmp-5.1.2

~ adding dev-libs/mpfr-3.1.2-r1: Sat Dec  7 07:50:58 2013 [used by gcc]

[TC] dev-libs/mpfr-3.1.2-r1

~ adding dev-libs/mpc-1.0.1: Sat Dec  7 07:51:37 2013 [used by gcc]

[TC] dev-libs/mpc-1.0.1

> skipping sys-libs/zlib-1.2.8-r1: Sat Dec  7 10:20:43 2013

> skipping dev-lang/perl-5.12.4-r1: Sat Dec  7 10:26:56 2013

~ adding sys-devel/gnuconfig-20131128

[TC] sys-devel/gnuconfig is being upgraded

[TC] sys-devel/gnuconfig-20131128 [20130111]

> skipping sys-devel/gcc-config-1.7.3: [perl]

> skipping sys-devel/autoconf-2.69: [perl]

> skipping sys-devel/autoconf-2.13: [perl]

> skipping sys-devel/autoconf-wrapper-13: [perl]

> skipping sys-devel/automake-1.13.4: [perl]

> skipping sys-devel/automake-1.12.6: [perl]

> skipping sys-devel/automake-wrapper-9: [perl]

> skipping sys-devel/binutils-config-3-r3: [perl]

~ adding sys-devel/binutils-2.23.2

[TC] sys-devel/binutils is being upgraded

[TC] sys-devel/binutils-2.23.2 [2.23.1]

> skipping sys-devel/flex-2.5.37: Sat Dec  7 10:39:32 2013

> skipping sys-devel/patch-2.6.1: Sun Feb 16 07:00:11 2014

> skipping sys-devel/m4-1.4.16: Sat Dec  7 10:41:01 2013

> skipping sys-devel/make-3.82-r4: Sun Feb 16 07:02:15 2014

> skipping sys-devel/bison-2.4.3: Sat Dec  7 10:42:52 2013

> skipping sys-devel/libtool-2.4.2: Sat Dec  7 10:43:49 2013

~ adding sys-devel/gettext-0.18.3.2

[TC] sys-devel/gettext is being upgraded

[TC] sys-devel/gettext-0.18.3.2 [0.18.2]

> skipping dev-lang/python-2.7.5-r3: Sat Dec  7 10:50:58 2013

~ adding dev-lang/python-3.3.3

[TC] dev-lang/python is being upgraded

[TC] dev-lang/python-3.3.3 [3.3.2-r2]

~ adding sys-apps/portage-2.2.8-r1

[TC] sys-apps/portage-2.2.8-r1 [2.2.7]

[TC] 8 toolchain packages

* python will be installed

@ About to cancel? Y to proceed, E to edit list(N y e)? 

update: user cancelled
```

Note that it's processing the conflicts and flagging perl as a toolchain ABI warning (I added 5.16 and 5.18 to local version). But it's not running the fix yet as perl-5.16 is not in the list. So the perl deps aren't being added either, as emerge is saying it's just going to rebuild 5.12. You might also notice the dates on gcc: it's rebuilding its deps, since they were built just before the last build of gcc, and not with a build of gcc linked with those versions. That was built just after, so this should be the last build of them (for this sequence.) "Confused? You should be." ;)

To actually fix it I need to add support for: clean(virtual/perl-Test-Simple) and perhaps re-resolve; turns out we already had something slightly more complex, for unmerges that happen before a package is installed (which needs to be handled for warning packages as well, ofc.) I didn't write much of this part, but most of it is really crufty, and hasn't been touched for several years. Anyhow I've rewritten some of the old warning code to be more efficient structurally (which I now need to change the rest to using.) It should be more useful for upgrades of old machines as well, once I do, since it will do them in the order in the file, ie chronologically as tree changed.

So not gone, not forgotten :) Error output should use more colour after I committed the setup of them; we were using derived code in shell, so imported it back, and found everything was a tangle of spaghetti so had to clean that up first. The actual ids I've been using for a while, so you should see a few places brighten up (unfortunately mostly errors ofc..:) Once I'm happy with toolchain, I'll switch to working on the installer again.

OFC I'm far behind the tree. I always stop for big fixes like this, that hit my install if I can. It means I'm forced to work on getting the thing working correctly. It also reassures me that update copes with several months between world upgrades, as that's what I usually end up doing.

----------

## brownandsticky

'been using this script for a week or so now and it's awesome.  I used my own little script for years but wanted something more polished and complete.  This fits the bill nicely.

   Many thanks +SteveL

   As a stop gap for overlay.  Could you possibly make the ebuilds available via git (in app-portage directory)?

----------

## steveL

 *brownandsticky wrote:*   

> 'been using this script for a week or so now and it's awesome.

 

Ah thanks mate; that's exactly what motivates me to improve it (flattery;)  Well it's actually that people find it useful, as that's the biggest compliment in my book.

 *Quote:*   

> I used my own little script for years but wanted something more polished and complete.  This fits the bill nicely.
> 
>    Many thanks +SteveL

 

You're very welcome :-) 

 *Quote:*   

> As a stop gap for overlay.  Could you possibly make the ebuilds available via git (in app-portage directory)?

 

Yeah was going to put the ebuild in the git repo, though I've changed it as well as the makefile for prefix support, so wanted to test it a bit first in case I've broken something.

I can easily make an overlay available; it just seemed odd to do it for literally one package, and even then I'm only really happy supporting the git version, unless someone else is happy to deal with the QA process; bug wrangling principally. Decision-making as to what's required right now, and veto over any changes, belongs to Griz64. If we had an overlay and were putting out versions that people reported on, decision-making could move to votes I guess, but not veto. Somehow I doubt enough people care to make that worth doing.

If we were to put it in an overlay, I'd rather use sys-apps, btw, as it was designed to support all 3 package manglers, from the beginning. But with a git ebuild, that's not necessary (which is why I like it;)

Again, thanks for the positive feedback: it's given me the buzz I need to tackle the last bit of toolchain (putting back a function I deleted a while ago so backup of packages we're about to remove, works again.)

----------

## jamtat

I found the script discussed in this thread while trying to find a semi-automated way of keeping my Gentoo/MythTV system updated/upgraded. Could I ask that the author of this script take a look at the thread I created at https://forums.gentoo.org/viewtopic-t-1021528.html?sid=6b54a4ec784b5aa3fe0d4ae52a8571bd and offer input as to whether this script could serve my purposes? Thanks in advance for any input on this: I hope this might provide the answer I'm seeking.

----------

## steveL

Sorry I didn't reply sooner; this didn't come up in "My Posts", for some reason.

 *jamtat wrote:*   

> I found the script discussed in this thread while trying to find a semi-automated way of keeping my Gentoo/MythTV system updated/upgraded. Could I ask that the author of this script take a look at the thread I created and offer input as to whether this script could serve my purposes? Thanks in advance for any input on this: I hope this might provide the answer I'm seeking.

 

Yes it would; it's designed to be used automated, under the control of another script or program:

The -x flag means "automated", wherein it bails out on many things it would ask a human about; also happens if it's being piped, and there's no terminal in sight.

cf: POSIX test: [ -t 0 ] though we use [[ in bash.

The -H flag means "use colours for the terminal, as you're being run for a Human, even though you're being piped: I'm piping your output to a terminal"; it also implies automated mode.

Note it's undocumented, though discussed here before, and deeper semantics are subject to change, since it's meant for use with chroot installation, and was implemented precisely for our installer. The relevant script variable (easily searchable) is useTerminal.

Having said that, it hasn't changed for years; you can always complain if and when something does change with it, though if you do use it, it's likely better to tell me here as well, so I'll post if we do some more work on the installer that requires such a change in semantic. It's unlikely since its effects are covered by -x, apart from forcing colour display.

Oh I think it doesn't ensure certain deps like dialog either, because it's designed for use in early-install.

Additionally, it has specific exit codes, documented in the script, only about 7 or 8 afair, so that the calling script can know about certain outcomes. Haven't added any for ages, since no-one's ever even mentioned using the ones that are there, let alone ask for others.

Talking of dialog, I quite like the -E flag to go straight to Editing the list, which might be useful in certain situations for a calling script (eg retrying, when you know you're interactive, and the user wants to tweak.)

For more info, run update -h and update --help (which is a different option, not aliasing the first.) You might like update -h error as well, if you plan to do much custom-tweaking. Thank drescherjm for that ;) (the base function does what he mentioned there, or is meant to, afair.)

update -h config will always show you the latest config settings (directly from the script), and their defaults.

HTH,

steveL

(I fixed the topic link above for you; you can edit your post and mod it to use the same; select the text, and click the "Topic" button, or type the tags.)

PS: there's a bug with autounmask when you skip the package, in unstable portage, which is much tighter and does not accept full CPVs, only pkg or pkg:slot, for exclusion. It doesn't affect the majority of exclusions, but thought I should mention it; should be corrected within a week or two, depending on when Griz next shouts at me about it. ;p

----------

## steveL

Just in case anyone tries to register on the trac, sorry but we've closed that for a few days, due to a deluge of fake account spam, till infra sort out a captcha or something they're happy with.

Shame, as I've always hated captchas, but can't see any other real option. In any event, if you need an account (unlikely I know ;) then feel free to pm me, or ask (Monkeh, igli or Griz64) in #friendly-coders on IRC: chat.freenode.net

----------

## geki

finally got time to merge git version. set noCompile array in config wrt kernel, its headers, grub and perl to skip these for manual upgrades.

just a great experience updating, thank you again, steveL!  :Surprised: 

----------

## steveL

Hey you're welcome geki :-)

Thanks for the encouragement. :D

----------

