Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280174 - Python-updater has incorrect code
Summary: Python-updater has incorrect code
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-03 13:08 UTC by Frank Peters
Modified: 2009-08-03 21:45 UTC (History)
1 user (show)

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


Attachments
Output of emerge --info (emerge.info,2.62 KB, text/plain)
2009-08-03 15:50 UTC, Frank Peters
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Peters 2009-08-03 13:08:43 UTC
Line 415 of python-updater contains an incorrect bash construction.

Line 415:

broken_libs="$(scanelf -qBN ${OLD_SONAME} < <(grep -e '^obj' ${content} | cut -d' ' -f2))"

In this line, a string formed by a command substitution is being redirected as input to the scanelf command.  However, the construction is incorrect.  It should be this:

broken_libs="$(scanelf -qBN ${OLD_SONAME} <<< $(grep -e '^obj' ${content} | cut -d' ' -f2))"

Using the original uncorrected line 415 produces an error message.

This incorrect code has been present in all releases of python-updater (0.7, 0.6, 0.5).


Reproducible: Always

Actual Results:
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-03 15:40:33 UTC
Post the output of `emerge --info`.
Comment 2 Frank Peters 2009-08-03 15:50:30 UTC
Created attachment 200029 [details]
Output of emerge --info
Comment 3 David Leverton 2009-08-03 18:16:31 UTC
Is POSIXLY_CORRECT set in the environment?  That would cause both this and your eselect issue.
Comment 4 Frank Peters 2009-08-03 18:37:27 UTC
The output of "printenv | sort" shows no variable named POSIXLY_CORRECT.
Comment 5 Frank Peters 2009-08-03 18:58:21 UTC
Your suggestion set me on the right track.  In my ~/.bashrc I do have the following line:

set -o posix

This line is the culprit.  If I comment out this line, then both the unmodified python-updater and eselect behave normally.

So, the problem is solved.

But, the question that remains is why don't these programs just follow the posix standard more closely?  Although I've just moved to Gentoo a few months ago, my .bashrc file has been unmodified for many years and has caused no problems in the past.

Anyway, thanks for the suggestion.
Comment 6 James Earl Spahlinger 2009-08-03 21:20:40 UTC
*** Bug 280191 has been marked as a duplicate of this bug. ***
Comment 7 Frank Peters 2009-08-03 21:45:58 UTC
The removal of the line

set -o posix

from ~/.bashrc resolves this problem.  This action turns off the strict posix compliance feature of bash and allows the python-updater code to execute without producing an error.