the installed file ${EPREFIX}/etc/profile.d/bash-completion.sh tries to access files in /usr/share and /etc. the spurious code can be found in bash-completion-1.0-gentoo.patch. (the original code also contains absolute paths, but it is completely replaced by the patch.) Reproducible: Always Steps to Reproduce: 1.emerge bash-completion inside prefix as non-root 2.enable it by `eselect bashcomp enable base` 3.launch a new shell Actual Results: complaints about missing files /usr/share/bash-completion/{.pre,.post} Expected Results: find the files in ${EPREFIX}/usr/share/... instead this might actually be an issue in the gentoo-x86 main tree, but it doesn't show up there, as the expected and the actual location match. in prefix this assumption does not hold anymore.
Created attachment 198100 [details] modified patch with extra label on all absolute paths this is a possible fix: i added the string ":INSTALLROOT:" to all absolute paths inside the patch and an extra "sed -i" line to the ebuild replacing that string with ${ROOT} (resp. ${EROOT} in prefix) i know, it's quite hacky, but it's the only solution i could imagine that does not involve heavier manipulations... tested inside prefix ~x86-linux on ubuntu 9.04.
Created attachment 198101 [details] modified ebuild containing extra `sed `
cc'ing shell-tools herd
Created attachment 198104 [details] modified ebuild containing extra `sed ` erm, new version of the ebuild. the previous one was a mixture of x86 and prefix, so it won't work :-( this version is based on x86 only, however untested... sorry for the noise.
(In reply to comment #4) > Created an attachment (id=198104) [edit] > modified ebuild containing extra `sed ` > > erm, new version of the ebuild. the previous one was a mixture of x86 and > prefix, so it won't work :-( > > this version is based on x86 only, however untested... sorry for the noise. > Maybe a Gentoo Prefix patch would be better here that places @GENTOO_PORTAGE_EPREFIX@ instead of INSTALLROOT in the appropriate places. Then you simply need to call eprefixigy to change @GENTOO...@ to an abs path. What do you think about that?
personally i don't like the deviation from the main tree, so i tried to fix it in gentoo-x86. however if the policy says so (and if it helps to get it into the central repository more quickly ;-) ), i'll rework the fix based on prefix...
(In reply to comment #6) > personally i don't like the deviation from the main tree, so i tried to fix it > in gentoo-x86. Yea, but given the state of bash-completion upstream..the gentoo patch won't get accepted. I would prefer to see a gentoo-prefix patch for this. Eventually, it could be merged to gentoo-x86 entirely. Two seperate patches are much easier for me to maintain when upstream releases a mega version bump (so many changes already in upstream git =/ ) > > however if the policy says so (and if it helps to get it into the central > repository more quickly ;-) ), i'll rework the fix based on prefix... >
Created attachment 198945 [details, diff] adds @GENTOO_PORTAGE_EPREFIX@ to bash_completion.sh this is a patch for 'bash_completion.sh' to be applied *after* 'bash-completion-1.0-gentoo.patch' was applied
Created attachment 198947 [details, diff] ebuild patch to utilize prefix patch this is a patch for 'bash-completion-1.0-r5.ebuild'. it additionally applies 'bash-completion-1.0-prefix.patch' and then runs eprefixify on the according file.
Sorry for the delay! I added prefix compat to bash-completion-1.1 based on your work.