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