aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/metadata.pm
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-01-06 19:28:52 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-01-13 19:54:44 +0100
commitf0c702f124090470ec2b1140c576033e4e50fa1b (patch)
treedac32b2728d5bb350c4e0dbe47415bfdf84faeb9 /scripts/metadata.pm
parent504cb913eb5e12ea5e737bdfac96df32240b3c37 (diff)
downloadupstream-f0c702f124090470ec2b1140c576033e4e50fa1b.tar.gz
upstream-f0c702f124090470ec2b1140c576033e4e50fa1b.tar.bz2
upstream-f0c702f124090470ec2b1140c576033e4e50fa1b.zip
metadata: replace %subdir hash with a path field in source packages
Every single reference to subdir was concatenated with the source package name, so it makes sense to store the concatenated value instead. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'scripts/metadata.pm')
-rw-r--r--scripts/metadata.pm12
1 files changed, 3 insertions, 9 deletions
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index 642bbcee77..f3c84e80c3 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -2,13 +2,12 @@ package metadata;
use base 'Exporter';
use strict;
use warnings;
-our @EXPORT = qw(%package %srcpackage %category %subdir %preconfig %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames);
+our @EXPORT = qw(%package %srcpackage %category %preconfig %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames);
our %package;
our %preconfig;
our %srcpackage;
our %category;
-our %subdir;
our %features;
our %overrides;
our @ignore;
@@ -178,7 +177,6 @@ sub parse_target_metadata($) {
}
sub clear_packages() {
- %subdir = ();
%preconfig = ();
%package = ();
%srcpackage = ();
@@ -204,12 +202,10 @@ sub parse_package_metadata($) {
};
while (<FILE>) {
chomp;
- /^Source-Makefile: \s*((?:package\/)?((?:.+\/)?)([^\/]+)\/Makefile)\s*$/ and do {
- $subdir{$3} = $2;
-
+ /^Source-Makefile: \s*((?:package\/)?((?:.+\/)?([^\/]+))\/Makefile)\s*$/ and do {
$src = {
makefile => $1,
- subdir => $2,
+ path => $2,
name => $3,
ignore => $ignore{$3},
packages => [],
@@ -235,7 +231,6 @@ sub parse_package_metadata($) {
$pkg->{title} = "";
$pkg->{depends} = [];
$pkg->{mdepends} = [];
- $pkg->{subdir} = $src->{subdir};
$pkg->{tristate} = 1;
$pkg->{override} = $override;
$package{$1} = $pkg;
@@ -278,7 +273,6 @@ sub parse_package_metadata($) {
name => $vpkg,
vdepends => [],
src => $src,
- subdir => $src->{subdir},
makefile => $src->{makefile},
};
push @{$package{$vpkg}->{vdepends}}, $pkg->{name};