1 |
Author: fuzzyray |
2 |
Date: 2010-04-28 14:59:46 +0000 (Wed, 28 Apr 2010) |
3 |
New Revision: 778 |
4 |
|
5 |
Modified: |
6 |
branches/gentoolkit-0.2.4/src/revdep-rebuild/revdep-rebuild |
7 |
Log: |
8 |
Restore follow symlinks option to find /var/db/pkg command. Make print statement python 3 compatible. Make EMERGE_DEFAULT_OPTIONS take precedence. |
9 |
|
10 |
Modified: branches/gentoolkit-0.2.4/src/revdep-rebuild/revdep-rebuild |
11 |
=================================================================== |
12 |
--- branches/gentoolkit-0.2.4/src/revdep-rebuild/revdep-rebuild 2010-04-28 14:53:44 UTC (rev 777) |
13 |
+++ branches/gentoolkit-0.2.4/src/revdep-rebuild/revdep-rebuild 2010-04-28 14:59:46 UTC (rev 778) |
14 |
@@ -285,7 +285,7 @@ |
15 |
# Add a space to the end of each object name to prevent false |
16 |
# matches, for example /usr/bin/dia matching /usr/bin/dialog (bug #196460). |
17 |
# The same for "${rpath} ". |
18 |
- find /var/db/pkg -type f -name CONTENTS -print0 | |
19 |
+ find -L /var/db/pkg -type f -name CONTENTS -print0 | |
20 |
xargs -0 grep -m 1 -Fl -e "${*} " -e "${rpath} " -e "${mlib} " | |
21 |
sed 's:/var/db/pkg/\(.*\)/CONTENTS:\1:' |
22 |
} |
23 |
@@ -548,7 +548,7 @@ |
24 |
get_search_env() { |
25 |
local new_env |
26 |
local old_env |
27 |
- local uid=$(python -c 'import os; import pwd; print pwd.getpwuid(os.getuid())[0]') |
28 |
+ local uid=$(python -c 'import os; import pwd; print(pwd.getpwuid(os.getuid())[0])') |
29 |
# Find a place to put temporary files |
30 |
if [[ "$uid" == "root" ]]; then |
31 |
local tmp_target="/var/cache/${APP_NAME}" |
32 |
@@ -815,7 +815,7 @@ |
33 |
progress $((++i)) $numFiles $target_file || |
34 |
progress $((++i)) $numFiles |
35 |
done |
36 |
- if [[ $SEARCH_BROKEN ]]; then |
37 |
+ if [[ $SEARCH_BROKEN && -f $ERRORS_FILE ]]; then |
38 |
# Look for missing version |
39 |
while read target_file; do |
40 |
echo "obj $target_file" >> "$BROKEN_FILE" |
41 |
@@ -1113,7 +1113,7 @@ |
42 |
trap - SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM |
43 |
|
44 |
einfo 'All prepared. Starting rebuild' |
45 |
- echo "emerge --oneshot ${EMERGE_OPTIONS[@]} ${EMERGE_DEFAULT_OPTS} $REBUILD_LIST" |
46 |
+ echo "emerge --oneshot ${EMERGE_DEFAULT_OPTS} ${EMERGE_OPTIONS[@]} $REBUILD_LIST" |
47 |
|
48 |
is_real_merge && countdown 10 |
49 |
|
50 |
@@ -1122,7 +1122,7 @@ |
51 |
|
52 |
# Run in background to correctly handle Ctrl-C |
53 |
{ |
54 |
- emerge --oneshot ${EMERGE_OPTIONS[@]} ${EMERGE_DEFAULT_OPTS} $REBUILD_LIST <&6 |
55 |
+ emerge --oneshot ${EMERGE_DEFAULT_OPTS} ${EMERGE_OPTIONS[@]} $REBUILD_LIST <&6 |
56 |
echo $? > "$STATUS_FILE" |
57 |
} & |
58 |
wait |