Boyd Stephen Smith Jr. wrote:
The -pv output of emerge shows this. A flag that was not available in your
current version but it available in the one you are installing, will be
colored yellow and postfixed with '%'.
Great. So something like the following in my cron.daily/portage.update
script should do the job:
echo "Save old use.desc"
rm -f /usr/portage/profiles/use.desc.old
cp /usr/portage/profiles/use.desc /usr/portage/profiles/use.desc.old
echo "Save old use.local.desc"
rm -f /usr/portage/profiles/use.local.desc.old
cp /usr/portage/profiles/use.local.desc
/usr/portage/profiles/use.local.desc.old
echo "Syncing portage tree..."
emerge --sync 2>> /var/log/portage.cron.log > /dev/null
status=$?
if [ $status -ne 0 ]; then
echo "Portage sync failed, exiting update."
exit $status
fi
echo "Changed use flags:"
diff /usr/portage/profiles/use.desc.old /usr/portage/profiles/use.desc
diff /usr/portage/profiles/use.local.desc.old
/usr/portage/profiles/use.local.desc
echo "Running eupdatedb..."
eupdatedb --quiet --nocolor 2> /dev/null
echo "Running update-eix..."
update-eix --quiet
echo "Checking for updates..."
rm -f /tmp/emerge.output
/usr/local/sbin/einfo --update --deep --newuse world
emerge --update --deep --pretend --verbose --nospinner --newuse world >
/tmp/emerge.output
emerge --update --deep --fetchonly --quiet --nospinner --newuse world >>
/tmp/emerge.output
cat /tmp/emerge.output
echo "New USE flags indicated by trailing percent sign in:"
grep -P "\S+%" /tmp/emerge.output
Thank you,
Roy
--
gentoo-user@gentoo.org mailing list