On Tue, Jan 08, 2013 at 11:02:19AM +0100, Hector Oron wrote:
> Package: debootstrap
> Version: 1.0.44
> Severity: wishlist
 
>   When using debootstrap to create a given environment, it would be nice to 
> output version-revision information to keep track of which software version 
> components are installed.

Please review and consider following patch:


diff -Nru debootstrap-1.0.46/debian/changelog 
debootstrap-1.0.47/debian/changelog
--- debootstrap-1.0.46/debian/changelog 2012-12-27 15:51:54.000000000 +0100
+++ debootstrap-1.0.47/debian/changelog 2013-01-08 11:25:06.000000000 +0100
@@ -1,3 +1,10 @@
+debootstrap (1.0.47) UNRELEASED; urgency=low
+
+  * Report package version information on package retrieve and validation.
+    Closes: #697675
+
+ -- Hector Oron <zu...@debian.org>  Tue, 08 Jan 2013 11:23:46 +0100
+
 debootstrap (1.0.46) unstable; urgency=low
 
   * Team upload.
diff -Nru debootstrap-1.0.46/functions debootstrap-1.0.47/functions
--- debootstrap-1.0.46/functions        2012-12-27 15:36:47.000000000 +0100
+++ debootstrap-1.0.47/functions        2013-01-08 11:23:38.000000000 +0100
@@ -276,8 +276,10 @@
        # args: from dest 'nocache'
        # args: from dest [checksum size] [alt {checksum size type}]
        local displayname
+       local versionname
        if [ "${2%.deb}" != "$2" ]; then
                displayname="$(echo "$2" | sed 's,^.*/,,;s,_.*$,,')"
+               versionname="$(echo "$2" | sed 's,^.*/,,' | cut -d_ -f2)"
        else
                displayname="$(echo "$1" | sed 's,^.*/,,')"
        fi
@@ -288,7 +290,7 @@
                elif [ "$3" = nocache ]; then
                        rm -f "$2"
                else
-                       info VALIDATING "Validating %s" "$displayname"
+                       info VALIDATING "Validating %s %s" "$displayname" 
"$versionname"
                        if verify_checksum "$2" "$3" "$4"; then
                                return 0
                        else
@@ -332,10 +334,10 @@
                fi
 
                while [ "$iters" -lt 10 ]; do
-                       info RETRIEVING "Retrieving %s" "$displayname"
+                       info RETRIEVING "Retrieving %s %s" "$displayname" 
"$versionname"
                        if ! just_get "$from" "$dest2"; then continue 2; fi
                        if [ "$checksum" != "" ]; then
-                               info VALIDATING "Validating %s" "$displayname"
+                               info VALIDATING "Validating %s %s" 
"$displayname" "$versionname"
                                if verify_checksum "$dest2" "$checksum" "$siz"; 
then
                                        checksum=""
                                fi

-- 
  Hector Oron

Attachment: signature.asc
Description: Digital signature

Reply via email to