1 |
Author: grobian |
2 |
Date: 2009-05-02 09:31:29 +0000 (Sat, 02 May 2009) |
3 |
New Revision: 13595 |
4 |
|
5 |
Modified: |
6 |
main/branches/prefix/bin/isolated-functions.sh |
7 |
main/branches/prefix/bin/misc-functions.sh |
8 |
main/branches/prefix/pym/_emerge/__init__.py |
9 |
Log: |
10 |
Merged from trunk -r13580:13589 |
11 |
|
12 |
| 13582 | Make elog functions use read -r when splitting lines, so | |
13 |
| zmedico | that backslashes intended for display will not be eaten. | |
14 |
|
15 |
| 13584 | Bug #267175 - Instead of "poor code kills airplanes", say | |
16 |
| zmedico | "install aborted due to poor programming practices shown | |
17 |
| | above" in order to help the user link the die message to the | |
18 |
| | related "poor programming practices" messages. Thanks to | |
19 |
| | Jeremy Olexa <darkside@g.o> for the suggestion. | |
20 |
|
21 |
| 13589 | Fix DepPriority.__int__() to return distinguishable values, | |
22 |
| zmedico | for use when measuring hardness for the circular dependency | |
23 |
| | display. This fixes a problem visible in bug #268038, | |
24 |
| | comment #0, where buildtime dependencies are incorrectly | |
25 |
| | displayed as runtime dependencies. | |
26 |
|
27 |
|
28 |
Modified: main/branches/prefix/bin/isolated-functions.sh |
29 |
=================================================================== |
30 |
--- main/branches/prefix/bin/isolated-functions.sh 2009-05-02 09:30:11 UTC (rev 13594) |
31 |
+++ main/branches/prefix/bin/isolated-functions.sh 2009-05-02 09:31:29 UTC (rev 13595) |
32 |
@@ -176,7 +176,7 @@ |
33 |
return 1 |
34 |
;; |
35 |
esac |
36 |
- echo -e "$@" | while read ; do |
37 |
+ echo -e "$@" | while read -r ; do |
38 |
echo "$messagetype $REPLY" >> \ |
39 |
"${T}/logging/${EBUILD_PHASE:-other}" |
40 |
done |
41 |
@@ -186,8 +186,8 @@ |
42 |
eqawarn() { |
43 |
elog_base QA "$*" |
44 |
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo |
45 |
- echo -e "$@" | while read ; do |
46 |
- vecho -e " $WARN*$NORMAL $REPLY" >&2 |
47 |
+ echo -e "$@" | while read -r ; do |
48 |
+ vecho " $WARN*$NORMAL $REPLY" >&2 |
49 |
done |
50 |
LAST_E_CMD="eqawarn" |
51 |
return 0 |
52 |
@@ -196,8 +196,8 @@ |
53 |
elog() { |
54 |
elog_base LOG "$*" |
55 |
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo |
56 |
- echo -e "$@" | while read ; do |
57 |
- echo -e " $GOOD*$NORMAL $REPLY" |
58 |
+ echo -e "$@" | while read -r ; do |
59 |
+ echo " $GOOD*$NORMAL $REPLY" |
60 |
done |
61 |
LAST_E_CMD="elog" |
62 |
return 0 |
63 |
@@ -226,8 +226,8 @@ |
64 |
einfo() { |
65 |
elog_base INFO "$*" |
66 |
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo |
67 |
- echo -e "$@" | while read ; do |
68 |
- echo -e " $GOOD*$NORMAL $REPLY" |
69 |
+ echo -e "$@" | while read -r ; do |
70 |
+ echo " $GOOD*$NORMAL $REPLY" |
71 |
done |
72 |
LAST_E_CMD="einfo" |
73 |
return 0 |
74 |
@@ -244,8 +244,8 @@ |
75 |
ewarn() { |
76 |
elog_base WARN "$*" |
77 |
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo |
78 |
- echo -e "$@" | while read ; do |
79 |
- echo -e " $WARN*$NORMAL $RC_INDENTATION$REPLY" >&2 |
80 |
+ echo -e "$@" | while read -r ; do |
81 |
+ echo " $WARN*$NORMAL $RC_INDENTATION$REPLY" >&2 |
82 |
done |
83 |
LAST_E_CMD="ewarn" |
84 |
return 0 |
85 |
@@ -254,8 +254,8 @@ |
86 |
eerror() { |
87 |
elog_base ERROR "$*" |
88 |
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo |
89 |
- echo -e "$@" | while read ; do |
90 |
- echo -e " $BAD*$NORMAL $RC_INDENTATION$REPLY" >&2 |
91 |
+ echo -e "$@" | while read -r ; do |
92 |
+ echo " $BAD*$NORMAL $RC_INDENTATION$REPLY" >&2 |
93 |
done |
94 |
LAST_E_CMD="eerror" |
95 |
return 0 |
96 |
|
97 |
Modified: main/branches/prefix/bin/misc-functions.sh |
98 |
=================================================================== |
99 |
--- main/branches/prefix/bin/misc-functions.sh 2009-05-02 09:30:11 UTC (rev 13594) |
100 |
+++ main/branches/prefix/bin/misc-functions.sh 2009-05-02 09:31:29 UTC (rev 13595) |
101 |
@@ -539,14 +539,16 @@ |
102 |
fi |
103 |
if [[ ${abort} == "yes" ]] ; then |
104 |
if [[ ${gentoo_bug} == "yes" ]] ; then |
105 |
- die "poor code kills airplanes" |
106 |
+ die "install aborted due to" \ |
107 |
+ "poor programming practices shown above" |
108 |
else |
109 |
echo "Please do not file a Gentoo bug and instead" \ |
110 |
"report the above QA issues directly to the upstream" \ |
111 |
"developers of this software." | fmt -w 70 | \ |
112 |
while read line ; do eqawarn "${line}" ; done |
113 |
eqawarn "Homepage: ${HOMEPAGE}" |
114 |
- hasq stricter ${FEATURES} && die "poor code kills airplanes" |
115 |
+ hasq stricter ${FEATURES} && die "install aborted due to" \ |
116 |
+ "poor programming practices shown above" |
117 |
fi |
118 |
fi |
119 |
fi |
120 |
|
121 |
Modified: main/branches/prefix/pym/_emerge/__init__.py |
122 |
=================================================================== |
123 |
--- main/branches/prefix/pym/_emerge/__init__.py 2009-05-02 09:30:11 UTC (rev 13594) |
124 |
+++ main/branches/prefix/pym/_emerge/__init__.py 2009-05-02 09:31:29 UTC (rev 13595) |
125 |
@@ -951,6 +951,43 @@ |
126 |
__slots__ = ("satisfied", "optional", "rebuild") |
127 |
|
128 |
def __int__(self): |
129 |
+ """ |
130 |
+ Note: These priorities are only used for measuring hardness |
131 |
+ in the circular dependency display via digraph.debug_print(), |
132 |
+ and nothing more. For actual merge order calculations, the |
133 |
+ measures defined by the DepPriorityNormalRange and |
134 |
+ DepPrioritySatisfiedRange classes are used. |
135 |
+ |
136 |
+ Attributes Hardness |
137 |
+ |
138 |
+ not satisfied and buildtime 8 |
139 |
+ not satisfied and runtime 7 |
140 |
+ not satisfied and runtime_post 6 |
141 |
+ satisfied and buildtime and rebuild 5 |
142 |
+ satisfied and buildtime 4 |
143 |
+ satisfied and runtime 3 |
144 |
+ satisfied and runtime_post 2 |
145 |
+ optional 1 |
146 |
+ (none of the above) 0 |
147 |
+ |
148 |
+ """ |
149 |
+ if not self.satisfied: |
150 |
+ if self.buildtime: |
151 |
+ return 8 |
152 |
+ if self.runtime: |
153 |
+ return 7 |
154 |
+ if self.runtime_post: |
155 |
+ return 6 |
156 |
+ if self.buildtime: |
157 |
+ if self.rebuild: |
158 |
+ return 5 |
159 |
+ return 4 |
160 |
+ if self.runtime: |
161 |
+ return 3 |
162 |
+ if self.runtime_post: |
163 |
+ return 2 |
164 |
+ if self.optional: |
165 |
+ return 1 |
166 |
return 0 |
167 |
|
168 |
def __str__(self): |