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

Bug 82574

Summary: portage needs epathclean function to prevent doubleslashes in paths
Product: Gentoo Linux Reporter: Jeff Kowalczyk <jeff.kowalczyk>
Component: EclassesAssignee: Portage team <dev-portage>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jeff Kowalczyk 2005-02-19 05:50:30 UTC
I see a lot of double-slashes in computed paths across many ebuilds. I know (from working with the zope,zope-config ebuilds) first-hand that keeping track of which path variables have trailing slashes is difficult.

Portage should offer a standard function (e.g. epathclean) that takes a path variable and (at a minimum) removes any double-slashes.

 * After doing that, you can safely remove /usr//lib/libFLAC.so.4
 * Note: 'emerge gentoolkit' to get revdep-rebuild

The problem is that although bash seems to handle double-slashes gracefully, if they should make it to config files or other read-many locations, the program or language using these double-slash paths may behave quite differently. I think python is an example of this. I have had many problems that were related to double-slash paths originating in the ebuild.

Use of this function should be added to the style guite, and perhaps some QA checks that I see portage is able to apply to ebuilds at runtime.

Reproducible: Always
Steps to Reproduce:
Comment 1 SpanKY gentoo-dev 2005-04-13 14:28:07 UTC
this is a hack

the sources of the double slashes should be tracked down and fixed
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2005-04-13 16:43:08 UTC
Agreed for portage internals to. Specific instances? Go for it.