This patch prepends EPREFIX to the scanelf path. Reproducible: Always
Created attachment 434950 [details, diff] portage-scanelf-path.patch
Ping portage team.
It is normally better to use os.path.join() that simple string addtition. That way it takes care of extra leading/trailing slashes. Thank you for the patch.
Created attachment 436168 [details, diff] portage-2.3.0-scanelf-path.patch Updated to os.path.join. Thanks!
Note that os.path.join has "tricky" behavior for paths that begin with a slash. For example, os.path.join("/foo", "/bar") return "bar". Nice, eh? So what we really want is something like this: os.path.join(os.sep, EPREFIX, "usr/bin/scanelf") or this: os.path.join(os.sep, EPREFIX, "usr", "bin", "scanelf")
Created attachment 436630 [details, diff] portage-2.3.0-scanelf-path.patch Thanks for pointing this out, Zac. Updated. Note that os.sep is used implicitly.
Thanks, is in the master branch: https://gitweb.gentoo.org/proj/portage.git/commit/?id=54d3676d4dc90444895c99c0b6c29d6be6a25b77 (In reply to Benda Xu from comment #6) > Note that os.sep is used implicitly. You need to include a leading "/" in the case where EPREFIX is empty, so I fixed it up like this, which is how we do it in some other places: os.path.join(EPREFIX or "/", "usr/bin/scanelf")
(In reply to Zac Medico from comment #7) > Thanks, is in the master branch: > > https://gitweb.gentoo.org/proj/portage.git/commit/ > ?id=54d3676d4dc90444895c99c0b6c29d6be6a25b77 > > (In reply to Benda Xu from comment #6) > > Note that os.sep is used implicitly. > > You need to include a leading "/" in the case where EPREFIX is empty, so I > fixed it up like this, which is how we do it in some other places: > > os.path.join(EPREFIX or "/", "usr/bin/scanelf") Thanks Zac!
Included in 2.3.0 release.