Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13499 - in main/branches/2.1.6: bin bin/ebuild-helpers pym/portage
Date: Thu, 30 Apr 2009 07:10:48
Message-Id: E1LzQPu-0007sz-T2@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-04-30 07:10:46 +0000 (Thu, 30 Apr 2009)
3 New Revision: 13499
4
5 Modified:
6 main/branches/2.1.6/bin/ebuild-helpers/prepall
7 main/branches/2.1.6/bin/ebuild.sh
8 main/branches/2.1.6/bin/misc-functions.sh
9 main/branches/2.1.6/pym/portage/__init__.py
10 Log:
11 Make portage.bsd_chflags correspond to FEATURES=chflags so that it can be
12 used for related conditionals in shell code. (trunk r13342)
13
14 Modified: main/branches/2.1.6/bin/ebuild-helpers/prepall
15 ===================================================================
16 --- main/branches/2.1.6/bin/ebuild-helpers/prepall 2009-04-30 07:10:29 UTC (rev 13498)
17 +++ main/branches/2.1.6/bin/ebuild-helpers/prepall 2009-04-30 07:10:46 UTC (rev 13499)
18 @@ -5,7 +5,7 @@
19
20 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
21
22 -if type -P chflags > /dev/null && type -P mtree > /dev/null ; then
23 +if hasq chflags $FEATURES ; then
24 # Save all the file flags for restoration at the end of prepall.
25 mtree -c -p "${D}" -k flags > "${T}/bsdflags.mtree"
26 # Remove all the file flags so that prepall can do anything necessary.
27 @@ -18,7 +18,7 @@
28
29 prepallstrip
30
31 -if type -P chflags > /dev/null && type -P mtree > /dev/null; then
32 +if hasq chflags $FEATURES ; then
33 # Restore all the file flags that were saved at the beginning of prepall.
34 mtree -U -e -p "${D}" -k flags < "${T}/bsdflags.mtree" &> /dev/null
35 fi
36
37 Modified: main/branches/2.1.6/bin/ebuild.sh
38 ===================================================================
39 --- main/branches/2.1.6/bin/ebuild.sh 2009-04-30 07:10:29 UTC (rev 13498)
40 +++ main/branches/2.1.6/bin/ebuild.sh 2009-04-30 07:10:46 UTC (rev 13499)
41 @@ -698,7 +698,7 @@
42 elif [ ! -d "${PORTAGE_BUILDDIR}" ] ; then
43 return 0
44 fi
45 - if type -P chflags > /dev/null ; then
46 + if hasq chflags $FEATURES ; then
47 chflags -R noschg,nouchg,nosappnd,nouappnd "${PORTAGE_BUILDDIR}"
48 chflags -R nosunlnk,nouunlnk "${PORTAGE_BUILDDIR}" 2>/dev/null
49 fi
50
51 Modified: main/branches/2.1.6/bin/misc-functions.sh
52 ===================================================================
53 --- main/branches/2.1.6/bin/misc-functions.sh 2009-04-30 07:10:29 UTC (rev 13498)
54 +++ main/branches/2.1.6/bin/misc-functions.sh 2009-04-30 07:10:46 UTC (rev 13499)
55 @@ -492,8 +492,7 @@
56 }
57
58 preinst_bsdflags() {
59 - type -P chflags > /dev/null || return 0
60 - type -P mtree > /dev/null || return 1
61 + hasq chflags $FEATURES || return
62 # Save all the file flags for restoration after installation.
63 mtree -c -p "${D}" -k flags > "${T}/bsdflags.mtree"
64 # Remove all the file flags so that the merge phase can do anything
65 @@ -503,8 +502,7 @@
66 }
67
68 postinst_bsdflags() {
69 - type -P chflags > /dev/null || return 0
70 - type -P mtree > /dev/null || return 1
71 + hasq chflags $FEATURES || return
72 # Restore all the file flags that were saved before installation.
73 mtree -e -p "${ROOT}" -U -k flags < "${T}/bsdflags.mtree" &> /dev/null
74 }
75
76 Modified: main/branches/2.1.6/pym/portage/__init__.py
77 ===================================================================
78 --- main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 07:10:29 UTC (rev 13498)
79 +++ main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 07:10:46 UTC (rev 13499)
80 @@ -1832,6 +1832,9 @@
81 if "usersandbox" in self.features:
82 self.features.remove("usersandbox")
83
84 + if bsd_chflags:
85 + self.features.add('chflags')
86 +
87 self["FEATURES"] = " ".join(sorted(self.features))
88 self.backup_changes("FEATURES")
89 global _glep_55_enabled, _validate_cache_for_unsupported_eapis