mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
* 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:
@@ -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('');
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user