diff -Nru upgrade-system-1.5.4.0/debian/changelog upgrade-system-1.6.0.0/debian/changelog --- upgrade-system-1.5.4.0/debian/changelog 2012-03-09 15:28:52.000000000 +0000 +++ upgrade-system-1.6.0.0/debian/changelog 2012-03-11 08:33:37.000000000 +0000 @@ -1,3 +1,15 @@ +upgrade-system (1.6.0.0) unstable; urgency=low + + * The "Upgrade-System as it was intended all along" release: + + Made all APT checks quiet. + + Pretty-printed the Information and Notification messages to match. + + Removed outdated cruft from the source code's comments. + * upgrade-system upgrade-system.8 upgrade-system.conf.5 debian/copyright: + + Updated copyright info to emphasize Christoph Schindler's contribution + to this particular release. + + -- Martin-Éric Racine Sun, 11 Mar 2012 10:33:31 +0200 + upgrade-system (1.5.4.0) unstable; urgency=low * Foolproofed orphaning for a case of both autoremove and deborphan non-empty. diff -Nru upgrade-system-1.5.4.0/debian/copyright upgrade-system-1.6.0.0/debian/copyright --- upgrade-system-1.5.4.0/debian/copyright 2012-02-24 10:13:22.000000000 +0000 +++ upgrade-system-1.6.0.0/debian/copyright 2012-03-10 12:58:14.000000000 +0000 @@ -2,15 +2,15 @@ Source: http://q-funk.iki.fi/debian/pool/u/upgrade-system Files: * -Copyright: © 2004-2012, Martin-Éric Racine -Copyright: © 2004, Christoph Schindler -Copyright: © 2003-2004, Martin Zdrahal +Copyright: © 2004-2012 Martin-Éric Racine +Copyright: © 2004,2012 Christoph Schindler +Copyright: © 2003-2004 Martin Zdrahal License: GPL-2+ On Debian systems, the complete text of the GNU General Public License can be found in . Files: debian/* -Copyright: © 2004-2012, Martin-Éric Racine +Copyright: © 2004-2012 Martin-Éric Racine License: GPL-2+ On Debian systems, the complete text of the GNU General Public License can be found in . diff -Nru upgrade-system-1.5.4.0/upgrade-system upgrade-system-1.6.0.0/upgrade-system --- upgrade-system-1.5.4.0/upgrade-system 2012-03-09 15:26:38.000000000 +0000 +++ upgrade-system-1.6.0.0/upgrade-system 2012-03-11 08:31:32.000000000 +0000 @@ -8,7 +8,7 @@ # ## AUTHORS # Copyright © 2003-2004 Martin Zdrahal -# Copyright © 2004 Christoph Schindler +# Copyright © 2004,2012 Christoph Schindler # Copyright © 2004-2012 Martin-Éric Racine # ## LICENSE @@ -29,6 +29,8 @@ # util-linux:setterm (main/required). # ## CHANGES +# 2012-03-10 Make all APT checks quiet. v1.6 [MER] +# 2012-03-06 Add autoremove to orphan purge. v1.5 [CS] # 2011-12-21 Add APT --fix-policy install. v1.5 [MER] # 2011-03-03 Add debsum reinstallation. v1.4 [MER] # 2010-05-02 Add crude prompt colorization. v1.3 [MER] @@ -86,44 +88,54 @@ NOTTY="-q -y -o DPkg::Options::=--force-confdef" DEBIAN_FRONTEND="noninteractive" export DEBIAN_FRONTEND - #DEBCONF_ADMIN_EMAIL="" - #export DEBCONF_ADMIN_EMAIL - DONE="${GREEN}N: System upgrade completed.${RESET}" fi ############################ ### UPDATE PACKAGE LISTS ### ############################ -echo "${BOLD}1) Updating package lists.${RESET}" +echo "${BOLD}1) Updating package lists:${RESET}" apt-get $NOTTY -qq update ##DEPENDS: apt (main/important). if [ $? != 0 ] then echo "${RED}E: Some package lists could not be updated.${RESET}" exit 1 +else + echo "I: Package lists updated." fi ######################## ### UPGRADE PACKAGES ### ######################## -echo "${BOLD}2) Upgrading packages:${RESET}" -apt-get $NOTTY $UPGRADEOPTS -##DEPENDS: apt (main/important). -if [ $? != 0 ] -then - echo "${RED}E: Some packages could not be upgraded.${RESET}" - exit 2 -fi +echo "${BOLD}2) Checking for upgradable packages:${RESET}" +UPGRADABLE=$(apt-get $NOTTY $UPGRADEOPTS --simulate | awk '/^Inst / { print $2 }') +##DEPENDS: apt (main/important), mawk (main/required). +case $UPGRADABLE in + "") + echo "I: No upgradable package to install." + break + ;; + *) + echo "I: Installing upgradable packages..." + apt-get $NOTTY $UPGRADEOPTS + ##DEPENDS: apt (main/important). + if [ $? != 0 ] + then + echo "${RED}E: Some packages could not be upgraded.${RESET}" + exit 2 + fi + ;; +esac ############################# ### PURGE ORPHAN PACKAGES ### ############################# echo "${BOLD}3) Checking for orphan packages:${RESET}" -APT_ORPHANS=$(apt-get $NOTTY --purge --simulate autoremove | awk '/^Purg / { print $2 }') +REMOVABLE=$(apt-get $NOTTY --purge --simulate autoremove | awk '/^Purg / { print $2 }') ##DEPENDS: apt (main/important), mawk (main/required). while true do - DEB_ORPHANS=$(deborphan $ORPHANOPTS) + DEBORPHANS=$(deborphan $ORPHANOPTS) ##DEPENDS: deborphan (universe/optional). - ORPHANS=${APT_ORPHANS:+$APT_ORPHANS }$DEB_ORPHANS - APT_ORPHANS="" + ORPHANS=${REMOVABLE:+$REMOVABLE }$DEBORPHANS + REMOVABLE="" case $ORPHANS in "") echo "I: No orphan package to purge." @@ -154,9 +166,25 @@ ############################################ ### FIX DEPENDENCIES TO MATCH APT POLICY ### ############################################ - echo "${BOLD}A) Fixing package dependencies:${RESET}" - apt-get $NOTTY --auto-remove --fix-policy --purge install - ##DEPENDS: apt (main/important). + echo "${BOLD}A) Checking for missing dependencies:${RESET}" + FIXABLE=$(apt-get $NOTTY --auto-remove --fix-policy --purge --simulate install | awk '/^Inst / { print $2 }') + ##DEPENDS: apt (main/important), mawk (main/required). + case $FIXABLE in + "") + echo "I: No missing dependency to install." + break + ;; + *) + echo "I: Installing missing dependencies..." + apt-get $NOTTY --auto-remove --fix-policy --purge install + ##DEPENDS: apt (main/important). + if [ $? != 0 ] + then + echo "${RED}E: Some dependencies could not be installed.${RESET}" + exit 3 + fi + ;; + esac ################################## ### PURGE UNINSTALLED PACKAGES ### ################################## @@ -222,7 +250,7 @@ echo "I: Removing obsolete configurations..." unique(){ dpkg -S $ORPHANS | cut -d ':' -f 1 | uniq - ##DEPENDS: dpkg (main/required), dpkg (main/required), coreutils (main/required). + ##DEPENDS: dpkg (main/required), coreutils (main/required), coreutils (main/required). } UNIQUE=$(unique) NUMBER=$(unique | wc -l) @@ -253,13 +281,13 @@ ##DEPENDS: dpkg (main/required), debsums (universe/optional), coreutils (main/required). case $ORPHANS in "") - echo "I: No package with missing debsums." + echo "I: No package with missing debsums to reinstall." break ;; *) echo "I: Reinstalling packages with missing debsums..." apt-get $NOTTY --reinstall install $ORPHANS - ##DEPENDS: dpkg (main/required). + ##DEPENDS: apt (main/important). ### Escape dangerous purges automatically. if [ $? != 0 ] then @@ -269,23 +297,14 @@ esac done fi + echo "${GREEN}N: FLAUSCH LOOP COMPLETED.${RESET}" esac #################################################################### ####################### ### CLEAN APT CACHE ### ####################### -echo "${BOLD}4) Cleaning APT cache.${RESET}" +echo "${BOLD}4) Cleaning package cache.${RESET}" apt-get $NOTTY $CLEANOPTS ##DEPENDS: apt (main/important). -############ -### DONE ### -############ -case $DONE in - "") - break - ;; - *) - echo ${DONE} - ;; -esac +echo "I: System upgrade completed." #EOF diff -Nru upgrade-system-1.5.4.0/upgrade-system.8 upgrade-system-1.6.0.0/upgrade-system.8 --- upgrade-system-1.5.4.0/upgrade-system.8 2011-12-31 17:52:18.000000000 +0000 +++ upgrade-system-1.6.0.0/upgrade-system.8 2012-03-10 12:53:22.000000000 +0000 @@ -32,7 +32,7 @@ .SH "AUTHORS" Copyright \(co 2003-2004 Martin Zdrahal .br -Copyright \(co 2004 Christoph Schindler +Copyright \(co 2004,2012 Christoph Schindler .br Copyright \(co 2004-2012 Martin\-\['E]ric Racine .SH "LICENSE" diff -Nru upgrade-system-1.5.4.0/upgrade-system.conf.5 upgrade-system-1.6.0.0/upgrade-system.conf.5 --- upgrade-system-1.5.4.0/upgrade-system.conf.5 2011-12-31 18:09:12.000000000 +0000 +++ upgrade-system-1.6.0.0/upgrade-system.conf.5 2012-03-10 12:53:31.000000000 +0000 @@ -110,7 +110,7 @@ .SH "AUTHORS" Copyright \(co 2003-2004 Martin Zdrahal .br -Copyright \(co 2004 Christoph Schindler +Copyright \(co 2004,2012 Christoph Schindler .br Copyright \(co 2004-2012 Martin\-\['E]ric Racine .SH "LICENSE"