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

To trunk or not to trunk (Was: New gen-control for Debian-Edu)



On Mon, 20 Aug 2007, Holger Levsen wrote:

I'm happy to see working code :-)

The attached diff contains two changes (in addition to fix a bug
in the Makefile that contains a space inbetween "./ gen-control"
which I would fix immediately if I had SVN access at the moment).

1. Which is IMHO a reasonable if not necessary enhancement to
   current Debian-Edu packages which adds a "(= ${binary:Version})"
   after each dependency of education-tasks.  This ensures that
   you always have the same set of Debian-Edu meta packages
   which is very reasonable and we had trouble in Debian-Med
   before we cared for the consistent meta package set.

2. If (and only if) there is a directory config containing the
   file control than a further package CDD-config is created.
   Because for the moment in Debian-Edu source there is no such
   directory and file nothing changes in the build.  For Debian-Med
   I decided to switch from the name med-common to med-config
   and can build this package now with the same tools.  For
   CDD-config is the same valid as for CDD-tasks: It has a
   versioned dependency (= ${binary:Version}) and is added
   to the dependency list of every other meta package.

   As I said this does not influence current Debian-Edu packages
   but it offers the possibility to build debian-edu-config
   (which would change the name to education-config in this
   case) together with the meta packages -- in case it is
   decided to do so.

Please comment on the simple patches and whether I should check
this into trunk.

Kind regards

        Andreas.

--
http://fam-tille.de
diff -urbN debian-edu.orig/gen-control debian-edu/gen-control
--- debian-edu.orig/gen-control	2007-08-14 21:19:40.000000000 +0200
+++ debian-edu/gen-control	2007-08-21 23:45:43.000000000 +0200
@@ -5,7 +5,7 @@
 #       Andreas Tille <tille@debian.org>
 # Date:   2001-08-23
 #
-# # $Id: gen-control 37848 2007-08-14 19:19:36Z tille $
+# # $Id: cdd-gen-control 448 2007-08-11 08:02:48Z tille $
 #
 # Generate the control file used by the CDD task package.
 
@@ -42,6 +42,7 @@
 my $cddname       = "" ;
 my $cddshortname  = "" ;
 my $tasksname     = "" ;
+my $hasconfig     = 0 ;
 
 sub usage() {
     print STDERR << "EOF";
@@ -162,6 +163,7 @@
 
 sub gen_control {
     my $task;
+
     for $task (sort keys %taskinfo) {
         print "Package: $task\n";
 
@@ -174,7 +176,14 @@
         if ($nodepends) {
                 # degrade dependencies to recommends
 	        if ( $tasksname ) {
-		    print "Depends: $tasksname\n";
+		    print "Depends: $tasksname";
+		    if ( $tasksname =~ /-tasks$/ ) {
+			print ' (= ${binary:Version})';
+		    }
+		    if ( $hasconfig ) {
+			print ', ' . $prefix . 'config (= ${binary:Version})';
+		    }
+		    print "\n" ;
 	        }
                 # Use common %seenlist, as it is no use listing
                 # packages both in recommends and suggest
@@ -612,4 +621,7 @@
         }
 	close(STUB) ;
     }
+    if  ( -d "config" && -e "config/control" ) {
+	$hasconfig = 1;
+    }
 }
diff -urbN debian-edu.orig/Makefile debian-edu/Makefile
--- debian-edu.orig/Makefile	2007-08-16 08:54:25.000000000 +0200
+++ debian-edu/Makefile	2007-08-22 08:24:23.000000000 +0200
@@ -9,7 +9,8 @@
 
 debian/control: debian/control.stub debian/changelog tasks/* $(SOURCELIST)
 	(cat debian/control.stub; \
-	./ gen-control -s $(TARGET_DIST) -D -c -m -i -A) > $@.new && mv $@.new $@
+	 test -f config/control && cat config/control; \
+	./gen-control -s $(TARGET_DIST) -D -c -m -i -A) > $@.new && mv $@.new $@
 
 tasksel: $(CDD)-tasks.desc
 $(CDD)-tasks.desc: tasks/* debian/changelog

Reply to: