This is a prefix version of bash-4.3_p30-r1.ebuild. Tested by me on a prefix on Red Hat. Please review my changes. Reproducible: Always
Created attachment 390946 [details] bash-4.3_p30-r1.ebuild
Created attachment 390948 [details, diff] bashrc-prefix-r1.patch Similar to bashrc-prefix.patch, but for the new bashrc-r1 file.
Hi, Amadio. Please attach a diff between bash-4.3_p30.ebuild and -r1. Plus, please explain what problem you are trying to solve. Is it another directory to be prefixed?
Created attachment 390964 [details] bash-4.3_p30-r1.diff Sorry about that. Here is a diff between gentoo-x86 and prefix ebuilds. Basically, I am just porting the gentoo-x86 ebuild to prefix by applying similar changes found in previous ebuilds. The prefix tree currently doesn't have this version of bash. This version introduces support for the new bash-completion rewrite by mgorny (i.e., helps solve bug #531612). This ebuild and the updated bash-completion ebuild need a bit more testing before hitting the tree, though.
Created attachment 390966 [details, diff] bash-4.3_p30-r1.diff Noticed a duplicate entry in the examples; fixed it.
Looks nice. Please commit it, but without bumping to -r1. The reason is that, the ebuild in gx86 could later be bumped to -r1, too. In addition, rename bashrc-prefix-r1.patch to bashrc-prefix-4.3.patch?
We need >=readline6.3 (bug #530890) first
(In reply to Christoph Junghans from comment #7) > We need >=readline6.3 (bug #530890) first I see, thanks. This is only for bumping bash in the Prefix tree. I don't think it blocks bug 315803.
(In reply to Benda Xu from comment #6) > but without bumping to -r1. > The reason is that, the ebuild in gx86 could later be bumped to -r1, too. > > In addition, rename bashrc-prefix-r1.patch to bashrc-prefix-4.3.patch? I am sorry, Amadio. I realized that it is =bash-4.3_p30-r1 in gx86. Please ignore my comment above.
(In reply to Benda Xu from comment #8) > (In reply to Christoph Junghans from comment #7) > > We need >=readline6.3 (bug #530890) first > > I see, thanks. This is only for bumping bash in the Prefix tree. I don't > think it blocks bug 315803. I though this bug is for merge the prefix-overlay version into gx86. Prefix overlay already has bash-4.3_p30 and the changes between bash-4.3_p30{,-r1} in gx86 are trivial.
Comment on attachment 390948 [details, diff] bashrc-prefix-r1.patch >--- bashrc-r1 2014-12-04 16:21:37.765632382 -0200 >+++ bashrc-r1 2014-12-04 16:20:51.077393468 -0200 >@@ -56,12 +56,10 @@ > > if ${use_color} ; then > # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 >- if type -P dircolors >/dev/null ; then >- if [[ -f ~/.dir_colors ]] ; then >- eval $(dircolors -b ~/.dir_colors) >- elif [[ -f /etc/DIR_COLORS ]] ; then >- eval $(dircolors -b /etc/DIR_COLORS) >- fi >+ if [[ -f ~/.dir_colors ]] ; then >+ eval $("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/dircolors -b ~/.dir_colors); >+ elif [[ -f "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS ]] ; then >+ eval $("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/dircolors -b "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS) Why was the if type -P dircolors block removed? > fi And in general this patch should be rewritten to something like :EPREFIX="@GENTOO_PORTAGE_EPREFIX@" if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then EPREFIX="" fi And using ${EPREFIX} everywhere.
(In reply to Christoph Junghans from comment #11) > Comment on attachment 390948 [details, diff] [details, diff] > bashrc-prefix-r1.patch > > >--- bashrc-r1 2014-12-04 16:21:37.765632382 -0200 > >+++ bashrc-r1 2014-12-04 16:20:51.077393468 -0200 > >@@ -56,12 +56,10 @@ > > > > if ${use_color} ; then > > # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 > >- if type -P dircolors >/dev/null ; then > >- if [[ -f ~/.dir_colors ]] ; then > >- eval $(dircolors -b ~/.dir_colors) > >- elif [[ -f /etc/DIR_COLORS ]] ; then > >- eval $(dircolors -b /etc/DIR_COLORS) > >- fi > >+ if [[ -f ~/.dir_colors ]] ; then > >+ eval $("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/dircolors -b ~/.dir_colors); > >+ elif [[ -f "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS ]] ; then > >+ eval $("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/dircolors -b "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS) > Why was the if type -P dircolors block removed? I'm just making the same changes as before, but I believe that since dircolors is part of coreutils, the check is not really necessary. The prefix-provided one should be preferred, so the direct path has been hardcoded. > > fi > > And in general this patch should be rewritten to something like > :EPREFIX="@GENTOO_PORTAGE_EPREFIX@" > if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then > EPREFIX="" > fi > > And using ${EPREFIX} everywhere. EPREFIX is usually not set in prefix installs, but I agree with you here. Your approach is nicer. We need to remember to unset EPREFIX with the other local variables, though.
(In reply to Guilherme Amadio from comment #12) > (In reply to Christoph Junghans from comment #11) > > Comment on attachment 390948 [details, diff] [details, diff] [details, diff] > > bashrc-prefix-r1.patch > > > > >--- bashrc-r1 2014-12-04 16:21:37.765632382 -0200 > > >+++ bashrc-r1 2014-12-04 16:20:51.077393468 -0200 > > >@@ -56,12 +56,10 @@ > > > > > > if ${use_color} ; then > > > # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 > > >- if type -P dircolors >/dev/null ; then > > >- if [[ -f ~/.dir_colors ]] ; then > > >- eval $(dircolors -b ~/.dir_colors) > > >- elif [[ -f /etc/DIR_COLORS ]] ; then > > >- eval $(dircolors -b /etc/DIR_COLORS) > > >- fi > > >+ if [[ -f ~/.dir_colors ]] ; then > > >+ eval $("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/dircolors -b ~/.dir_colors); > > >+ elif [[ -f "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS ]] ; then > > >+ eval $("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/dircolors -b "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS) > > Why was the if type -P dircolors block removed? > > I'm just making the same changes as before, but I believe that since > dircolors is part of coreutils, the check is not really necessary. The > prefix-provided one should be preferred, so the direct path has been > hardcoded. > > > > fi > > > > And in general this patch should be rewritten to something like > > :EPREFIX="@GENTOO_PORTAGE_EPREFIX@" > > if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then > > EPREFIX="" > > fi > > > > And using ${EPREFIX} everywhere. > > EPREFIX is usually not set in prefix installs, but I agree with you here. > Your approach is nicer. We need to remember to unset EPREFIX with the other > local variables, though. Yeah, I think that is what base-system herd want before we can merge the ebuild with gx86.
Just before you guys continue. I've got issues compiling bash 4.3 on Solaris. Some readline stuff. May be solved by readline-6.3, don't know.
So, now that readline-6.3 is in, let me know what I should do in order to commit this too. Fabian, what do you think of Christian's proposed changes?
I'm not sure what the end result would look like
Newer versions of bash are already in the prefix repository now.