X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=scripts%2Fpackage-metadata.pl;h=5abc1bdef3f70e1c4cbe3f97ecfd6ea925ad88ed;hb=543d945f07ec439388cbe3a9ea1b193e910bb824;hp=53bb45a62c83d628e62dc3857eb8d9d48d3b9ba3;hpb=a405a93fa69cf836ed628ac86b90a6a718c36bae;p=oweals%2Fopenwrt.git diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 53bb45a62c..5abc1bdef3 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -191,9 +191,9 @@ sub mconf_depends { $depend = shift @vdeps; if (@vdeps > 1) { - $condition = ($condition ? "$condition && " : '') . '!('.join("||", map { "PACKAGE_".$_ } @vdeps).')'; + $condition = ($condition ? "$condition && " : '') . join("&&", map { "PACKAGE_$_ 0) { - $condition = ($condition ? "$condition && " : '') . '!PACKAGE_'.$vdeps[0]; + $condition = ($condition ? "$condition && " : '') . "PACKAGE_${vdeps[0]}{name} && $pkg->{repository}) { print "Package/$name/subdir = $pkg->{repository}\n"; } + if ($pkg->{name} && defined($pkg->{abiversion}) && length($pkg->{abiversion})) { + my $abiv; + + if ($pkg->{abiversion} =~ m!^(\d{4})-(\d{2})-(\d{2})-[0-9a-f]{7,40}$!) { + print STDERR "WARNING: Reducing ABI version '$pkg->{abiversion}' of package '$name' to '$1$2$3'\n"; + $abiv = "$1$2$3"; + } + else { + $abiv = $pkg->{abiversion}; + } + + foreach my $n (@{$pkg->{provides}}) { + print "Package/$n/abiversion = $abiv\n"; + } + } + my %depends; + foreach my $dep (@{$pkg->{depends} || []}) { + if ($dep =~ m!^\+?(?:[^:]+:)?([^@]+)$!) { + $depends{$1}++; + } + } + my @depends = sort keys %depends; + if (@depends > 0) { + foreach my $n (@{$pkg->{provides}}) { + print "Package/$n/depends = @depends\n"; + } + } } } @@ -565,7 +608,7 @@ sub parse_command() { /^config$/ and return gen_package_config(); /^kconfig/ and return gen_kconfig_overrides(); /^source$/ and return gen_package_source(); - /^subdirs$/ and return gen_package_subdirs(); + /^pkgaux$/ and return gen_package_auxiliary(); /^license$/ and return gen_package_license(0); /^licensefull$/ and return gen_package_license(1); /^usergroup$/ and return gen_usergroup_list(); @@ -577,7 +620,7 @@ Available Commands: $0 config [file] Package metadata in Kconfig format $0 kconfig [file] [config] [patchver] Kernel config overrides $0 source [file] Package source file information - $0 subdirs [file] Package subdir information in makefile format + $0 pkgaux [file] Package auxiliary variables in makefile format $0 license [file] Package license information $0 licensefull [file] Package license information (full list) $0 usergroup [file] Package usergroup allocation list