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-2.1.10.35.ebuild ChangeLog portage-2.1.10.32.ebuild portage-2.2.0_alpha72.ebuild
Date: Thu, 17 Nov 2011 06:19:52
Message-Id: 20111117061941.999562004B@flycatcher.gentoo.org
1 zmedico 11/11/17 06:19:41
2
3 Modified: ChangeLog
4 Added: portage-2.1.10.35.ebuild
5 Removed: portage-2.1.10.32.ebuild
6 portage-2.2.0_alpha72.ebuild
7 Log:
8 2.1.10.35 version bump. This fixes bug #390711 (clean up previous build prior
9 to pkg_pretend) and bug #390699 (support HOSTNAME variable for emerge quiet
10 mode xterm titles). Bug #381649 tracks all bugs fixed since portage-2.1.10.11.
11
12 (Portage version: 2.2.0_alpha75/cvs/Linux i686)
13
14 Revision Changes Path
15 1.908 sys-apps/portage/ChangeLog
16
17 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.908&view=markup
18 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.908&content-type=text/plain
19 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.907&r2=1.908
20
21 Index: ChangeLog
22 ===================================================================
23 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
24 retrieving revision 1.907
25 retrieving revision 1.908
26 diff -u -r1.907 -r1.908
27 --- ChangeLog 12 Nov 2011 16:16:11 -0000 1.907
28 +++ ChangeLog 17 Nov 2011 06:19:41 -0000 1.908
29 @@ -1,6 +1,14 @@
30 # ChangeLog for sys-apps/portage
31 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
32 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.907 2011/11/12 16:16:11 zmedico Exp $
33 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.908 2011/11/17 06:19:41 zmedico Exp $
34 +
35 +*portage-2.1.10.35 (17 Nov 2011)
36 +
37 + 17 Nov 2011; Zac Medico <zmedico@g.o> +portage-2.1.10.35.ebuild,
38 + -portage-2.1.10.32.ebuild, -portage-2.2.0_alpha72.ebuild:
39 + 2.1.10.35 version bump. This fixes bug #390711 (clean up previous build prior
40 + to pkg_pretend) and bug #390699 (support HOSTNAME variable for emerge quiet
41 + mode xterm titles). Bug #381649 tracks all bugs fixed since portage-2.1.10.11.
42
43 12 Nov 2011; Zac Medico <zmedico@g.o> metadata.xml,
44 portage-2.1.10.11.ebuild, portage-2.1.10.32.ebuild, portage-2.1.10.34.ebuild,
45
46
47
48 1.1 sys-apps/portage/portage-2.1.10.35.ebuild
49
50 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.10.35.ebuild?rev=1.1&view=markup
51 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.10.35.ebuild?rev=1.1&content-type=text/plain
52
53 Index: portage-2.1.10.35.ebuild
54 ===================================================================
55 # Copyright 1999-2011 Gentoo Foundation
56 # Distributed under the terms of the GNU General Public License v2
57 # $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.10.35.ebuild,v 1.1 2011/11/17 06:19:41 zmedico Exp $
58
59 # Require EAPI 2 since we now require at least python-2.6 (for python 3
60 # syntax support) which also requires EAPI 2.
61 EAPI=2
62 inherit eutils multilib python
63
64 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
65 HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
66 LICENSE="GPL-2"
67 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
68 SLOT="0"
69 IUSE="build doc epydoc +ipc linguas_pl python2 python3 selinux"
70
71 # Import of the io module in python-2.6 raises ImportError for the
72 # thread module if threading is disabled.
73 python_dep="python3? ( =dev-lang/python-3* )
74 !python2? ( !python3? (
75 build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] ) )
76 !build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] >=dev-lang/python-3 ) )
77 ) )
78 python2? ( !python3? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] ) ) )"
79
80 # The pysqlite blocker is for bug #282760.
81 DEPEND="${python_dep}
82 !build? ( >=sys-apps/sed-4.0.5 )
83 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
84 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
85
86 RDEPEND="${python_dep}
87 !build? ( >=sys-apps/sed-4.0.5
88 >=app-shells/bash-3.2_p17
89 >=app-admin/eselect-1.2 )
90 elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
91 elibc_glibc? ( >=sys-apps/sandbox-1.6 )
92 elibc_uclibc? ( >=sys-apps/sandbox-1.6 )
93 >=app-misc/pax-utils-0.1.17
94 selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
95 !<app-shells/bash-3.2_p17
96 !<app-admin/logrotate-3.8.0"
97 PDEPEND="
98 !build? (
99 >=net-misc/rsync-2.6.4
100 userland_GNU? ( >=sys-apps/coreutils-6.4 )
101 )"
102 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
103 # NOTE: FEATURES=install-sources requires debugedit and rsync
104
105 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
106
107 prefix_src_archives() {
108 local x y
109 for x in ${@}; do
110 for y in ${SRC_ARCHIVES}; do
111 echo ${y}/${x}
112 done
113 done
114 }
115
116 PV_PL="2.1.2"
117 PATCHVER_PL=""
118 TARBALL_PV=$PV
119 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
120 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
121 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
122 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
123
124 PATCHVER=
125 [[ $TARBALL_PV = $PV ]] || 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 compatible_python_is_selected() {
135 [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
136 }
137
138 pkg_setup() {
139 # Bug #359731 - Die early if get_libdir fails.
140 [[ -z $(get_libdir) ]] && \
141 die "get_libdir returned an empty string"
142
143 if use python2 && use python3 ; then
144 ewarn "Both python2 and python3 USE flags are enabled, but only one"
145 ewarn "can be in the shebangs. Using python3."
146 fi
147 if ! use python2 && ! use python3 && ! compatible_python_is_selected ; then
148 ewarn "Attempting to select a compatible default python interpreter"
149 local x success=0
150 for x in /usr/bin/python2.* ; do
151 x=${x#/usr/bin/python2.}
152 if [[ $x -ge 6 ]] 2>/dev/null ; then
153 eselect python set python2.$x
154 if compatible_python_is_selected ; then
155 elog "Default python interpreter is now set to python-2.$x"
156 success=1
157 break
158 fi
159 fi
160 done
161 if [ $success != 1 ] ; then
162 eerror "Unable to select a compatible default python interpreter!"
163 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
164 fi
165 fi
166
167 if use python3; then
168 python_set_active_version 3
169 elif use python2; then
170 python_set_active_version 2
171 fi
172 }
173
174 src_prepare() {
175 if [ -n "${PATCHVER}" ] ; then
176 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
177 rm "$S/bin/ebuild-helpers/portageq" \
178 || die "failed to remove portageq helper symlink"
179 fi
180 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
181 fi
182 einfo "Setting portage.VERSION to ${PVR} ..."
183 sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
184 die "Failed to patch portage.VERSION"
185 sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
186 die "Failed to patch VERSION in doc/fragment/version"
187 sed -e "1s/VERSION/${PVR}/" -i man/* || \
188 die "Failed to patch VERSION in man page headers"
189
190 if ! use ipc ; then
191 einfo "Disabling ipc..."
192 sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
193 -i pym/_emerge/AbstractEbuildProcess.py || \
194 die "failed to patch AbstractEbuildProcess.py"
195 fi
196
197 if use python3; then
198 einfo "Converting shebangs for python3..."
199 python_convert_shebangs -r 3 .
200 elif use python2; then
201 einfo "Converting shebangs for python2..."
202 python_convert_shebangs -r 2 .
203 fi
204 }
205
206 src_compile() {
207 if use doc; then
208 cd "${S}"/doc
209 touch fragment/date
210 make xhtml xhtml-nochunks || die "failed to make docs"
211 fi
212
213 if use epydoc; then
214 einfo "Generating api docs"
215 mkdir "${WORKDIR}"/api
216 local my_modules epydoc_opts=""
217 my_modules="$(find "${S}/pym" -name "*.py" \
218 | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \
219 -e 's:/:.:g' | sort)" || die "error listing modules"
220 # workaround for bug 282760
221 > "$S/pym/pysqlite2.py"
222 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
223 epydoc -o "${WORKDIR}"/api \
224 -qqqqq --no-frames --show-imports $epydoc_opts \
225 --name "${PN}" --url "${HOMEPAGE}" \
226 ${my_modules} || die "epydoc failed"
227 rm "$S/pym/pysqlite2.py"
228 fi
229 }
230
231 src_test() {
232 # make files executable, in case they were created by patch
233 find bin -type f | xargs chmod +x
234 ./pym/portage/tests/runTests || die "test(s) failed"
235 }
236
237 src_install() {
238 local libdir=$(get_libdir)
239 local portage_base="/usr/${libdir}/portage"
240 local portage_share_config=/usr/share/portage/config
241
242 cd "${S}"/cnf
243 insinto /etc
244 doins etc-update.conf dispatch-conf.conf || die
245
246 insinto "$portage_share_config"
247 doins "$S/cnf/make.globals" || die
248 if [ -f "make.conf.${ARCH}".diff ]; then
249 patch make.conf "make.conf.${ARCH}".diff || \
250 die "Failed to patch make.conf.example"
251 newins make.conf make.conf.example || die
252 else
253 eerror ""
254 eerror "Portage does not have an arch-specific configuration for this arch."
255 eerror "Please notify the arch maintainer about this issue. Using generic."
256 eerror ""
257 newins make.conf make.conf.example || die
258 fi
259
260 dosym ..${portage_share_config}/make.globals /etc/make.globals
261
262 insinto /etc/logrotate.d
263 doins "${S}"/cnf/logrotate.d/elog-save-summary || die
264
265 # BSD and OSX need a sed wrapper so that find/xargs work properly
266 if use userland_GNU; then
267 rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper"
268 fi
269
270 local x symlinks files
271
272 cd "$S" || die "cd failed"
273 for x in $(find bin -type d) ; do
274 exeinto $portage_base/$x || die "exeinto failed"
275 cd "$S"/$x || die "cd failed"
276 files=$(find . -mindepth 1 -maxdepth 1 -type f ! -type l)
277 if [ -n "$files" ] ; then
278 doexe $files || die "doexe failed"
279 fi
280 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
281 if [ -n "$symlinks" ] ; then
282 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
283 fi
284 done
285
286 cd "$S" || die "cd failed"
287 for x in $(find pym/* -type d ! -path "pym/portage/tests*") ; do
288 insinto $portage_base/$x || die "insinto failed"
289 cd "$S"/$x || die "cd failed"
290 # __pycache__ directories contain no py files
291 [[ "*.py" != $(echo *.py) ]] || continue
292 doins *.py || die "doins failed"
293 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
294 if [ -n "$symlinks" ] ; then
295 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
296 fi
297 done
298
299 # We install some minimal tests for use as a preinst sanity check.
300 # These tests must be able to run without a full source tree and
301 # without relying on a previous portage instance being installed.
302 cd "$S" || die "cd failed"
303 exeinto $portage_base/pym/portage/tests || die
304 doexe pym/portage/tests/runTests || die
305 insinto $portage_base/pym/portage/tests || die
306 doins pym/portage/tests/*.py || die
307 insinto $portage_base/pym/portage/tests/lint || die
308 doins pym/portage/tests/lint/*.py || die
309 doins pym/portage/tests/lint/__test__ || die
310
311 # Symlinks to directories cause up/downgrade issues and the use of these
312 # modules outside of portage is probably negligible.
313 for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do
314 [ ! -L "${x}" ] && continue
315 die "symlink to directory will cause upgrade/downgrade issues: '${x}'"
316 done
317
318 doman "${S}"/man/*.[0-9]
319 if use linguas_pl; then
320 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9]
321 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9]
322 fi
323
324 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES}
325 use doc && dohtml -r "${S}"/doc/*
326 use epydoc && dohtml -r "${WORKDIR}"/api
327
328 dodir /usr/bin
329 for x in ebuild egencache emerge portageq quickpkg repoman ; do
330 dosym ../${libdir}/portage/bin/${x} /usr/bin/${x}
331 done
332
333 dodir /usr/sbin
334 local my_syms="archive-conf
335 dispatch-conf
336 emaint
337 emerge-webrsync
338 env-update
339 etc-update
340 fixpackages
341 regenworld"
342 local x
343 for x in ${my_syms}; do
344 dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x}
345 done
346 dosym env-update /usr/sbin/update-env
347 dosym etc-update /usr/sbin/update-etc
348
349 dodir /etc/portage
350 keepdir /etc/portage
351 }
352
353 pkg_preinst() {
354 if [[ $ROOT == / ]] ; then
355 # Run some minimal tests as a sanity check.
356 local test_runner=$(find "$D" -name runTests)
357 if [[ -n $test_runner && -x $test_runner ]] ; then
358 einfo "Running preinst sanity tests..."
359 "$test_runner" || die "preinst sanity tests failed"
360 fi
361 fi
362
363 if ! use build && ! has_version dev-python/pycrypto && \
364 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
365 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
366 ewarn "with this system then please install dev-python/pycrypto or"
367 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
368 ewarn "to enable RMD160 hash support."
369 ewarn "See bug #198398 for more information."
370 fi
371 if [ -f "${ROOT}/etc/make.globals" ]; then
372 rm "${ROOT}/etc/make.globals"
373 fi
374
375 if [[ -d ${ROOT}var/log/portage && \
376 $(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
377 has_version '<sys-apps/portage-2.1.10.11' ; then
378 # Initialize permissions for bug #378451 and bug #377177, since older
379 # portage does not create /var/log/portage with the desired default
380 # permissions.
381 einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
382 chown portage:portage "${ROOT}var/log/portage"
383 chmod g+ws "${ROOT}var/log/portage"
384 fi
385
386 [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" \
387 && REPO_LAYOUT_CONF_WARN=true || REPO_LAYOUT_CONF_WARN=false
388
389 has_version "<${CATEGORY}/${PN}-2.1.10.34" \
390 && QUIET_BUILD_WARN=true || QUIET_BUILD_WARN=false
391 }
392
393 pkg_postinst() {
394 # Compile all source files recursively. Any orphans
395 # will be identified and removed in postrm.
396 python_mod_optimize /usr/$(get_libdir)/portage/pym
397
398 if $REPO_LAYOUT_CONF_WARN ; then
399 ewarn
400 echo "If you want overlay eclasses to override eclasses from" \
401 "other repos then see the portage(5) man page" \
402 "for information about the new layout.conf and repos.conf" \
403 "configuration files." \
404 | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done
405 ewarn
406 fi
407
408 if $QUIET_BUILD_WARN ; then
409 elog
410 echo "NOTE: Beginning with portage-2.1.10.34, the emerge" \
411 "--quiet-build option is enabled by default." \
412 "Set --quiet-build=n in EMERGE_DEFAULT_OPTS if" \
413 "you want to disable it by default. See the emerge(1)" \
414 "man page for more information about this option." \
415 | fmt -w 75 | while read -r ; do elog "$REPLY" ; done
416 elog
417 fi
418 }
419
420 pkg_postrm() {
421 python_mod_cleanup /usr/$(get_libdir)/portage/pym
422 }