Summary: | libtool.eclass fails terribly when PORTDIR contains special characters | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michał Górny <mgorny> |
Component: | Eclasses | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | billyoc, blackrabbit, cornicx, dr4k0n, tomk |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Example build log (libXext-9999)
The proof-of-concept patch |
Description
Michał Górny
![]() ![]() ![]() ![]() Created attachment 227239 [details]
Example build log (libXext-9999)
Created attachment 227259 [details, diff]
The proof-of-concept patch
My patch is based on an assumption that the contents of ELT_PATCH_DIR are known not to use any special characters in filenames. Thus, instead of using full paths, we cd into ${ELT_PATCH_DIR} and use relative, safe paths.
elibtoolize() probably doesn't require us to stay in the directory it sets (it seems to use absolute paths everywhere) and it returns to the original calling pwd anyway -- that's why the patch doesn't save pwd nor uses subshelling.
We could even cd into "${ELT_PATCH_DIR}/${patch_set}" (old ${patch_dir}) but this way we lose ability to display the dirname in ELT_try_and_apply_patch().
while the wrapper func does take care of resetting the PWD, it doesnt make it a good code practice to extend. so if there is going to be any dir changing, it's going to be via pushd/popd. since there doesnt seem to be a clean way to build up the list of files w/out changing dirs w/out using a subshell, changing dirs looks like the way to go. however, i rewrote the function completely to clean it up (and fix other issues as well). thanks for the notice. http://sources.gentoo.org/eclass/libtool.eclass?r1=1.85&r2=1.86 Thank you, it seems to work correctly now. (In reply to comment #3) > http://sources.gentoo.org/eclass/libtool.eclass?r1=1.85&r2=1.86 This change broke some packages. *** Bug 315239 has been marked as a duplicate of this bug. *** *** Bug 315273 has been marked as a duplicate of this bug. *** *** Bug 315279 has been marked as a duplicate of this bug. *** the popd arg shouldnt have been there http://sources.gentoo.org/eclass/libtool.eclass?r1=1.86&r2=1.87 thanks mike *** Bug 315363 has been marked as a duplicate of this bug. *** Works for me. Thanks. Man, that was fast. Works like a charm. *** Bug 315499 has been marked as a duplicate of this bug. *** |