From 3247ef99bb1a95adfc71ad6fab3b5e86ed481a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Sat, 25 Jul 2009 22:23:19 +0000 Subject: add defaults for filters and also fix the corresponding suffixes --- lib/MDV/Distribconf.pm | 17 +++++++++++------ 1 file 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)$/) { -- cgit v1.2.1