summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-02-28 23:33:11 +0000
committerFrancois Pons <fpons@mandriva.com>2003-02-28 23:33:11 +0000
commite792ebd9f22fa917047fa56e7171d42c4d3fd3f6 (patch)
tree0f7dd1a602732f188c5e69c3ff9f5656547b0964 /urpm.pm
parent1718edaef5b1999f85b90370b740ead8f2d50181 (diff)
downloadurpmi-e792ebd9f22fa917047fa56e7171d42c4d3fd3f6.tar
urpmi-e792ebd9f22fa917047fa56e7171d42c4d3fd3f6.tar.gz
urpmi-e792ebd9f22fa917047fa56e7171d42c4d3fd3f6.tar.bz2
urpmi-e792ebd9f22fa917047fa56e7171d42c4d3fd3f6.tar.xz
urpmi-e792ebd9f22fa917047fa56e7171d42c4d3fd3f6.zip
fix owner ship preserved when copying
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/urpm.pm b/urpm.pm
index 0ddce2ed..0e3ab2ab 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -243,7 +243,7 @@ sub sync_file {
foreach (@_) {
my ($in) = /^(?:removable[^:]*|file):\/(.*)/;
propagate_sync_callback($options, 'start', $_);
- system("cp", "-pR", $in || $_, ref $options ? $options->{dir} : $options) or die _("copy failed: %s", $@);
+ system("cp", "--preserve=mode,timestamps", "-R", $in || $_, ref $options ? $options->{dir} : $options) or die _("copy failed: %s", $@);
propagate_sync_callback($options, 'end', $_);
}
}
@@ -935,7 +935,7 @@ sub add_distrib_media {
if (-e $hdlists_file) {
unlink "$urpm->{cachedir}/partial/hdlists";
$urpm->{log}(_("copying hdlists file..."));
- system("cp", "-pR", $hdlists_file, "$urpm->{cachedir}/partial/hdlists") ?
+ system("cp", "--preserve=mode,timestamps", "-R", $hdlists_file, "$urpm->{cachedir}/partial/hdlists") ?
$urpm->{log}(_("...copying failed")) : $urpm->{log}(_("...copying done"));
} else {
$urpm->{error}(_("unable to access first installation medium (no Mandrake/base/hdlists file found)")), return;
@@ -1161,7 +1161,7 @@ sub update_media {
unlink "$urpm->{statedir}/descriptions.$medium->{name}";
if (-e "$dir/../descriptions") {
$urpm->{log}(_("copying description file of \"%s\"...", $medium->{name}));
- system("cp", "-pR", "$dir/../descriptions", "$urpm->{statedir}/descriptions.$medium->{name}") ?
+ system("cp", "--preserve=mode,timestamps", "-R", "$dir/../descriptions", "$urpm->{statedir}/descriptions.$medium->{name}") ?
$urpm->{log}(_("...copying failed")) : $urpm->{log}(_("...copying done"));
}
@@ -1170,7 +1170,7 @@ sub update_media {
unlink "$urpm->{cachedir}/partial/$medium->{hdlist}";
$urpm->{log}(_("copying source hdlist (or synthesis) of \"%s\"...", $medium->{name}));
$options{callback} && $options{callback}('copy', $medium->{name});
- if (system("cp", "-pR", $with_hdlist_dir, "$urpm->{cachedir}/partial/$medium->{hdlist}")) {
+ if (system("cp", "--preserve=mode,timestamps", "-R", $with_hdlist_dir, "$urpm->{cachedir}/partial/$medium->{hdlist}")) {
$options{callback} && $options{callback}('failed', $medium->{name});
$urpm->{log}(_("...copying failed"))
} else {
@@ -1229,7 +1229,7 @@ sub update_media {
my $local_list = $medium->{with_hdlist} =~ /hd(list.*)\.cz$/ ? $1 : 'list';
if (-s "$dir/$local_list") {
$urpm->{log}(_("copying source list of \"%s\"...", $medium->{name}));
- system("cp", "-pR", "$dir/$local_list", "$urpm->{cachedir}/partial/list") ?
+ system("cp", "--preserve=mode,timestamps", "-R", "$dir/$local_list", "$urpm->{cachedir}/partial/list") ?
$urpm->{log}(_("...copying failed")) : $urpm->{log}(_("...copying done"));
}
}
@@ -1331,10 +1331,10 @@ sub update_media {
unlink "$urpm->{cachedir}/partial/$basename";
if ($medium->{synthesis}) {
$options{force} || ! -e "$urpm->{statedir}/synthesis.$medium->{hdlist}" or
- system("cp", "-pR", "$urpm->{statedir}/synthesis.$medium->{hdlist}", "$urpm->{cachedir}/partial/$basename");
+ system("cp", "--preserve=mode,timestamps", "-R", "$urpm->{statedir}/synthesis.$medium->{hdlist}", "$urpm->{cachedir}/partial/$basename");
} else {
$options{force} || ! -e "$urpm->{statedir}/$medium->{hdlist}" or
- system("cp", "-pR", "$urpm->{statedir}/$medium->{hdlist}", "$urpm->{cachedir}/partial/$basename");
+ system("cp", "--preserve=mode,timestamps", "-R", "$urpm->{statedir}/$medium->{hdlist}", "$urpm->{cachedir}/partial/$basename");
}
eval {
$urpm->{sync}({ dir => "$urpm->{cachedir}/partial",
@@ -2250,7 +2250,7 @@ sub download_source_packages {
}
}
if (@removable_sources) {
- system("cp", "-pR", @removable_sources, "$urpm->{cachedir}/rpms");
+ system("cp", "--preserve=mode,timestamps", "-R", @removable_sources, "$urpm->{cachedir}/rpms");
}
} else {
$urpm->{error}(_("medium \"%s\" is not selected", $medium->{name}));