Explorar el Código

Synchronize with potato-branch again:
debian/changelog: update to 1.6.10
scripts/dpkg-divert.pl: reinstate last writeability-patch. Modified
to not abort on ENOENT: this indicates a directory does not (yet)
exist. If this happens don't try to rename.
scripts/update-alternatives.pl:
+ update usage-warning to reflect the new --config option
+ Document some global variables
+ Switch back to auto-mode when removing a manually selected alternative
dselect/{dselect.h,main.cc,pkglist.cc}: remove CAN_RESIZE stuff
dselect/methlist.cc: don't abort if getch fails due to interrupted syscall
dselect/pkglist.cc: don't abort if getch fails due to interrupted syscall
dselect/baselist.cc: put debug-statement in sigwinchhandler and
actually resize the current terminal before redisplaying the screen

Wichert Akkerman hace 26 años
padre
commit
e9ca0e5a2a
Se han modificado 11 ficheros con 2371 adiciones y 1813 borrados
  1. 17 0
      ChangeLog
  2. 46 0
      debian/changelog
  3. 4 0
      dselect/baselist.cc
  4. 0 11
      dselect/dselect.h
  5. 0 30
      dselect/main.cc
  6. 3 0
      dselect/methlist.cc
  7. 3 4
      dselect/pkglist.cc
  8. 586 537
      po/cs.po
  9. 1680 1228
      po/es.po
  10. 6 2
      scripts/dpkg-divert.pl
  11. 26 1
      scripts/update-alternatives.pl

+ 17 - 0
ChangeLog

@@ -1,3 +1,20 @@
+Sat Mar  4 16:52:38 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+  * Synchronize with potato-branch again:
+  * debian/changelog: update to 1.6.10
+  * scripts/dpkg-divert.pl: reinstate last writeability-patch. Modified
+    to not abort on ENOENT: this indicates a directory does not (yet)
+    exist. If this happens don't try to rename.
+  * scripts/update-alternatives.pl:
+    + update usage-warning to reflect the new --config option
+    + Document some global variables
+    + Switch back to auto-mode when removing a manually selected alternative
+  * dselect/{dselect.h,main.cc,pkglist.cc}: remove CAN_RESIZE stuff
+  * dselect/methlist.cc: don't abort if getch fails due to interrupted syscall
+  * dselect/pkglist.cc: don't abort if getch fails due to interrupted syscall
+  * dselect/baselist.cc: put debug-statement in sigwinchhandler and
+    actually resize the current terminal before redisplaying the screen
+
 Thu Mar  2 17:03:04 CET 2000 Wichert Akkerman <wakkerma@debian.org>
 
   * dselect/methkeys.cc: remove old bindings for `n' and `p', which

+ 46 - 0
debian/changelog

@@ -6,6 +6,52 @@ dpkg (1.7.0) unstable; urgency=low
 
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
 
+dpkg (1.6.10) frozen unstable; urgency=low
+
+  * The `it rains in Sydney' release
+  * Mark another string in dselect as translateable, Closes: Bug#58618
+  * Fix typos, Closes: Bug#58619
+  * Change dselect keybindings slightly so `n' really does searchagain
+  * Updated Czech and Spanish translations, Closes: Bug#58617
+  * dpkg-divert.pl: reinstate last writeability-patch. Modified
+    to not abort on ENOENT: this indicates a directory does not (yet)
+    exist. If this happens don't try to rename. This should fix all
+    current dpkg-divert problems. Closes: Bug#59207,#58596
+  * update-alternatives: switch back to auto-mode when manually selected
+    alternative is removed, Closes: Bug#54933
+  * dselect no longer segfaults on SIGWINCH but does The Right Thing
+    instead. Closes: Bug#54303,#58697,#59419
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Tue,  7 Mar 2000 15:09:47 +1100
+
+dpkg (1.6.9) frozen unstable; urgency=low
+
+  * Fix typo in update-alternatives manpage
+  * dpkg-architecture: -q should not imply -f, Closes: Bug#57761
+  * Cleanup bits of install-info to make it more stable
+  * Fix Build-Dependency for ncurses, Closes: Bug#58073
+  * Some more documentation updates, Closes: Bug#57985
+  * Revert patch to check for writeable filesystems in dpkg-divert,
+    Closes: Bug#57840
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Fri, 18 Feb 2000 12:11:58 +0100
+
+dpkg (1.6.8) frozen unstable; urgency=low
+
+  * Turn --force-overwrite on by default
+  * Fix a couple of small buildsystem errors
+  * Support multiple adjacent newlines in control-style files, Closes: Bug#56056
+  * Updated Czech and Swedish translations
+  * Revert patch to change order of things when purging a package,
+    Closes: Bug#56374
+  * Handle failed open of /dev/tty in dpkg -l, Closes: Bug# 55041
+  * Update Japanese translations, Closes: Bug# 56641, #57494, #57595
+  * Update extended description for dpkg-dev, Closes: Bug# 56675
+  * Implement verbose option for update-alternative
+  * Fix conflicts handling
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Thu, 10 Feb 2000 15:31:31 +0100
+
 dpkg (1.6.7) frozen unstable; urgency=low
 
   * dpkg compiles on HP-UX, Solaris and IRIX now

+ 4 - 0
dselect/baselist.cc

@@ -45,9 +45,13 @@ void mywerase(WINDOW *win) {
 
 baselist *baselist::signallist= 0;
 void baselist::sigwinchhandler(int) {
+  struct winsize size;
+  if (debug) fprintf(debug,"baselist::sigwinchhandler(), signallist=%p\n",signallist);
   baselist *p= signallist;
   p->enddisplay();
   endwin(); initscr();
+  if (ioctl(fileno(stdout), TIOCGWINSZ, &size) != 0) ohshite(_("ioctl(TIOCGWINSZ) failed"));
+  resizeterm(size.ws_row, size.ws_col); wrefresh(curscr);
   p->startdisplay();
   if (doupdate() == ERR) ohshite(_("doupdate in SIGWINCH handler failed"));
 }

+ 0 - 11
dselect/dselect.h

@@ -27,17 +27,6 @@
 
 #include <signal.h>
 
-#if defined(SIGWINCH) && defined(TIOCGWINSZ) && defined(NCURSES_VERSION)
-#define CAN_RESIZE 1
-#else
-#define CAN_RESIZE 0
-#endif
-
-#if CAN_RESIZE
-static RETSIGTYPE adjust(int sig);
-static int          interrupted;
-#endif
-
 struct helpmenuentry {
   char key;
   const struct helpmessage *msg;

+ 0 - 30
dselect/main.cc

@@ -103,32 +103,6 @@ static void usage(void) {
        stdout)) werr("stdout");
 }
 
-#if CAN_RESIZE
-/*
- * This uses functions that are "unsafe", but it seems to work on SunOS and
- * Linux.  The 'wrefresh(curscr)' is needed to force the refresh to start from
- * the top of the screen -- some xterms mangle the bitmap while resizing.
- *
- * Borrowed from the ncurses example view.c
- */
-static RETSIGTYPE adjust(int sig)
-{
-  if (waiting || sig == 0) {
-    struct winsize size;
-
-    if (ioctl(fileno(stdout), TIOCGWINSZ, &size) == 0) {
-      resizeterm(size.ws_row, size.ws_col);
-      wrefresh(curscr);       /* Linux needs this */
-      show_all();
-    }
-    interrupted = FALSE;
-  } else {
-    interrupted = TRUE;
-  }
-  (void) signal(SIGWINCH, adjust);        /* some systems need this */
-}
-#endif  /* CAN_RESIZE */
-
 /* These are called by C code, so need to have C calling convention */
 extern "C" {
 
@@ -338,10 +312,6 @@ int main(int, const char *const *argv) {
   bindtextdomain(PACKAGE, LOCALEDIR);
   textdomain(PACKAGE);
 
-#if CAN_RESIZE
-  (void) signal(SIGWINCH, adjust); /* arrange interrupts to resize */
-#endif
-
   if (setjmp(ejbuf)) { /* expect warning about possible clobbering of argv */
     cursesoff();
     error_unwind(ehflag_bombout); exit(2);

+ 3 - 0
dselect/methlist.cc

@@ -24,6 +24,7 @@
 #include <curses.h>
 #include <assert.h>
 #include <signal.h>
+#include <errno.h>
 
 extern "C" {
 #include <config.h>
@@ -156,7 +157,9 @@ quitaction methodlist::display() {
     if (doupdate() == ERR) ohshite(_("doupdate failed"));
     signallist= this;
     if (sigprocmask(SIG_UNBLOCK,&sigwinchset,0)) ohshite(_("failed to unblock SIGWINCH"));
+    do
     response= getch();
+    while (response == ERR && errno == EINTR);
     if (sigprocmask(SIG_BLOCK,&sigwinchset,0)) ohshite(_("failed to re-block SIGWINCH"));
     if (response == ERR) ohshite(_("getch failed"));
     interp= (*bindings)(response);

+ 3 - 4
dselect/pkglist.cc

@@ -24,6 +24,7 @@
 #include <curses.h>
 #include <assert.h>
 #include <signal.h>
+#include <errno.h>
 
 extern "C" {
 #include <config.h>
@@ -497,15 +498,13 @@ pkginfo **packagelist::display() {
 
   if (debug) fprintf(debug,"packagelist[%p]::display() entering loop\n",this);
   for (;;) {
-#if CAN_RESIZE
-    if (interrupted)
-      adjust(0);
-#endif
     if (whatinfo_height) wcursyncup(whatinfowin);
     if (doupdate() == ERR) ohshite("doupdate failed");
     signallist= this;
     if (sigprocmask(SIG_UNBLOCK,&sigwinchset,0)) ohshite("failed to unblock SIGWINCH");
+    do
     response= getch();
+    while (response == ERR && errno == EINTR);
     if (sigprocmask(SIG_BLOCK,&sigwinchset,0)) ohshite("failed to re-block SIGWINCH");
     if (response == ERR) ohshite("getch failed");
     interp= (*bindings)(response);

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 586 - 537
po/cs.po


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1680 - 1228
po/es.po


+ 6 - 2
scripts/dpkg-divert.pl

@@ -199,9 +199,13 @@ sub checkrename {
     # (hopefully) wont overwrite anything. If it succeeds, we
     # assume a writable filesystem.
     foreach $file ($rsrc,$rdest) {
-	open (TMP, ">> ${file}.dpkg-devert.tmp") || &quit("error checking \`$file': $!");
+	open (TMP, ">> ${file}.dpkg-devert.tmp") || $! == NOENT ||
+		&quit("error checking \`$file': $!");
 	close TMP;
-	unlink ("${file}.dpkg-devert.tmp");
+	if ($1 == ENOENT) {
+		$dorename = 0;
+	} else
+		unlink ("${file}.dpkg-devert.tmp");
     }
     if (@ssrc && @sdest &&
         !($ssrc[0] == $sdest[0] && $ssrc[1] == $sdest[1])) {

+ 26 - 1
scripts/update-alternatives.pl

@@ -4,6 +4,27 @@
 sub ENOENT { 2; }
 # Sorry about this, but the errno-part of POSIX.pm isn't in perl-*-base
 
+# Global variables:
+#  $alink            Alternative we are managing (ie the symlink we're making/removing) (install only)
+#  $name             Name of the alternative (the symlink) we are processing
+#  $apath            Path of alternative we are offering            
+#  $apriority        Priority of link (only when we are installing an alternative)
+#  $mode             action to perform (display / install / remove / display / auto / config)
+#  $manual           update-mode for alternative (manual / auto)
+#  $state            State of alternative:
+#                       expected: alternative with highest priority is the active alternative
+#                       expected-inprogress: busy selecting alternative with highest priority
+#                       unexpected: alternative another alternative is active / error during readlink
+#                       nonexistant: alternative-symlink does not exist
+#  $link             Link we are working with
+#  @slavenames       List with names of slavelinks
+#  %slavenum         Map from name of slavelink to slave-index (into @slavelinks)
+#  @slavelinks       List of slavelinks (indexed by slave-index)
+#  %versionnum       Map from currently available versions into @versions and @priorities
+#  @versions         List of available versions for alternative
+#  %priorities       Map from @version-index to priority
+#  %slavepath        Map from (@version-index,slavename) to slave-path
+
 $version= '0.93.80'; # This line modified by Makefile
 sub usageversion {
     print(STDERR <<END)
@@ -93,7 +114,7 @@ while (@ARGV) {
 defined($aslavelink{$name}) && &badusage("name $name is both primary and slave");
 $aslavelinkcount{$alink} && &badusage("link $link is both primary and slave");
 
-$mode || &badusage("need --display, --install, --remove or --auto");
+$mode || &badusage("need --display, --config, --install, --remove or --auto");
 $mode eq 'install' || !%slavelink || &badusage("--slave only allowed with --install");
 
 if (open(AF,"$admindir/$name")) {
@@ -280,6 +301,10 @@ if ($mode eq 'install') {
 }
 
 if ($mode eq 'remove') {
+    if ($manual eq "manual" and $state = "expected") {
+    	&pr("Removing manually selected alternative - switching to auto mode");
+	$manual= "auto";
+    }
     if (defined($i= $versionnum{$apath})) {
         $k= $#versions;
         $versionnum{$versions[$k]}= $i;