File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -388,13 +388,15 @@ sub dump_rpmdb {
388388
389389sub read_rpm {
390390 my ($rpm ) = @_ ;
391- my %r = Build::Rpm::rpmq($rpm , qw{ NAME VERSION RELEASE EPOCH ARCH LICENSE SOURCERPM DISTURL FILENAMES URL VENDOR FILEMODES FILEDIGESTS FILEDIGESTALGO SIGMD5} );
391+ my $sigmd5tag = ref ($rpm ) ? ' SIGMD5' : ' SIGTAG_MD5' ;
392+ my %r = Build::Rpm::rpmq($rpm , qw{ NAME VERSION RELEASE EPOCH ARCH LICENSE SOURCERPM DISTURL FILENAMES URL VENDOR FILEMODES FILEDIGESTS FILEDIGESTALGO} , $sigmd5tag );
392393 delete $r {$_ } for qw{ BASENAMES DIRNAMES DIRINDEXES} ; # save mem
393- for (qw{ NAME VERSION RELEASE EPOCH ARCH LICENSE SOURCERPM DISTURL URL VENDOR FILEDIGESTALGO SIGMD5 } ) {
394+ for (qw{ NAME VERSION RELEASE EPOCH ARCH LICENSE SOURCERPM DISTURL URL VENDOR FILEDIGESTALGO} , $sigmd5tag ) {
394395 next unless $r {$_ };
395396 die (" bad rpm entry for $_ \n " ) unless ref ($r {$_ }) eq ' ARRAY' && @{$r {$_ }} == 1;
396397 $r {$_ } = $r {$_ }-> [0];
397398 }
399+ $r {' SIGMD5' } = delete $r {$sigmd5tag } if $sigmd5tag eq ' SIGTAG_MD5' && exists ($r {$sigmd5tag });
398400 delete $r {' LICENSE' } if $r {' NAME' } eq ' gpg-pubkey' && ($r {' LICENSE' } || ' ' ) eq ' pubkey' ;
399401 return \%r ;
400402}
You can’t perform that action at this time.
0 commit comments