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