On Thu, 7 Dec 2017 00:59:33 +0100, Frank Steinmetzger wrote: > > How does a restarted emerge @world recognizes packages, which are > > already compiled according to the new standard? > > I “circumvent” those questions by doing: > emerge -pveD world > worldlist > emerge -1O $(cat worldlist) > > If the system for whatever reason fails and I need to interrupt the > merge, I simply remove the lines from worldlist that have already been > built and then repeat the last command. Plus I can exclude some > packages that don’t need a rebuild: -bins, -docs, virtuals, most perl > and tex packages and so on. This saves a bit of time on the slower > laptop.
I wrote a script to handle this some years ago, and it has come in handy this week. It emerges all packages that have not been done since a given time. In this case, I run mergeolderthan -r glibc since glibc was emerged right before the world emerge #!/bin/bash EMERGE_ARGS="--oneshot --keep-going" usage() { echo -e "\nUsage: $(basename $0) [-f file] [-r category/package[-version] [-h]" echo " -f re-emerge all packages older than this file" echo " -r re-emerge all packages older than this package" echo " -h Show this text" echo -e "\n All other options are passed to the emerge command" echo -e "$*" exit } while getopts f:r:pvlh ARG; do case "${ARG}" in f) REFFILE=${OPTARG} ;; r) REFFILE=$(ls -1 /var/db/pkg/${OPTARG}*/environment.bz2 | head -n 1) ;; p) EMERGE_ARGS="${EMERGE_ARGS} --pretend" ;; v) EMERGE_ARGS="${EMERGE_ARGS} --verbose" ;; l) LIST="y" ;; h) usage ;; esac done shift $(expr ${OPTIND} - 1) [[ "${REFFILE}" ]] || usage "\nYou must specify a reference with -f or -r\n" [[ -f ${REFFILE} ]] || usage "\n${REFFILE} not found\n" PKGLIST=$(mktemp -t mergeolderthan.XXXXXXXX) emerge -ep --exclude gentoo-sources @world | grep -v sys-kernel/gentoo-sources | awk -F] '/^\[ebuild/ {print $2}' | awk '{print $1}' | while read PKG; do if [[ /var/db/pkg/${PKG}/environment.bz2 -ot ${REFFILE} ]]; then echo "=${PKG}" >>$PKGLIST fi done if [[ "${LIST}" ]]; then cat ${PKGLIST} && rm -f ${PKGLIST} else cat ${PKGLIST} | xargs --no-run-if-empty emerge ${EMERGE_ARGS} && rm -f ${PKGLIST} fi -- Neil Bothwick Hickory Dickory Dock, The mice ran up the clock, The clock struck one, The others escaped with minor injuries.
pgp3nkpJOWd1h.pgp
Description: OpenPGP digital signature