Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 723312

Summary: net-print/hplip-3.20.3 configure error due to Bashism and underquoted argument to test built-in (PATCH)
Product: Gentoo Linux Reporter: Matt Whitlock <gentoo>
Component: Current packagesAssignee: Daniel Pielmeier <billie>
Status: RESOLVED FIXED    
Severity: normal CC: alexander, jstein, printing
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://launchpad.net/bugs/1881331
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: fix-configure-bashisms.patch

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.