X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=scripts%2Fpackage-metadata.pl;h=e0cdff1e8174be5c09744049a0c34a61ca56e589;hb=6928d06a7edabf7679c4f69a50051d891084e1d9;hp=36b1160d8c927e9a4807bee4b15d0a9d7cb1a257;hpb=de0ccd35323b420e96ac849b327e77dd9c7837b0;p=openwrt%2Fopenwrt.git diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 36b1160d8c..e0cdff1e81 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -209,7 +209,7 @@ sub mconf_depends { $flags =~ /@/ or $depend = "PACKAGE_$depend"; } else { my $vdep = $vpackage{$depend}; - if ($vdep) { + if ($vdep && @$vdep > 0) { $depend = join("||", map { "PACKAGE_".$_->{name} } @$vdep); } else { $flags =~ /@/ or $depend = "PACKAGE_$depend"; @@ -509,13 +509,28 @@ sub gen_package_source() { } } -sub gen_package_subdirs() { +sub gen_package_auxiliary() { parse_package_metadata($ARGV[0]) or exit 1; foreach my $name (sort {uc($a) cmp uc($b)} keys %package) { my $pkg = $package{$name}; if ($pkg->{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"; + } + } } } @@ -565,7 +580,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 +592,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