Skip to content

Commit

Permalink
build: expose ABI version in .packageauxvars
Browse files Browse the repository at this point in the history
Subdequent commits need this information to resolve the ABI version when
computing binary ipk dependencies.

Signed-off-by: Jo-Philipp Wich <[email protected]>
  • Loading branch information
jow- committed Jan 19, 2019
1 parent 2d9d57b commit e3d5b38
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/package-dumpinfo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ $(if $(MENU),Menu: $(MENU)
)$(if $(DEFAULT),Default: $(DEFAULT)
)$(if $(findstring $(PREREQ_CHECK),1),Prereq-Check: 1
)Version: $(VERSION)
Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS))
$(if $(ABI_VERSION),ABIVersion: $(ABI_VERSION)
)Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS))
Conflicts: $(CONFLICTS)
Menu-Depends: $(MDEPENDS)
Provides: $(PROVIDES)
Expand Down
1 change: 1 addition & 0 deletions scripts/metadata.pm
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ sub parse_package_metadata($) {
/^Build-Types:\s*(.+)\s*$/ and $src->{buildtypes} = [ split /\s+/, $1 ];
next unless $pkg;
/^Version: \s*(.+)\s*$/ and $pkg->{version} = $1;
/^ABIVersion: \s*(.+)\s*$/ and $pkg->{abiversion} = $1;
/^Title: \s*(.+)\s*$/ and $pkg->{title} = $1;
/^Menu: \s*(.+)\s*$/ and $pkg->{menu} = $1;
/^Submenu: \s*(.+)\s*$/ and $pkg->{submenu} = $1;
Expand Down
9 changes: 9 additions & 0 deletions scripts/package-metadata.pl
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,15 @@ ()
if ($pkg->{name} && $pkg->{repository}) {
print "Package/$name/subdir = $pkg->{repository}\n";
}
if ($pkg->{name} && defined($pkg->{abiversion})) {
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";
}
elsif (length $pkg->{abiversion}) {
print "Package/$name/abiversion = $pkg->{abiversion}\n";
}
}
}
}

Expand Down

0 comments on commit e3d5b38

Please sign in to comment.