1 |
zmedico 08/12/28 01:23:07 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: portage-2.2_rc20.ebuild portage-2.1.6.4.ebuild |
5 |
Removed: portage-2.1.6.3.ebuild portage-2.1.6.2.ebuild |
6 |
portage-2.2_rc19.ebuild portage-2.2_rc18.ebuild |
7 |
Log: |
8 |
*portage-2.2_rc20 (27 Dec 2008) |
9 |
|
10 |
27 Dec 2008; Zac Medico <zmedico@g.o> +portage-2.2_rc20.ebuild: |
11 |
2.2_rc20 bump. This includes the fixes that are in 2.1.6.4. Bug #210077 |
12 |
tracks all bugs fixed in the 2.2 branch. |
13 |
|
14 |
*portage-2.1.6.4 (27 Dec 2008) |
15 |
|
16 |
27 Dec 2008; Zac Medico <zmedico@g.o> +portage-2.1.6.4.ebuild: |
17 |
2.1.6.4 bump. This fixes bug #252562 (--onlydeps in short emerge help) |
18 |
and bug #252572 (infinite dependency calculation loop). Bug #216231 |
19 |
tracks all bugs fixed since 2.1.4.x. |
20 |
|
21 |
27 Dec 2008; Zac Medico <zmedico@g.o> -portage-2.1.6.2.ebuild, |
22 |
-portage-2.1.6.3.ebuild, -portage-2.2_rc18.ebuild, |
23 |
-portage-2.2_rc19.ebuild: |
24 |
Remove old versions. |
25 |
(Portage version: 2.1.6.4/cvs/Linux 2.6.28-1225-x86-64 i686) |
26 |
|
27 |
Revision Changes Path |
28 |
1.564 sys-apps/portage/ChangeLog |
29 |
|
30 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.564&view=markup |
31 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.564&content-type=text/plain |
32 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.563&r2=1.564 |
33 |
|
34 |
Index: ChangeLog |
35 |
=================================================================== |
36 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v |
37 |
retrieving revision 1.563 |
38 |
retrieving revision 1.564 |
39 |
diff -u -r1.563 -r1.564 |
40 |
--- ChangeLog 25 Dec 2008 07:20:43 -0000 1.563 |
41 |
+++ ChangeLog 28 Dec 2008 01:23:06 -0000 1.564 |
42 |
@@ -1,6 +1,24 @@ |
43 |
# ChangeLog for sys-apps/portage |
44 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
45 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.563 2008/12/25 07:20:43 zmedico Exp $ |
46 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.564 2008/12/28 01:23:06 zmedico Exp $ |
47 |
+ |
48 |
+*portage-2.2_rc20 (27 Dec 2008) |
49 |
+ |
50 |
+ 27 Dec 2008; Zac Medico <zmedico@g.o> +portage-2.2_rc20.ebuild: |
51 |
+ 2.2_rc20 bump. This includes the fixes that are in 2.1.6.4. Bug #210077 |
52 |
+ tracks all bugs fixed in the 2.2 branch. |
53 |
+ |
54 |
+*portage-2.1.6.4 (27 Dec 2008) |
55 |
+ |
56 |
+ 27 Dec 2008; Zac Medico <zmedico@g.o> +portage-2.1.6.4.ebuild: |
57 |
+ 2.1.6.4 bump. This fixes bug #252562 (--onlydeps in short emerge help) |
58 |
+ and bug #252572 (infinite dependency calculation loop). Bug #216231 |
59 |
+ tracks all bugs fixed since 2.1.4.x. |
60 |
+ |
61 |
+ 27 Dec 2008; Zac Medico <zmedico@g.o> -portage-2.1.6.2.ebuild, |
62 |
+ -portage-2.1.6.3.ebuild, -portage-2.2_rc18.ebuild, |
63 |
+ -portage-2.2_rc19.ebuild: |
64 |
+ Remove old versions. |
65 |
|
66 |
*portage-2.2_rc19 (24 Dec 2008) |
67 |
|
68 |
|
69 |
|
70 |
|
71 |
1.1 sys-apps/portage/portage-2.2_rc20.ebuild |
72 |
|
73 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/portage-2.2_rc20.ebuild?rev=1.1&view=markup |
74 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/portage-2.2_rc20.ebuild?rev=1.1&content-type=text/plain |
75 |
|
76 |
Index: portage-2.2_rc20.ebuild |
77 |
=================================================================== |
78 |
# Copyright 1999-2008 Gentoo Foundation |
79 |
# Distributed under the terms of the GNU General Public License v2 |
80 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2_rc20.ebuild,v 1.1 2008/12/28 01:23:06 zmedico Exp $ |
81 |
|
82 |
inherit eutils multilib python |
83 |
|
84 |
DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
85 |
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" |
86 |
LICENSE="GPL-2" |
87 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
88 |
PROVIDE="virtual/portage" |
89 |
SLOT="0" |
90 |
IUSE="build doc epydoc selinux linguas_pl" |
91 |
|
92 |
python_dep=">=dev-lang/python-2.4" |
93 |
|
94 |
DEPEND="${python_dep} |
95 |
!build? ( >=sys-apps/sed-4.0.5 ) |
96 |
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
97 |
epydoc? ( >=dev-python/epydoc-2.0 )" |
98 |
RDEPEND="${python_dep} |
99 |
!build? ( >=sys-apps/sed-4.0.5 |
100 |
>=app-shells/bash-3.2_p17 |
101 |
>=app-admin/eselect-news-20071201 ) |
102 |
elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
103 |
elibc_glibc? ( >=sys-apps/sandbox-1.2.17 !mips? ( >=sys-apps/sandbox-1.2.18.1-r2 ) ) |
104 |
elibc_uclibc? ( >=sys-apps/sandbox-1.2.17 !mips? ( >=sys-apps/sandbox-1.2.18.1-r2 ) ) |
105 |
>=app-misc/pax-utils-0.1.17 |
106 |
selinux? ( >=dev-python/python-selinux-2.16 )" |
107 |
PDEPEND=" |
108 |
!build? ( |
109 |
>=net-misc/rsync-2.6.4 |
110 |
userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
111 |
|| ( >=dev-lang/python-2.5 >=dev-python/pycrypto-2.0.1-r6 ) |
112 |
)" |
113 |
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
114 |
# rsync-2.6.4 rdep is for the --filter option #167668 |
115 |
|
116 |
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" |
117 |
|
118 |
prefix_src_archives() { |
119 |
local x y |
120 |
for x in ${@}; do |
121 |
for y in ${SRC_ARCHIVES}; do |
122 |
echo ${y}/${x} |
123 |
done |
124 |
done |
125 |
} |
126 |
|
127 |
PV_PL="2.1.2" |
128 |
PATCHVER_PL="" |
129 |
TARBALL_PV="2.2_rc15" |
130 |
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
131 |
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) |
132 |
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 |
133 |
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )" |
134 |
|
135 |
PATCHVER=$PV |
136 |
if [ -n "${PATCHVER}" ]; then |
137 |
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 |
138 |
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)" |
139 |
fi |
140 |
|
141 |
S="${WORKDIR}"/${PN}-${TARBALL_PV} |
142 |
S_PL="${WORKDIR}"/${PN}-${PV_PL} |
143 |
|
144 |
src_unpack() { |
145 |
unpack ${A} |
146 |
cd "${S}" |
147 |
if [ -n "${PATCHVER}" ]; then |
148 |
cd "${S}" |
149 |
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" |
150 |
fi |
151 |
einfo "Setting portage.VERSION to ${PVR} ..." |
152 |
sed -i "s/^VERSION=.*/VERSION=\"${PVR}\"/" pym/portage/__init__.py || \ |
153 |
die "Failed to patch portage.VERSION" |
154 |
} |
155 |
|
156 |
src_compile() { |
157 |
|
158 |
if use doc; then |
159 |
cd "${S}"/doc |
160 |
touch fragment/date |
161 |
make xhtml xhtml-nochunks || die "failed to make docs" |
162 |
fi |
163 |
|
164 |
if use epydoc; then |
165 |
einfo "Generating api docs" |
166 |
mkdir "${WORKDIR}"/api |
167 |
local my_modules epydoc_opts="" |
168 |
# A name collision between the portage.dbapi class and the |
169 |
# module with the same name triggers an epydoc crash unless |
170 |
# portage.dbapi is excluded from introspection. |
171 |
ROOT=/ has_version '>=dev-python/epydoc-3_pre0' && \ |
172 |
epydoc_opts='--exclude-introspect portage\.dbapi' |
173 |
my_modules="$(find "${S}/pym" -name "*.py" \ |
174 |
| sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ |
175 |
-e 's:/:.:g' | sort)" || die "error listing modules" |
176 |
PYTHONPATH="${S}/pym:${PYTHONPATH}" epydoc -o "${WORKDIR}"/api \ |
177 |
-qqqqq --no-frames --show-imports $epydoc_opts \ |
178 |
--name "${PN}" --url "${HOMEPAGE}" \ |
179 |
${my_modules} || die "epydoc failed" |
180 |
fi |
181 |
} |
182 |
|
183 |
src_test() { |
184 |
./pym/portage/tests/runTests || \ |
185 |
die "test(s) failed" |
186 |
} |
187 |
|
188 |
src_install() { |
189 |
local libdir=$(get_libdir) |
190 |
local portage_base="/usr/${libdir}/portage" |
191 |
local portage_share_config=/usr/share/portage/config |
192 |
|
193 |
cd "${S}"/cnf |
194 |
insinto /etc |
195 |
doins etc-update.conf dispatch-conf.conf |
196 |
|
197 |
dodir "${portage_share_config}" |
198 |
insinto "${portage_share_config}" |
199 |
doins "${S}/cnf/"{sets.conf,make.globals} |
200 |
if [ -f "make.conf.${ARCH}".diff ]; then |
201 |
patch make.conf "make.conf.${ARCH}".diff || \ |
202 |
die "Failed to patch make.conf.example" |
203 |
newins make.conf make.conf.example |
204 |
else |
205 |
eerror "" |
206 |
eerror "Portage does not have an arch-specific configuration for this arch." |
207 |
eerror "Please notify the arch maintainer about this issue. Using generic." |
208 |
eerror "" |
209 |
newins make.conf make.conf.example |
210 |
fi |
211 |
|
212 |
dosym ..${portage_share_config}/make.globals /etc/make.globals |
213 |
|
214 |
insinto /etc/logrotate.d |
215 |
doins "${S}"/cnf/logrotate.d/elog-save-summary |
216 |
|
217 |
dodir ${portage_base}/bin |
218 |
exeinto ${portage_base}/bin |
219 |
|
220 |
# BSD and OSX need a sed wrapper so that find/xargs work properly |
221 |
if use userland_GNU; then |
222 |
rm "${S}"/bin/sed || die "Failed to remove sed wrapper" |
223 |
fi |
224 |
|
225 |
cd "${S}"/bin |
226 |
doexe * |
227 |
dosym newins ${portage_base}/bin/donewins |
228 |
|
229 |
local symlinks |
230 |
for mydir in $(find "${S}"/pym -type d | sed -e "s:^${S}/::") ; do |
231 |
dodir ${portage_base}/${mydir} |
232 |
insinto ${portage_base}/${mydir} |
233 |
cd "${S}"/${mydir} |
234 |
doins *.py |
235 |
symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) |
236 |
[ -n "${symlinks}" ] && cp -P ${symlinks} "${D}${portage_base}/${mydir}" |
237 |
done |
238 |
|
239 |
# Symlinks to directories cause up/downgrade issues and the use of these |
240 |
# modules outside of portage is probably negligible. |
241 |
for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do |
242 |
[ ! -L "${x}" ] && continue |
243 |
die "symlink to directory will cause upgrade/downgrade issues: '${x}'" |
244 |
done |
245 |
|
246 |
exeinto ${portage_base}/pym/portage/tests |
247 |
doexe "${S}"/pym/portage/tests/runTests |
248 |
|
249 |
doman "${S}"/man/*.[0-9] |
250 |
if use linguas_pl; then |
251 |
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] |
252 |
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] |
253 |
fi |
254 |
|
255 |
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} |
256 |
use doc && dohtml -r "${S}"/doc/* |
257 |
use epydoc && dohtml -r "${WORKDIR}"/api |
258 |
|
259 |
dodir /usr/bin |
260 |
for x in ebuild emerge portageq repoman xpak; do |
261 |
dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} |
262 |
done |
263 |
|
264 |
dodir /usr/sbin |
265 |
local my_syms="archive-conf |
266 |
dispatch-conf |
267 |
emaint |
268 |
emerge-webrsync |
269 |
env-update |
270 |
etc-update |
271 |
fixpackages |
272 |
quickpkg |
273 |
regenworld" |
274 |
local x |
275 |
for x in ${my_syms}; do |
276 |
dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} |
277 |
done |
278 |
dosym env-update /usr/sbin/update-env |
279 |
dosym etc-update /usr/sbin/update-etc |
280 |
|
281 |
dodir /etc/portage |
282 |
keepdir /etc/portage |
283 |
} |
284 |
|
285 |
pkg_preinst() { |
286 |
if ! use build && ! has_version dev-python/pycrypto && \ |
287 |
has_version '>=dev-lang/python-2.5' ; then |
288 |
if ! built_with_use '>=dev-lang/python-2.5' ssl ; then |
289 |
ewarn "If you are an ebuild developer and you plan to commit ebuilds" |
290 |
ewarn "with this system then please install dev-python/pycrypto or" |
291 |
ewarn "enable the ssl USE flag for >=dev-lang/python-2.5 in order" |
292 |
ewarn "to enable RMD160 hash support." |
293 |
ewarn "See bug #198398 for more information." |
294 |
fi |
295 |
fi |
296 |
if [ -f "${ROOT}/etc/make.globals" ]; then |
297 |
rm "${ROOT}/etc/make.globals" |
298 |
fi |
299 |
|
300 |
has_version ">=${CATEGORY}/${PN}-2.2_alpha" |
301 |
MINOR_UPGRADE=$? |
302 |
|
303 |
has_version "<=${CATEGORY}/${PN}-2.2_pre5" |
304 |
WORLD_MIGRATION_UPGRADE=$? |
305 |
|
306 |
# If portage-2.1.6 is installed and the preserved_libs_registry exists, |
307 |
# assume that the NEEDED.ELF.2 files have already been generated. |
308 |
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \ |
309 |
! ( [ -e "$ROOT"var/lib/portage/preserved_libs_registry ] && \ |
310 |
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) |
311 |
NEEDED_REBUILD_UPGRADE=$? |
312 |
|
313 |
has_version "<${CATEGORY}/${PN}-2.2_alpha" |
314 |
ADD_SYSTEM_TO_WORLD=$? |
315 |
|
316 |
if [ $ADD_SYSTEM_TO_WORLD != 0 -a "$ROOT" != / ] && \ |
317 |
! has_version "${CATEGORY}/${PN}" ; then |
318 |
# building stage 1 |
319 |
ADD_SYSTEM_TO_WORLD=0 |
320 |
fi |
321 |
} |
322 |
|
323 |
pkg_postinst() { |
324 |
# Compile all source files recursively. Any orphans |
325 |
# will be identified and removed in postrm. |
326 |
python_mod_optimize /usr/$(get_libdir)/portage/pym |
327 |
|
328 |
if [ $ADD_SYSTEM_TO_WORLD = 0 ] && \ |
329 |
[ ! -e "$ROOT"var/lib/portage/world_sets ] ; then |
330 |
einfo "adding @system to world_sets for backward compatibility" |
331 |
echo @system > "$ROOT"var/lib/portage/world_sets |
332 |
fi |
333 |
|
334 |
if [ $WORLD_MIGRATION_UPGRADE = 0 ] ; then |
335 |
einfo "moving set references from the worldfile into world_sets" |
336 |
cd "${ROOT}/var/lib/portage/" |
337 |
grep "^@" world >> world_sets |
338 |
sed -i -e '/^@/d' world |
339 |
fi |
340 |
|
341 |
if [ $NEEDED_REBUILD_UPGRADE = 0 ] ; then |
342 |
einfo "rebuilding NEEDED.ELF.2 files" |
343 |
for cpv in "${ROOT}/var/db/pkg"/*/*; do |
344 |
if [ -f "${cpv}/NEEDED" ]; then |
345 |
rm -f "${cpv}/NEEDED.ELF.2" |
346 |
while read line; do |
347 |
filename=${line% *} |
348 |
needed=${line#* } |
349 |
needed=${needed//+/++} |
350 |
needed=${needed//#/##} |
351 |
needed=${needed//%/%%} |
352 |
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename) |
353 |
newline=${newline// - } |
354 |
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2" |
355 |
done < "${cpv}/NEEDED" |
356 |
fi |
357 |
done |
358 |
fi |
359 |
|
360 |
elog |
361 |
elog "For help with using portage please consult the Gentoo Handbook" |
362 |
elog "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" |
363 |
elog |
364 |
|
365 |
if [ $MINOR_UPGRADE = 0 ] ; then |
366 |
elog "If you're upgrading from a pre-2.2 version of portage you might" |
367 |
elog "want to remerge world (emerge -e world) to take full advantage" |
368 |
elog "of some of the new features in 2.2." |
369 |
elog "This is not required however for portage to function properly." |
370 |
elog |
371 |
fi |
372 |
|
373 |
if [ -z "${PV/*_pre*}" ]; then |
374 |
elog "If you always want to use the latest development version of portage" |
375 |
elog "please read http://www.gentoo.org/proj/en/portage/doc/testing.xml" |
376 |
elog |
377 |
fi |
378 |
} |
379 |
|
380 |
pkg_postrm() { |
381 |
python_mod_cleanup /usr/$(get_libdir)/portage/pym |
382 |
} |
383 |
|
384 |
|
385 |
|
386 |
1.1 sys-apps/portage/portage-2.1.6.4.ebuild |
387 |
|
388 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/portage-2.1.6.4.ebuild?rev=1.1&view=markup |
389 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/portage-2.1.6.4.ebuild?rev=1.1&content-type=text/plain |
390 |
|
391 |
Index: portage-2.1.6.4.ebuild |
392 |
=================================================================== |
393 |
# Copyright 1999-2008 Gentoo Foundation |
394 |
# Distributed under the terms of the GNU General Public License v2 |
395 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.6.4.ebuild,v 1.1 2008/12/28 01:23:07 zmedico Exp $ |
396 |
|
397 |
inherit eutils multilib python |
398 |
|
399 |
DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
400 |
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" |
401 |
LICENSE="GPL-2" |
402 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
403 |
PROVIDE="virtual/portage" |
404 |
SLOT="0" |
405 |
IUSE="build doc epydoc selinux linguas_pl" |
406 |
|
407 |
python_dep=">=dev-lang/python-2.4" |
408 |
|
409 |
DEPEND="${python_dep} |
410 |
!build? ( >=sys-apps/sed-4.0.5 ) |
411 |
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
412 |
epydoc? ( >=dev-python/epydoc-2.0 )" |
413 |
RDEPEND="${python_dep} |
414 |
!build? ( >=sys-apps/sed-4.0.5 |
415 |
>=app-shells/bash-3.2_p17 |
416 |
>=app-admin/eselect-news-20071201 ) |
417 |
elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
418 |
elibc_glibc? ( >=sys-apps/sandbox-1.2.17 !mips? ( >=sys-apps/sandbox-1.2.18.1-r2 ) ) |
419 |
elibc_uclibc? ( >=sys-apps/sandbox-1.2.17 !mips? ( >=sys-apps/sandbox-1.2.18.1-r2 ) ) |
420 |
>=app-misc/pax-utils-0.1.17 |
421 |
selinux? ( >=dev-python/python-selinux-2.16 )" |
422 |
PDEPEND=" |
423 |
!build? ( |
424 |
>=net-misc/rsync-2.6.4 |
425 |
userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
426 |
|| ( >=dev-lang/python-2.5 >=dev-python/pycrypto-2.0.1-r6 ) |
427 |
)" |
428 |
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
429 |
# rsync-2.6.4 rdep is for the --filter option #167668 |
430 |
|
431 |
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" |
432 |
|
433 |
prefix_src_archives() { |
434 |
local x y |
435 |
for x in ${@}; do |
436 |
for y in ${SRC_ARCHIVES}; do |
437 |
echo ${y}/${x} |
438 |
done |
439 |
done |
440 |
} |
441 |
|
442 |
PV_PL="2.1.2" |
443 |
PATCHVER_PL="" |
444 |
TARBALL_PV=2.1.6 |
445 |
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
446 |
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) |
447 |
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 |
448 |
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )" |
449 |
|
450 |
PATCHVER=$PV |
451 |
if [ -n "${PATCHVER}" ]; then |
452 |
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 |
453 |
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)" |
454 |
fi |
455 |
|
456 |
S="${WORKDIR}"/${PN}-${TARBALL_PV} |
457 |
S_PL="${WORKDIR}"/${PN}-${PV_PL} |
458 |
|
459 |
src_unpack() { |
460 |
unpack ${A} |
461 |
cd "${S}" |
462 |
if [ -n "${PATCHVER}" ]; then |
463 |
cd "${S}" |
464 |
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" |
465 |
fi |
466 |
einfo "Setting portage.VERSION to ${PVR} ..." |
467 |
sed -i "s/^VERSION=.*/VERSION=\"${PVR}\"/" pym/portage/__init__.py || \ |
468 |
die "Failed to patch portage.VERSION" |
469 |
} |
470 |
|
471 |
src_compile() { |
472 |
|
473 |
if use doc; then |
474 |
cd "${S}"/doc |
475 |
touch fragment/date |
476 |
make xhtml xhtml-nochunks || die "failed to make docs" |
477 |
fi |
478 |
|
479 |
if use epydoc; then |
480 |
einfo "Generating api docs" |
481 |
mkdir "${WORKDIR}"/api |
482 |
local my_modules epydoc_opts="" |
483 |
# A name collision between the portage.dbapi class and the |
484 |
# module with the same name triggers an epydoc crash unless |
485 |
# portage.dbapi is excluded from introspection. |
486 |
ROOT=/ has_version '>=dev-python/epydoc-3_pre0' && \ |
487 |
epydoc_opts='--exclude-introspect portage\.dbapi' |
488 |
my_modules="$(find "${S}/pym" -name "*.py" \ |
489 |
| sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ |
490 |
-e 's:/:.:g' | sort)" || die "error listing modules" |
491 |
PYTHONPATH="${S}/pym:${PYTHONPATH}" epydoc -o "${WORKDIR}"/api \ |
492 |
-qqqqq --no-frames --show-imports $epydoc_opts \ |
493 |
--name "${PN}" --url "${HOMEPAGE}" \ |
494 |
${my_modules} || die "epydoc failed" |
495 |
fi |
496 |
} |
497 |
|
498 |
src_test() { |
499 |
./pym/portage/tests/runTests || \ |
500 |
die "test(s) failed" |
501 |
} |
502 |
|
503 |
src_install() { |
504 |
local libdir=$(get_libdir) |
505 |
local portage_base="/usr/${libdir}/portage" |
506 |
local portage_share_config=/usr/share/portage/config |
507 |
|
508 |
cd "${S}"/cnf |
509 |
insinto /etc |
510 |
doins etc-update.conf dispatch-conf.conf |
511 |
|
512 |
dodir "${portage_share_config}" |
513 |
insinto "${portage_share_config}" |
514 |
doins "${S}/cnf/"make.globals |
515 |
if [ -f "make.conf.${ARCH}".diff ]; then |
516 |
patch make.conf "make.conf.${ARCH}".diff || \ |
517 |
die "Failed to patch make.conf.example" |
518 |
newins make.conf make.conf.example |
519 |
else |
520 |
eerror "" |
521 |
eerror "Portage does not have an arch-specific configuration for this arch." |
522 |
eerror "Please notify the arch maintainer about this issue. Using generic." |
523 |
eerror "" |
524 |
newins make.conf make.conf.example |
525 |
fi |
526 |
|
527 |
dosym ..${portage_share_config}/make.globals /etc/make.globals |
528 |
|
529 |
insinto /etc/logrotate.d |
530 |
doins "${S}"/cnf/logrotate.d/elog-save-summary |
531 |
|
532 |
dodir ${portage_base}/bin |
533 |
exeinto ${portage_base}/bin |
534 |
|
535 |
# BSD and OSX need a sed wrapper so that find/xargs work properly |
536 |
if use userland_GNU; then |
537 |
rm "${S}"/bin/sed || die "Failed to remove sed wrapper" |
538 |
fi |
539 |
|
540 |
cd "${S}"/bin |
541 |
doexe * |
542 |
dosym newins ${portage_base}/bin/donewins |
543 |
|
544 |
local symlinks |
545 |
for mydir in $(find "${S}"/pym -type d | sed -e "s:^${S}/::") ; do |
546 |
dodir ${portage_base}/${mydir} |
547 |
insinto ${portage_base}/${mydir} |
548 |
cd "${S}"/${mydir} |
549 |
doins *.py |
550 |
symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) |
551 |
[ -n "${symlinks}" ] && cp -P ${symlinks} "${D}${portage_base}/${mydir}" |
552 |
done |
553 |
|
554 |
# Symlinks to directories cause up/downgrade issues and the use of these |
555 |
# modules outside of portage is probably negligible. |
556 |
for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do |
557 |
[ ! -L "${x}" ] && continue |
558 |
die "symlink to directory will cause upgrade/downgrade issues: '${x}'" |
559 |
done |
560 |
|
561 |
exeinto ${portage_base}/pym/portage/tests |
562 |
doexe "${S}"/pym/portage/tests/runTests |
563 |
|
564 |
doman "${S}"/man/*.[0-9] |
565 |
if use linguas_pl; then |
566 |
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] |
567 |
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] |
568 |
fi |
569 |
|
570 |
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} |
571 |
use doc && dohtml -r "${S}"/doc/* |
572 |
use epydoc && dohtml -r "${WORKDIR}"/api |
573 |
|
574 |
dodir /usr/bin |
575 |
for x in ebuild emerge portageq repoman xpak; do |
576 |
dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} |
577 |
done |
578 |
|
579 |
dodir /usr/sbin |
580 |
local my_syms="archive-conf |
581 |
dispatch-conf |
582 |
emaint |
583 |
emerge-webrsync |
584 |
env-update |
585 |
etc-update |
586 |
fixpackages |
587 |
quickpkg |
588 |
regenworld" |
589 |
local x |
590 |
for x in ${my_syms}; do |
591 |
dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} |
592 |
done |
593 |
dosym env-update /usr/sbin/update-env |
594 |
dosym etc-update /usr/sbin/update-etc |
595 |
|
596 |
dodir /etc/portage |
597 |
keepdir /etc/portage |
598 |
} |
599 |
|
600 |
pkg_preinst() { |
601 |
if ! use build && ! has_version dev-python/pycrypto && \ |
602 |
has_version '>=dev-lang/python-2.5' ; then |
603 |
if ! built_with_use '>=dev-lang/python-2.5' ssl ; then |
604 |
ewarn "If you are an ebuild developer and you plan to commit ebuilds" |
605 |
ewarn "with this system then please install dev-python/pycrypto or" |
606 |
ewarn "enable the ssl USE flag for >=dev-lang/python-2.5 in order" |
607 |
ewarn "to enable RMD160 hash support." |
608 |
ewarn "See bug #198398 for more information." |
609 |
fi |
610 |
fi |
611 |
if [ -f "${ROOT}/etc/make.globals" ]; then |
612 |
rm "${ROOT}/etc/make.globals" |
613 |
fi |
614 |
has_version ">=${CATEGORY}/${PN}-2.2_pre" |
615 |
DOWNGRADE_FROM_2_2=$? |
616 |
} |
617 |
|
618 |
pkg_postinst() { |
619 |
# Compile all source files recursively. Any orphans |
620 |
# will be identified and removed in postrm. |
621 |
python_mod_optimize /usr/$(get_libdir)/portage/pym |
622 |
|
623 |
elog |
624 |
elog "For help with using portage please consult the Gentoo Handbook" |
625 |
elog "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" |
626 |
elog |
627 |
|
628 |
if [ $DOWNGRADE_FROM_2_2 = 0 ] ; then |
629 |
ewarn |
630 |
echo "Since you have downgraded from portage-2.2, do not forget to" \ |
631 |
"use revdep-rebuild when appropriate, since the @preserved-rebuild" \ |
632 |
"package set is only supported with portage-2.2." | fmt -w 70 | \ |
633 |
while read ; do ewarn "$REPLY" ; done |
634 |
ewarn |
635 |
fi |
636 |
} |
637 |
|
638 |
pkg_postrm() { |
639 |
python_mod_cleanup /usr/$(get_libdir)/portage/pym |
640 |
} |