Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2578 - "terrible hack" in sys-apps/portage/portage-1.9.9.ebuild
Summary: "terrible hack" in sys-apps/portage/portage-1.9.9.ebuild
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-08 10:52 UTC by Jean Jordaan
Modified: 2011-10-30 22:18 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean Jordaan 2002-05-08 10:52:43 UTC
About this passage in sys-apps/portage/portage-1.9.9.ebuild :

pkg_preinst() {
        if [ -d 
/var/db/pkg/sys-apps/bash-2.05a ] && [ ! -d /var/db/pkg/sys-apps
/bash-2.05a-r1 ]
        then
                
eerror "You have to update your bash-2.05a installation."
                eerror "Please execute 'emerge sys-
apps/bash' as root"
                eerror "before installing this version of portage."
                die
        fi
}

I 
asked:

> > What exactly does that "if [ -d /var/db/pkg/sys-apps/bash-2.05a ] &&
> > [ ! -d 
/var/db/pkg/sys-apps/bash-2.05a-r1 ]" line mean, and what do 
> > I do to get the right flavor of 
bash installed? 

Chad answered:

> Just change that line to look for bash-2.05a-r2 
instead.  That 
> might do it. I don't know who wrote that, but it is a terrible hack.

I 
explored a bit more:

It did look a bit terrible to me too :o)  Shouldn't it require an 

appropriate bash version through an RDEPEND assignment at the start of
the ebuild? 

I 
don't know what exactly the above 'if' statement thinks it's checking
though. Paraphrased: 
"If the directory .../bash-2.05a exists and the 
directory .../bash-2.05a-r1 does not exist, 
then die". On my system, 
.../bash-2.05a exists, and it contains bash-2.05a-r1.ebuild (or -r2 as 

the case may be). But no -r1 or -r2 directories ever exist. So should
the 'if' really be "If the 
directory .../bash-2.05a exists and the 
*file* .../bash-2.05a/bash-2.05a-r1.ebuild does not 
exist, then die"?
Still a hack, which would fail for r2.

I think for now I'm just going to 
hack that whole stanza out of the 
ebuild.
Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-05-10 18:45:31 UTC
I already removed it when I saw it.  Ugh!