Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 315727 - Portage fails to report 'snippet of code' when package dies in pkg_setup() and the repo path contains special chars
Summary: Portage fails to report 'snippet of code' when package dies in pkg_setup() an...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 316899 (view as bug list)
Depends on:
Blocks: 335925
  Show dependency tree
 
Reported: 2010-04-17 12:40 UTC by Michał Górny
Modified: 2010-09-22 03:48 UTC (History)
0 users

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


Attachments
Patch fixing the issue (portage-315727-bash-source-quoting.diff,760 bytes, patch)
2010-04-17 12:40 UTC, Michał Górny
Details | Diff
git-am format patch (0001-Quote-path-for-die-snippet-display.patch,1.02 KB, patch)
2010-04-23 22:04 UTC, Michał Górny
Details | Diff
Patch to fix BASH_SOURCE quoting in call stack (0004-Quote-paths-for-call-stack-display.patch,990 bytes, patch)
2010-04-24 14:51 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-17 12:40:11 UTC
If a package being built dies during pkg_setup() phase, and it is situated in a repository path to which contains special characters (including ${PORTDIR}), portage fails to report the 'specific snippet of code' at which the package died.

The reason for this is passing ${BASH_SOURCE[1]} unquoted to sed. I'm attaching a patch to fix the issue.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-17 12:40:57 UTC
Created attachment 228137 [details, diff]
Patch fixing the issue
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-23 22:04:07 UTC
Created attachment 228925 [details, diff]
git-am format patch
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-24 14:51:02 UTC
Created attachment 229007 [details, diff]
Patch to fix BASH_SOURCE quoting in call stack

Here's a patch for a similar issue in 'call stack' display code.
Comment 5 Zac Medico gentoo-dev 2010-04-24 14:53:22 UTC
(In reply to comment #4)
> Created an attachment (id=229007) [details]
> Patch to fix BASH_SOURCE quoting in call stack

Thanks, it's in git now:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=044253371b2fefb348f30e0fba81efd2267b1390
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-04-24 15:19:23 UTC
*** Bug 316899 has been marked as a duplicate of this bug. ***
Comment 7 Zac Medico gentoo-dev 2010-09-22 03:48:09 UTC
This is fixed in 2.1.9.