1 |
Author: zmedico |
2 |
Date: 2008-03-29 05:30:41 +0000 (Sat, 29 Mar 2008) |
3 |
New Revision: 9592 |
4 |
|
5 |
Modified: |
6 |
main/trunk/bin/misc-functions.sh |
7 |
main/trunk/pym/portage/__init__.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. |
14 |
|
15 |
|
16 |
Modified: main/trunk/bin/misc-functions.sh |
17 |
=================================================================== |
18 |
--- main/trunk/bin/misc-functions.sh 2008-03-29 04:55:40 UTC (rev 9591) |
19 |
+++ main/trunk/bin/misc-functions.sh 2008-03-29 05:30:41 UTC (rev 9592) |
20 |
@@ -433,6 +433,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 |
@@ -551,7 +556,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 tar_options="" |
42 |
[ "${PORTAGE_QUIET}" == "1" ] || tar_options="${tar_options} -v" |
43 |
@@ -561,10 +568,9 @@ |
44 |
[ -z "${PORTAGE_BINPKG_TMPFILE}" ] && \ |
45 |
PORTAGE_BINPKG_TMPFILE="${PKGDIR}/${CATEGORY}/${PF}.tbz2" |
46 |
mkdir -p "${PORTAGE_BINPKG_TMPFILE%/*}" || die "mkdir failed" |
47 |
- tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS . | \ |
48 |
+ tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS -C "${D}" . | \ |
49 |
bzip2 -f > "$PORTAGE_BINPKG_TMPFILE" || \ |
50 |
die "Failed to create tarball" |
51 |
- cd .. |
52 |
export PYTHONPATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}:${PYTHONPATH}" |
53 |
python -c "from portage import xpak; t=xpak.tbz2('${PORTAGE_BINPKG_TMPFILE}'); t.recompose('${PORTAGE_BUILDDIR}/build-info')" |
54 |
if [ $? -ne 0 ]; then |
55 |
|
56 |
Modified: main/trunk/pym/portage/__init__.py |
57 |
=================================================================== |
58 |
--- main/trunk/pym/portage/__init__.py 2008-03-29 04:55:40 UTC (rev 9591) |
59 |
+++ main/trunk/pym/portage/__init__.py 2008-03-29 05:30:41 UTC (rev 9592) |
60 |
@@ -4704,11 +4704,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 |