* Make sure the working directory's subdirs have sane modes before trying

to delete it, in case it has unwritable dirs and alien is not running
     as root. Closes: #217330
This commit is contained in:
joey
2003-10-28 22:11:51 +00:00
parent 492029f47e
commit 902aefad11
2 changed files with 7 additions and 1 deletions

View File

@@ -304,6 +304,12 @@ sub DESTROY {
if ($this->unpacked_tree eq '/') {
die "alien internal error: unpacked_tree is set to '/'. Please file a bug report!";
}
# Just in case some dir perms are too screwed up for rm to work and
# we're not running as root. NB: can't use xargs
$this->do('find', $this->unpacked_tree, '-type', 'd',
'-exec', 'chmod', '755', '{}', ';');
$this->do('rm', '-rf', $this->unpacked_tree)
or die "unable to delete temporary directory '".$this->unpacked_tree."': $!";
$this->unpacked_tree('');

View File

@@ -96,7 +96,7 @@ sub revert {
=item build
Uses the parent's build command. If a lsb-rpm is available, uses it to build
Uses the parent's build method. If a lsb-rpm is available, uses it to build
the package.
=cut