Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 723312 - net-print/hplip-3.20.3 configure error due to Bashism and underquoted argument to test built-in (PATCH)
Summary: net-print/hplip-3.20.3 configure error due to Bashism and underquoted argumen...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: nonbash
  Show dependency tree
 
Reported: 2020-05-16 05:27 UTC by Matt Whitlock
Modified: 2020-05-29 17:54 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix-configure-bashisms.patch (fix-configure-bashisms.patch,487 bytes, patch)
2020-05-16 05:27 UTC, Matt Whitlock
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Whitlock 2020-05-16 05:27:39 UTC
Created attachment 639492 [details, diff]
fix-configure-bashisms.patch

hplip's configure.in contains a Bashism (use of == operator with test built-in). Thus, configure emits an error when /bin/sh is not Bash. This doesn't cause the build to fail outright, but it may be causing misdetection of features.

   test `sh ./createPPD.sh -q` == 0

./configure: 16844: test: g++: unexpected operator

Aside from the Bashism, there is also the issue that the output of the backticked command may split into some number of words other than one, so it should be double-quoted.

After those two corrections, it's still unclear what those lines in the configure script are even supposed to be doing since they're 'test' invocations whose exit status is promptly ignored. ::shrug::

The attached patch fixes up the syntax and allows net-print/hplip-3.20.3 to configure without error.
Comment 1 Daniel Pielmeier gentoo-dev 2020-05-29 17:54:08 UTC
Should be fixed in Git with hplip-3.20.5.