diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2009-07-25 22:23:19 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2009-07-25 22:23:19 +0000 |
commit | 3247ef99bb1a95adfc71ad6fab3b5e86ed481a23 (patch) | |
tree | d1b0c68bada86a27239887272a5c26c2e90a19ba /lib | |
parent | 8ed584d6700877837db6da7765ae7b90d1123677 (diff) | |
download | perl-MDV-Distribconf-3247ef99bb1a95adfc71ad6fab3b5e86ed481a23.tar perl-MDV-Distribconf-3247ef99bb1a95adfc71ad6fab3b5e86ed481a23.tar.gz perl-MDV-Distribconf-3247ef99bb1a95adfc71ad6fab3b5e86ed481a23.tar.bz2 perl-MDV-Distribconf-3247ef99bb1a95adfc71ad6fab3b5e86ed481a23.tar.xz perl-MDV-Distribconf-3247ef99bb1a95adfc71ad6fab3b5e86ed481a23.zip |
add defaults for filters and also fix the corresponding suffixes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MDV/Distribconf.pm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/MDV/Distribconf.pm b/lib/MDV/Distribconf.pm index f39bd7e..b955304 100644 --- a/lib/MDV/Distribconf.pm +++ b/lib/MDV/Distribconf.pm @@ -452,8 +452,13 @@ sub getvalue { /^path$/ and return $media; /^root$/ and return $distrib->{root}; /^(info|files|changelog)$/ and - return "$var." . lc($distrib->getvalue($media, 'name', $level)) . '.xml.lzma'; - /^synthesis$/ and $default = 'synthesis.' . lc($distrib->getvalue($media, 'hdlist', $level)); + return "$var." . lc($distrib->getvalue($media, 'name', $level)) . '.xml' . $distrib->getvalue(undef, 'xml-info-suffix'); + /^synthesis$/ and $default = 'synthesis.' . 'hdlist_' . lc($distrib->getvalue($media, 'name', $level)) . + $distrib->getvalue(undef, 'synthesis-suffix'); + /^synthesis-filter$/ and $default = ".cz:gzip -9"; + /^synthesis-suffix$/ and return (split ':', $distrib->getvalue(undef, 'synthesis-filter'))[0]; + /^xml-info-filter$/ and $default = ".lzma:lzma -5"; + /^xml-info-suffix$/ and return (split ':', $distrib->getvalue(undef, 'xml-info-filter'))[0]; /^hdlist$/ and $default = 'hdlist_' . lc($distrib->getvalue($media, 'name', $level)) . '.cz'; /^pubkey$/ and $default = 'pubkey_' . lc($distrib->getvalue($media, 'name', $level)); /^(pubkey|hdlist|synthesis)$/ and do { @@ -539,12 +544,12 @@ sub getmediapath { my %files = ( pubkey => 'pubkey', hdlist => 'hdlist.cz', - synthesis => 'synthesis.hdlist.cz', + synthesis => 'synthesis.hdlist' . $distrib->getvalue(undef, 'synthesis-suffix'), MD5SUM => 'MD5SUM', infodir => '', - info => 'info.xml.lzma', - files => 'files.xml.lzma', - changelog => 'changelog.xml.lzma', + info => 'info.xml' . $distrib->getvalue(undef, 'xml-info-suffix'), + files => 'files.xml' . $distrib->getvalue(undef, 'xml-info-suffix'), + changelog => 'changelog.xml' . $distrib->getvalue(undef, 'xml-info-suffix'), ); $var eq 'path' and return $distrib->getpath($media, 'path'); if ($var =~ /^(info|files|changelog)$/) { |