Skip to content
Permalink
Browse files

build: extend ABI_VERSION suffixing to provides

When a library package specifies additional provides, e.g. libncurses
which provides libncursesw, we should also append the abi version
suffix to each provide, since there may be more than one package
providing the virtual library.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  • Loading branch information...
jow- committed Jan 21, 2019
1 parent 68b29a7 commit 60558790a2a832265ec041131e851b6648f514d4
Showing with 11 additions and 5 deletions.
  1. +1 −1 include/package-ipkg.mk
  2. +10 −4 scripts/package-metadata.pl
@@ -162,7 +162,7 @@ Package: $(1)$$(ABIV_$(1))
Version: $(VERSION)
$$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
)$$(call addfield,Conflicts,$$(call mergelist,$(CONFLICTS))
)$$(call addfield,Provides,$$(call mergelist,$(PROVIDES)$$(if $$(ABIV_$(1)), $(1)))
)$$(call addfield,Provides,$$(call mergelist,$(PROVIDES)$$(if $$(ABIV_$(1)), $(1) $(foreach provide,$(PROVIDES),$(provide)$$(ABIV_$(1)))))
)$$(call addfield,Alternatives,$$(call mergelist,$(ALTERNATIVES))
)$$(call addfield,Source,$(SOURCE)
)$$(call addfield,SourceName,$(1)
@@ -516,13 +516,19 @@ ()
if ($pkg->{name} && $pkg->{repository}) {
print "Package/$name/subdir = $pkg->{repository}\n";
}
if ($pkg->{name} && defined($pkg->{abiversion})) {
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";
print "Package/$name/abiversion = $1$2$3\n";
$abiv = "$1$2$3";
}
else {
$abiv = $pkg->{abiversion};
}
elsif (length $pkg->{abiversion}) {
print "Package/$name/abiversion = $pkg->{abiversion}\n";

foreach my $n (@{$pkg->{provides}}) {
print "Package/$n/abiversion = $abiv\n";
}
}
}

0 comments on commit 6055879

Please sign in to comment.
You can’t perform that action at this time.