From a97320a33fcf92f0c683b0830dbf700b88726a99 Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Mon, 23 Jun 2008 15:57:21 +0200 Subject: [PATCH] Minor fixes to documentation and code. --- debian/changelog | 14 ++++++++++++++ doc/carnet-upgrade.sgml | 10 +++++----- src/cn-upgrade | 2 +- src/functions.sh | 20 ++++++++++---------- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index bd0bc0c..b11ce43 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +carnet-upgrade (4.0.3) stable; urgency=low + + * Remove X if installed. + * Check for free space in / for kernel upgrade. + * Check for free space in /var for package download. + * Update package versions. + * Use hr_HR localization in dialog. + * Ignore autogenerated debhelper.log. + * Added section on "/ full" to documentation. + * Display short installation notice in postinst. + * Upgrade oidentd before kernel-2.6-cn. + + -- Valentin Vidic Mon, 23 Jun 2008 12:43:39 +0200 + carnet-upgrade (4.0.2) stable; urgency=low * Added login.defs to documentation. diff --git a/doc/carnet-upgrade.sgml b/doc/carnet-upgrade.sgml index 1564de6..4ef1565 100644 --- a/doc/carnet-upgrade.sgml +++ b/doc/carnet-upgrade.sgml @@ -8,7 +8,7 @@ Grupa za izradu paketa paketi@carnet.hr - Verzija 4.0.2 + Verzija 4.0.3 CARNet Debian etch je treća generacija CARNet Debian @@ -506,10 +506,10 @@ CN: run_actions (main) started...

Ukoliko imate malu / particiju moguće je da instalacija kernel paketa neće uspjeti. Paket kernel-2.6-cn - donosi čak četiri inačice kernela i zauzima preko 100 MB. Zbog - sigurnosti stare inačice kernela se ne brišu iz /boot - direktorija što može nakon nekoliko iteracija dovesti do zapunjenja - particije. Rješenje je brisanje starih nekorištenih kernela iz + donosi čak četiri inačice kernela i zauzima preko 100 MB. Stare + inačice kernela se ne brišu iz /boot direktorija što + nakon nekoliko iteracija može dovesti do zapunjenja particije. + Rješenje je brisanje starih nekorištenih kernela iz /boot direktorija i pripadnih modula iz /lib/modules direktorija. Detaljnije upute nalaze se na # Ivan 'ico' Rako -version="carnet-upgrade v4.0.2" +version="carnet-upgrade v4.0.3" # restart upgrade under script for logging purposes if [ "$1" == "--no-script" ]; then diff --git a/src/functions.sh b/src/functions.sh index 3830ea5..0af728b 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -865,7 +865,7 @@ download_size() { size=$(LC_ALL=C apt-get --yes --print-uris "$@" \ | sed -n '/^Need to get / {s///; s/B\/.*//; p}') - size_to_mb $size + size_to_mb "${size}B" } installed_size() { @@ -874,7 +874,7 @@ installed_size() { size=$(apt-cache show $package \ | awk '$1 == "Installed-Size:" {print $2; exit}') - size_to_mb "${size}k" + size_to_mb "${size}kB" } size_to_mb() { @@ -884,16 +884,16 @@ size_to_mb() { size=0; fi - if [ "${size%k}" != "$size" ]; then - size=$(round ${size%k}) + if [ "${size%kB}" != "$size" ]; then + size=$(round ${size%kB}) size=$(($size/1024+1)) - elif [ "${size%M}" != "$size" ]; then - size=$(round ${size%M}) - elif [ "${size%G}" != "$size" ]; then - size=$(round ${size%G}) + elif [ "${size%MB}" != "$size" ]; then + size=$(round ${size%MB}) + elif [ "${size%GB}" != "$size" ]; then + size=$(round ${size%GB}) size=$(($size*1024)) - elif [ "${size%[0-9]}" != "$size" ]; then - size=$(round $size) + elif [ "${size%[0-9]B}" != "$size" ]; then + size=$(round ${size%B}) size=$(($size/1024/1024+1)) else log "unrecognized size unit: $size" -- 1.7.10.4