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