Bug#805392: pbuilder: debdelta-upgrade invocation seems incorrect
Mattia Rizzolo
mattia at mapreri.org
Wed Nov 18 10:48:54 UTC 2015
control: tags -1 + pending
On Wed, Nov 18, 2015 at 11:33:10AM +0530, Ritesh Raj Sarraf wrote:
> On Tue, 2015-11-17 at 19:52 +0000, Mattia Rizzolo wrote:
> > - if $CHROOTEXEC hash debdelta-upgrade 2> /dev/null ; then
> > + if $CHROOTEXEC bash -c "hash debdelta-upgrade 2> /dev/null" ;
> That seems to be the correct root cause.
cool
Though the whole purpose of using `hash` was to avoid spawing yet
another process... I think would make more sense to switch to it.
Here:
mattia at chase ~ % time /usr/bin/which cat > /dev/null 2>&1
/usr/bin/which cat > /dev/null 2>&1 0.00s user 0.00s system 0% cpu 0.001 total
mattia at chase ~ % time /bin/bash -c "hash cat"
/bin/bash -c "hash cat" 0.00s user 0.00s system 0% cpu 0.004 total
which is quite a difference (clearly spawing a full shell is harder..
even if /bin/which is actually a shell script)
(ok, we're talking about 0.003 seconds, but today I feel like checking
also those :))
So, instead I just committed
- if $CHROOTEXEC hash debdelta-upgrade 2> /dev/null ; then
+ if $CHROOTEXEC which debdelta-upgrade > /dev/null 2>&1 ; then
which should also make easier to understand to non-bash-savy users.
--
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/20151118/dc571414/attachment.sig>
More information about the Pbuilder-maint
mailing list