[Bug 939528] Re: auto-upgrade-tester: Add a post-upgrade test to check for obsolete config files
Jean-Baptiste Lallement
jean-baptiste at ubuntu.com
Tue Mar 6 15:33:35 UTC 2012
I pushed a script update-
manager/AutoUpgradeTester/post_upgrade_tests/test_obsolete_conffiles.py
to the auto-upgrade-tester that will be active with next run.
** Changed in: update-manager (Ubuntu)
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-manager in Ubuntu.
https://bugs.launchpad.net/bugs/939528
Title:
auto-upgrade-tester: Add a post-upgrade test to check for obsolete
config files
Status in “update-manager” package in Ubuntu:
Fix Released
Bug description:
auto-upgrade-tester: Add a post-upgrade test to check for obsolete config files.
Test fails if the list is not empty.
Script from upgrade-system
#################################
### REMOVING OBSOLETE CONFIGS ###
#################################
echo "${BOLD}D) Checking for obsolete configurations:${RESET}"
ORPHANS=$( dpkg-query -W -f='${Conffiles}\n' | grep obsolete | awk {'print $1'} )
##DEPENDS: dpkg (main/required), grep (main/required), mawk (main/required).
case $ORPHANS in
"")
echo "I: No obsolete configuration to purge."
break
;;
*)
echo "I: Removing obsolete configurations..."
unique(){
dpkg -S $ORPHANS | cut -d ':' -f 1 | uniq
##DEPENDS: dpkg (main/required), dpkg (main/required), coreutils (main/required).
}
UNIQUE=$( unique )
NUMBER=$( unique | wc -l )
echo "I: Number of packages affected: $NUMBER."
dpkg -S $ORPHANS
##DEPENDS: dpkg (main/required).
echo "${YELLOW}W: BEWARE OF FALSE POSITIVES! DELETE WITH EXTREME CAUTION!${RESET}"
rm -i $ORPHANS
##DEPENDS: coreutils (main/required).
apt-get $NOTTY --reinstall install ${UNIQUE}
##DEPENDS: apt (main/important).
### Escape dangerous purges automatically.
if [ $? != 0 ]
then
break
fi
;;
esac
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/939528/+subscriptions
More information about the foundations-bugs
mailing list