diff options
author | Francois Pons <fpons@mandriva.com> | 2003-10-06 12:41:56 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-10-06 12:41:56 +0000 |
commit | 030bf8a16552d9dcaa2b15eeb4c6ebb523e8dcd2 (patch) | |
tree | 88e89c9e43e6c5145505844c0abbea9c18cacf49 | |
parent | 180efcaca4a32b459c128646ef27711d23ca548e (diff) | |
download | urpmi-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.
-rw-r--r-- | urpm.pm | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -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; } |