Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9595 - in main/branches/2.1.2: bin pym
Date: Sat, 29 Mar 2008 05:55:54
Message-Id: E1JfU2g-0000ZR-Go@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-03-29 05:55:49 +0000 (Sat, 29 Mar 2008)
3 New Revision: 9595
4
5 Modified:
6 main/branches/2.1.2/bin/misc-functions.sh
7 main/branches/2.1.2/pym/portage.py
8 Log:
9 Bug #214619 - Run dyn_package() and preinst_mask() from ${T} instead of
10 ${D} in order to avoid leaving gmon.out files in ${D} in case any tools
11 were built with -pf in CFLAGS. Also, call preinst_mask() after all other
12 functions so that INSTALL_MASK can be used to wipe out any gmon.out files
13 created during previous functions. (trunk r9592)
14
15
16 Modified: main/branches/2.1.2/bin/misc-functions.sh
17 ===================================================================
18 --- main/branches/2.1.2/bin/misc-functions.sh 2008-03-29 05:53:07 UTC (rev 9594)
19 +++ main/branches/2.1.2/bin/misc-functions.sh 2008-03-29 05:55:49 UTC (rev 9595)
20 @@ -407,6 +407,11 @@
21 eerror "${FUNCNAME}: D is unset"
22 return 1
23 fi
24 +
25 + # Make sure $PWD is not ${D} so that we don't leave gmon.out files
26 + # in there in case any tools were built with -pg in CFLAGS.
27 + cd "${T}"
28 +
29 # remove man pages, info pages, docs if requested
30 for f in man info doc; do
31 if hasq no${f} $FEATURES; then
32 @@ -525,7 +530,9 @@
33 }
34
35 dyn_package() {
36 - cd "${PORTAGE_BUILDDIR}/image"
37 + # Make sure $PWD is not ${D} so that we don't leave gmon.out files
38 + # in there in case any tools were built with -pg in CFLAGS.
39 + cd "${T}"
40 install_mask "${PORTAGE_BUILDDIR}/image" "${PKG_INSTALL_MASK}"
41 local pkg_dest="${PKGDIR}/All/${PF}.tbz2"
42 local pkg_tmp="${PKGDIR}/All/${PF}.tbz2.$$"
43 @@ -534,10 +541,9 @@
44 # Sandbox is disabled in case the user wants to use a symlink
45 # for $PKGDIR and/or $PKGDIR/All.
46 export SANDBOX_ON="0"
47 - tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS . | \
48 + tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS -C "${D}" . | \
49 bzip2 -f > "${pkg_tmp}" || \
50 die "Failed to create tarball"
51 - cd ..
52 export PYTHONPATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
53 python -c "import xpak; t=xpak.tbz2('${pkg_tmp}'); t.recompose('${PORTAGE_BUILDDIR}/build-info')"
54 if [ $? -ne 0 ]; then
55
56 Modified: main/branches/2.1.2/pym/portage.py
57 ===================================================================
58 --- main/branches/2.1.2/pym/portage.py 2008-03-29 05:53:07 UTC (rev 9594)
59 +++ main/branches/2.1.2/pym/portage.py 2008-03-29 05:55:49 UTC (rev 9595)
60 @@ -4678,11 +4678,14 @@
61 phase_retval = exit_status_check(phase_retval)
62 if phase_retval == os.EX_OK:
63 # Post phase logic and tasks that have been factored out of
64 - # ebuild.sh.
65 + # ebuild.sh. Call preinst_mask last so that INSTALL_MASK can
66 + # can be used to wipe out any gmon.out files created during
67 + # previous functions (in case any tools were built with -pg
68 + # in CFLAGS).
69 myargs = [_shell_quote(misc_sh_binary),
70 - "preinst_bsdflags", "preinst_mask",
71 + "preinst_bsdflags",
72 "preinst_sfperms", "preinst_selinux_labels",
73 - "preinst_suid_scan"]
74 + "preinst_suid_scan", "preinst_mask"]
75 _doebuild_exit_status_unlink(
76 mysettings.get("EBUILD_EXIT_STATUS_FILE"))
77 mysettings["EBUILD_PHASE"] = ""
78
79 --
80 gentoo-commits@l.g.o mailing list