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

Bug 315727

Summary: Portage fails to report 'snippet of code' when package dies in pkg_setup() and the repo path contains special chars
Product: Portage Development Reporter: Michał Górny <mgorny>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 335925    
Attachments: Patch fixing the issue
git-am format patch
Patch to fix BASH_SOURCE quoting in call stack

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.