On 2012-07-22 6:38 PM, Matthias Buecher / Germany wrote:
> A) Use `sort -u` instead of just `uniq`
> B) First add kernel packages alphabetically sorted, then all others 
> alphabetically sorted.
>    This allows other packages to override kernel configs if necessary.
> 
> Note: If find has no action for matches then also pruned folders are included 
> in the result list, therefore specify the default action -print explicitly.
> 
> Signed-off-by: Matthias Bücher <m...@maddes.net>
> 
> 
> 
> Additional info:
> The current order of packages in tmp/.packageinfo (and targets in 
> tmp/.targetinfo) is random.
> This is a problem when a package has to override a kernel config.
> For example the nfs-root package I currently work on has to set 
> CONFIG_NFS_FS=y to work properly, so the package has to be after kmod-fs-nfs 
> (CONFIG_NFS_FS=m) which is not possible with a random order.
> Patch is attached to avoid mangling (as with first sent mail), and following 
> as text for review/comments.
Relying on a particular sorting of packages is just a hack, not a real 
solution. Are you sure that the order actually matters? If so, please
test this patch, it should fix the issue regardless of the scan order:
---
--- a/scripts/kconfig.pl
+++ b/scripts/kconfig.pl
@@ -73,7 +73,10 @@ sub config_add($$$) {
                my %cfg = %$_;
                
                foreach my $config (keys %cfg) {
-                       next if $mod_plus and $config{$config} and 
$config{$config} eq "y";
+                       if ($mod_plus and $config{$config}) {
+                               next if $config{$config} eq "y";
+                               next if $cfg{$config} eq '#undef';
+                       }
                        $config{$config} = $cfg{$config};
                }
        }

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to