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