Bug#805392: pbuilder: debdelta-upgrade invocation seems incorrect

Mattia Rizzolo mattia at mapreri.org
Tue Nov 17 19:52:54 UTC 2015


control: severity -1 normal

Hi there!

On Tue, Nov 17, 2015 at 10:14:52PM +0530, Ritesh Raj Sarraf wrote:
> This following code snippet looks incorrect. Please look the logs that
> follow. Can you please elaborate what the "hash" keyword is supposed to
> do ?

hash has to do with finding the path of a binary to execute.
from bash(1):

   hash [-lr] [-p filename] [-dt] [name]
          Each time hash is invoked, the full pathname of the command  name
          is  determined  by  searching the directories in $PATH and remem‐
          bered.  Any previously-remembered pathname is discarded.  If  the
          -p  option is supplied, no path search is performed, and filename
          is used as the full filename  of  the  command.   The  -r  option
          causes  the  shell  to  forget  all remembered locations.  The -d
          option causes the shell to forget the remembered location of each
          name.   If  the -t option is supplied, the full pathname to which
          each name corresponds is printed.  If multiple name arguments are
          supplied  with  -t,  the  name  is printed before the hashed full
          pathname.  The -l option causes output to be displayed in a  for‐
          mat  that  may be reused as input.  If no arguments are given, or
          if only -l is supplied, information about remembered commands  is
          printed.  The return status is true unless a name is not found or
          an invalid option is supplied.


> if [ "$DEBDELTA" = "yes" ]; then
>     if $CHROOTEXEC hash debdelta-upgrade 2> /dev/null ; then

I wonder why, given that I tested it, but indeed this has little chances
to work correctly: hash is a bash keyword, but bash is not called in
there.

can you please try to locally apply

--- a/pbuilder-updatebuildenv
+++ b/pbuilder-updatebuildenv
@@ -73,7 +73,7 @@ recover_aptcache
 
 $TRAP saveaptcache_umountproc_cleanbuildplace_trap exit sighup
 if [ "$DEBDELTA" = "yes" ]; then
-    if $CHROOTEXEC hash debdelta-upgrade 2> /dev/null ; then
+    if $CHROOTEXEC bash -c "hash debdelta-upgrade 2> /dev/null" ; then
         log.i "Using debdelta-upgrade for available deltas"
         if $CHROOTEXEC debdelta-upgrade ; then
             :

> As yoou can see debdelta is installed and available. But, with the
> current code, it does not work.

And yet, I've tested it.. maybe i changed that after the testing, I
don't remember honestly...
-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  http://mapreri.org                              : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20151117/685f4853/attachment.sig>


More information about the Pbuilder-maint mailing list