Mageia Bugzilla – Attachment 11447 Details for
Bug 25992
perl-URPM bug fix: add support for reading zstd compressed files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
enable to alter hdlist compressor in genhdlist2 (not really wanted)
genhdlist2.diff (text/plain), 2.08 KB, created by
Thierry Vignaud
on 2020-01-06 23:52:28 CET
(
hide
)
Description:
enable to alter hdlist compressor in genhdlist2 (not really wanted)
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2020-01-06 23:52:28 CET
Size:
2.08 KB
patch
obsolete
>--- /tmp/genhdlist2 2020-01-06 23:34:46.335163948 +0100 >+++ /bin/genhdlist2 2020-01-06 23:44:15.665569719 +0100 >@@ -17,6 +17,8 @@ > > sub main() { > my %options = ( >+ #hdlist_compress => 'zstd -13', >+ hdlist_compress => 'gzip', > synthesis_filter => '.cz:zstd -13', > xml_info => 'auto', > xml_info_filter => '.lzma:xz -7', >@@ -33,6 +35,7 @@ > 'no-hdlist' => \$options{no_hdlist}, > 'allow-empty-media' => \$options{allow_empty_media}, > 'file-deps=s' => \$options{file_deps}, >+ 'hdlist-compress=s' => \$options{hdlist_compress}, > 'synthesis-filter=s' => \$options{synthesis_filter}, > 'xml-info!' => \$options{xml_info}, > 'xml-info-filter=s' => \$options{xml_info_filter}, >@@ -130,7 +133,7 @@ > # default to "@suggests@" lines on older distros, "@recommends@" lines on newer: > my $output_recommends = do_we_use_recommends($rpms_dir); > >- build($urpm, \%rpms_todo, $media_info_dir, $rpms_dir, \@xml_media_info, $options{no_incremental}, $options{no_hdlist}, $xml_info_suffix, $xml_info_filter, $synthesis); >+ build($urpm, \%rpms_todo, $media_info_dir, $rpms_dir, \@xml_media_info, $options{no_incremental}, $options{no_hdlist}, $xml_info_suffix, $xml_info_filter, $synthesis, $options{hdlist_compress}); > build_synthesis($urpm, "$synthesis.tmp", $synthesis_filter, $output_recommends); > > if (1) { >@@ -177,7 +180,7 @@ > } > > sub build { >- my ($urpm, $rpms_todo, $media_info_dir, $rpms_dir, $xml_media_info, $b_no_incremental, $b_no_hdlist, $xml_info_suffix, $xml_info_filter, $synthesis) = @_; >+ my ($urpm, $rpms_todo, $media_info_dir, $rpms_dir, $xml_media_info, $b_no_incremental, $b_no_hdlist, $xml_info_suffix, $xml_info_filter, $synthesis, $hdlist_compress) = @_; > > my $hdlist = "$media_info_dir/hdlist.cz"; > >@@ -185,8 +188,8 @@ > if (!$b_no_hdlist) { > $out_hdlist = MDV::Packdrakeng->new( > archive => "$hdlist.tmp", >- compress => "gzip", >- uncompress => "gzip -d", >+ compress => $hdlist_compress, >+ uncompress => "$hdlist_compress -d", # big assumption but works for gzip, xz, zstd > extern => 1, > comp_level => 9, > ) or die "Can't create archive";
--- /tmp/genhdlist2 2020-01-06 23:34:46.335163948 +0100 +++ /bin/genhdlist2 2020-01-06 23:44:15.665569719 +0100 @@ -17,6 +17,8 @@ sub main() { my %options = ( + #hdlist_compress => 'zstd -13', + hdlist_compress => 'gzip', synthesis_filter => '.cz:zstd -13', xml_info => 'auto', xml_info_filter => '.lzma:xz -7', @@ -33,6 +35,7 @@ 'no-hdlist' => \$options{no_hdlist}, 'allow-empty-media' => \$options{allow_empty_media}, 'file-deps=s' => \$options{file_deps}, + 'hdlist-compress=s' => \$options{hdlist_compress}, 'synthesis-filter=s' => \$options{synthesis_filter}, 'xml-info!' => \$options{xml_info}, 'xml-info-filter=s' => \$options{xml_info_filter}, @@ -130,7 +133,7 @@ # default to "@suggests@" lines on older distros, "@recommends@" lines on newer: my $output_recommends = do_we_use_recommends($rpms_dir); - build($urpm, \%rpms_todo, $media_info_dir, $rpms_dir, \@xml_media_info, $options{no_incremental}, $options{no_hdlist}, $xml_info_suffix, $xml_info_filter, $synthesis); + build($urpm, \%rpms_todo, $media_info_dir, $rpms_dir, \@xml_media_info, $options{no_incremental}, $options{no_hdlist}, $xml_info_suffix, $xml_info_filter, $synthesis, $options{hdlist_compress}); build_synthesis($urpm, "$synthesis.tmp", $synthesis_filter, $output_recommends); if (1) { @@ -177,7 +180,7 @@ } sub build { - my ($urpm, $rpms_todo, $media_info_dir, $rpms_dir, $xml_media_info, $b_no_incremental, $b_no_hdlist, $xml_info_suffix, $xml_info_filter, $synthesis) = @_; + my ($urpm, $rpms_todo, $media_info_dir, $rpms_dir, $xml_media_info, $b_no_incremental, $b_no_hdlist, $xml_info_suffix, $xml_info_filter, $synthesis, $hdlist_compress) = @_; my $hdlist = "$media_info_dir/hdlist.cz"; @@ -185,8 +188,8 @@ if (!$b_no_hdlist) { $out_hdlist = MDV::Packdrakeng->new( archive => "$hdlist.tmp", - compress => "gzip", - uncompress => "gzip -d", + compress => $hdlist_compress, + uncompress => "$hdlist_compress -d", # big assumption but works for gzip, xz, zstd extern => 1, comp_level => 9, ) or die "Can't create archive";
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 25992
: 11447