metadata: make srcpackage extensible
Turn the srcpackage values into hashes to allow storing more information than just binary package names. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
1a2b5eb7ac
commit
19577582e4
3 changed files with 6 additions and 4 deletions
|
@ -525,7 +525,7 @@ sub install_package {
|
||||||
};
|
};
|
||||||
|
|
||||||
# install all dependencies referenced from the source package
|
# install all dependencies referenced from the source package
|
||||||
foreach my $vpkg (@{$feed_src->{$src}}) {
|
foreach my $vpkg (@{$feed_src->{$src}{packages}}) {
|
||||||
foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}, @{$vpkg->{"builddepends/host"}}) {
|
foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}, @{$vpkg->{"builddepends/host"}}) {
|
||||||
next if $dep =~ /@/;
|
next if $dep =~ /@/;
|
||||||
$dep =~ s/^\+//;
|
$dep =~ s/^\+//;
|
||||||
|
|
|
@ -212,7 +212,9 @@ sub parse_package_metadata($) {
|
||||||
$src = $3;
|
$src = $3;
|
||||||
$subdir =~ s/^package\///;
|
$subdir =~ s/^package\///;
|
||||||
$subdir{$src} = $subdir;
|
$subdir{$src} = $subdir;
|
||||||
$srcpackage{$src} = [];
|
$srcpackage{$src} = {
|
||||||
|
packages => [],
|
||||||
|
};
|
||||||
$override = "";
|
$override = "";
|
||||||
undef $pkg;
|
undef $pkg;
|
||||||
};
|
};
|
||||||
|
@ -237,7 +239,7 @@ sub parse_package_metadata($) {
|
||||||
$pkg->{tristate} = 1;
|
$pkg->{tristate} = 1;
|
||||||
$pkg->{override} = $override;
|
$pkg->{override} = $override;
|
||||||
$package{$1} = $pkg;
|
$package{$1} = $pkg;
|
||||||
push @{$srcpackage{$src}}, $pkg;
|
push @{$srcpackage{$src}{packages}}, $pkg;
|
||||||
};
|
};
|
||||||
/^Feature:\s*(.+?)\s*$/ and do {
|
/^Feature:\s*(.+?)\s*$/ and do {
|
||||||
undef $pkg;
|
undef $pkg;
|
||||||
|
|
|
@ -445,7 +445,7 @@ sub gen_package_mk() {
|
||||||
print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' ', @{$pkg->{buildtypes}})."\n";
|
print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' ', @{$pkg->{buildtypes}})."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $spkg (@{$srcpackage{$pkg->{src}}}) {
|
foreach my $spkg (@{$srcpackage{$pkg->{src}}{packages}}) {
|
||||||
foreach my $dep (@{$spkg->{depends}}, @{$spkg->{builddepends}}) {
|
foreach my $dep (@{$spkg->{depends}}, @{$spkg->{builddepends}}) {
|
||||||
$dep =~ /@/ or do {
|
$dep =~ /@/ or do {
|
||||||
$dep =~ s/\+//g;
|
$dep =~ s/\+//g;
|
||||||
|
|
Loading…
Reference in a new issue