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