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