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

Bug#273801: education-tasks: installs general file which might lead to name space problems



tags 273801 + patch
thanks

I had a look at this issue, and the fact that the task recommends and
suggests are ignored in the tasksel tasks.  Here is a proposed fix,
both getting rid of the generic name (did anyone add it to tasksel?
Should the tasksel method be added?), and also make sure the
"important" packages in a task are listed as key packages, while all
the others are listed as task packages.

It is slightly tested, but the beta3 d-i transition blocks me from
testing it fully using a debian-edu test CD.

Cc to Joey Hess, hoping he can have a look to check if this approach
is sane.

  * Rewrote how the tasksel tasks are generated.  The existing
    packages listed as dependencies are now key packages in the task,
    and missing, recommended and suggested packages are now listed as
    task packages using the 'list' method.

Index: debian/rules
===================================================================
--- debian/rules        (revision 7820)
+++ debian/rules        (working copy)
@@ -21,8 +21,6 @@
        dh_installdirs

        dh_install debian-edu-tasks.desc usr/share/tasksel
-       dh_install tasksel/* usr/share/tasksel/task-files
-       dh_install task-files usr/lib/tasksel/packages

 # Build architecture-independent files here.
 binary-indep: build install
Index: gen-control
===================================================================
--- gen-control (revision 7820)
+++ gen-control (working copy)
@@ -143,6 +143,8 @@
     }
 }

+# List all depends as key packages, and recommends and suggests
+# packages as nice to have.
 sub print_task_desc {
        if (! -d "tasksel") {
                mkdir("tasksel") || die "mkdir tasksel: $!";
@@ -156,21 +158,26 @@
                print "Section: debian-edu\n";
                print "Description: $taskinfo{$task}{Description}\n";
                print "$taskinfo{$task}{'Description-long'}"; # Already contain newline
-               print "Packages: task-files\n";
                print "Relevance: 10\n";
                print "Key: \n";
                print " $task\n";
-
-               print "\n";
-
-               open (OUT, ">tasksel/$task") || die "tasksel/$task: $!";
-               print OUT "$task\n";
                my %seen;
-               foreach my $package (task_packages($task, "Depends")) {
-                       print OUT "$package\n" unless $seen{$package};
+               $seen{$task} = 1;
+               if (1) { # Enable to list all dependencies as key packages
+                   foreach my $package (task_packages($task, "Depends")) {
+                       print " $package\n" unless $seen{$package};
                        $seen{$package} = 1;
+                   }
                }
-               close OUT;
+               print "Packages: list\n";
+               for my $header (qw(Depends Recommends Suggests)) {
+                   foreach my $package (task_packages($task, $header)) {
+                       print " $package\n" unless $seen{$package};
+                       $seen{$package} = 1;
+                   }
+               }
+
+               print "\n";
        }
 }




Reply to: