summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-24 01:37:02 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-24 01:37:02 +0000
commitf813009e9e33fadfd0a6c28ed487fd1252b32b7e (patch)
treedf29961941d6dd67341ab0629ead52ec1739dd5a /perl-install/pkgs.pm
parentc394be229cada296338957fd93621978f236db8f (diff)
downloaddrakx-backup-do-not-use-f813009e9e33fadfd0a6c28ed487fd1252b32b7e.tar
drakx-backup-do-not-use-f813009e9e33fadfd0a6c28ed487fd1252b32b7e.tar.gz
drakx-backup-do-not-use-f813009e9e33fadfd0a6c28ed487fd1252b32b7e.tar.bz2
drakx-backup-do-not-use-f813009e9e33fadfd0a6c28ed487fd1252b32b7e.tar.xz
drakx-backup-do-not-use-f813009e9e33fadfd0a6c28ed487fd1252b32b7e.zip
Save hdlists and synthesis as user root
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm7
1 files changed, 5 insertions, 2 deletions
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) {