Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650100 - sys-devel/crossdev-20171230: bashisms in /usr/bin/cross-emerge
Summary: sys-devel/crossdev-20171230: bashisms in /usr/bin/cross-emerge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-03-10 12:41 UTC by Scall
Modified: 2018-04-10 07:52 UTC (History)
1 user (show)

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


Attachments
cross-emerge.patch (cross-emerge.patch,306 bytes, patch)
2018-03-10 12:46 UTC, Scall
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scall 2018-03-10 12:41:08 UTC
/usr/bin/cross-emerge contains bashisms that should be fixed.

> checkbashisms /usr/bin/cross-emerge
possible bashism in /usr/bin/cross-emerge line 13 (alternative test command ([[ foo ]] should be [ foo ])):
if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then
possible bashism in /usr/bin/cross-emerge line 13 (should be 'b = a'):
if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then

Note: I only checked the 20171230 package; this bug may affect other versions as well.
Comment 1 Scall 2018-03-10 12:46:01 UTC
Created attachment 523280 [details, diff]
cross-emerge.patch

cross-emerge.patch
Comment 2 Larry the Git Cow gentoo-dev 2018-03-10 13:07:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=21a0f5a3d83084436e6f6b66114cc5c593528866

commit 21a0f5a3d83084436e6f6b66114cc5c593528866
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-03-10 13:04:46 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-03-10 13:04:46 +0000

    cross-emerge: tweak EPREFIX handling to be POSIX sh, bug #650100
    
    Reported and fixed by Scall.
    
    Reported-by: Scall
    Fixed-by: Scall
    Closes: https://bugs.gentoo.org/650100
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 wrappers/cross-emerge | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2018-03-10 13:13:43 UTC
Patch look s good! I've applied it as-is.
Thank you!
Comment 4 Larry the Git Cow gentoo-dev 2018-03-24 15:13:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=394fb518fbc0789402b853d7ec44eaf283ffae51

commit 394fb518fbc0789402b853d7ec44eaf283ffae51
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-03-24 15:08:00 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-03-24 15:12:51 +0000

    cross-emerge: fix empty EPREFIX handling, bug #650100
    
    commit 21a0f5a3d83084436e6f6b66114cc5c593528866
    ("cross-emerge: tweak EPREFIX handling to be POSIX sh, bug #650100")
    introduced a bug:
        $ foo-emerge
        foo-emerge: line 13: [: =: unary operator expected
    
    Tweak it by quoting 'test' argument.
    
    Reported-by: Marty E. Plummer
    Bug: https://bugs.gentoo.org/650100
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 wrappers/cross-emerge | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)}
Comment 5 Larry the Git Cow gentoo-dev 2018-04-10 07:52:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79e2aaafe727f09b7b6a34164a8e88bad6afcdd0

commit 79e2aaafe727f09b7b6a34164a8e88bad6afcdd0
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-04-10 07:51:54 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-04-10 07:51:54 +0000

    sys-devel/crossdev: bump up to 20180410
    
    Closes: https://bugs.gentoo.org/652724
    Bug: https://bugs.gentoo.org/147155
    Bug: https://bugs.gentoo.org/650100
    Package-Manager: Portage-2.3.28, Repoman-2.3.9

 sys-devel/crossdev/Manifest                 |  1 +
 sys-devel/crossdev/crossdev-20180410.ebuild | 39 +++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)}