瀏覽代碼

add DIFF #define

Wichert Akkerman 24 年之前
父節點
當前提交
6a9ed76db3
共有 3 個文件被更改,包括 11 次插入4 次删除
  1. 6 1
      ChangeLog
  2. 1 0
      include/dpkg.h.in
  3. 4 3
      main/configure.c

+ 6 - 1
ChangeLog

@@ -1,3 +1,8 @@
+Sun Apr 21 12:23:40 CEST 2002 Wichert Akkerman <wichert@deephackmode.org>
+
+  * include/dpkg.h.in: add DIFF #define
+  * main/configure.c: use it
+
 Sun Apr 14 16:13:16 CEST 2002 Wichert Akkerman <wichert@deephackmode.org>
 
   * man/en/deb-old.5.sgml: DocBook version of deb-old manpage
@@ -7,7 +12,7 @@ Sun Apr 14 16:13:16 CEST 2002 Wichert Akkerman <wichert@deephackmode.org>
 
 Sun Apr 14 00:49:09 CEST 2002 Wichert Akkerman <wichert@deephackmode.org>
 
-  * scripts/controlllib.pl: accept multilpe consectucive empty lines
+  * scripts/controlllib.pl: accept multilpe consecutive empty lines
 
 Sat Apr 13 22:59:25 CEST 2002 Wichert Akkerman <wichert@deephackmode.org>
 

+ 1 - 0
include/dpkg.h.in

@@ -129,6 +129,7 @@
 #define RM		"rm"
 #define FIND		"find"
 #define SHELL		"sh"
+#define DIFF		"diff"
 
 #define SHELLENVIR	"SHELL"
 

+ 4 - 3
main/configure.c

@@ -2,7 +2,8 @@
  * dpkg - main program for package management
  * configure.c - configure packages
  *
- * Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk>
+ * Copyright 1995 Ian Jackson <iwj10@cus.cam.ac.uk>
+ * Copyright 1999 Wichert Akkerman <wichert@deephackmode.org>
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as
@@ -316,11 +317,11 @@ void deferred_configure(struct pkginfo *pkg) {
 	      char cmdbuf[1024];
 	      p= getenv(PAGERENV);
 	      if (!p || !*p) p= DEFAULTPAGER;
-	      sprintf(cmdbuf, "diff -Nu %.250s %.250s | %.250s", cdr.buf, cdr2.buf, p);
+	      sprintf(cmdbuf, DIFF " -Nu %.250s %.250s | %.250s", cdr.buf, cdr2.buf, p);
               s= getenv(SHELLENV);
               if (!s || !*s) s= DEFAULTSHELL;
 	      execlp(s,s,"-c", cmdbuf, NULL);
-              ohshite(_("failed to run diff (%.250s)"), cmdbuf);
+              ohshite(_("failed to run %s (%.250s)"), DIFF, cmdbuf);
 	    }
             while ((r= waitpid(c1,&status,0)) == -1 && errno == EINTR);
             if (r != c1) { onerr_abort++; ohshite(_("wait for shell failed")); }