diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-06-24 16:28:50 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-06-24 16:28:50 +0000 |
commit | ad5bafb5f3e215165653c9c1f83e67bd08f482de (patch) | |
tree | 8f423d1cf3eb3abc031c8ed8b863092628587f93 /urpm | |
parent | 5d740abac49f175662254526c91acf2e130c8a6b (diff) | |
download | urpmi-ad5bafb5f3e215165653c9c1f83e67bd08f482de.tar urpmi-ad5bafb5f3e215165653c9c1f83e67bd08f482de.tar.gz urpmi-ad5bafb5f3e215165653c9c1f83e67bd08f482de.tar.bz2 urpmi-ad5bafb5f3e215165653c9c1f83e67bd08f482de.tar.xz urpmi-ad5bafb5f3e215165653c9c1f83e67bd08f482de.zip |
use @media_info_prefix_suffix and statedir_media_info_file()
(useful for next commit)
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/media.pm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index fce615f0..c9bff53d 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -36,6 +36,16 @@ our @PER_MEDIA_OPT = qw( my @xml_media_info = ('info', 'files', 'changelog'); +my @media_info_prefix_suffix = ( + [ 'synthesis.hdlist', '.cz' ], + [ 'hdlist', '.cz' ], + [ 'descriptions', '' ], + [ 'names', '' ], + [ 'MD5SUM', '' ], + (map { [ $_, '.xml.lzma' ] } @xml_media_info), +); + + sub get_medium_option { my ($urpm, $medium, $option_name) = @_; @@ -942,8 +952,7 @@ sub _clean_statedir_medium_files { my ($urpm, $medium) = @_; #- remove files associated with this medium. - unlink grep { $_ } map { $_->($urpm, $medium) } \&statedir_synthesis, \&statedir_descriptions, \&statedir_names, \&statedir_MD5SUM, \&statedir_hdlist; - unlink statedir_xml_info($urpm, $medium, $_) foreach @xml_media_info; + unlink grep { $_ } map { statedir_media_info_file($urpm, $medium, $_->[0], $_->[1]) } @media_info_prefix_suffix; remove_user_media_info_files($urpm, $medium); } |