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