Parcourir la source

From the ChangeLog
* debian/control: add Build-Depends
* THANKS: new file which lists everyone who contributed to the code
* Change `Debian Linux' to `Debian GNU/Linux' in a couple of manpages
* main/enquiry.c: modify list1package to use the full width of the tty
* Merge patches from Adam Heath:
+ lib/mlib.c: new function do_fd_copy to read a file into a fd
+ dpkg-deb/build.c: use do_fd_copy
+ dpkg-deb/build.c: use dpkg-deb-filelist to reorder files when
building a package
+ dpkg-deb/info.c: use do_fd_copy
+ lib/showcright.c: use do_fd_copy to read license
+ scripts/dpkg-safelist.{1,pl}: new script to reorder a filelist to
make sure symlinks are listed after their targets.
+ dpkg-deb/main.c: add -z option to set compression level
+ dpkg-deb/build.c: pass new -z options to gzip
* dpkg-deb/dpkg-deb.1: document new -z option

Wichert Akkerman il y a 26 ans
Parent
commit
ef5a6bb593
18 fichiers modifiés avec 211 ajouts et 41 suppressions
  1. 23 0
      ChangeLog
  2. 50 0
      THANKS
  3. 5 0
      debian/changelog
  4. 2 0
      debian/control
  5. 1 1
      debian/rules
  6. 25 14
      dpkg-deb/build.c
  7. 6 0
      dpkg-deb/dpkg-deb.1
  8. 2 0
      dpkg-deb/dpkg-deb.h
  9. 1 5
      dpkg-deb/info.c
  10. 3 0
      dpkg-deb/main.c
  11. 3 0
      include/dpkg.h.in
  12. 44 0
      lib/mlib.c
  13. 1 3
      lib/showcright.c
  14. 32 8
      main/enquiry.c
  15. 7 6
      main/main.c
  16. 4 2
      scripts/Makefile.in
  17. 1 1
      scripts/dpkg-name.1
  18. 1 1
      scripts/dpkg-scanpackages.8

+ 23 - 0
ChangeLog

@@ -1,3 +1,26 @@
+Fri Dec 24 15:35:29 CET 1999 Wichert Akkerman <wakkerma@debian.org>
+
+  * debian/control: add Build-Depends
+  * THANKS: new file which lists everyone who contributed to the code
+  * Change `Debian Linux' to `Debian GNU/Linux' in a couple of manpages
+  * main/enquiry.c: modify list1package to use the full width of the tty
+  * Merge patches from Adam Heath:
+    + lib/mlib.c: new function do_fd_copy to read a file into a fd
+    + dpkg-deb/build.c: use do_fd_copy
+    + dpkg-deb/build.c: use dpkg-deb-filelist to reorder files when
+      building a package
+    + dpkg-deb/info.c: use do_fd_copy 
+    + lib/showcright.c: use do_fd_copy to read license
+    + scripts/dpkg-safelist.{1,pl}: new script to reorder a filelist to
+      make sure symlinks are listed after their targets. 
+    + dpkg-deb/main.c: add -z option to set compression level
+    + dpkg-deb/build.c: pass new -z options to gzip
+  * dpkg-deb/dpkg-deb.1: document new -z option
+
+Wed Dec 22 13:41:41 CET 1999 Wichert Akkerman <wakkerma@debian.org>
+
+  * main/main.c: cleanup printversion
+
 Wed Dec 22 12:07:40 CET 1999 Wichert Akkerman <wakkerma@debian.org>
 Wed Dec 22 12:07:40 CET 1999 Wichert Akkerman <wakkerma@debian.org>
 
 
   * debian/dpkg-doc.postrm: Use doc-name instead of file-name (probably
   * debian/dpkg-doc.postrm: Use doc-name instead of file-name (probably

+ 50 - 0
THANKS

@@ -0,0 +1,50 @@
+Adam Heath <doogie<debian.org>
+Andrew Hobson <ahobson@eng.mindspring.net>
+Ben Collins <bcollins@debian.org>
+Branko Lankester
+Bruce Perens <bruce@pixar.com>
+Carl Streeter <streeter@cae.wisc.edu>
+Charles Briscoe-Smith <cpb4@ukc.ac.uk>
+Charles Briscoe-Smith <cpbs@debian.org>
+Christophe Le Bars <clebars@teaser.fr>
+Colin Plumb
+Dan Gohman <gohmandj@mrs.umn.edu>
+Darren Stalder <torin@daft.com>
+Erick Branderhorst <branderhorst@heel.fgg.eur.nl>
+Galen Hazelwood <galenh@debian.org>
+Guy Maor <maor@debian.org>
+Heiko Schlittermann <heiko@lotte.sax.de>
+Ian Jackson <ian@chiark.chu.cam.ac.uk>
+Ian Murdock <imurdock@debian.org>
+J.H.M. Dassen <jdassen@cistron.nl>
+Jim Pick <jim@jimpick.com>
+Jim Van Zandt <jrv@vanzandt.mv.com>
+Jim Van Zandt <jrv@vanzandt.mv.com>
+Joel Klecker <jk@espy.org>
+Josip Rodin <joy@cibalia.gkvk.hr>
+Juan Cespedes <cespedes@debian.org>
+Juan Cespedes <cespedes@debian.org>
+Juergen Menden <menden@morgana.camelot.de>
+Juho Vuori <javuori@cc.helsinki.fi>
+Kim-Minh Kaplan <kkaplan@cdfhp3.in2p3.fr>
+Klee Dienes <klee@debian.org>
+Marcus Brinkmann <brinkmd@debian.org> 
+Masato Taruishi <taru@debian.or.jp>
+Matt Welsh <mdw@sunsite.unc.edu>
+Michael Alan Dorman <mdorman@calder.med.miami.edu>
+Michael Shields <shields@crosslink.net>
+Michael Sobolev <mss@transas.com>
+Miquel van Smoorenburg <miquels@cistron.nl>
+Nicolás Lichtmaier <nick@debian.org>
+Nils Rennebarth <nils@debian.org>
+Peter Karlsson <pk@mds.mdh.se>
+Petr Cech <cech@atrey.karlin.mff.cuni.cz>
+Piotr Roszatycki <dexter@fnet.pl>
+Raphael Hertzog <rhertzog@hrnet.fr>
+Richard Kettlewell <rjk@sfere.greenend.org.uk>
+Roderick Schertler <roderick@argon.org>
+Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
+Scott Barker
+Tom Lees <tom@lpsg.demon.co.uk>
+Topi Miettinen <Topi.Miettinen@nic.fi>
+Wichert Akkerman <wakkerma@debian.org>

+ 5 - 0
debian/changelog

@@ -4,6 +4,11 @@ dpkg (1.6.5) unstable; urgency=low
   * Correctly unregister internals manual, Closes: Bug# 53200
   * Correctly unregister internals manual, Closes: Bug# 53200
   * dselect helpessages can be translated now, Closes: Bug# 51381
   * dselect helpessages can be translated now, Closes: Bug# 51381
   * dselect UI tweaks, including a new --expert mode
   * dselect UI tweaks, including a new --expert mode
+  * Added build-depends, Closes: Bug# 53394
+  * Added THANKS-file with people who have contributed to the code
+  * Use full width of tty in packagelisting, Closes: Bug# 53395
+  * Add -z option to dpkg-deb to set compressionlevel when building
+    packages, Closes: Bug# 53398
 
 
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
 
 

+ 2 - 0
debian/control

@@ -3,6 +3,8 @@ Section: base
 Priority: required
 Priority: required
 Maintainer: Wichert Akkerman <wakkerma@debian.org>
 Maintainer: Wichert Akkerman <wakkerma@debian.org>
 Standards-Version: 3.1.0
 Standards-Version: 3.1.0
+Build-Depends: debiandoc-sgml, ncurses-dev
+
 
 
 Package: dpkg
 Package: dpkg
 Architecture: any
 Architecture: any

+ 1 - 1
debian/rules

@@ -74,7 +74,7 @@ binary-dpkg: stamp-binary
 	set -e ; for i in dpkg dpkg-deb dpkg-split md5sum dselect ; do \
 	set -e ; for i in dpkg dpkg-deb dpkg-split md5sum dselect ; do \
 		mv $(TMP)/usr/bin/$$i $(TMP_DPKG)/usr/bin/ ; \
 		mv $(TMP)/usr/bin/$$i $(TMP_DPKG)/usr/bin/ ; \
 	done
 	done
-	set -e ; for i in ChangeLog TODO copyright ; do \
+	set -e ; for i in ChangeLog THANKS TODO copyright ; do \
 		mv $(TMP)/usr/share/doc/dpkg/$$i $(TMP_DPKG)/usr/share/doc/dpkg/ ; \
 		mv $(TMP)/usr/share/doc/dpkg/$$i $(TMP_DPKG)/usr/share/doc/dpkg/ ; \
 	done
 	done
 	set -e ; for i in "" ja ; do \
 	set -e ; for i in "" ja ; do \

+ 25 - 14
dpkg-deb/build.c

@@ -252,12 +252,8 @@ void do_build(const char *const *argv) {
   }                
   }                
                 
                 
   if (lseek(gzfd,0,SEEK_SET)) ohshite(_("failed to rewind tmpfile (control)"));
   if (lseek(gzfd,0,SEEK_SET)) ohshite(_("failed to rewind tmpfile (control)"));
-  if (!(c3= m_fork())) {
-    m_dup2(gzfd,0); m_dup2(fileno(ar),1);
-    execlp(CAT,"cat",(char*)0); ohshite(_("failed to exec cat (control)"));
-  }
-  waitsubproc(c3,"cat (control)",0);
-  
+  do_fd_copy(gzfd, fileno(ar), _("control"));
+
   if (!oldformatflag) {
   if (!oldformatflag) {
     fclose(gz);
     fclose(gz);
     if ((gzfd= mkstemp(tfbuf)) == -1) ohshite(_("failed to make tmpfile (data)"));
     if ((gzfd= mkstemp(tfbuf)) == -1) ohshite(_("failed to make tmpfile (data)"));
@@ -270,23 +266,42 @@ void do_build(const char *const *argv) {
     strcpy(tfbuf,envbuf);
     strcpy(tfbuf,envbuf);
     strcat(tfbuf,"/dpkg.XXXXXX");
     strcat(tfbuf,"/dpkg.XXXXXX");
   }
   }
+  m_pipe(p1);
+  if (!(c3= m_fork())) {
+    m_dup2(p1[1],1); close(p1[0]); close(p1[1]);
+    if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
+    execlp(SAFEFILELIST,"dpkg-deb-filelist",(char*)0);
+    ohshite(_("failed to exec dpkg-deb-filelist"));
+  }
+  close(p1[1]);
   m_pipe(p2);
   m_pipe(p2);
   if (!(c4= m_fork())) {
   if (!(c4= m_fork())) {
-    m_dup2(p2[1],1); close(p2[0]); close(p2[1]);
+    m_dup2(p2[1],1); m_dup2(p1[0],0); close(p2[0]); close(p2[1]);
     if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
     if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
-    execlp(TAR,"tar","--exclude",BUILDCONTROLDIR,"-cf","-",".",(char*)0);
+    execlp(TAR,"tar","--no-recursion", "--exclude",BUILDCONTROLDIR,"-T","-","-cf","-",(char*)0);
     ohshite(_("failed to exec tar --exclude"));
     ohshite(_("failed to exec tar --exclude"));
   }
   }
   close(p2[1]);
   close(p2[1]);
+  close(p1[0]);
   if (!(c5= m_fork())) {
   if (!(c5= m_fork())) {
+    char *combuf;
     m_dup2(p2[0],0); close(p2[0]);
     m_dup2(p2[0],0); close(p2[0]);
     m_dup2(oldformatflag ? fileno(ar) : gzfd,1);
     m_dup2(oldformatflag ? fileno(ar) : gzfd,1);
-    execlp(GZIP,"gzip","-9c",(char*)0);
+    combuf = strdup("-9c");
+    if(compression != NULL) {
+      if(*compression = '0') {
+	do_fd_copy(0, 1, _("no compression copy loop"));
+	exit(0);
+      }
+      combuf[1] = *compression;
+    }
+    execlp(GZIP,"gzip",combuf,(char*)0);
     ohshite(_("failed to exec gzip -9c from tar --exclude"));
     ohshite(_("failed to exec gzip -9c from tar --exclude"));
   }
   }
   close(p2[0]);
   close(p2[0]);
   waitsubproc(c5,"gzip -9c from tar --exclude",0);
   waitsubproc(c5,"gzip -9c from tar --exclude",0);
   waitsubproc(c4,"tar --exclude",0);
   waitsubproc(c4,"tar --exclude",0);
+  waitsubproc(c3,"dpkg-deb-filelist",0);
   if (!oldformatflag) {
   if (!oldformatflag) {
     if (fstat(gzfd,&datastab)) ohshite("_(failed to fstat tmpfile (data))");
     if (fstat(gzfd,&datastab)) ohshite("_(failed to fstat tmpfile (data))");
     if (fprintf(ar,
     if (fprintf(ar,
@@ -298,11 +313,7 @@ void do_build(const char *const *argv) {
       werr(debar);
       werr(debar);
 
 
     if (lseek(gzfd,0,SEEK_SET)) ohshite(_("failed to rewind tmpfile (data)"));
     if (lseek(gzfd,0,SEEK_SET)) ohshite(_("failed to rewind tmpfile (data)"));
-    if (!(c3= m_fork())) {
-      m_dup2(gzfd,0); m_dup2(fileno(ar),1);
-      execlp(CAT,"cat",(char*)0); ohshite(_("failed to exec cat (data)"));
-    }
-    waitsubproc(c3,"cat (data)",0);
+    do_fd_copy(gzfd, fileno(ar), _("data"));
 
 
     if (datastab.st_size & 1)
     if (datastab.st_size & 1)
       if (putc('\n',ar) == EOF)
       if (putc('\n',ar) == EOF)

+ 6 - 0
dpkg-deb/dpkg-deb.1

@@ -60,6 +60,12 @@ appear in the binary package's filesystem archive, but instead
 the files in it will be put in the binary package's control
 the files in it will be put in the binary package's control
 information area.
 information area.
 
 
+You can specify the compressionlevel used by adding a
+.B \-z#
+option.
+.B dpkg-deb
+will pass that option on to gzip.
+
 Unless you specify
 Unless you specify
 .BR \-\-nocheck ", " dpkg\-deb "
 .BR \-\-nocheck ", " dpkg\-deb "
 will read
 will read

+ 2 - 0
dpkg-deb/dpkg-deb.h

@@ -33,6 +33,8 @@ extern dofunction *action;
 void extracthalf(const char *debar, const char *directory,
 void extracthalf(const char *debar, const char *directory,
                  const char *taroption, int admininfo);
                  const char *taroption, int admininfo);
 
 
+extern char *compression;
+
 #define DEBMAGIC     "!<arch>\ndebian-binary   "
 #define DEBMAGIC     "!<arch>\ndebian-binary   "
 #define ADMINMEMBER		"control.tar.gz  "
 #define ADMINMEMBER		"control.tar.gz  "
 #define ADMINMEMBER_COMPAT	"control.tar.gz/ "
 #define ADMINMEMBER_COMPAT	"control.tar.gz/ "

+ 1 - 5
dpkg-deb/info.c

@@ -90,11 +90,7 @@ static void info_spew(const char *debar, const char *directory,
   while ((component= *argv++) != 0) {
   while ((component= *argv++) != 0) {
     co= fopen(component,"r");
     co= fopen(component,"r");
     if (co) {
     if (co) {
-      if (!(c1= m_fork())) {
-        m_dup2(fileno(co),0);
-        execlp(CAT,"cat",(char*)0); ohshite(_("failed to exec cat component"));
-      }
-      waitsubproc(c1,"cat component",0);
+      do_fd_copy(fileno(co), 1, _("info_spew"));
     } else if (errno == ENOENT) {
     } else if (errno == ENOENT) {
       if (fprintf(stderr, _("dpkg-deb: `%.255s' contains no control component `%.255s'\n"),
       if (fprintf(stderr, _("dpkg-deb: `%.255s' contains no control component `%.255s'\n"),
                   debar, component) == EOF) werr("stderr");
                   debar, component) == EOF) werr("stderr");

+ 3 - 0
dpkg-deb/main.c

@@ -66,6 +66,7 @@ Usage: dpkg-deb -b|--build <directory> [<deb>]    Build an archive.\n\
 <cfield> is the name of a field in the main `control' file.\n\
 <cfield> is the name of a field in the main `control' file.\n\
 Options:  -D for debugging output; --old or --new controls archive format;\n\
 Options:  -D for debugging output; --old or --new controls archive format;\n\
           --nocheck to suppress control file check (build bad package).\n\
           --nocheck to suppress control file check (build bad package).\n\
+          -z# to set the compression when building
 \n\
 \n\
 Use `dpkg' to install and remove packages from your system, or\n\
 Use `dpkg' to install and remove packages from your system, or\n\
 `dselect' for user-friendly package management.  Packages unpacked\n\
 `dselect' for user-friendly package management.  Packages unpacked\n\
@@ -79,6 +80,7 @@ const char printforhelp[]=
      "Type dpkg --help for help about installing and deinstalling packages.");
      "Type dpkg --help for help about installing and deinstalling packages.");
 
 
 int debugflag=0, nocheckflag=0, oldformatflag=BUILDOLDPKGFORMAT;
 int debugflag=0, nocheckflag=0, oldformatflag=BUILDOLDPKGFORMAT;
+const char* compression=NULL;
 const struct cmdinfo *cipaction=0;
 const struct cmdinfo *cipaction=0;
 dofunction *action=0;
 dofunction *action=0;
 
 
@@ -118,6 +120,7 @@ static const struct cmdinfo cmdinfos[]= {
   { "old",           0,   0,  &oldformatflag, 0,  0,            1  },
   { "old",           0,   0,  &oldformatflag, 0,  0,            1  },
   { "debug",        'D',  0,  &debugflag,     0,  0,            1  },
   { "debug",        'D',  0,  &debugflag,     0,  0,            1  },
   { "nocheck",       0,   0,  &nocheckflag,   0,  0,            1  },
   { "nocheck",       0,   0,  &nocheckflag,   0,  0,            1  },
+  { "compression",  'z',  1,  0,   &compression,  0,            1  },
   { "help",         'h',  0,  0, 0,               helponly         },
   { "help",         'h',  0,  0, 0,               helponly         },
   { "version",       0,   0,  0, 0,               versiononly      },
   { "version",       0,   0,  0, 0,               versiononly      },
   { "licence",       0,   0,  0, 0,               showcopyright    }, /* UK spelling */
   { "licence",       0,   0,  0, 0,               showcopyright    }, /* UK spelling */

+ 3 - 0
include/dpkg.h.in

@@ -120,6 +120,7 @@
 #define DSELECT      "dselect"
 #define DSELECT      "dselect"
 #define DPKG         "dpkg"
 #define DPKG         "dpkg"
 
 
+#define SAFEFILELIST "dpkg-safefilelist"
 #define TAR          "tar"
 #define TAR          "tar"
 #define GZIP         "gzip"
 #define GZIP         "gzip"
 #define CAT          "cat"
 #define CAT          "cat"
@@ -197,6 +198,8 @@ void m_pipe(int fds[2]);
 void checksubprocerr(int status, const char *description, int sigpipeok);
 void checksubprocerr(int status, const char *description, int sigpipeok);
 void waitsubproc(pid_t pid, const char *description, int sigpipeok);
 void waitsubproc(pid_t pid, const char *description, int sigpipeok);
 
 
+int do_fd_copy(int fd1, int fd2, char *desc);
+
 extern volatile int onerr_abort;
 extern volatile int onerr_abort;
 
 
 /*** from showcright.c ***/
 /*** from showcright.c ***/

+ 44 - 0
lib/mlib.c

@@ -122,3 +122,47 @@ void waitsubproc(pid_t pid, const char *description, int sigpipeok) {
   if (r != pid) { onerr_abort++; ohshite(_("wait for %s failed"),description); }
   if (r != pid) { onerr_abort++; ohshite(_("wait for %s failed"),description); }
   checksubprocerr(status,description,sigpipeok);
   checksubprocerr(status,description,sigpipeok);
 }
 }
+
+int do_fd_copy(int fd1, int fd2, char *desc) {
+    char *buf, *sbuf;
+    int count;
+    char *er_msg_1 = _("failed to allocate buffer for copy (%s)");
+    char *er_msg_2 = _("failed in copy on write (%s)");
+    char *er_msg_3 = _("failed in copy on read (%s)");
+
+    count = strlen(er_msg_1) + strlen(desc) + 1;
+    sbuf = malloc(count);
+    if(sbuf == NULL)
+	ohshite(_("failed to allocate buffer for snprintf 1"));
+    snprintf(sbuf, count, er_msg_1, desc);
+    sbuf[count-1] = 0;
+
+    buf = malloc(32768);
+    if(buf == NULL)
+	ohshite(sbuf);
+    free(sbuf);
+
+    count = strlen(er_msg_2) + strlen(desc) + 1;
+    sbuf = malloc(count);
+    if(sbuf == NULL)
+	ohshite(_("failed to allocate buffer for snprintf 2"));
+    snprintf(sbuf, count, er_msg_2, desc);
+    sbuf[count-1] = 0;
+
+    while((count = read(fd1, buf, 32768)) > 0)
+	if(write(fd2, buf, count) < count)
+		ohshite(sbuf);
+
+    free(sbuf);
+    count = strlen(er_msg_3) + strlen(desc) + 1;
+    sbuf = malloc(count);
+    if(sbuf == NULL)
+	ohshite(_("failed to allocate buffer for snprintf 2"));
+    snprintf(sbuf, count, er_msg_3, desc);
+    sbuf[count-1] = 0;
+
+    if(count < 0)
+	ohshite(_("failed in copy on read (control)"));
+    free(sbuf);
+    free(buf);
+}

+ 1 - 3
lib/showcright.c

@@ -29,7 +29,5 @@ void showcopyright(const struct cmdinfo *c, const char *v) {
   int fd;
   int fd;
   fd= open(COPYINGFILE,O_RDONLY);
   fd= open(COPYINGFILE,O_RDONLY);
   if (fd < 0) ohshite(_("cannot open GPL file " COPYINGFILE));
   if (fd < 0) ohshite(_("cannot open GPL file " COPYINGFILE));
-  m_dup2(fd,0);
-  execlp(CAT,CAT,"-",(char*)0);
-  ohshite(_("unable to exec cat for displaying GPL file"));
+  do_fd_copy(fd, 1, _("showcopyright"));
 }
 }

+ 32 - 8
main/enquiry.c

@@ -27,6 +27,10 @@
 #include <fnmatch.h>
 #include <fnmatch.h>
 #include <assert.h>
 #include <assert.h>
 #include <unistd.h>
 #include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
 
 
 #include <config.h>
 #include <config.h>
 #include <dpkg.h>
 #include <dpkg.h>
@@ -55,24 +59,44 @@ static void limiteddescription(struct pkginfo *pkg, int maxl,
   *pdesc_r=pdesc; *l_r=l;
   *pdesc_r=pdesc; *l_r=l;
 }
 }
 
 
+static int getttywidth() {
+  int fd;
+  int res;
+  struct winsize ws;
+
+  if ((fd=open("/dev/tty",O_RDONLY))!=-1) {
+    if (ioctl(fd, TIOCGWINSZ, &ws)==-1)
+      ws.ws_col=80;
+    close(fd);
+  }
+  return ws.ws_col;
+}
+
 static void list1package(struct pkginfo *pkg, int *head) {
 static void list1package(struct pkginfo *pkg, int *head) {
-  int l;
+  int l,w;
   const char *pdesc;
   const char *pdesc;
+  char format[80];
     
     
+  w=getttywidth()-(3+1+15+1+14+1+44); /* get spare width */
+  w>>=1; /* halve that so we can add that to the both the name and description */
+  sprintf(format,"%%c%%c%%c %%-%d.%ds %%-14.14s %%.*s\n", (14+w), (14+w));
+
   if (!*head) {
   if (!*head) {
     fputs(_("\
     fputs(_("\
 Desired=Unknown/Install/Remove/Purge\n\
 Desired=Unknown/Install/Remove/Purge\n\
 | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed\n\
 | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed\n\
-|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)\n\
-||/ Name            Version        Description\n\
-+++-===============-==============-============================================\n"),
-          stdout);
+|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)\n"), stdout);
+    printf(format,'|','|','/', _("Name"), _("Version"), 40, _("Description"));
+    printf("+++-");
+    for (l=0;l<(14+w);l++) printf("="); printf("-");
+    printf("==============-");
+    for (l=0;l<(44+w);l++) printf("="); 
+    printf("\n");
     *head= 1;
     *head= 1;
   }
   }
-  
   if (!pkg->installed.valid) blankpackageperfile(&pkg->installed);
   if (!pkg->installed.valid) blankpackageperfile(&pkg->installed);
-  limiteddescription(pkg,44,&pdesc,&l);
-  printf("%c%c%c %-15.15s %-14.14s %.*s\n",
+  limiteddescription(pkg,(44+w),&pdesc,&l);
+  printf(format,
          "uihrp"[pkg->want],
          "uihrp"[pkg->want],
          "nUFiHc"[pkg->status],
          "nUFiHc"[pkg->status],
          " R?#"[pkg->eflag],
          " R?#"[pkg->eflag],

+ 7 - 6
main/main.c

@@ -41,13 +41,14 @@
 #include "main.h"
 #include "main.h"
 
 
 static void printversion(void) {
 static void printversion(void) {
-  if (fputs(_("Debian Linux `dpkg' package management program version "), stdout) < 0)
-      werr("stdout");
+  if (fputs(_("Debian Linux `"), stdout) < 0) werr("stdout");
+  if (fputs(DPKG, stdout) < 0) werr("stdout");
+  if (fputs(_("' package management program version "), stdout) < 0) werr("stdout");
   if (fputs( DPKG_VERSION_ARCH ".\n", stdout) < 0) werr("stdout");
   if (fputs( DPKG_VERSION_ARCH ".\n", stdout) < 0) werr("stdout");
-  if (fputs(_("Copyright 1994-1996 Ian Jackson, Bruce Perens.  This is free software;\n"
-             "see the GNU General Public Licence version 2 or later for copying\n"
-             "conditions.  There is NO warranty.  See dpkg --licence for details.\n"),
-             stdout) < 0) werr("stdout");
+  if (fputs(_( "This is free software; see the GNU General Public Licence version 2 or\n"
+		"later for copying conditions.  There is NO warranty.\n"
+		"See dpkg --licence for copyright and license details.\n"),
+		 stdout) < 0) werr("stdout");
 }
 }
 /*
 /*
    options that need fixing:
    options that need fixing:

+ 4 - 2
scripts/Makefile.in

@@ -7,12 +7,14 @@ include ../Makefile.conf
 BIN_SCRIPTS		= dpkg-name dpkg-source dpkg-genchanges \
 BIN_SCRIPTS		= dpkg-name dpkg-source dpkg-genchanges \
 			  dpkg-gencontrol dpkg-shlibdeps dpkg-buildpackage \
 			  dpkg-gencontrol dpkg-shlibdeps dpkg-buildpackage \
 			  dpkg-parsechangelog dpkg-distaddfile 822-date \
 			  dpkg-parsechangelog dpkg-distaddfile 822-date \
-			  dpkg-scanpackages dpkg-scansources dpkg-architecture
+			  dpkg-scanpackages dpkg-scansources dpkg-architecture \
+			  dpkg-safefilelist
 
 
 SBIN_SCRIPTS		= update-rc.d update-alternatives install-info \
 SBIN_SCRIPTS		= update-rc.d update-alternatives install-info \
 			  dpkg-divert cleanup-info
 			  dpkg-divert cleanup-info
 
 
-MAN1PAGES		= dpkg-name.1 dpkg-source.1 822-date.1 dpkg-architecture.1
+MAN1PAGES		= dpkg-name.1 dpkg-source.1 822-date.1 dpkg-architecture.1 \
+			  dpkg-safefilelist.1
 MAN8PAGES		= update-rc.d.8 update-alternatives.8 install-info.8  \
 MAN8PAGES		= update-rc.d.8 update-alternatives.8 install-info.8  \
 			  cleanup-info.8 dpkg-scanpackages.8 dpkg-scansources.8 \
 			  cleanup-info.8 dpkg-scanpackages.8 dpkg-scansources.8 \
 			  dpkg-divert.8
 			  dpkg-divert.8

+ 1 - 1
scripts/dpkg-name.1

@@ -4,7 +4,7 @@
 .\" This is free software; see the GNU General Public Licence version 2
 .\" This is free software; see the GNU General Public Licence version 2
 .\" or later for copying conditions.  There is NO warranty.
 .\" or later for copying conditions.  There is NO warranty.
 .\" Time-stamp: <96/05/03 14:00:06 root>
 .\" Time-stamp: <96/05/03 14:00:06 root>
-.TH dpkg-name 1 "May 1996" "Debian Project" "Debian Linux"
+.TH dpkg-name 1 "May 1996" "Debian Project" "Debian GNU/Linux"
 .SH NAME
 .SH NAME
 dpkg\-name \- rename Debian packages to full package names
 dpkg\-name \- rename Debian packages to full package names
 .SH SYNOPSIS
 .SH SYNOPSIS

+ 1 - 1
scripts/dpkg-scanpackages.8

@@ -13,7 +13,7 @@
 .\" You should have received a copy of the GNU General Public
 .\" You should have received a copy of the GNU General Public
 .\" License along with dpkg; if not, write to the Free Software
 .\" License along with dpkg; if not, write to the Free Software
 .\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 .\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-.TH DPKG-SCANPACKAGES 8 "1996-07-08" "Debian Linux"
+.TH DPKG-SCANPACKAGES 8 "1996-07-08" "Debian GNU/Linux"
 .SH NAME
 .SH NAME
 dpkg-scanpackages \- create Packages files
 dpkg-scanpackages \- create Packages files
 .
 .