Procházet zdrojové kódy

dpkg (1.2.14) stable unstable; urgency=MEDIUM

  * dselect +/-/_/= on lines for all broken, new, local or whatever
    packages do not affect _all_ packages.  (Bug#4129.)

 -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Thu, 22 Aug 1996 00:39:52 +0100
Ian Jackson před 30 roky
rodič
revize
c496eb18f7
6 změnil soubory, kde provedl 25 přidání a 4 odebrání
  1. 7 0
      debian.Changelog
  2. 1 1
      debian.rules
  3. binární
      doc/developer-keys.bak
  4. 15 2
      dselect/pkgcmds.cc
  5. 1 0
      dselect/pkglist.h
  6. 1 1
      version.h

+ 7 - 0
debian.Changelog

@@ -1,3 +1,10 @@
+dpkg (1.2.14) stable unstable; urgency=MEDIUM
+
+  * dselect +/-/_/= on lines for all broken, new, local or whatever
+    packages do not affect _all_ packages.  (Bug#4129.)
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Thu, 22 Aug 1996 00:39:52 +0100
+
 dpkg (1.2.13) unstable; urgency=LOW
 
   * dpkg --search produces correct output for diversions.

+ 1 - 1
debian.rules

@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 package=dpkg
-version=1.2.13
+version=1.2.14
 
 archi=$(shell dpkg --print-architecture)
 DIR:=$(shell pwd)

binární
doc/developer-keys.bak


+ 15 - 2
dselect/pkgcmds.cc

@@ -33,7 +33,19 @@ extern "C" {
 #include "dselect.h"
 #include "pkglist.h"
 
-static int matches(struct pkginfo *pkg, struct pkginfo *comparewith) {
+int packagelist::affectedmatches(struct pkginfo *pkg, struct pkginfo *comparewith) {
+  switch (statsortorder) {
+  case sso_avail:
+    if (comparewith->clientdata->ssavail != pkg->clientdata->ssavail) return 0;
+    break;
+  case sso_state:
+    if (comparewith->clientdata->ssstate != pkg->clientdata->ssstate) return 0;
+    break;
+  case sso_unsorted:
+    break;
+  default:
+    internerr("unknown statsortorder in affectedmatches");
+  }
   if (comparewith->priority != pkginfo::pri_unset &&
       (comparewith->priority != pkg->priority ||
        comparewith->priority == pkginfo::pri_other &&
@@ -60,7 +72,8 @@ void packagelist::affectedrange(int *startp, int *endp) {
     return;
   }
   *startp= index;
-  while (index < nitems && matches(table[index]->pkg,table[cursorline]->pkg)) index++;
+  while (index < nitems && affectedmatches(table[index]->pkg,table[cursorline]->pkg))
+    index++;
   *endp= index;
 }
 

+ 1 - 0
dselect/pkglist.h

@@ -160,6 +160,7 @@ class packagelist : public baselist {
   void addheading(enum ssavailval, enum ssstateval,
                   pkginfo::pkgpriority, const char*, const char *section);
   void sortinplace();
+  int affectedmatches(struct pkginfo *pkg, struct pkginfo *comparewith);
   void affectedrange(int *startp, int *endp);
   void setwant(pkginfo::pkgwant nw);
   void sethold(int hold);

+ 1 - 1
version.h

@@ -1 +1 @@
-#define DPKG_VERSION "1.2.13" /* This line modified by Makefile */
+#define DPKG_VERSION "1.2.14" /* This line modified by Makefile */