Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/portage: portage-9999.ebuild portage-2.1.9.ebuild ChangeLog portage-2.2_rc75.ebuild portage-2.2_rc72.ebuild portage-2.2_rc71.ebuild portage-2.2_rc73.ebuild
Date: Sat, 04 Sep 2010 07:32:22
Message-Id: 20100904073217.B8D9A20051@flycatcher.gentoo.org
1 zmedico 10/09/04 07:32:17
2
3 Modified: portage-9999.ebuild ChangeLog
4 Added: portage-2.1.9.ebuild portage-2.2_rc75.ebuild
5 Removed: portage-2.2_rc72.ebuild portage-2.2_rc71.ebuild
6 portage-2.2_rc73.ebuild
7 Log:
8 *portage-2.2_rc75 (04 Sep 2010)
9
10 04 Sep 2010; Zac Medico <zmedico@g.o> +portage-2.2_rc75.ebuild:
11 2.2_rc75 version bump. This fixes bug #210077 (orphan ebuild-ipc
12 processes), bug #335778 (fix --autounmask display to account for
13 forced/masked USE flags), and bug #335779 (fix duplicates in
14 unsatisfied dependency USE change suggestions). Bug #210077 tracks
15 all bugs fixed since 2.1.x.
16
17 *portage-2.1.9 (04 Sep 2010)
18
19 04 Sep 2010; Zac Medico <zmedico@g.o> +portage-2.1.9.ebuild:
20 2.1.9 version bump. This fixes bug #44796 (package.env for
21 per-package environment variables, bug #267103 (add /etc/portage to
22 CONFIG_PROTECT_MASK), bug #275789 (ignore CVS directories inside
23 package.* config directories), bug #278895 (emerge hangs due to
24 orphan ebuild subprocesses, bug #280097 (emerge --autounmask),
25 bug #285191 (RDEPEND.implicit warning for repoman), bug #292083
26 (package.accept_keywords for profiles), bug #305035 (emerge -p support
27 for PORTAGE_RO_DISTDIR), #308835 (econf support for CONFIG_SHELL), bug
28 #309001 (make unpack() handle SIGPIPE from decompressors when piping
29 to tar), bug #309149 (eend display adjustments), bug #309699 (clarify
30 emerge -e docs), bug #309907 (apply package moves to package.license),
31 bug #310135 (disable repoman changelog.ebuildadded check for git), bug
32 #310947 (prevent emerge atom arguments from expanding to unavailable
33 categories), bug #312085 (improved implicit IUSE support for minimal
34 profiles), bug #315615 (fix config file permission issues with userpriv),
35 bug #315709 and bug #315741 (whitespace and unicode handling for
36 PORTDIR_OVERLAY), bug #317133 (exeinto typo in man page), bug #317775
37 (UnicodeEncodeError in merge list display), bug #317921 (variable
38 typo in man page), bug #318241 (include LICENSE file in tarball),
39 bug #320755 (fix ebuild(1) to only run test phase once), bug #321145
40 (fix error handling in ebuild.sh), bug #321871 (make repoman check all
41 manifest entries), bug #324075 (fix repoman copyright date warnings
42 for git), bug #324191 (FEATURES=compress-build-logs), bug #325505
43 (UnicodeEncodeError in emerge --info), bug #326553 (repoman warning for
44 preserve_old_lib), bug #326561 (emerge warning about unknown FEATURES
45 settings), bug #326787 (intermittent unsatisfied build-time dependencies
46 with --jobs), bug #327507 (make FEATURES=usersync drop privileges
47 for all rsync invocations), bug #327883 (intermittent loss of build
48 logs), bug #328099 (add warning in FEATURES=ccache docs), bug #328317
49 (merge os-headers before libc), bug #328935 (document substitution in
50 PORTAGE_ELOG_MAILSUBJECT), bug #329159 (disable file owner lookup when
51 collision features are disabled), bug #329803 (make --depclean show a
52 machine-readable list of selected atoms), bug #330179 (fix emerge to
53 show a masking message instead of missing IUSE when appropriate), bug
54 #330645 (autouse AttributeError triggered by missing portage group),
55 bug #330937 (handle IOError raisedby array.fromfile() in recent
56 python), bug #331271 (fix USE_EXPAND wildcards to work correctly with
57 incremental negation), bug #331413 (clarify atom operator docs), bug
58 #332799 (fix emerge-webrsync to only download bz2 snapshots if tarsync
59 is installed), bug #332967 (movefile issue with binary packages), bug
60 #334265 (empty metadata.xml herd tag crashes repoman), bug #335242
61 (grammar fix in emerge man page), and bug #335340 (customizable
62 PORTAGE_BZIP2_COMMAND). Bug #335925 tracks all bugs fixed since 2.1.8.x.
63
64 04 Sep 2010; Zac Medico <zmedico@g.o> portage-9999.ebuild:
65 Fix src_prepare to use the new VERSION sed template for the docbook docs.
66
67 04 Sep 2010; Zac Medico <zmedico@g.o> -portage-2.2_rc71.ebuild,
68 -portage-2.2_rc72.ebuild, -portage-2.2_rc73.ebuild:
69 Remove old versions.
70
71 (Portage version: 2.1.9/cvs/Linux i686)
72
73 Revision Changes Path
74 1.10 sys-apps/portage/portage-9999.ebuild
75
76 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-9999.ebuild?rev=1.10&view=markup
77 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-9999.ebuild?rev=1.10&content-type=text/plain
78 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-9999.ebuild?r1=1.9&r2=1.10
79
80 Index: portage-9999.ebuild
81 ===================================================================
82 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-9999.ebuild,v
83 retrieving revision 1.9
84 retrieving revision 1.10
85 diff -u -r1.9 -r1.10
86 --- portage-9999.ebuild 30 Aug 2010 22:16:27 -0000 1.9
87 +++ portage-9999.ebuild 4 Sep 2010 07:32:17 -0000 1.10
88 @@ -1,6 +1,6 @@
89 # Copyright 1999-2010 Gentoo Foundation
90 # Distributed under the terms of the GNU General Public License v2
91 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-9999.ebuild,v 1.9 2010/08/30 22:16:27 zmedico Exp $
92 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-9999.ebuild,v 1.10 2010/09/04 07:32:17 zmedico Exp $
93
94 # Require EAPI 2 since we now require at least python-2.6 (for python 3
95 # syntax support) which also requires EAPI 2.
96 @@ -94,6 +94,8 @@
97 einfo "Setting portage.VERSION to ${_version} ..."
98 sed -e "s/^VERSION=.*/VERSION='${_version}'/" -i pym/portage/__init__.py || \
99 die "Failed to patch portage.VERSION"
100 + sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
101 + die "Failed to patch VERSION in doc/fragment/version"
102 sed -e "1s/VERSION/${_version}/" -i man/* || \
103 die "Failed to patch VERSION in man page headers"
104
105
106
107
108 1.719 sys-apps/portage/ChangeLog
109
110 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.719&view=markup
111 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.719&content-type=text/plain
112 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.718&r2=1.719
113
114 Index: ChangeLog
115 ===================================================================
116 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
117 retrieving revision 1.718
118 retrieving revision 1.719
119 diff -u -r1.718 -r1.719
120 --- ChangeLog 3 Sep 2010 00:03:14 -0000 1.718
121 +++ ChangeLog 4 Sep 2010 07:32:17 -0000 1.719
122 @@ -1,6 +1,69 @@
123 # ChangeLog for sys-apps/portage
124 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
125 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.718 2010/09/03 00:03:14 zmedico Exp $
126 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.719 2010/09/04 07:32:17 zmedico Exp $
127 +
128 +*portage-2.2_rc75 (04 Sep 2010)
129 +
130 + 04 Sep 2010; Zac Medico <zmedico@g.o> +portage-2.2_rc75.ebuild:
131 + 2.2_rc75 version bump. This fixes bug #210077 (orphan ebuild-ipc
132 + processes), bug #335778 (fix --autounmask display to account for
133 + forced/masked USE flags), and bug #335779 (fix duplicates in
134 + unsatisfied dependency USE change suggestions). Bug #210077 tracks
135 + all bugs fixed since 2.1.x.
136 +
137 +*portage-2.1.9 (04 Sep 2010)
138 +
139 + 04 Sep 2010; Zac Medico <zmedico@g.o> +portage-2.1.9.ebuild:
140 + 2.1.9 version bump. This fixes bug #44796 (package.env for
141 + per-package environment variables, bug #267103 (add /etc/portage to
142 + CONFIG_PROTECT_MASK), bug #275789 (ignore CVS directories inside
143 + package.* config directories), bug #278895 (emerge hangs due to
144 + orphan ebuild subprocesses, bug #280097 (emerge --autounmask),
145 + bug #285191 (RDEPEND.implicit warning for repoman), bug #292083
146 + (package.accept_keywords for profiles), bug #305035 (emerge -p support
147 + for PORTAGE_RO_DISTDIR), #308835 (econf support for CONFIG_SHELL), bug
148 + #309001 (make unpack() handle SIGPIPE from decompressors when piping
149 + to tar), bug #309149 (eend display adjustments), bug #309699 (clarify
150 + emerge -e docs), bug #309907 (apply package moves to package.license),
151 + bug #310135 (disable repoman changelog.ebuildadded check for git), bug
152 + #310947 (prevent emerge atom arguments from expanding to unavailable
153 + categories), bug #312085 (improved implicit IUSE support for minimal
154 + profiles), bug #315615 (fix config file permission issues with userpriv),
155 + bug #315709 and bug #315741 (whitespace and unicode handling for
156 + PORTDIR_OVERLAY), bug #317133 (exeinto typo in man page), bug #317775
157 + (UnicodeEncodeError in merge list display), bug #317921 (variable
158 + typo in man page), bug #318241 (include LICENSE file in tarball),
159 + bug #320755 (fix ebuild(1) to only run test phase once), bug #321145
160 + (fix error handling in ebuild.sh), bug #321871 (make repoman check all
161 + manifest entries), bug #324075 (fix repoman copyright date warnings
162 + for git), bug #324191 (FEATURES=compress-build-logs), bug #325505
163 + (UnicodeEncodeError in emerge --info), bug #326553 (repoman warning for
164 + preserve_old_lib), bug #326561 (emerge warning about unknown FEATURES
165 + settings), bug #326787 (intermittent unsatisfied build-time dependencies
166 + with --jobs), bug #327507 (make FEATURES=usersync drop privileges
167 + for all rsync invocations), bug #327883 (intermittent loss of build
168 + logs), bug #328099 (add warning in FEATURES=ccache docs), bug #328317
169 + (merge os-headers before libc), bug #328935 (document substitution in
170 + PORTAGE_ELOG_MAILSUBJECT), bug #329159 (disable file owner lookup when
171 + collision features are disabled), bug #329803 (make --depclean show a
172 + machine-readable list of selected atoms), bug #330179 (fix emerge to
173 + show a masking message instead of missing IUSE when appropriate), bug
174 + #330645 (autouse AttributeError triggered by missing portage group),
175 + bug #330937 (handle IOError raisedby array.fromfile() in recent
176 + python), bug #331271 (fix USE_EXPAND wildcards to work correctly with
177 + incremental negation), bug #331413 (clarify atom operator docs), bug
178 + #332799 (fix emerge-webrsync to only download bz2 snapshots if tarsync
179 + is installed), bug #332967 (movefile issue with binary packages), bug
180 + #334265 (empty metadata.xml herd tag crashes repoman), bug #335242
181 + (grammar fix in emerge man page), and bug #335340 (customizable
182 + PORTAGE_BZIP2_COMMAND). Bug #335925 tracks all bugs fixed since 2.1.8.x.
183 +
184 + 04 Sep 2010; Zac Medico <zmedico@g.o> portage-9999.ebuild:
185 + Fix src_prepare to use the new VERSION sed template for the docbook docs.
186 +
187 + 04 Sep 2010; Zac Medico <zmedico@g.o> -portage-2.2_rc71.ebuild,
188 + -portage-2.2_rc72.ebuild, -portage-2.2_rc73.ebuild:
189 + Remove old versions.
190
191 *portage-2.2_rc74 (02 Sep 2010)
192
193
194
195
196 1.1 sys-apps/portage/portage-2.1.9.ebuild
197
198 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.9.ebuild?rev=1.1&view=markup
199 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.9.ebuild?rev=1.1&content-type=text/plain
200
201 Index: portage-2.1.9.ebuild
202 ===================================================================
203 # Copyright 1999-2010 Gentoo Foundation
204 # Distributed under the terms of the GNU General Public License v2
205 # $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.9.ebuild,v 1.1 2010/09/04 07:32:17 zmedico Exp $
206
207 # Require EAPI 2 since we now require at least python-2.6 (for python 3
208 # syntax support) which also requires EAPI 2.
209 EAPI=2
210 inherit eutils multilib python
211
212 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
213 HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
214 LICENSE="GPL-2"
215 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
216 PROVIDE="virtual/portage"
217 SLOT="0"
218 IUSE="build doc epydoc linguas_pl python3 selinux"
219
220 python_dep="python3? ( =dev-lang/python-3* )
221 !python3? (
222 build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 ) )
223 !build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) )
224 )"
225
226 # The pysqlite blocker is for bug #282760.
227 DEPEND="${python_dep}
228 !build? ( >=sys-apps/sed-4.0.5 )
229 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
230 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
231
232 RDEPEND="${python_dep}
233 !build? ( >=sys-apps/sed-4.0.5
234 >=app-shells/bash-3.2_p17
235 >=app-admin/eselect-1.2 )
236 elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
237 elibc_glibc? ( >=sys-apps/sandbox-1.6 )
238 elibc_uclibc? ( >=sys-apps/sandbox-1.6 )
239 >=app-misc/pax-utils-0.1.17
240 selinux? ( sys-libs/libselinux )"
241 PDEPEND="
242 !build? (
243 >=net-misc/rsync-2.6.4
244 userland_GNU? ( >=sys-apps/coreutils-6.4 )
245 )"
246 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
247 # rsync-2.6.4 rdep is for the --filter option #167668
248
249 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
250
251 prefix_src_archives() {
252 local x y
253 for x in ${@}; do
254 for y in ${SRC_ARCHIVES}; do
255 echo ${y}/${x}
256 done
257 done
258 }
259
260 PV_PL="2.1.2"
261 PATCHVER_PL=""
262 TARBALL_PV=2.1.9
263 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
264 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
265 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
266 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
267
268 PATCHVER=
269 if [ -n "${PATCHVER}" ]; then
270 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
271 $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
272 fi
273
274 S="${WORKDIR}"/${PN}-${TARBALL_PV}
275 S_PL="${WORKDIR}"/${PN}-${PV_PL}
276
277 compatible_python_is_selected() {
278 [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
279 }
280
281 pkg_setup() {
282 if ! use python3 && ! compatible_python_is_selected ; then
283 ewarn "Attempting to select a compatible default python interpreter"
284 local x success=0
285 for x in /usr/bin/python2.* ; do
286 x=${x#/usr/bin/python2.}
287 if [[ $x -ge 6 ]] 2>/dev/null ; then
288 eselect python set python2.$x
289 if compatible_python_is_selected ; then
290 elog "Default python interpreter is now set to python-2.$x"
291 success=1
292 break
293 fi
294 fi
295 done
296 if [ $success != 1 ] ; then
297 eerror "Unable to select a compatible default python interpreter!"
298 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
299 fi
300 fi
301
302 if use python3; then
303 python_set_active_version 3
304 fi
305 }
306
307 src_prepare() {
308 if [ -n "${PATCHVER}" ] ; then
309 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
310 rm "$S/bin/ebuild-helpers/portageq" \
311 || die "failed to remove portageq helper symlink"
312 fi
313 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
314 fi
315 einfo "Setting portage.VERSION to ${PVR} ..."
316 sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
317 die "Failed to patch portage.VERSION"
318 sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
319 die "Failed to patch VERSION in doc/fragment/version"
320 sed -e "1s/VERSION/${PVR}/" -i man/* || \
321 die "Failed to patch VERSION in man page headers"
322
323 if use python3; then
324 python_convert_shebangs -r 3 .
325 fi
326 }
327
328 src_compile() {
329 if use doc; then
330 cd "${S}"/doc
331 touch fragment/date
332 make xhtml xhtml-nochunks || die "failed to make docs"
333 fi
334
335 if use epydoc; then
336 einfo "Generating api docs"
337 mkdir "${WORKDIR}"/api
338 local my_modules epydoc_opts=""
339 my_modules="$(find "${S}/pym" -name "*.py" \
340 | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \
341 -e 's:/:.:g' | sort)" || die "error listing modules"
342 # workaround for bug 282760
343 > "$S/pym/pysqlite2.py"
344 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
345 epydoc -o "${WORKDIR}"/api \
346 -qqqqq --no-frames --show-imports $epydoc_opts \
347 --name "${PN}" --url "${HOMEPAGE}" \
348 ${my_modules} || die "epydoc failed"
349 rm "$S/pym/pysqlite2.py"
350 fi
351 }
352
353 src_test() {
354 # make files executable, in case they were created by patch
355 find bin -type f | xargs chmod +x
356 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
357 ./pym/portage/tests/runTests || die "test(s) failed"
358 }
359
360 src_install() {
361 local libdir=$(get_libdir)
362 local portage_base="/usr/${libdir}/portage"
363 local portage_share_config=/usr/share/portage/config
364
365 cd "${S}"/cnf
366 insinto /etc
367 doins etc-update.conf dispatch-conf.conf || die
368
369 # This allows config file updates that are applied for package
370 # moves to take effect immediately.
371 echo 'CONFIG_PROTECT_MASK="/etc/portage"' > "$T"/50portage \
372 || die "failed to create 50portage"
373 doenvd "$T"/50portage || die "doenvd 50portage failed"
374 rm "$T"/50portage
375
376 insinto "$portage_share_config"
377 doins "$S/cnf/make.globals" || die
378 if [ -f "make.conf.${ARCH}".diff ]; then
379 patch make.conf "make.conf.${ARCH}".diff || \
380 die "Failed to patch make.conf.example"
381 newins make.conf make.conf.example || die
382 else
383 eerror ""
384 eerror "Portage does not have an arch-specific configuration for this arch."
385 eerror "Please notify the arch maintainer about this issue. Using generic."
386 eerror ""
387 newins make.conf make.conf.example || die
388 fi
389
390 dosym ..${portage_share_config}/make.globals /etc/make.globals
391
392 insinto /etc/logrotate.d
393 doins "${S}"/cnf/logrotate.d/elog-save-summary || die
394
395 # BSD and OSX need a sed wrapper so that find/xargs work properly
396 if use userland_GNU; then
397 rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper"
398 fi
399
400 local x symlinks
401
402 cd "$S" || die "cd failed"
403 for x in $(find bin -type d) ; do
404 exeinto $portage_base/$x || die "exeinto failed"
405 cd "$S"/$x || die "cd failed"
406 doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \
407 die "doexe failed"
408 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
409 if [ -n "$symlinks" ] ; then
410 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
411 fi
412 done
413
414 cd "$S" || die "cd failed"
415 for x in $(find pym/* -type d) ; do
416 insinto $portage_base/$x || die "insinto failed"
417 cd "$S"/$x || die "cd failed"
418 doins *.py || die "doins failed"
419 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
420 if [ -n "$symlinks" ] ; then
421 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
422 fi
423 done
424
425 # Symlinks to directories cause up/downgrade issues and the use of these
426 # modules outside of portage is probably negligible.
427 for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do
428 [ ! -L "${x}" ] && continue
429 die "symlink to directory will cause upgrade/downgrade issues: '${x}'"
430 done
431
432 exeinto ${portage_base}/pym/portage/tests
433 doexe "${S}"/pym/portage/tests/runTests
434
435 doman "${S}"/man/*.[0-9]
436 if use linguas_pl; then
437 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9]
438 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9]
439 fi
440
441 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES}
442 use doc && dohtml -r "${S}"/doc/*
443 use epydoc && dohtml -r "${WORKDIR}"/api
444
445 dodir /usr/bin
446 for x in ebuild egencache emerge portageq repoman ; do
447 dosym ../${libdir}/portage/bin/${x} /usr/bin/${x}
448 done
449
450 dodir /usr/sbin
451 local my_syms="archive-conf
452 dispatch-conf
453 emaint
454 emerge-webrsync
455 env-update
456 etc-update
457 fixpackages
458 quickpkg
459 regenworld"
460 local x
461 for x in ${my_syms}; do
462 dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x}
463 done
464 dosym env-update /usr/sbin/update-env
465 dosym etc-update /usr/sbin/update-etc
466
467 dodir /etc/portage
468 keepdir /etc/portage
469 }
470
471 pkg_preinst() {
472 if ! use build && ! has_version dev-python/pycrypto && \
473 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
474 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
475 ewarn "with this system then please install dev-python/pycrypto or"
476 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
477 ewarn "to enable RMD160 hash support."
478 ewarn "See bug #198398 for more information."
479 fi
480 if [ -f "${ROOT}/etc/make.globals" ]; then
481 rm "${ROOT}/etc/make.globals"
482 fi
483
484 [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12"
485 REPO_LAYOUT_CONF_WARN=$?
486 }
487
488 pkg_postinst() {
489 # Compile all source files recursively. Any orphans
490 # will be identified and removed in postrm.
491 python_mod_optimize /usr/$(get_libdir)/portage/pym
492
493 if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then
494 ewarn
495 echo "If you want overlay eclasses to override eclasses from" \
496 "other repos then see the portage(5) man page" \
497 "for information about the new layout.conf and repos.conf" \
498 "configuration files." \
499 | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done
500 ewarn
501 fi
502
503 einfo
504 einfo "For help with using portage please consult the Gentoo Handbook"
505 einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3"
506 einfo
507 }
508
509 pkg_postrm() {
510 python_mod_cleanup /usr/$(get_libdir)/portage/pym
511 }
512
513
514
515 1.1 sys-apps/portage/portage-2.2_rc75.ebuild
516
517 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2_rc75.ebuild?rev=1.1&view=markup
518 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2_rc75.ebuild?rev=1.1&content-type=text/plain
519
520 Index: portage-2.2_rc75.ebuild
521 ===================================================================
522 # Copyright 1999-2010 Gentoo Foundation
523 # Distributed under the terms of the GNU General Public License v2
524 # $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2_rc75.ebuild,v 1.1 2010/09/04 07:32:17 zmedico Exp $
525
526 # Require EAPI 2 since we now require at least python-2.6 (for python 3
527 # syntax support) which also requires EAPI 2.
528 EAPI=2
529 inherit eutils multilib python
530
531 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
532 HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
533 LICENSE="GPL-2"
534 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
535 PROVIDE="virtual/portage"
536 SLOT="0"
537 IUSE="build doc epydoc linguas_pl python3 selinux"
538
539 python_dep="python3? ( =dev-lang/python-3* )
540 !python3? (
541 build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 ) )
542 !build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) )
543 )"
544
545 # The pysqlite blocker is for bug #282760.
546 DEPEND="${python_dep}
547 !build? ( >=sys-apps/sed-4.0.5 )
548 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
549 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
550 # Require sandbox-2.2 for bug #288863.
551 RDEPEND="${python_dep}
552 !build? ( >=sys-apps/sed-4.0.5
553 >=app-shells/bash-3.2_p17
554 >=app-admin/eselect-1.2 )
555 elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
556 elibc_glibc? ( >=sys-apps/sandbox-2.2 )
557 elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
558 >=app-misc/pax-utils-0.1.17
559 selinux? ( sys-libs/libselinux )"
560 PDEPEND="
561 !build? (
562 >=net-misc/rsync-2.6.4
563 userland_GNU? ( >=sys-apps/coreutils-6.4 )
564 )"
565 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
566 # rsync-2.6.4 rdep is for the --filter option #167668
567
568 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
569
570 prefix_src_archives() {
571 local x y
572 for x in ${@}; do
573 for y in ${SRC_ARCHIVES}; do
574 echo ${y}/${x}
575 done
576 done
577 }
578
579 PV_PL="2.1.2"
580 PATCHVER_PL=""
581 TARBALL_PV=2.2_rc68
582 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
583 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
584 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
585 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
586
587 PATCHVER=$PV
588 if [ -n "${PATCHVER}" ]; then
589 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
590 $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
591 fi
592
593 S="${WORKDIR}"/${PN}-${TARBALL_PV}
594 S_PL="${WORKDIR}"/${PN}-${PV_PL}
595
596 compatible_python_is_selected() {
597 [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
598 }
599
600 pkg_setup() {
601 if ! use python3 && ! compatible_python_is_selected ; then
602 ewarn "Attempting to select a compatible default python interpreter"
603 local x success=0
604 for x in /usr/bin/python2.* ; do
605 x=${x#/usr/bin/python2.}
606 if [[ $x -ge 6 ]] 2>/dev/null ; then
607 eselect python set python2.$x
608 if compatible_python_is_selected ; then
609 elog "Default python interpreter is now set to python-2.$x"
610 success=1
611 break
612 fi
613 fi
614 done
615 if [ $success != 1 ] ; then
616 eerror "Unable to select a compatible default python interpreter!"
617 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
618 fi
619 fi
620
621 if use python3; then
622 python_set_active_version 3
623 fi
624 }
625
626 src_prepare() {
627 if [ -n "${PATCHVER}" ] ; then
628 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
629 rm "$S/bin/ebuild-helpers/portageq" \
630 || die "failed to remove portageq helper symlink"
631 fi
632 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
633 fi
634 einfo "Setting portage.VERSION to ${PVR} ..."
635 sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
636 die "Failed to patch portage.VERSION"
637 sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
638 die "Failed to patch VERSION in doc/fragment/version"
639 sed -e "1s/VERSION/${PVR}/" -i man/* || \
640 die "Failed to patch VERSION in man page headers"
641
642 if use python3; then
643 python_convert_shebangs -r 3 .
644 fi
645 }
646
647 src_compile() {
648 if use doc; then
649 cd "${S}"/doc
650 touch fragment/date
651 make xhtml xhtml-nochunks || die "failed to make docs"
652 fi
653
654 if use epydoc; then
655 einfo "Generating api docs"
656 mkdir "${WORKDIR}"/api
657 local my_modules epydoc_opts=""
658 my_modules="$(find "${S}/pym" -name "*.py" \
659 | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \
660 -e 's:/:.:g' | sort)" || die "error listing modules"
661 # workaround for bug 282760
662 > "$S/pym/pysqlite2.py"
663 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
664 epydoc -o "${WORKDIR}"/api \
665 -qqqqq --no-frames --show-imports $epydoc_opts \
666 --name "${PN}" --url "${HOMEPAGE}" \
667 ${my_modules} || die "epydoc failed"
668 rm "$S/pym/pysqlite2.py"
669 fi
670 }
671
672 src_test() {
673 # make files executable, in case they were created by patch
674 find bin -type f | xargs chmod +x
675 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
676 ./pym/portage/tests/runTests || die "test(s) failed"
677 }
678
679 src_install() {
680 local libdir=$(get_libdir)
681 local portage_base="/usr/${libdir}/portage"
682 local portage_share_config=/usr/share/portage/config
683
684 cd "${S}"/cnf
685 insinto /etc
686 doins etc-update.conf dispatch-conf.conf || die
687
688 # This allows config file updates that are applied for package
689 # moves to take effect immediately.
690 echo 'CONFIG_PROTECT_MASK="/etc/portage"' > "$T"/50portage \
691 || die "failed to create 50portage"
692 doenvd "$T"/50portage || die "doenvd 50portage failed"
693 rm "$T"/50portage
694
695 insinto "$portage_share_config/sets"
696 doins "$S"/cnf/sets/*.conf || die
697 insinto "$portage_share_config"
698 doins "$S/cnf/make.globals" || die
699 if [ -f "make.conf.${ARCH}".diff ]; then
700 patch make.conf "make.conf.${ARCH}".diff || \
701 die "Failed to patch make.conf.example"
702 newins make.conf make.conf.example || die
703 else
704 eerror ""
705 eerror "Portage does not have an arch-specific configuration for this arch."
706 eerror "Please notify the arch maintainer about this issue. Using generic."
707 eerror ""
708 newins make.conf make.conf.example || die
709 fi
710
711 dosym ..${portage_share_config}/make.globals /etc/make.globals
712
713 insinto /etc/logrotate.d
714 doins "${S}"/cnf/logrotate.d/elog-save-summary || die
715
716 # BSD and OSX need a sed wrapper so that find/xargs work properly
717 if use userland_GNU; then
718 rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper"
719 fi
720
721 local x symlinks
722
723 cd "$S" || die "cd failed"
724 for x in $(find bin -type d) ; do
725 exeinto $portage_base/$x || die "exeinto failed"
726 cd "$S"/$x || die "cd failed"
727 doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \
728 die "doexe failed"
729 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
730 if [ -n "$symlinks" ] ; then
731 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
732 fi
733 done
734
735 cd "$S" || die "cd failed"
736 for x in $(find pym/* -type d) ; do
737 insinto $portage_base/$x || die "insinto failed"
738 cd "$S"/$x || die "cd failed"
739 doins *.py || die "doins failed"
740 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
741 if [ -n "$symlinks" ] ; then
742 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
743 fi
744 done
745
746 # Symlinks to directories cause up/downgrade issues and the use of these
747 # modules outside of portage is probably negligible.
748 for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do
749 [ ! -L "${x}" ] && continue
750 die "symlink to directory will cause upgrade/downgrade issues: '${x}'"
751 done
752
753 exeinto ${portage_base}/pym/portage/tests
754 doexe "${S}"/pym/portage/tests/runTests
755
756 doman "${S}"/man/*.[0-9]
757 if use linguas_pl; then
758 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9]
759 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9]
760 fi
761
762 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES}
763 use doc && dohtml -r "${S}"/doc/*
764 use epydoc && dohtml -r "${WORKDIR}"/api
765
766 dodir /usr/bin
767 for x in ebuild egencache emerge portageq repoman ; do
768 dosym ../${libdir}/portage/bin/${x} /usr/bin/${x}
769 done
770
771 dodir /usr/sbin
772 local my_syms="archive-conf
773 dispatch-conf
774 emaint
775 emerge-webrsync
776 env-update
777 etc-update
778 fixpackages
779 quickpkg
780 regenworld"
781 local x
782 for x in ${my_syms}; do
783 dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x}
784 done
785 dosym env-update /usr/sbin/update-env
786 dosym etc-update /usr/sbin/update-etc
787
788 dodir /etc/portage
789 keepdir /etc/portage
790 }
791
792 pkg_preinst() {
793 if ! use build && ! has_version dev-python/pycrypto && \
794 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
795 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
796 ewarn "with this system then please install dev-python/pycrypto or"
797 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
798 ewarn "to enable RMD160 hash support."
799 ewarn "See bug #198398 for more information."
800 fi
801 if [ -f "${ROOT}/etc/make.globals" ]; then
802 rm "${ROOT}/etc/make.globals"
803 fi
804
805 has_version "<${CATEGORY}/${PN}-2.2_alpha"
806 MINOR_UPGRADE=$?
807
808 has_version "<=${CATEGORY}/${PN}-2.2_pre5"
809 WORLD_MIGRATION_UPGRADE=$?
810
811 # If portage-2.1.6 is installed and the preserved_libs_registry exists,
812 # assume that the NEEDED.ELF.2 files have already been generated.
813 has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
814 ! ( [ -e "$ROOT"var/lib/portage/preserved_libs_registry ] && \
815 has_version ">=${CATEGORY}/${PN}-2.1.6_rc" )
816 NEEDED_REBUILD_UPGRADE=$?
817
818 [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12"
819 REPO_LAYOUT_CONF_WARN=$?
820 }
821
822 pkg_postinst() {
823 # Compile all source files recursively. Any orphans
824 # will be identified and removed in postrm.
825 python_mod_optimize /usr/$(get_libdir)/portage/pym
826
827 if [ $WORLD_MIGRATION_UPGRADE = 0 ] ; then
828 einfo "moving set references from the worldfile into world_sets"
829 cd "${ROOT}/var/lib/portage/"
830 grep "^@" world >> world_sets
831 sed -i -e '/^@/d' world
832 fi
833
834 if [ $NEEDED_REBUILD_UPGRADE = 0 ] ; then
835 einfo "rebuilding NEEDED.ELF.2 files"
836 for cpv in "${ROOT}/var/db/pkg"/*/*; do
837 if [ -f "${cpv}/NEEDED" ]; then
838 rm -f "${cpv}/NEEDED.ELF.2"
839 while read line; do
840 filename=${line% *}
841 needed=${line#* }
842 needed=${needed//+/++}
843 needed=${needed//#/##}
844 needed=${needed//%/%%}
845 newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
846 newline=${newline// - }
847 echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
848 done < "${cpv}/NEEDED"
849 fi
850 done
851 fi
852
853 if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then
854 ewarn
855 echo "If you want overlay eclasses to override eclasses from" \
856 "other repos then see the portage(5) man page" \
857 "for information about the new layout.conf and repos.conf" \
858 "configuration files." \
859 | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done
860 ewarn
861 fi
862
863 einfo
864 einfo "For help with using portage please consult the Gentoo Handbook"
865 einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3"
866 einfo
867
868 if [ $MINOR_UPGRADE = 0 ] ; then
869 elog "If you're upgrading from a pre-2.2 version of portage you might"
870 elog "want to remerge world (emerge -e world) to take full advantage"
871 elog "of some of the new features in 2.2."
872 elog "This is not required however for portage to function properly."
873 elog
874 fi
875
876 if [ -z "${PV/*_rc*}" ]; then
877 elog "If you always want to use the latest development version of portage"
878 elog "please read http://www.gentoo.org/proj/en/portage/doc/testing.xml"
879 elog
880 fi
881 }
882
883 pkg_postrm() {
884 python_mod_cleanup /usr/$(get_libdir)/portage/pym
885 }