Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 125206 Details for
Bug 184042
app-portage/gentoolkit - refactored revdep-rebuild
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
revdep-rebuild-rmOldTempfiles.patch
revdep-rebuild.patch (text/plain), 2.75 KB, created by
michael@smith-li.com
on 2007-07-17 20:09:47 UTC
(
hide
)
Description:
revdep-rebuild-rmOldTempfiles.patch
Filename:
MIME Type:
Creator:
michael@smith-li.com
Created:
2007-07-17 20:09:47 UTC
Size:
2.75 KB
patch
obsolete
>--- revdep-rebuild.orig 2007-07-17 11:13:35.000000000 -0400 >+++ revdep-rebuild 2007-07-17 15:29:48.000000000 -0400 >@@ -317,29 +317,25 @@ > # Use the color preference from portage > NOCOLOR=$(portageq envvar NOCOLOR) > >-# Find a place to put temporary files >-# TODO; let the user choose where to put tempfiles >-# gfind $HOME/ /var/tmp/ /tmp/ -writable -print -quit >-# TODO: This is a rather noisy, but portable way to implement -quit >-LIST=$( >- find $HOME/ /var/tmp/ /tmp/ -writable | while read LIST; do >- echo "$LIST.$appname" >- break >- done >-) >-if [[ $LIST = .$appname ]]; then >- die 1 "!!! Unable to find a satisfactory location for temporary files !!!" >-fi >-[[ $remove_old_tempfiles ]] && rm -f $LIST.* >- >-function set_trap () { >+set_trap() { > trap "rm_temp $1" SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM > } >-function rm_temp () { >+rm_temp() { > rm $1 > die 1 $' ...terminated. Removing incomplete '"$1." > } > get_search_env() { >+ # Find a place to put temporary files >+ # TODO; let the user choose where to put tempfiles >+ # gfind $HOME/ /var/tmp/ /tmp/ -writable -print -quit >+ # HACK: This is a rather noisy, but portable way to implement -quit >+ while read LIST; do >+ break # Set LIST >+ done < <(find $HOME/ /var/tmp/ /tmp/ -writable) >+ [[ $LIST ]] || >+ die 1 "Unable to find a satisfactory location for temporary files" >+ >+ LIST+=".$appname" > if [[ $SEARCH_BROKEN ]]; then > SONAME_SEARCH="$SONAME" > HEAD_TEXT="broken by a package update" >@@ -362,19 +358,18 @@ > unset WORKING_TEXT > fi > >- [[ $LIST ]] || die 1 $LIST IS NOT DEFINED >- > # If any of our temporary files are older than 1 day, remove them all >- [[ ! $keep_tempfiles && -r $LIST && >- $( >- find -L "$LIST" -type f -mmin +1440 -print | >- while read; do echo 1; break; done >- ) ]] && rm -f $LIST.* >+ if [[ ! $keep_tempfiles ]]; then >+ while read; do >+ remove_old_tempfiles=1 >+ break >+ done < <(find -L "$LIST."* -maxdepth 0 -type f -mmin +1440 -print) >+ fi > > # Compare old and new environments > # Don't use our previous files if environment doesn't match > new_env=$( >- # We don't care if these options change >+ # We don't care if these emerge options change > EMERGE_OPTIONS=(${EMERGE_OPTIONS[@]//--pretend/}) > EMERGE_OPTIONS=(${EMERGE_OPTIONS[@]//--fetchonly/}) > cat <<- EOF >@@ -391,13 +386,16 @@ > old_env=$(<"$LIST.0_env") > if [[ $old_env != $new_env ]]; then > ewarn 'Environment mismatch from previous run, deleting temporary files...' >- rm -f "$LIST"* >+ remove_old_tempfiles=1 > fi > else > # No 0_env file found, silently delete any other tempfiles that may exist >- rm -f "$LIST"* >+ remove_old_tempfiles=1 > fi > >+ # If we should remove old tempfiles, do so >+ [[ $remove_old_tempfiles ]] && rm -f "$LIST."* >+ > # Save the environment in a file for next time > echo "$new_env" > "$LIST.0_env" >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 184042
:
123727
|
123795
|
123821
|
124074
|
124178
|
124343
|
124352
|
124370
|
124464
|
124466
|
124474
|
124489
|
124704
|
124760
|
125088
|
125136
|
125180
|
125187
|
125206
|
125347
|
125349
|
125357
|
125494
|
129344