Summary: | sys-apps/portage - unpack() should reject absolute paths + misleading error message | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Jakub Moc (RETIRED) <jakub> |
Component: | Core - Ebuild Support | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | grobian |
Priority: | High | Keywords: | InVCS |
Version: | 2.1 | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=483244 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 200044 | ||
Attachments: | suggested patch for unpack() |
Description
Jakub Moc (RETIRED)
2007-12-09 14:40:42 UTC
more detailed: unpack() prefixes its argument with ${DISTDIR} unconditionally unless it starts with "./". This is fine, but results in the confusing error message when used with an absolute path, as it looks for ${DISTDIR}/abspath/foo. The error message could be improved by printing ${srcdir}${x} to make it print the full path it is also checking. However, that results in some bloat that probably shouldn't be triggered at all, by simply spitting out an error message if the argument given to unpack starts with a / (and hence is absolute). Created attachment 138096 [details, diff]
suggested patch for unpack()
Attached a suggestion for how to change unpack()'s behaviour to refuse absolute paths. I don't know if it is useful to allow subdirs in unpack (e.g. unpack somedir/data.tar.bz2), otherwise that could be rejected as well.
please fix the wording while you're in there "should not" -> "cannot" This has been released in 2.1.4_rc10. (In reply to comment #3) > please fix the wording while you're in there > > "should not" -> "cannot" done |