diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2018-01-06 18:01:25 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2018-01-13 19:54:44 +0100 |
commit | 504cb913eb5e12ea5e737bdfac96df32240b3c37 (patch) | |
tree | df83abffbc34304c2b6c512a5bf48a67b93a17c5 /scripts/package-metadata.pl | |
parent | 47f292ff7823e9d844e946d221f5708bf51b15fd (diff) | |
download | upstream-504cb913eb5e12ea5e737bdfac96df32240b3c37.tar.gz upstream-504cb913eb5e12ea5e737bdfac96df32240b3c37.tar.bz2 upstream-504cb913eb5e12ea5e737bdfac96df32240b3c37.zip |
metadata: change pkg->{src} field to hold a reference
We often want to access fields of a source packages through pkg->{src}.
Allow accessing them directly instead of resolving the source hash through
srcpackages.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'scripts/package-metadata.pl')
-rwxr-xr-x | scripts/package-metadata.pl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 1031e11460..12cd6fe344 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -484,12 +484,12 @@ sub gen_package_mk() { my $idx = ""; my $pkg_dep = $package{$dep}; if (defined($pkg_dep) && defined($pkg_dep->{src})) { - unless (!$deptype || grep { $_ eq $deptype } @{$srcpackage{$pkg_dep->{src}}{buildtypes}}) { + unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}{buildtypes}}) { warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", - $src->{makefile}, $type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; + $src->{makefile}, $type, $pkg_dep->{src}{name}, $deptype, $pkg_dep->{makefile}, $deptype; next; } - $idx = $pkg_dep->{subdir}.$pkg_dep->{src}; + $idx = $pkg_dep->{subdir}.$pkg_dep->{src}{name}; } elsif (defined($srcpackage{$dep})) { $idx = $subdir{$dep}.$dep; } else { @@ -538,12 +538,12 @@ sub gen_package_mk() { foreach my $dep (@deps) { $pkg_dep = $package{$deps}; if (defined $pkg_dep->{src}) { - unless (!$deptype || grep { $_ eq $deptype } @{$srcpackage{$pkg_dep->{src}}{buildtypes}}) { + unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}{buildtypes}}) { warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", - $src->{makefile}, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; + $src->{makefile}, $pkg_dep->{src}{name}, $deptype, $pkg_dep->{makefile}, $deptype; next; } - $idx = $pkg_dep->{subdir}.$pkg_dep->{src}; + $idx = $pkg_dep->{subdir}.$pkg_dep->{src}{name}; } elsif (defined($srcpackage{$dep})) { $idx = $subdir{$dep}.$dep; } @@ -552,7 +552,7 @@ sub gen_package_mk() { $idx .= $suffix; my $depline; - next if $srcname eq $pkg_dep->{src}.$suffix; + next if $srcname eq $pkg_dep->{src}{name}.$suffix; next if $dep{$condition.":".$srcname."->".$idx}; next if $dep{$srcname."->($dep)".$idx} and $pkg_dep->{vdepends}; my $depstr; |