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