commit 0de41088c5bc84cc9a2a6b10acf79dd8eebcce48
Author: Elan Ruusamäe <[email protected]>
Date:   Mon Dec 3 21:15:44 2012 +0200

    find extra sources from detached checksum file
    
    so, this is valid:
    
    vim.spec:
    Source0:    ftp://ftp.vim.org/pub/editors/vim/patches/7.3/7.3.738
    
    sources:
    41a709ad15a1dfb5e1405fb2e618f173  7.3.738

 specparser.pl | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/specparser.pl b/specparser.pl
index e865609..e19ac6c 100755
--- a/specparser.pl
+++ b/specparser.pl
@@ -321,6 +321,16 @@ sub add_md5_to_print($) # {{{
                }
        }
        close(F);
+
+       # find extra sources from detached checksum file
+       my $checksums = read_sources_file();
+       my @mapped = map { $_->[0] } @sources;
+       delete @sourcemap{@mapped};
+       while (my($source, $url) = each %sourcemap) {
+               my ($basename) = $url =~ m{/([^/]+$)};
+               my $hash = $checksums->{$basename} or next;
+               push @sources, [$source, $hash, $url];
+       }
 } # }}}
 
 next_spec(shift);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/distfiles.git/commitdiff/0de41088c5bc84cc9a2a6b10acf79dd8eebcce48

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to