[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#489811: cdd-dev: Should support enhances and test-* tasksel headers



Package: cdd-dev
Version: 0.5.1

The new tasksel support tasks that are enabled when a specific
language is detected, and tasks that enhances other tasks.  These
should be passed on when generating tasksel tasks using cdd-dev.
Here is a draft patch to implement it.  It is slightly tested.

--- /usr/share/cdd-dev/cdd-gen-control  2008-02-07 11:52:38.000000000 +0100
+++ cdd-gen-control     2008-07-08 00:07:38.000000000 +0200
@@ -243,6 +243,14 @@
                 print "Description: $taskinfo{$task}{Description}\n";
                 print "$taskinfo{$task}{'Description-long'}"; # Already contain newline
                 print "Relevance: 10\n";
+                print "Enhances: $taskinfo{$task}{Enhances}\n"
+                    if exists $taskinfo{$task}{Enhances};
+                for my $header (keys %{$taskinfo{$task}}) {
+print "Testheader: '$header'\n";
+                    if ($header =~ m/test-.+/i) {
+                        print "$header: $taskinfo{$task}{$header}\n";
+                    }
+                }
                 print "Key: \n";
                 print " $task\n";
                 my %seen;
@@ -435,12 +443,10 @@
         $line =~ s/\s+$//;

         $_ = $line;
-        $taskinfo{$curpkg}{'Section'}      = $1 if (m/^Section:\s+(.+)$/);
-        $taskinfo{$curpkg}{'Architecture'} = $1 if (m/^Architecture:\s+(.+)$/);
-
-        $taskinfo{$curpkg}{'Priority'}     = $1 if (m/^Priority:\s+(.+)$/);
-
-        $taskinfo{$curpkg}{'Leaf'}         = $1 if (m/^Leaf:\s+(.+)$/);
+        for my $header (qw(Section, Architecture Priority Leaf Enhances)) {
+            $taskinfo{$curpkg}{$header} = $1 if (m/^$header:\s+(.+)$/);
+        }
+        $taskinfo{$curpkg}{$1} = $2 if (m/^(test-.+):\s+(.+)$/i);

         if (m/^Description:\s+(.+)$/) {
             $taskinfo{$curpkg}{'Description'} = $1;

Happy hacking,
-- 
Petter Reinholdtsen



Reply to: