[OpenWrt-Devel] [PATCH 08/15] metadata: remove redundant fields from package hash

Matthias Schiffer mschiffer at universe-factory.net
Mon Jan 8 09:52:21 EST 2018


Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 scripts/metadata.pm         | 3 ---
 scripts/package-metadata.pl | 8 ++++----
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index e636a45a33..50f91407d6 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -224,9 +224,7 @@ sub parse_package_metadata($) {
 		/^Package:\s*(.+?)\s*$/ and do {
 			undef $feature;
 			$pkg = {};
-			$pkg->{ignore} = $src->{ignore};
 			$pkg->{src} = $src;
-			$pkg->{makefile} = $src->{makefile};
 			$pkg->{name} = $1;
 			$pkg->{title} = "";
 			$pkg->{depends} = [];
@@ -273,7 +271,6 @@ sub parse_package_metadata($) {
 					name => $vpkg,
 					vdepends => [],
 					src => $src,
-					makefile => $src->{makefile},
 				};
 				push @{$package{$vpkg}->{vdepends}}, $pkg->{name};
 			}
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index c98db46d36..233fb0eabf 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -290,7 +290,7 @@ sub print_package_config_category($) {
 			print "menu \"$menu\"\n";
 		}
 		foreach my $pkg (@pkgs) {
-			next if $pkg->{ignore};
+			next if $pkg->{src}->{ignore};
 			my $title = $pkg->{name};
 			my $c = (72 - length($pkg->{name}) - length($pkg->{title}));
 			if ($c > 0) {
@@ -485,7 +485,7 @@ sub gen_package_mk() {
 				if (defined($pkg_dep) && defined($pkg_dep->{src})) {
 					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}->{name}, $deptype, $pkg_dep->{makefile}, $deptype;
+							$src->{makefile}, $type, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{src}->{makefile}, $deptype;
 						next;
 					}
 					$idx = $pkg_dep->{src}->{path};
@@ -539,7 +539,7 @@ sub gen_package_mk() {
 				if (defined $pkg_dep->{src}) {
 					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}->{name}, $deptype, $pkg_dep->{makefile}, $deptype;
+							$src->{makefile}, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{src}->{makefile}, $deptype;
 						next;
 					}
 					$idx = $pkg_dep->{src}->{path};
@@ -640,7 +640,7 @@ sub gen_package_license($) {
 			} else {
 				if ($level == 1) {
 					print "$pkg->{name}: Missing license! ";
-					print "Please fix $pkg->{makefile}\n";
+					print "Please fix $pkg->{src}->{makefile}\n";
 				}
 			}
 		}
-- 
2.15.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list