Check for a file named .config before actually installing the package. If it does not exist, create a default configuration file before proceeding. This fixes the problem where you get all entries marked as module in the generated configuration file when you use "./scripts/feeds install -d m pkg" to install a package without having a .config file already.
Signed-off-by: Axel Gembe <[EMAIL PROTECTED]> --- scripts/feeds | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/feeds b/scripts/feeds index 78e65ad..e3123a5 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -289,6 +289,10 @@ sub install_package { return $ret; } +sub make_defconfig { + system("make defconfig Config.in >/dev/null 2>/dev/null"); +} + sub refresh_config { my $default = shift; @@ -299,10 +303,15 @@ sub refresh_config { if ($default) { system("make oldconfig CONFDEFAULT=\"$default\" Config.in >/dev/null 2>/dev/null"); } else { - system("make defconfig Config.in >/dev/null 2>/dev/null"); + make_defconfig(); } } +sub check_for_config { + # make sure we have a config file + -f ".config" or make_defconfig(); +} + sub install { my $name; my %opts; @@ -326,6 +335,8 @@ sub install { $opts{p} and $f->[1] eq $opts{p} and $feed = $f; } + check_for_config(); + if($opts{a}) { foreach my $f (@feeds) { if (!defined($opts{p}) or $opts{p} eq $f->[1]) { @@ -345,8 +356,6 @@ sub install { } } - # workaround for timestamp check - # set the defaults if ($opts{d} and $opts{d} =~ /^[ymn]$/) { refresh_config($opts{d}); -- 1.5.5.1 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel