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