Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 531704 - app-shells/bash-4.3_p30-r1: prefix changes review
Summary: app-shells/bash-4.3_p30-r1: prefix changes review
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on: 530890
Blocks: 531612
  Show dependency tree
 
Reported: 2014-12-04 18:43 UTC by Guilherme Amadio
Modified: 2015-08-20 07:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bash-4.3_p30-r1.ebuild (bash-4.3_p30-r1.ebuild,9.38 KB, text/plain)
2014-12-04 18:44 UTC, Guilherme Amadio
Details
bashrc-prefix-r1.patch (bashrc-prefix-r1.patch,1.54 KB, patch)
2014-12-04 18:44 UTC, Guilherme Amadio
Details | Diff
bash-4.3_p30-r1.diff (bash-4.3_p30-r1.diff,5.02 KB, text/x-diff)
2014-12-04 22:30 UTC, Guilherme Amadio
Details
bash-4.3_p30-r1.diff (bash-4.3_p30-r1.diff,4.73 KB, patch)
2014-12-04 22:36 UTC, Guilherme Amadio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guilherme Amadio gentoo-dev 2014-12-04 18:43:32 UTC
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
Comment 1 Guilherme Amadio gentoo-dev 2014-12-04 18:44:01 UTC
Created attachment 390946 [details]
bash-4.3_p30-r1.ebuild
Comment 2 Guilherme Amadio gentoo-dev 2014-12-04 18:44:52 UTC
Created attachment 390948 [details, diff]
bashrc-prefix-r1.patch

Similar to bashrc-prefix.patch, but for the new bashrc-r1 file.
Comment 3 Benda Xu gentoo-dev 2014-12-04 21:58:14 UTC
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?
Comment 4 Guilherme Amadio gentoo-dev 2014-12-04 22:30:18 UTC
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.
Comment 5 Guilherme Amadio gentoo-dev 2014-12-04 22:36:41 UTC
Created attachment 390966 [details, diff]
bash-4.3_p30-r1.diff

Noticed a duplicate entry in the examples; fixed it.
Comment 6 Benda Xu gentoo-dev 2014-12-04 23:46:49 UTC
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?
Comment 7 Christoph Junghans (RETIRED) gentoo-dev 2014-12-05 00:00:09 UTC
We need >=readline6.3 (bug #530890) first
Comment 8 Benda Xu gentoo-dev 2014-12-05 00:14:05 UTC
(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.
Comment 9 Benda Xu gentoo-dev 2014-12-05 00:18:04 UTC
(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.
Comment 10 Christoph Junghans (RETIRED) gentoo-dev 2014-12-05 00:59:29 UTC
(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 11 Christoph Junghans (RETIRED) gentoo-dev 2014-12-05 21:46:58 UTC
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.
Comment 12 Guilherme Amadio gentoo-dev 2014-12-05 22:29:44 UTC
(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.
Comment 13 Christoph Junghans (RETIRED) gentoo-dev 2014-12-14 23:10:45 UTC
(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.
Comment 14 Fabian Groffen gentoo-dev 2015-01-03 10:36:00 UTC
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.
Comment 15 Guilherme Amadio gentoo-dev 2015-01-20 17:23:11 UTC
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?
Comment 16 Fabian Groffen gentoo-dev 2015-01-20 20:47:51 UTC
I'm not sure what the end result would look like
Comment 17 Guilherme Amadio gentoo-dev 2015-08-20 07:51:57 UTC
Newer versions of bash are already in the prefix repository now.