[Initscripts-ng-commits] r596 - in /trunk/src/insserv/debian: changelog patches/00list patches/32_debug_option.dpatch patches/33_nosuse_scripts.dpatch

pere at users.alioth.debian.org pere at users.alioth.debian.org
Fri Feb 8 11:29:41 UTC 2008


Author: pere
Date: Fri Feb  8 11:29:41 2008
New Revision: 596

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=596
Log:
  * New patch 32_debug_option to add new option -D to print debug
    output.
  * New patch 33_nosuse_scripts to disable some SUSE specific. 

Added:
    trunk/src/insserv/debian/patches/32_debug_option.dpatch   (with props)
    trunk/src/insserv/debian/patches/33_nosuse_scripts.dpatch   (with props)
Modified:
    trunk/src/insserv/debian/changelog
    trunk/src/insserv/debian/patches/00list

Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=596&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Fri Feb  8 11:29:41 2008
@@ -16,6 +16,9 @@
   * New patch 50_sign_warning getting rid of some signed/unsigned
     compare issues.
   * Update test suite to the one provided by Werner Fink.
+  * New patch 32_debug_option to add new option -D to print debug
+    output.
+  * New patch 33_nosuse_scripts to disable some SUSE specific. 
 
  -- Petter Reinholdtsen <pere at debian.org>  Fri,  1 Feb 2008 19:45:46 +0100
 

Modified: trunk/src/insserv/debian/patches/00list
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/00list?rev=596&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/00list (original)
+++ trunk/src/insserv/debian/patches/00list Fri Feb  8 11:29:41 2008
@@ -1,5 +1,7 @@
 10_nosuse
 11_more_warnings
 31_debian_conf
+32_debug_option
+33_nosuse_scripts
 40_segfault_virtprov
 50_sign_warning

Added: trunk/src/insserv/debian/patches/32_debug_option.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/32_debug_option.dpatch?rev=596&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/32_debug_option.dpatch (added)
+++ trunk/src/insserv/debian/patches/32_debug_option.dpatch Fri Feb  8 11:29:41 2008
@@ -1,0 +1,104 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 32_debug_option.dpatch by Petter Reinholdtsen <pere at hungry.com>
+
+Implement new option -D instead of the compile time option DEBUG to
+ease debugging.
+
+ at DPATCH@
+--- insserv-1.11.0.orig/insserv.c
++++ insserv-1.11.0/insserv.c
+@@ -107,6 +107,9 @@
+ /* When to be verbose */
+ static boolean verbose = false;
+ 
++/* Enable debug output */
++static int debug = 0;
++
+ /* When to be verbose */
+ static boolean dryrun = false;
+ 
+@@ -1946,6 +1949,7 @@
+     {"config",	1, (int*)0, 'c'},
+     {"dryrun",	0, (int*)0, 'n'},
+     {"default",	0, (int*)0, 'd'},
++    {"debug",	0, (int*)0, 'D'},
+     {"remove",	0, (int*)0, 'r'},
+     {"force",	0, (int*)0, 'f'},
+     {"path",	1, (int*)0, 'p'},
+@@ -1993,7 +1997,7 @@
+     for (c = 0; c < argc; c++)
+ 	argr[c] = (char*)0;
+ 
+-    while ((c = getopt_long(argc, argv, "c:dfrhvno:p:", long_options, (int *)0)) != -1) {
++    while ((c = getopt_long(argc, argv, "c:dDfrhvno:p:", long_options, (int *)0)) != -1) {
+ 	switch (c) {
+ 	    case 'c':
+ 		insconf = optarg;
+@@ -2002,6 +2006,9 @@
+ 	    case 'd':
+ 		defaults = true;
+ 		break;
++	    case 'D':
++		debug++;
++		break;
+ 	    case 'r':
+ 		del = true;
+ 		break;
+@@ -2121,11 +2128,10 @@
+ 	}
+     }
+ 
+-#if defined(DEBUG) && (DEBUG > 0)
+-    for (c = 0; c < argc; c++)
+-	if (argr[c])
+-	    printf("Overwrite argument for %s is %s\n", argv[c], argr[c]);
+-#endif /* DEBUG */
++    if (debug > 0)
++        for (c = 0; c < argc; c++)
++	    if (argr[c])
++	        printf("Overwrite argument for %s is %s\n", argv[c], argr[c]);
+ 
+     /*
+      * Scan and set our configuration for virtual services.
+@@ -2675,10 +2693,10 @@
+     if (maxorder > 99)
+ 	error("Maximum of 99 in ordering reached\n");
+ 
+-#if defined(DEBUG) && (DEBUG > 0)
+-    printf("Maxorder %d\n", maxorder);
+-    show_all();
+-#else
++    if (debug > 0) {
++        printf("Maxorder %d\n", maxorder);
++	show_all();
++    } else {
+ # ifdef SUSE	/* SuSE's SystemV link scheme */
+     pushd(path);
+     for (runlevel = 0; runlevel < RUNLEVLES; runlevel++) {
+@@ -2957,7 +2975,7 @@
+ 	closedir(rcdir);
+     }
+ # endif /* !SUSE, standard SystemV link scheme */
+-#endif  /* !DEBUG */
++    }
+ 
+     /*
+      * Do the makedep
+--- insserv-1.11.0.orig/listing.c
++++ insserv-1.11.0/listing.c
+@@ -454,7 +454,6 @@
+ /*
+  * For debuging: show all services
+  */
+-#if defined(DEBUG) && (DEBUG > 0)
+ void show_all()
+ {
+     list_t *tmp;
+@@ -468,7 +467,6 @@
+ 		   dir->start, dir->name, dir->lvl, lvl2str(dir->lvl), *dir->name == '$' ? "system" : "guessed");
+     }
+ }
+-#endif
+ 
+ /*
+  * Used within loops to get names not included in this runlevel.

Propchange: trunk/src/insserv/debian/patches/32_debug_option.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/src/insserv/debian/patches/33_nosuse_scripts.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/33_nosuse_scripts.dpatch?rev=596&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/33_nosuse_scripts.dpatch (added)
+++ trunk/src/insserv/debian/patches/33_nosuse_scripts.dpatch Fri Feb  8 11:29:41 2008
@@ -1,0 +1,25 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 33_nosuse_scripts.dpatch by Petter Reinholdtsen <pere at hungry.com>
+
+Disable some suse specific code.
+
+ at DPATCH@
+diff -u insserv-1.11.0/insserv.c insserv-1.11.0/insserv.c
+--- insserv-1.11.0/insserv.c
++++ insserv-1.11.0/insserv.c
+@@ -2655,6 +2665,7 @@
+     if (is_loop_detected() && !ignore)
+ 	error("exiting now!\n");
+ 
++#ifdef SUSE
+     /*
+      * Re-order some well known scripts to get
+      * a more stable order collection.
+@@ -2663,6 +2674,7 @@
+      */
+     setorder("route",	(getorder("network") + 2), true);
+     setorder("single",	(getorder("kbd") + 2),	   true);
++#endif /* SUSE */
+ 
+     /*
+      * Be sure that interactive scripts are the only member of

Propchange: trunk/src/insserv/debian/patches/33_nosuse_scripts.dpatch
------------------------------------------------------------------------------
    svn:executable = *




More information about the Initscripts-ng-commits mailing list