reopen 487317 quit On Sun, Aug 02, 2009 at 01:09:17AM -0700, Ryan Niebur wrote: > I think that debsum's usage for rmtree is okay. > > -- > _________________________ > Ryan Niebur > ryanrya...@gmail.com
06:26 < sgran> Ryan52: no, you can't yet 06:28 < sgran> it needs something like http://paste.debian.net/43176/ 14:49 < Ryan52> sgran: thanks! 14:50 < Ryan52> sgran: could you please explain to me why it is needed tho? 14:58 < sgran> without the {safe => 1} constructor, rmtree calls chmod on symlinks with absolute paths (lchmod doesn't work on linux) 14:58 < sgran> this makes debsums, when running as root, accidentally change the permissions of real files that the symlink in the package pointed at 14:59 < Ryan52> ok. did you reopen the bug or should I? 14:59 < sgran> I did not 14:59 < Ryan52> ok 15:00 < sgran> it may be worked around in the perl module, by making 'safe' the default, but I think it's probably better for debsums to also call it explicitly since it's designed to work on packages as root 15:12 < sgran> Ryan52: sure attached is http://paste.debian.net/43176/ -- _________________________ Ryan Niebur ryanrya...@gmail.com
--- debsums.in.old 2009-06-26 05:30:54.000000000 +0100 +++ debsums.in 2009-08-02 14:27:16.000000000 +0100 @@ -486,7 +486,7 @@ my $control = "$tmp/DEBIAN"; $sums = "$control/md5sums"; - rmtree $control if -d $control; + rmtree ($control, {safe => 1}) if -d $control; system 'dpkg', '--control', $deb, $control and die "$self: can't extract control info from $deb\n"; @@ -538,7 +538,7 @@ }, $unpacked; close SUMS; - rmtree $unpacked; + rmtree ($unpacked, {safe => 1}); print "done.\n" unless $silent;
signature.asc
Description: Digital signature