diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2008-07-21 18:38:34 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2008-07-21 18:38:34 +0000 |
| commit | 6b1d31718e4d21c8e6e5962a325102c9f589bccb (patch) | |
| tree | 095b71be4dc75f01a5df4c1efcce15bac80061c6 /trunk | |
| parent | 97b5b67769460c19f5eedfad48a0bbbfacdccddf (diff) | |
| download | gentoolkit-6b1d31718e4d21c8e6e5962a325102c9f589bccb.tar.gz | |
Moved temporary files from /tmp to /var/tmp. Use a to avoid unprintable characters when using --library
svn path=/; revision=499
Diffstat (limited to 'trunk')
| -rwxr-xr-x | trunk/src/revdep-rebuild/revdep-rebuild | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/trunk/src/revdep-rebuild/revdep-rebuild b/trunk/src/revdep-rebuild/revdep-rebuild index 1694e8c..bae694a 100755 --- a/trunk/src/revdep-rebuild/revdep-rebuild +++ b/trunk/src/revdep-rebuild/revdep-rebuild @@ -512,7 +512,7 @@ setup_tmpdir() { else die 1 "Unable to find or create a satisfactory location for temporary files" fi - [[ $VERBOSE ]] && einfo "Temporary files are located in $PWD" + [[ $VERBOSE ]] && einfo "Temporary cache files are located in $PWD" setup_rm } get_search_env() { @@ -521,7 +521,7 @@ get_search_env() { local uid=$(python -c 'import os; import pwd; print pwd.getpwuid(os.getuid())[0]') # Find a place to put temporary files # Use "${TMPDIR}/revdep-rebuild" or /tmp/revdep-rebuild - local tmp_target="${TMPDIR:=/tmp}/${APP_NAME}-${uid}" + local tmp_target="/var/tmp/${APP_NAME}-${uid}-cache" # From here on all work is done inside the temporary directory setup_tmpdir "$tmp_target" "$uid" @@ -542,14 +542,18 @@ get_search_env() { # Set to "<tab>$SONAME<space>" SONAME_SEARCH=$'\t'"$SONAME " fi - local uuid="${SONAME##*/}" - uuid="${uuid//[[:space:]]}" - uuid="${uuid//\*}" - uuid="${uuid//\\}" + # Hash the SONAME, to avoid unprintable characters. We are using HMAC since + # the interface has remained consistent since python 2.2 + local uuid_hash=$(python -c "import hmac; print hmac.new('revdep-rebuild',\"${SONAME##*/}\").hexdigest()") + # Delete me - keeping for reference if needed + #local uuid="${SONAME##*/}" + #uuid="${uuid//[[:space:]]}" + #uuid="${uuid//\*}" + #uuid="${uuid//\\}" HEAD_TEXT="using $SONAME" OK_TEXT="There are no dynamic links to $SONAME" unset WORKING_TEXT - setup_tmpdir $tmp_target"/"$uuid" "$uid" + setup_tmpdir "$tmp_target"/"$uuid_hash" "$uid" fi # If any of our temporary files are older than 1 day, remove them all |
