Mageia Bugzilla – Attachment 9850 Details for
Bug 22261
Bugs in gendistrib when hdlists, etc. are not stored in the master media_info directory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Fix for second bug
0002-gendistrib-avoid-errors-when-hdlists-are-not-stored-.patch (text/plain), 1.35 KB, created by
Martin Whitaker
on 2017-12-24 00:20:50 CET
(
hide
)
Description:
Fix for second bug
Filename:
MIME Type:
Creator:
Martin Whitaker
Created:
2017-12-24 00:20:50 CET
Size:
1.35 KB
patch
obsolete
>From 74a9117e361bcb2f6f8383830b867d4a266c7021 Mon Sep 17 00:00:00 2001 >From: Martin Whitaker <mageia@martin-whitaker.me.uk> >Date: Sat, 23 Dec 2017 23:02:48 +0000 >Subject: [PATCH 2/2] gendistrib: avoid errors when hdlists are not stored in > the main media_info > >gendistrib assumes the hdlist and synthesis files are present in the >master media_info directory, and tries to calculate md5sums for them. >This results in error messages if they are not stored there. This patch >prevents the errors. > >diff --git a/gendistrib b/gendistrib >index 5baf66b..52766ca 100755 >--- a/gendistrib >+++ b/gendistrib >@@ -183,9 +183,12 @@ if (grep { !$_->{noneedrebuild} } @hdlists) { > unless ($nomd5sum) { > # this MD5SUM is mostly obsolete, but is still needed up to 2007.1 > # (and even on cooker for existing urpmi.cfg) >- my $md5sum = `cd $destinfodir ; /usr/bin/md5sum hdlist_* synthesis*`; >+ require File::Glob; >+ my $md5sum1 = `cd $destinfodir ; /usr/bin/md5sum hdlist_*` if glob("$destinfodir/hdlist_*"); >+ my $md5sum2 = `cd $destinfodir ; /usr/bin/md5sum synthesis*` if glob("$destinfodir/synthesis*"); > open my $md5sumfh, '>', "$destinfodir/MD5SUM" or die "Can't create $destinfodir/MD5SUM: $!\n"; >- print $md5sumfh $md5sum; >+ print $md5sumfh $md5sum1 if $md5sum1; >+ print $md5sumfh $md5sum2 if $md5sum2; > } > > print STDERR "Calculating size of medias\n" unless $nooutput; >-- >2.13.6 >
From 74a9117e361bcb2f6f8383830b867d4a266c7021 Mon Sep 17 00:00:00 2001 From: Martin Whitaker <mageia@martin-whitaker.me.uk> Date: Sat, 23 Dec 2017 23:02:48 +0000 Subject: [PATCH 2/2] gendistrib: avoid errors when hdlists are not stored in the main media_info gendistrib assumes the hdlist and synthesis files are present in the master media_info directory, and tries to calculate md5sums for them. This results in error messages if they are not stored there. This patch prevents the errors. diff --git a/gendistrib b/gendistrib index 5baf66b..52766ca 100755 --- a/gendistrib +++ b/gendistrib @@ -183,9 +183,12 @@ if (grep { !$_->{noneedrebuild} } @hdlists) { unless ($nomd5sum) { # this MD5SUM is mostly obsolete, but is still needed up to 2007.1 # (and even on cooker for existing urpmi.cfg) - my $md5sum = `cd $destinfodir ; /usr/bin/md5sum hdlist_* synthesis*`; + require File::Glob; + my $md5sum1 = `cd $destinfodir ; /usr/bin/md5sum hdlist_*` if glob("$destinfodir/hdlist_*"); + my $md5sum2 = `cd $destinfodir ; /usr/bin/md5sum synthesis*` if glob("$destinfodir/synthesis*"); open my $md5sumfh, '>', "$destinfodir/MD5SUM" or die "Can't create $destinfodir/MD5SUM: $!\n"; - print $md5sumfh $md5sum; + print $md5sumfh $md5sum1 if $md5sum1; + print $md5sumfh $md5sum2 if $md5sum2; } print STDERR "Calculating size of medias\n" unless $nooutput; -- 2.13.6
View Attachment As Raw
Actions:
View
Attachments on
bug 22261
:
9849
| 9850