Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40786 - sys-apps/sed is dependant on sed to configure
Summary: sys-apps/sed is dependant on sed to configure
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 40819
Blocks:
  Show dependency tree
 
Reported: 2004-02-07 20:04 UTC by Brian Harring (RETIRED)
Modified: 2004-10-05 03:01 UTC (History)
4 users (show)

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


Attachments
sed-4.0.7.ebuild patch, to enable detection of a missing sed, and bootstrap a temporary working bin. (sed-4.0.7.ebuild.patch,1005 bytes, patch)
2004-02-08 03:02 UTC, Brian Harring (RETIRED)
Details | Diff
sed-4.0.7.ebuild.patch v2 (sed-4.0.7.ebuild.patch,738 bytes, patch)
2004-02-11 20:05 UTC, Brian Harring (RETIRED)
Details | Diff
sed-4.0.7.ebuild patch v3 (sed-4.0.7.ebuild.patch,975 bytes, patch)
2004-02-15 21:38 UTC, Brian Harring (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Harring (RETIRED) gentoo-dev 2004-02-07 20:04:18 UTC
Y'all might shoot me for this one, but sys-apps/sed's configure script is dependant on sed to work.  Surprisingly, it's not a CANTFIX.

The normal sed installation can actually run a make install to install a working sed installation, without using configure.

So... I'll be posting a patch to the ebuild to enable this behaviour.  It's useful for cases where a user either accidentally hoses sed, or intentionally does (as I did).
Comment 1 Brian Harring (RETIRED) gentoo-dev 2004-02-08 03:02:57 UTC
Created attachment 25176 [details, diff]
sed-4.0.7.ebuild patch, to enable detection of a missing sed, and bootstrap a temporary working bin.

It may not be a bad idea to have this ebuild always bootstrap a working copy,
depending on how well it behaves across arches.  The reason I wonder about
this, is mainly since it tests if sed exists, if it does, but say is corrupted,
it would still try to use the corrupted version.
Comment 2 Brian Harring (RETIRED) gentoo-dev 2004-02-08 03:12:04 UTC
ebuild.sh's unpack function uses sed; I've added 40819 (a patch to remove ebuild.sh's reliance on sed) as a blocker for  this bug, since w/out those modifications, this patch is worthless- it wouldn't matter if the ebuild knows how to build a temporary sed, ebuild.sh would fail to even unpack the src.
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-08 09:06:37 UTC
I do not know if you had a bad sed experience or such, but I do not see the
need for this fluff.  There are much worse cases that I can think of where
some base tool have been unmerged (I do not see how you will do anything if
you unmerge gcc/binutils/glibc without an binary package, even more of a
pain is if you unmerge tar).  Sed is easy - you can create a perl script
and cp it to /usr/bin/sed to get you mostly going.

Seemant, as sed is your baby ... ?
Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2004-02-11 13:25:38 UTC
I'm not opposed to this idea of bootstrapping a sed in order to build a sed, so long as we can do it elegantly.
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2004-02-11 13:27:32 UTC
ok, here's my feeling -- I'd rather that the bootstrapped bin is installed into WORKDIR so that the real sed can still be built.  I don't like the idea of having to emerge sed twice.
Comment 6 SpanKY gentoo-dev 2004-02-11 17:14:17 UTC
when i have to mess with stuff in PATH i just put the temp script in $T and then just PATH="${T}:${PATH}" ... in this case i think adding a small detection algorithm isnt a bad idea (if `which sed` returns false then bootstrap)
Comment 7 Brian Harring (RETIRED) gentoo-dev 2004-02-11 20:05:40 UTC
Created attachment 25449 [details, diff]
sed-4.0.7.ebuild.patch v2

Switched over to using which sed instead, 
removed the 'echo "install *temporary* sed"' since it was inaccurate.

If ${T} is a preferred location, I can modify the patch to transfer the bin
there, and set the PATH="${T}:${PATH}" rather then using the binary directly
out of it's src dir (PATH="${S}/sed:${PATH}").
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-15 14:23:10 UTC
I still do not see the need, but Ok.

What really bothers me about things such as this, is it creates a president
(but you did it for package foo ...).  I would rather us stick to "if you
screwed up package foo/bar-x.y.z, then get the binary package.  This might
also be a good time to consider also having broken-out .tbz2's for each
release ... ?
Comment 9 Brian Harring (RETIRED) gentoo-dev 2004-02-15 21:38:06 UTC
Created attachment 25698 [details, diff]
sed-4.0.7.ebuild patch v3

Updated it, I now know what seemant was talking about with needing to re-emerge
it twice.
Basically, now it bootstraps a quick sed, transfers it to ${T} (ala SpanKY),
wipes clean all intermediate objects (if you don't do this, you'll end up
needing to re-emerge sed due to the temp sed being used).
Comment 10 SpanKY gentoo-dev 2004-10-03 02:02:03 UTC
fixed in 4.0.9 and 4.1.2
Comment 11 Brian Harring (RETIRED) gentoo-dev 2004-10-05 03:01:02 UTC
Spanky you rock.