Kaynağa Gözat

dselect/method.cc: pass admindir to dpkg
dselect/Makefile.in: fix rule to build helpmessages
dselect/curkeys.h: use curses.h instead of ncurses.h, since someone decided to play nasty and just remove that
scripts/: remove dpkg-safelist
dpkg-deb/build.c: remove dpkg-safelist calls
main/enquiry.c: redo formula to get fieldwidths for packages

Wichert Akkerman 26 yıl önce
ebeveyn
işleme
68d09d4cdc

+ 10 - 0
ChangeLog

@@ -1,3 +1,13 @@
+Fri Jan  7 18:24:45 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+  * dselect/method.cc: pass admindir to dpkg
+  * dselect/Makefile.in: fix rule to build helpmessages
+  * dselect/curkeys.h: use curses.h instead of ncurses.h, since someone
+    decided to play nasty and just remove that
+  * scripts/: remove dpkg-safelist
+  * dpkg-deb/build.c: remove dpkg-safelist calls
+  * main/enquiry.c: redo formula to get fieldwidths for packages
+
 Wed Jan  5 17:09:45 CET 2000 Wichert Akkerman <wakkerma@debian.org>
 
   * Merge patch from Tom Lees <tom@lpsg.demon.co.uk>:

+ 3 - 2
debian/changelog

@@ -1,8 +1,9 @@
 dpkg (1.6.6) unstable; urgency=low
 
-  * dpkg-buildpackage supports debsign, Closes: Bug# 58333
-  * fix update-alternatives manpage, Closes: Bug# 53859
+  * dpkg-buildpackage supports debsign, Closes: Bug#58333
+  * fix update-alternatives manpage, Closes: Bug#53859
   * Updated Polish translation
+  * Pass admindir to dpkg, Closes: Bug#54039
 
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
 

+ 2 - 3
debian/rules

@@ -129,15 +129,14 @@ binary-dpkg-dev: stamp-binary
 	set -e ; for i in dpkg-name dpkg-source dpkg-genchanges dpkg-gencontrol \
 		dpkg-shlibdeps dpkg-buildpackage dpkg-distaddfile 822-date \
 		dpkg-scanpackages dpkg-scansources dpkg-architecture \
-		dpkg-parsechangelog dpkg-safefilelist ; do \
+		dpkg-parsechangelog ; do \
 		mv $(TMP)/usr/bin/$$i $(TMP_DPKG_DEV)/usr/bin/ ; \
 	done
 	set -e ; for i in "" ja ; do \
 		install -d -m 755 -o root -g root $(TMP_DPKG_DEV)/usr/share/man/$$i/man1 ; \
 		for m in dpkg-name.1 dpkg-source.1 822-date.1 dpkg-architecture.1 \
 			dpkg-buildpackage.1 dpkg-distaddfile.1 dpkg-genchanges.1 \
-			dpkg-gencontrol.1 dpkg-parsechangelog.1 dpkg-shlibdeps.1 \
-			dpkg-safefilelist.1 ; do \
+			dpkg-gencontrol.1 dpkg-parsechangelog.1 dpkg-shlibdeps.1 ; do \
 			if [ -e $(TMP)/usr/share/man/$$i/man1/$$m ] ; then \
 				mv $(TMP)/usr/share/man/$$i/man1/$$m $(TMP_DPKG_DEV)/usr/share/man/$$i/man1/$$m ; \
 			fi ; \

+ 9 - 15
dpkg-deb/build.c

@@ -266,42 +266,32 @@ void do_build(const char *const *argv) {
     strcpy(tfbuf,envbuf);
     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);
   if (!(c4= m_fork())) {
-    m_dup2(p2[1],1); m_dup2(p1[0],0); close(p2[0]); close(p2[1]);
+    m_dup2(p2[1],1); close(p2[0]); close(p2[1]);
     if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
-    execlp(TAR,"tar","--no-recursion", "--exclude",BUILDCONTROLDIR,"-T","-","-cf","-",(char*)0);
+    execlp(TAR,"tar","--exclude",BUILDCONTROLDIR,"-cf","-",".",(char*)0);
     ohshite(_("failed to exec tar --exclude"));
   }
   close(p2[1]);
-  close(p1[0]);
   if (!(c5= m_fork())) {
     char *combuf;
     m_dup2(p2[0],0); close(p2[0]);
     m_dup2(oldformatflag ? fileno(ar) : gzfd,1);
     combuf = strdup("-9c");
     if(compression != NULL) {
-      if(*compression = '0') {
+      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 %s from tar --exclude"), combuf);
   }
   close(p2[0]);
   waitsubproc(c5,"gzip -9c from tar --exclude",0);
   waitsubproc(c4,"tar --exclude",0);
-  waitsubproc(c3,"dpkg-deb-filelist",0);
   if (!oldformatflag) {
     if (fstat(gzfd,&datastab)) ohshite("_(failed to fstat tmpfile (data))");
     if (fprintf(ar,
@@ -313,7 +303,11 @@ void do_build(const char *const *argv) {
       werr(debar);
 
     if (lseek(gzfd,0,SEEK_SET)) ohshite(_("failed to rewind tmpfile (data)"));
-    do_fd_copy(gzfd, fileno(ar), _("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);
 
     if (datastab.st_size & 1)
       if (putc('\n',ar) == EOF)

+ 1 - 1
dselect/Makefile.in

@@ -52,7 +52,7 @@ basecmds.o: helpmsgs.h
 curkeys.o: curkeys.h
 
 $(srcdir)/helpmsgs.h $(srcdir)/helpmsgs.cc: helpmsgs.src $(srcdir)/mkhelpmsgs.pl
-	cd $(srcdir) ; perl $(srcdir)/mkhelpmsgs.pl $<
+	cd $(srcdir) ; perl mkhelpmsgs.pl helpmsgs.src
 
 curkeys.h: keyoverride $(srcdir)/mkcurkeys.pl
 	cursesfile=`echo '#include <curses.h>' | \

+ 1 - 1
dselect/curkeys.cc

@@ -20,7 +20,7 @@
  */
 
 extern "C" {
-#include <ncurses/curses.h>
+#include <curses.h>
 #include <config.h>
 #include <dpkg.h>
 #include <dpkg-db.h>

+ 2 - 0
dselect/method.cc

@@ -221,6 +221,8 @@ urqresult urq_install(void) {
 static urqresult rundpkgauto(const char *name, const char *dpkgmode) {
   const char *fallibleargs[] = {
     DPKG,
+	"--admindir",
+	admindir,
     "--pending",
     dpkgmode,
     0

+ 13 - 9
main/enquiry.c

@@ -74,13 +74,17 @@ static int getttywidth() {
 
 static void list1package(struct pkginfo *pkg, int *head) {
   int l,w;
+  int nw,vw,dw;
   const char *pdesc;
   char format[80];
     
-  w=getttywidth()-(3+1+15+1+14+1+44); /* get spare width */
-  if (w<80) w=80; /* lets not try to deal with terminals that are too small */
-  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));
+  w=getttywidth()-80;	/* get spare width */
+  if (w<0) w=0;		/* lets not try to deal with terminals that are too small */
+  w>>=2;		/* halve that so we can add that to the both the name and description */
+  nw=(14+w);		/* name width */
+  vw=(14+w);		/* version width */
+  dw=(44+(2*w));	/* description width */
+  sprintf(format,"%%c%%c%%c %%-%d.%ds %%-%d.%ds %%.*s\n", nw, nw, vw, vw);
 
   if (!*head) {
     fputs(_("\
@@ -88,15 +92,15 @@ Desired=Unknown/Install/Remove/Purge\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"), 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("+++-");					/* status */
+    for (l=0;l<nw;l++) printf("="); printf("-");	/* packagename */
+    for (l=0;l<vw;l++) printf("="); printf("-");	/* version */
+    for (l=0;l<dw;l++) printf("="); 			/* description */
     printf("\n");
     *head= 1;
   }
   if (!pkg->installed.valid) blankpackageperfile(&pkg->installed);
-  limiteddescription(pkg,(44+w),&pdesc,&l);
+  limiteddescription(pkg,dw,&pdesc,&l);
   printf(format,
          "uihrp"[pkg->want],
          "nUFiHc"[pkg->status],

Dosya farkı çok büyük olduğundan ihmal edildi
+ 548 - 236
po/dpkg.pot


+ 2 - 4
scripts/Makefile.in

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

+ 0 - 37
scripts/dpkg-safefilelist.1

@@ -1,37 +0,0 @@
-.\" This is an -*- nroff -*- source file.
-.\" dpkg-safefilelist and this manpage are Copyright 1999 by Adam Heath.
-.\"
-.\" This is free software; see the GNU General Public Licence version 2
-.\" or later for copying conditions.  There is NO warranty.
-.\" Time-stamp: <Fri, 24 Dec 1999 05:36:51 -0600>
-.TH dpkg-safefilelist 1 "December 1999" "Debian Project" "Debian GNU/Linux"
-.SH NAME
-dpkg\-safefilelist \- List files with symlinks after their targets
-.SH SYNOPSIS
-.B dpkg\-safefilelist
-.SH DESCRIPTION
-.PP
-This manual page documents the
-.B dpkg\-safefilelist
-.sh script which provides an easy way to list files with the targets
-coming before the symlinks that point to them.
-
-.SH EXAMPLES
-.TP
-.B dpkg-safefilelist
-This will find all files in the current directory, and sort them,
-printing symlinks after their targets.
-.SH BUGS?
-Successfully tested on
-.B Debian GNU/Linux 
-systems only.
-.SH SEE ALSO
-.BR dpkg-deb (8),
-.BR find (1),
-.SH COPYRIGHT
-Copyright 1999 Adam Heath.
-.B dpkg-safefilelist
-is free software; see the GNU General Public Licence version 2 or
-later for copying conditions. There is
-.B no
-warranty.

+ 0 - 35
scripts/dpkg-safefilelist.pl

@@ -1,35 +0,0 @@
-#!/usr/bin/perl
-open(FILES, "find -mindepth 1|");
-sub myprint {
-	print "@_\n";
-}
-while (<FILES>) {
-	chomp;
-	$file = $_;
-	if( ! -l $file ) {
-		print "$file\n" if(!$targets{$file});
-	}
-	$newfile = $file;
-	$oldfile = $newfile;
-
-	while (-l $newfile) {
-		push @symlinks, $newfile;
-		$oldfile = $newfile;
-		$link = readlink($newfile);
-		$newfile = $_;
-		$newfile =~ s,.*/,,;
-		$path = $_;
-		$path =~ s,[^/]*$,,;
-		$newfile = $path . $link;
-		break if("$oldfile" == "$newfile");
-	}
-	if(-e $newfile) {
-		push @symlinks, $newfile;
-		while($file = pop @symlinks) {
-			if(!$targets{$file}) {
-				$targets{$file} = 1;
-				print "$file\n";
-			}
-		}
-	}
-}

+ 1 - 1
version-nr

@@ -1 +1 @@
-1.6.5
+1.6.6