Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via or IRC
Bug 82574 - portage needs epathclean function to prevent doubleslashes in paths
Summary: portage needs epathclean function to prevent doubleslashes in paths
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
Depends on:
Reported: 2005-02-19 05:50 UTC by Jeff Kowalczyk
Modified: 2005-04-13 16:43 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
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/
 * 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.