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

proposing gpr 0.9deb-4sarge for Debian 3.1r1



hi

I hereby propose gpr 0.9deb-4sarge
for inclusion in the next point release of stable

Reason:

gpr can install a wrapper in place of the command lpr (by using a
diversion). The wrapper will
call the real lpr command if: either it is called from a terminal, or
there is no access to an X DISPLAY; otherwise it will call gpr.

Unfortunately, due to a bug, the diversion of lpr with gpr did not
work (it would loop endlessly); in that case gpr would become
completly useless.

(Curiosly the people who noted did not ever file a bug report)

I uploaded 0.9deb-5 into sarge before the freeze but it did not make
it in :-( :-( and I did not notice that :-( :-(

So this upload is for sarge.

I also disabled the automatic update of config.{sub,guess} for paranoia.

The attached diff shows the difference between this package
and the current version in sarge.

thanks

a.
diff -ur sarge/gpr-0.9deb/debian/changelog sarge-proposed-update/gpr-0.9deb/debian/changelog
--- sarge/gpr-0.9deb/debian/changelog	2005-03-20 10:42:54.000000000 +0100
+++ sarge-proposed-update/gpr-0.9deb/debian/changelog	2005-07-09 11:23:19.177332112 +0200
@@ -1,3 +1,14 @@
+gpr (0.9deb-4sarge) stable; urgency=low
+
+  * the diversion of lpr with gpr did not work (it would loop endlessly)
+    (curiosly the people who noted did not file a bug report)
+    in that case gpr would become completly useless; I uploaded 0.9deb-5 into 
+    sarge before the freeze but it did not make it in :-(  :-( 
+    and I did not that  :-(  :-(   so this upload is for sarge.
+    I also disabled the automatic update of config.{sub,guess} for paranoia
+
+ -- A Mennucc1 <mennucc1@debian.org>  Sat,  9 Jul 2005 11:01:49 +0200
+
 gpr (0.9deb-4) unstable; urgency=low
 
   * increase line to read printcap as suggested by
Only in sarge-proposed-update/gpr-0.9deb/debian: changelog~
diff -ur sarge/gpr-0.9deb/debian/lpr.wrapper sarge-proposed-update/gpr-0.9deb/debian/lpr.wrapper
--- sarge/gpr-0.9deb/debian/lpr.wrapper	2005-03-17 00:05:17.000000000 +0100
+++ sarge-proposed-update/gpr-0.9deb/debian/lpr.wrapper	2005-07-09 11:03:51.058913104 +0200
@@ -6,6 +6,7 @@
 
 test -t 1 && exec $lpr "$@"
 
+test "$DO_NOT_CALL_GPR_INSTEAD_OF_LPR" = yes  && exec $lpr "$@"
 #for i in "$@" ;
 # case $i in 
 #   -P)  continue;;
@@ -15,4 +16,7 @@
 #   -d)  continue;;
 #done
 
+DO_NOT_CALL_GPR_INSTEAD_OF_LPR=yes
+export DO_NOT_CALL_GPR_INSTEAD_OF_LPR
+
 exec gpr "$@"
diff -ur sarge/gpr-0.9deb/debian/rules sarge-proposed-update/gpr-0.9deb/debian/rules
--- sarge/gpr-0.9deb/debian/rules	2005-03-17 00:05:16.000000000 +0100
+++ sarge-proposed-update/gpr-0.9deb/debian/rules	2005-07-09 11:23:32.576295160 +0200
@@ -29,12 +29,12 @@
 build-stamp:
 	dh_testdir
 
-	test -r /usr/share/misc/config.sub -a \
-                 config.sub -ot /usr/share/misc/config.sub && \
-	   cp -vf /usr/share/misc/config.sub config.sub || true
-	test -r /usr/share/misc/config.guess -a \
-                 config.guess -ot /usr/share/misc/config.guess && \
-	   cp -vf /usr/share/misc/config.guess config.guess || true
+	#test -r /usr/share/misc/config.sub -a \
+        #         config.sub -ot /usr/share/misc/config.sub && \
+	#   cp -vf /usr/share/misc/config.sub config.sub || true
+	#test -r /usr/share/misc/config.guess -a \
+        #         config.guess -ot /usr/share/misc/config.guess && \
+	#   cp -vf /usr/share/misc/config.guess config.guess || true
 	#
 	# avoid time skews
 	touch configure.in && 	touch aclocal.m4 && 	touch configure
Only in sarge-proposed-update/gpr-0.9deb/debian: rules~
diff -ur sarge/gpr-0.9deb/src/main.c sarge-proposed-update/gpr-0.9deb/src/main.c
--- sarge/gpr-0.9deb/src/main.c	2005-03-17 00:05:10.000000000 +0100
+++ sarge-proposed-update/gpr-0.9deb/src/main.c	2005-07-09 11:10:26.435806680 +0200
@@ -103,15 +103,24 @@
   char curr_line[200];	/* the current line of input from stdin */
   struct stat info;	/* file info, used to see if file is piped 
 			   from an app */
-  if (!strcmp(argv[0], "lpr")) {
-    cmdname = "lpr.orig -P";
+
+  //Mennucc: in Debian, gpr may divert lpr to a script that calls gpr
+  //   this command line avoids looping
+  {
+    struct stat buf;
+    if ( 0==stat("/usr/bin/lpr.not.gpr", &buf ) ) {
+      cmdname = "/usr/bin/lpr.not.gpr -P";
+    }
+  }
+  // Mennucc: this seems to be an obvious error
+  if (0==strcmp(argv[0], "lpr")) {
     if (getenv("DISPLAY") == NULL) {
       char **vars = malloc(sizeof(char *) * (argc + 1));
       int i;
       vars[argc] = NULL;
       for (i = 0; i < argc; i++)
 	vars[i] = argv[i];
-      execvp("lpr.orig", vars);
+      execvp("/usr/bin/lpr.not.gpr", vars);
       // exec failed
       perror("gpr");
       exit(1);

Attachment: signature.asc
Description: Digital signature


Reply to: