summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-10-06 12:41:56 +0000
committerFrancois Pons <fpons@mandriva.com>2003-10-06 12:41:56 +0000
commit030bf8a16552d9dcaa2b15eeb4c6ebb523e8dcd2 (patch)
tree88e89c9e43e6c5145505844c0abbea9c18cacf49 /urpm.pm
parent180efcaca4a32b459c128646ef27711d23ca548e (diff)
downloadurpmi-030bf8a16552d9dcaa2b15eeb4c6ebb523e8dcd2.tar
urpmi-030bf8a16552d9dcaa2b15eeb4c6ebb523e8dcd2.tar.gz
urpmi-030bf8a16552d9dcaa2b15eeb4c6ebb523e8dcd2.tar.bz2
urpmi-030bf8a16552d9dcaa2b15eeb4c6ebb523e8dcd2.tar.xz
urpmi-030bf8a16552d9dcaa2b15eeb4c6ebb523e8dcd2.zip
make sure names.XXX are correctly generated all the time.
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm25
1 files changed, 13 insertions, 12 deletions
diff --git a/urpm.pm b/urpm.pm
index 4bed12ce..721b13c4 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2019,22 +2019,23 @@ this could happen if you mounted manually the directory when creating the medium
}
}
- foreach (@{$urpm->{media}}) {
- unlink "$urpm->{statedir}/names.$_->{name}";
- if (defined $_->{start} && defined $_->{end}) {
- local *F;
- open F, ">$urpm->{statedir}/names.$_->{name}";
- foreach ($_->{start} .. $_->{end}) {
- print F $urpm->{depslist}[$_]->name."\n";
- }
- close F;
- }
- }
-
#- this file is written in any cases.
$urpm->write_config();
}
+ #- make sure names files are regenerated.
+ foreach (@{$urpm->{media}}) {
+ unlink "$urpm->{statedir}/names.$_->{name}";
+ if (defined $_->{start} && defined $_->{end}) {
+ local *F;
+ open F, ">$urpm->{statedir}/names.$_->{name}";
+ foreach ($_->{start} .. $_->{end}) {
+ print F $urpm->{depslist}[$_]->name."\n";
+ }
+ close F;
+ }
+ }
+
$options{nolock} or $urpm->unlock_urpmi_db;
$options{nopubkey} or $urpm->unlock_rpm_db;
}