1 |
"Vladimir G. Ivanovic" <vgivanovic@×××××××.net> posted |
2 |
1161293905.8172.15.camel@×××××××××××××××××.org, excerpted below, on Thu, |
3 |
19 Oct 2006 14:38:25 -0700: |
4 |
|
5 |
> That being said, I'd like to see the patch even if it's in an inoperative |
6 |
> state, just to see what's involved. |
7 |
|
8 |
OK, here you go. It was a bit of a hack but it worked for my purposes. |
9 |
You can see the dates and portage version number, which gives you an idea |
10 |
of how stale these are. My initials are JED, so I use that to distinguish |
11 |
stuff I've changed and avoid namespace collisions. |
12 |
|
13 |
What the first part does is add a check for an environmental variable |
14 |
JEDPortageSkipCompile. If found, the actual src_compile call (the stuff |
15 |
in the ebuild) is skipped, but portage does the rest of its compile step, |
16 |
mainly shuffling metadata around so it there where expected to be used in |
17 |
the install/package/qmerge steps later, as if the src_compile call had |
18 |
completed normally, but critically also creating that .compiled file. |
19 |
|
20 |
The second part, which /may/ not be needed any more if I've read portage |
21 |
changelogs and dev remarks correctly, simply added the missing check for |
22 |
.compiled, directly paralleling the similar existing checks for .unpacked |
23 |
and (IIRC) .installed. Given the file was created, I think missing the |
24 |
check was an oversight, but it wasn't there in these old portage versions |
25 |
anyway, so I had to add it. |
26 |
|
27 |
The third part is simply a patch to be applied to the portage ebuild, |
28 |
invoking the patch to portage itself. Again, the dates and portage |
29 |
version numbers tell the age. I'd obviously changed this one later than |
30 |
the other one. |
31 |
|
32 |
Usage after applying the patches was as follows. |
33 |
|
34 |
If the compile step crashed, I could investigate and fix the problem if |
35 |
necessary, then run whatever compile steps needed to be completed |
36 |
manually, in the working dir. Usually this simply meant rerunning the |
37 |
make command, but sometimes there'd be a bit more to it. One looks at the |
38 |
src_compile step in the ebuild to figure that out, but the important thing |
39 |
was not having to rerun .configure thereby often eliminating much of the |
40 |
compiling that had already been done, unless I had to. |
41 |
|
42 |
After manually completing the make and/or anything else the ebuild's |
43 |
src_compile did, I'd then "export JEDPortageSkipCompile=true", and run |
44 |
ebuild <package> merge or package or whatever. (I always used package as I |
45 |
created binpackages, then ran emerge -K to merge the binpkg, but those |
46 |
uninterested in FEATURES=buildpkg could simply use ebuild <package> merge |
47 |
and be done with it.) |
48 |
|
49 |
After completing the package, don't forget to unset JEDPortageSkipCompile |
50 |
if you will be doing anything else with portage, or you'll end up with a |
51 |
bunch of empty packages! =8^( |
52 |
|
53 |
--- portage-2.0.51-r3/bin/ebuild.sh 2004-10-18 21:58:42.000000000 -0700 |
54 |
+++ portage/bin/ebuild.sh 2004-11-07 00:48:24.025367508 -0700 |
55 |
@@ -912,7 +912,8 @@ |
56 |
#some packages use an alternative to $S to build in, cause |
57 |
#our libtool to create problematic .la files |
58 |
export PWORKDIR="$WORKDIR" |
59 |
- src_compile |
60 |
+# JED> src_compile |
61 |
+ [ -z $JEDPortageSkipCompile ] && src_compile |
62 |
#|| abort_compile "fail" |
63 |
cd "${BUILDDIR}" |
64 |
touch .compiled |
65 |
@@ -1003,6 +1003,14 @@ |
66 |
|
67 |
dyn_install() { |
68 |
trap "abort_install" SIGINT SIGQUIT |
69 |
+# JED> |
70 |
+ if [ ${BUILDDIR}/.installed -nt "${WORKDIR}" -a -d ${BUILDDIR}/image ]; then |
71 |
+ echo ">>> It appears that ${PN} is already installed; skipping." |
72 |
+ echo ">>> (Delete ${BUILDDIR}/.installed to force reinstall.)" |
73 |
+ trap SIGINT SIGQUIT |
74 |
+ return |
75 |
+ fi |
76 |
+# JED< |
77 |
rm -rf "${BUILDDIR}/image" |
78 |
mkdir "${BUILDDIR}/image" |
79 |
if [ -d "${S}" ]; then |
80 |
|
81 |
|
82 |
--- /p/sys-apps/portage/portage-2.0.51.22-r1.ebuild 2005-05-29 01:35:53.000000000 -0700 |
83 |
+++ /usr/local/p/sys-apps/portage/portage-2.0.51.22-r1.ebuild 2005-05-31 10:06:38.000000000 -0700 |
84 |
@@ -26,8 +26,12 @@ |
85 |
src_unpack() { |
86 |
unpack ${A} |
87 |
cd "${S}" |
88 |
patch -p1 < ${FILESDIR}/2.0.51.22-fixes.patch |
89 |
+ |
90 |
+# JED > patches |
91 |
+ patch -p1 </usr/local/src/patch/portage/jed-portage.patch |
92 |
+# JED < patches |
93 |
} |
94 |
|
95 |
src_compile() { |
96 |
python -O -c "import compileall; compileall.compile_dir('${S}/pym')" |
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
-- |
105 |
Duncan - List replies preferred. No HTML msgs. |
106 |
"Every nonfree program has a lord, a master -- |
107 |
and if you use the program, he is your master." Richard Stallman |
108 |
|
109 |
-- |
110 |
gentoo-amd64@g.o mailing list |