From f813009e9e33fadfd0a6c28ed487fd1252b32b7e Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 24 Sep 2004 01:37:02 +0000 Subject: Save hdlists and synthesis as user root --- perl-install/pkgs.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'perl-install/pkgs.pm') diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index f272926db..4d886cc12 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -373,16 +373,17 @@ sub psUpdateHdlistsDeps { install_any::getAndSaveFile("media/media_info/$_->{hdlist}", $hdlistf) or die "no $_->{hdlist} found"; symlinkf $hdlistf, "/tmp/$_->{hdlist}"; ++$need_copy; + chown 0, 0, $hdlistf; } if (-s $synthesisf != $_->{synthesis_hdlist_size}) { install_any::getAndSaveFile("media/media_info/synthesis.$_->{hdlist}", $synthesisf); - -s $synthesisf > 0 or unlink $synthesisf; + if (-s $synthesisf > 0) { chown 0, 0, $synthesisf } else { unlink $synthesisf } } } if ($need_copy) { #- this is necessary for urpmi. - install_any::getAndSaveFile("media/media_info/$_", "$urpmidir/$_") foreach qw(rpmsrate); + install_any::getAndSaveFile("media/media_info/$_", "$urpmidir/$_") && chown 0, 0, "$urpmidir/$_" foreach qw(rpmsrate); } } @@ -476,6 +477,8 @@ sub psUsingHdlist { -s $newsf > 0 or unlink $newsf; } + chown 0, 0, $newf, $newsf; + #- get all keys corresponding in the right pubkey file, #- they will be added in rpmdb later if not found. if (!$o_fhdlist || $o_pubkey) { -- cgit v1.2.1