Summary: | Bashisms in qmi-network script | ||
---|---|---|---|
Product: | libqmi | Reporter: | marius |
Component: | libqmi | Assignee: | Dan Williams <dcbw> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | aleksander, marius |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
See Also: |
https://bugs.freedesktop.org/show_bug.cgi?id=87093 http://bugs.debian.org/772328 |
||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Patch for the issue |
Created attachment 111490 [details] [review] Patch for the issue Added a proposed patch for the issue. Also see bug #87093. I just saw a fix for this was committed: commit 739fc4f183c18d7d8b3158a0843046ad2d2edd4f Author: Aleksander Morgado <aleksander@aleksander.es> Date: Mon Dec 8 13:58:39 2014 +0100 qmi-network: fix bashisms Equivalent to the fix done in mbim-network, see: https://bugs.freedesktop.org/show_bug.cgi?id=87093 diff --git a/utils/qmi-network.in b/utils/qmi-network.in index 1470f38..84a46ae 100755 --- a/utils/qmi-network.in +++ b/utils/qmi-network.in @@ -47,10 +47,10 @@ version () } if [ $# -ne 2 ]; then - if [ $1 == "--help" ]; then + if [ "$1" == "--help" ]; then help exit 0 - elif [ $1 == "--version" ]; then + elif [ "$1" == "--version" ]; then but it is not sufficient, as the important here is to replace "==" with "=". Btw, a 1.10.x release containing these two commits would be nice, as "--help"/"--version" is now completely broken in Debian and Ubuntu. (In reply to marius from comment #2) > I just saw a fix for this was committed: > > commit 739fc4f183c18d7d8b3158a0843046ad2d2edd4f > Author: Aleksander Morgado <aleksander@aleksander.es> > Date: Mon Dec 8 13:58:39 2014 +0100 > > qmi-network: fix bashisms > > Equivalent to the fix done in mbim-network, see: > https://bugs.freedesktop.org/show_bug.cgi?id=87093 > > diff --git a/utils/qmi-network.in b/utils/qmi-network.in > index 1470f38..84a46ae 100755 > --- a/utils/qmi-network.in > +++ b/utils/qmi-network.in > @@ -47,10 +47,10 @@ version () > } > > if [ $# -ne 2 ]; then > - if [ $1 == "--help" ]; then > + if [ "$1" == "--help" ]; then > help > exit 0 > - elif [ $1 == "--version" ]; then > + elif [ "$1" == "--version" ]; then > > but it is not sufficient, as the important here is to replace "==" with "=". Merged to git master, thanks. (In reply to marius from comment #3) > Btw, a 1.10.x release containing these two commits would be nice, as > "--help"/"--version" is now completely broken in Debian and Ubuntu. I'm releasing 1.12.0 stable soon, this week or next week. I may also release a 1.10.x though, not sure. Thanks. The patch at https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=12;filename=0001-Fix-bashism-as-the-script-uses-sh-not-bash.patch;att=2;bug=772328 should apply to the 1.10 branch. (In reply to marius from comment #7) > The patch at > https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=12;filename=0001-Fix- > bashism-as-the-script-uses-sh-not-bash.patch;att=2;bug=772328 > > should apply to the 1.10 branch. See http://lists.freedesktop.org/archives/libqmi-devel/2014-December/001060.html |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
From Debian (Bug#772328): I've ran checkbashisms (from the 'devscripts' package) over the whole archive and I found that your package has a /bin/sh script that uses a "bashism". checkbashisms' output: > possible bashism in ./usr/bin/qmi-network line 50 (should be 'b = a'): > if [ $1 == "--help" ]; then > possible bashism in ./usr/bin/qmi-network line 53 (should be 'b = a'): > elif [ $1 == "--version" ]; then