From 83ab3faa780ece0593aeab6e46d277e727a095af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Thu, 7 Jan 2010 20:09:28 +0000 Subject: fix so that default 'synthesis' value is generated from 'hdlist' value --- lib/MDV/Distribconf.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/MDV/Distribconf.pm b/lib/MDV/Distribconf.pm index b955304..e15ebe2 100644 --- a/lib/MDV/Distribconf.pm +++ b/lib/MDV/Distribconf.pm @@ -453,8 +453,14 @@ sub getvalue { /^root$/ and return $distrib->{root}; /^(info|files|changelog)$/ and 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$/ and do { + $default = 'synthesis.' . lc($distrib->getvalue($media, 'hdlist', $level)); + # If compression (suffix) chosen differs from default .cz (gzip), be sure to use corresponding suffix + if ($default =~ /.*\.cz$/ and !($distrib->getvalue(undef, 'synthesis-suffix') eq ".cz")) { + $default =~ s/\.cz$//g; + $default .= $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"; -- cgit v1.2.1