scripts: metadata: use the new "Repository" field

Switch to the new "Repository" metadata field to populate tmp/.packagesubdirs

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2016-04-13 15:33:53 +02:00
parent aad2b92603
commit 9a04a80677
2 changed files with 3 additions and 2 deletions

View file

@ -849,8 +849,8 @@ sub gen_package_subdirs() {
parse_package_metadata($ARGV[0]) or exit 1; parse_package_metadata($ARGV[0]) or exit 1;
foreach my $name (sort {uc($a) cmp uc($b)} keys %package) { foreach my $name (sort {uc($a) cmp uc($b)} keys %package) {
my $pkg = $package{$name}; my $pkg = $package{$name};
if ($pkg->{name} && $pkg->{package_subdir}) { if ($pkg->{name} && $pkg->{repository}) {
print "Package/$name/subdir = $pkg->{package_subdir}\n"; print "Package/$name/subdir = $pkg->{repository}\n";
} }
} }
} }

View file

@ -223,6 +223,7 @@ sub parse_package_metadata($) {
/^Build-Depends\/(\w+): \s*(.+)\s*$/ and $pkg->{"builddepends/$1"} = [ split /\s+/, $2 ]; /^Build-Depends\/(\w+): \s*(.+)\s*$/ and $pkg->{"builddepends/$1"} = [ split /\s+/, $2 ];
/^Build-Types:\s*(.+)\s*$/ and $pkg->{buildtypes} = [ split /\s+/, $1 ]; /^Build-Types:\s*(.+)\s*$/ and $pkg->{buildtypes} = [ split /\s+/, $1 ];
/^Package-Subdir:\s*(.+?)\s*$/ and $pkg->{package_subdir} = $1; /^Package-Subdir:\s*(.+?)\s*$/ and $pkg->{package_subdir} = $1;
/^Repository:\s*(.+?)\s*$/ and $pkg->{repository} = $1;
/^Category: \s*(.+)\s*$/ and do { /^Category: \s*(.+)\s*$/ and do {
$pkg->{category} = $1; $pkg->{category} = $1;
defined $category{$1} or $category{$1} = {}; defined $category{$1} or $category{$1} = {};