Bug#800628: pbuilder: pbuilder-satisfydepends-classic breaks on any versioned Build-Depends
Mattia Rizzolo
mattia at mapreri.org
Thu Oct 1 21:44:36 UTC 2015
On Thu, Oct 01, 2015 at 09:20:13PM +0000, Thorsten Glaser wrote:
> Daniel Schepler dixit:
Thanks for the bug Daniel!
> >Putting debugging echo statements into
> >/usr/lib/pbuilder/pbuilder-satisfydepends-funcs, it appears it's trying to
> >execute "dpkg" "--compare-versions" "9.20150811+bpb2" ">= 9" "".
>
> That looks like someone who does not really know how to program
> in shell took warnings from shellcheck too literally, without
> knowing what the code actually was supposed to do.
That person being me and the wrong chunk being the following chunk from
65d723234bf5dcd99f083ab4d5087b75ded2cfa6.
I was too quick at putting quotes, without first checking what
get_dep_op_and_ver does.
diff --git a/pbuilder-satisfydepends-classic b/pbuilder-satisfydepends-classic
index f149b4f..c7bab1e 100755
--- a/pbuilder-satisfydepends-classic
+++ b/pbuilder-satisfydepends-classic
@@ -90,7 +90,7 @@ checkbuilddep_internal() {
fi
if echo "$INSTALLPKG" | grep -q '('; then
#echo "Debug: $INSTALLPKG"
- if ! checkbuilddep_versiondeps "$CURRENTREALPKGNAME" `get_dep_op_and_ver "$INSTALLPKG"`; then
+ if ! checkbuilddep_versiondeps "$CURRENTREALPKGNAME" "$(get_dep_op_and_ver "$INSTALLPKG")"; then
echo " -> Does not satisfy version, not trying"
continue
fi
@@ -167,7 +167,7 @@ checkbuilddep_internal() {
fi
if echo "$INSTALLPKG" | grep -q '('; then
# this package has version-conflicts
- if ! checkbuilddep_versiondeps "$CURRENTREALPKGNAME" `get_dep_op_and_ver "$INSTALLPKG"`; then
+ if ! checkbuilddep_versiondeps "$CURRENTREALPKGNAME" "$(get_dep_op_and_ver "$INSTALLPKG")"; then
echo "I: Satisfies version, not trying"
continue
fi
> I’d suggest inspecting the changes from that commit more.
Out of curiosity, do you have a suggestion on how to add a test for that
without splitting (=> small refactor) the big checkbuilddep_internal?
I'll fix & upload tomorrow (afternoon).
--
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/20151001/6ae04d4c/attachment.sig>
More information about the Pbuilder-maint
mailing list