metadata: remove redundant fields from package hash
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
f0c702f124
commit
423ec18116
@ -373,10 +373,14 @@ sub list {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# TODO: do_install_package etc. should deal with source packages rather
|
||||||
|
# than binary packages
|
||||||
sub do_install_package($$) {
|
sub do_install_package($$) {
|
||||||
my $feed = shift;
|
my $feed = shift;
|
||||||
my $pkg = shift;
|
my $pkg = shift;
|
||||||
my $path = $pkg->{makefile};
|
|
||||||
|
my $path;
|
||||||
|
$pkg->{src} and $path = $pkg->{src}{makefile};
|
||||||
|
|
||||||
if($path) {
|
if($path) {
|
||||||
$path =~ s/\/Makefile$//;
|
$path =~ s/\/Makefile$//;
|
||||||
|
@ -224,9 +224,7 @@ sub parse_package_metadata($) {
|
|||||||
/^Package:\s*(.+?)\s*$/ and do {
|
/^Package:\s*(.+?)\s*$/ and do {
|
||||||
undef $feature;
|
undef $feature;
|
||||||
$pkg = {};
|
$pkg = {};
|
||||||
$pkg->{ignore} = $src->{ignore};
|
|
||||||
$pkg->{src} = $src;
|
$pkg->{src} = $src;
|
||||||
$pkg->{makefile} = $src->{makefile};
|
|
||||||
$pkg->{name} = $1;
|
$pkg->{name} = $1;
|
||||||
$pkg->{title} = "";
|
$pkg->{title} = "";
|
||||||
$pkg->{depends} = [];
|
$pkg->{depends} = [];
|
||||||
@ -273,7 +271,6 @@ sub parse_package_metadata($) {
|
|||||||
name => $vpkg,
|
name => $vpkg,
|
||||||
vdepends => [],
|
vdepends => [],
|
||||||
src => $src,
|
src => $src,
|
||||||
makefile => $src->{makefile},
|
|
||||||
};
|
};
|
||||||
push @{$package{$vpkg}->{vdepends}}, $pkg->{name};
|
push @{$package{$vpkg}->{vdepends}}, $pkg->{name};
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ sub print_package_config_category($) {
|
|||||||
print "menu \"$menu\"\n";
|
print "menu \"$menu\"\n";
|
||||||
}
|
}
|
||||||
foreach my $pkg (@pkgs) {
|
foreach my $pkg (@pkgs) {
|
||||||
next if $pkg->{ignore};
|
next if $pkg->{src}{ignore};
|
||||||
my $title = $pkg->{name};
|
my $title = $pkg->{name};
|
||||||
my $c = (72 - length($pkg->{name}) - length($pkg->{title}));
|
my $c = (72 - length($pkg->{name}) - length($pkg->{title}));
|
||||||
if ($c > 0) {
|
if ($c > 0) {
|
||||||
@ -485,7 +485,7 @@ sub gen_package_mk() {
|
|||||||
if (defined($pkg_dep) && defined($pkg_dep->{src})) {
|
if (defined($pkg_dep) && defined($pkg_dep->{src})) {
|
||||||
unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}{buildtypes}}) {
|
unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}{buildtypes}}) {
|
||||||
warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n",
|
warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n",
|
||||||
$src->{makefile}, $type, $pkg_dep->{src}{name}, $deptype, $pkg_dep->{makefile}, $deptype;
|
$src->{makefile}, $type, $pkg_dep->{src}{name}, $deptype, $pkg_dep->{src}{makefile}, $deptype;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
$idx = $pkg_dep->{src}{path};
|
$idx = $pkg_dep->{src}{path};
|
||||||
@ -539,7 +539,7 @@ sub gen_package_mk() {
|
|||||||
if (defined $pkg_dep->{src}) {
|
if (defined $pkg_dep->{src}) {
|
||||||
unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}{buildtypes}}) {
|
unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}{buildtypes}}) {
|
||||||
warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n",
|
warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n",
|
||||||
$src->{makefile}, $pkg_dep->{src}{name}, $deptype, $pkg_dep->{makefile}, $deptype;
|
$src->{makefile}, $pkg_dep->{src}{name}, $deptype, $pkg_dep->{src}{makefile}, $deptype;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
$idx = $pkg_dep->{src}{path};
|
$idx = $pkg_dep->{src}{path};
|
||||||
@ -640,7 +640,7 @@ sub gen_package_license($) {
|
|||||||
} else {
|
} else {
|
||||||
if ($level == 1) {
|
if ($level == 1) {
|
||||||
print "$pkg->{name}: Missing license! ";
|
print "$pkg->{name}: Missing license! ";
|
||||||
print "Please fix $pkg->{makefile}\n";
|
print "Please fix $pkg->{src}{makefile}\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user