diff -Nru upgrade-system-1.5.2.0/debian/changelog upgrade-system-1.5.4.0/debian/changelog --- upgrade-system-1.5.2.0/debian/changelog 2012-03-06 19:41:41.000000000 +0000 +++ upgrade-system-1.5.4.0/debian/changelog 2012-03-09 15:28:52.000000000 +0000 @@ -1,3 +1,15 @@ +upgrade-system (1.5.4.0) unstable; urgency=low + + * Foolproofed orphaning for a case of both autoremove and deborphan non-empty. + + -- Martin-Éric Racine Fri, 09 Mar 2012 17:26:42 +0200 + +upgrade-system (1.5.3.0) unstable; urgency=low + + * Corrected "apt-get --purge --simulate autoremove" regex Remv to Purg. + + -- Martin-Éric Racine Fri, 09 Mar 2012 13:03:10 +0200 + upgrade-system (1.5.2.0) unstable; urgency=low * Added $(apt-get autoremove) packages' detection to the deborphan loop. diff -Nru upgrade-system-1.5.2.0/upgrade-system upgrade-system-1.5.4.0/upgrade-system --- upgrade-system-1.5.2.0/upgrade-system 2012-03-06 22:07:28.000000000 +0000 +++ upgrade-system-1.5.4.0/upgrade-system 2012-03-09 15:26:38.000000000 +0000 @@ -116,13 +116,13 @@ ### PURGE ORPHAN PACKAGES ### ############################# echo "${BOLD}3) Checking for orphan packages:${RESET}" -APT_ORPHANS=$(apt-get $NOTTY --purge --simulate autoremove | awk '/^Remv / { print $2 }') +APT_ORPHANS=$(apt-get $NOTTY --purge --simulate autoremove | awk '/^Purg / { print $2 }') ##DEPENDS: apt (main/important), mawk (main/required). while true do DEB_ORPHANS=$(deborphan $ORPHANOPTS) ##DEPENDS: deborphan (universe/optional). - ORPHANS=${APT_ORPHANS}${DEB_ORPHANS} + ORPHANS=${APT_ORPHANS:+$APT_ORPHANS }$DEB_ORPHANS APT_ORPHANS="" case $ORPHANS in "")