build: remove package preconfig feature
This feature has been unused for years, and its scope is too limited to be actually useful. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
423ec18116
commit
3abf663c22
4 changed files with 2 additions and 73 deletions
|
@ -9,19 +9,6 @@ ifneq ($(DUMP),)
|
||||||
|
|
||||||
dumpinfo: FORCE
|
dumpinfo: FORCE
|
||||||
|
|
||||||
define Config/template
|
|
||||||
Preconfig: $(1)
|
|
||||||
Preconfig-Type: $(2)
|
|
||||||
Preconfig-Default: $(3)
|
|
||||||
Preconfig-Label: $(4)
|
|
||||||
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Config
|
|
||||||
Preconfig/$(1) = $$(call Config/template,$(1),$(2),$(3),$(4))
|
|
||||||
preconfig_$$(1) += $(1)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Dumpinfo/Package
|
define Dumpinfo/Package
|
||||||
$(info Package: $(1)
|
$(info Package: $(1)
|
||||||
$(if $(MENU),Menu: $(MENU)
|
$(if $(MENU),Menu: $(MENU)
|
||||||
|
@ -59,8 +46,7 @@ $(if $(URL),$(URL)
|
||||||
$(if $(Package/$(1)/config),Config:
|
$(if $(Package/$(1)/config),Config:
|
||||||
$(Package/$(1)/config)
|
$(Package/$(1)/config)
|
||||||
@@
|
@@
|
||||||
)$(foreach pc,$(preconfig_$(1)),
|
))
|
||||||
$(Preconfig/$(pc))))
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Feature/Default
|
define Feature/Default
|
||||||
|
|
|
@ -72,7 +72,6 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DE
|
||||||
$(call opkg,$(TARGET_DIR)) flag $$flag `cat $$file`; \
|
$(call opkg,$(TARGET_DIR)) flag $$flag `cat $$file`; \
|
||||||
done; \
|
done; \
|
||||||
done || true
|
done || true
|
||||||
@-$(MAKE) package/preconfig
|
|
||||||
|
|
||||||
$(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
|
$(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
|
||||||
|
|
||||||
|
@ -96,8 +95,6 @@ ifdef CONFIG_SIGNED_PACKAGES
|
||||||
); done
|
); done
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(curdir)/preconfig:
|
|
||||||
|
|
||||||
$(curdir)/flags-install:= -j1
|
$(curdir)/flags-install:= -j1
|
||||||
|
|
||||||
$(eval $(call stampfile,$(curdir),package,prereq,.config))
|
$(eval $(call stampfile,$(curdir),package,prereq,.config))
|
||||||
|
|
|
@ -2,10 +2,9 @@ package metadata;
|
||||||
use base 'Exporter';
|
use base 'Exporter';
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
our @EXPORT = qw(%package %srcpackage %category %preconfig %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames);
|
our @EXPORT = qw(%package %srcpackage %category %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames);
|
||||||
|
|
||||||
our %package;
|
our %package;
|
||||||
our %preconfig;
|
|
||||||
our %srcpackage;
|
our %srcpackage;
|
||||||
our %category;
|
our %category;
|
||||||
our %features;
|
our %features;
|
||||||
|
@ -177,7 +176,6 @@ sub parse_target_metadata($) {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub clear_packages() {
|
sub clear_packages() {
|
||||||
%preconfig = ();
|
|
||||||
%package = ();
|
%package = ();
|
||||||
%srcpackage = ();
|
%srcpackage = ();
|
||||||
%category = ();
|
%category = ();
|
||||||
|
@ -191,7 +189,6 @@ sub parse_package_metadata($) {
|
||||||
my $file = shift;
|
my $file = shift;
|
||||||
my $pkg;
|
my $pkg;
|
||||||
my $feature;
|
my $feature;
|
||||||
my $preconfig;
|
|
||||||
my $src;
|
my $src;
|
||||||
my $override;
|
my $override;
|
||||||
my %ignore = map { $_ => 1 } @ignore;
|
my %ignore = map { $_ => 1 } @ignore;
|
||||||
|
@ -299,21 +296,6 @@ sub parse_package_metadata($) {
|
||||||
};
|
};
|
||||||
/^Config:\s*(.*)\s*$/ and $pkg->{config} = "$1\n".get_multiline(*FILE, "\t");
|
/^Config:\s*(.*)\s*$/ and $pkg->{config} = "$1\n".get_multiline(*FILE, "\t");
|
||||||
/^Prereq-Check:/ and $pkg->{prereq} = 1;
|
/^Prereq-Check:/ and $pkg->{prereq} = 1;
|
||||||
/^Preconfig:\s*(.+)\s*$/ and do {
|
|
||||||
my $pkgname = $pkg->{name};
|
|
||||||
$preconfig{$pkgname} or $preconfig{$pkgname} = {};
|
|
||||||
if (exists $preconfig{$pkgname}->{$1}) {
|
|
||||||
$preconfig = $preconfig{$pkgname}->{$1};
|
|
||||||
} else {
|
|
||||||
$preconfig = {
|
|
||||||
id => $1
|
|
||||||
};
|
|
||||||
$preconfig{$pkgname}{$1} = $preconfig unless $src->{ignore};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/^Preconfig-Type:\s*(.*?)\s*$/ and $preconfig->{type} = $1;
|
|
||||||
/^Preconfig-Label:\s*(.*?)\s*$/ and $preconfig->{label} = $1;
|
|
||||||
/^Preconfig-Default:\s*(.*?)\s*$/ and $preconfig->{default} = $1;
|
|
||||||
/^Require-User:\s*(.*?)\s*$/ and do {
|
/^Require-User:\s*(.*?)\s*$/ and do {
|
||||||
my @ugspecs = split /\s+/, $1;
|
my @ugspecs = split /\s+/, $1;
|
||||||
|
|
||||||
|
|
|
@ -372,19 +372,6 @@ sub print_package_overrides() {
|
||||||
sub gen_package_config() {
|
sub gen_package_config() {
|
||||||
parse_package_metadata($ARGV[0]) or exit 1;
|
parse_package_metadata($ARGV[0]) or exit 1;
|
||||||
print "menuconfig IMAGEOPT\n\tbool \"Image configuration\"\n\tdefault n\n";
|
print "menuconfig IMAGEOPT\n\tbool \"Image configuration\"\n\tdefault n\n";
|
||||||
foreach my $preconfig (keys %preconfig) {
|
|
||||||
foreach my $cfg (keys %{$preconfig{$preconfig}}) {
|
|
||||||
my $conf = $preconfig{$preconfig}->{$cfg}->{id};
|
|
||||||
$conf =~ tr/\.-/__/;
|
|
||||||
print <<EOF
|
|
||||||
config UCI_PRECONFIG_$conf
|
|
||||||
string "$preconfig{$preconfig}->{$cfg}->{label}" if IMAGEOPT
|
|
||||||
depends on PACKAGE_$preconfig
|
|
||||||
default "$preconfig{$preconfig}->{$cfg}->{default}"
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print "source \"package/*/image-config.in\"\n";
|
print "source \"package/*/image-config.in\"\n";
|
||||||
if (scalar glob "package/feeds/*/*/image-config.in") {
|
if (scalar glob "package/feeds/*/*/image-config.in") {
|
||||||
print "source \"package/feeds/*/*/image-config.in\"\n";
|
print "source \"package/feeds/*/*/image-config.in\"\n";
|
||||||
|
@ -579,29 +566,6 @@ sub gen_package_mk() {
|
||||||
if ($line ne "") {
|
if ($line ne "") {
|
||||||
print "\n$line";
|
print "\n$line";
|
||||||
}
|
}
|
||||||
foreach my $preconfig (keys %preconfig) {
|
|
||||||
my $cmds;
|
|
||||||
foreach my $cfg (keys %{$preconfig{$preconfig}}) {
|
|
||||||
my $conf = $preconfig{$preconfig}->{$cfg}->{id};
|
|
||||||
$conf =~ tr/\.-/__/;
|
|
||||||
$cmds .= "\techo \"uci set '$preconfig{$preconfig}->{$cfg}->{id}=\$(subst \",,\$(CONFIG_UCI_PRECONFIG_$conf))'\"; \\\n";
|
|
||||||
}
|
|
||||||
next unless $cmds;
|
|
||||||
print <<EOF
|
|
||||||
|
|
||||||
ifndef DUMP_TARGET_DB
|
|
||||||
\$(TARGET_DIR)/etc/uci-defaults/$preconfig: FORCE
|
|
||||||
( \\
|
|
||||||
$cmds \\
|
|
||||||
) > \$@
|
|
||||||
|
|
||||||
ifneq (\$(IMAGEOPT)\$(CONFIG_IMAGEOPT),)
|
|
||||||
package/preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub gen_package_source() {
|
sub gen_package_source() {
|
||||||
|
|
Loading…
Reference in a new issue