diff options
author | Ian Jackson <ian@chiark.chu.cam.ac.uk> | 1996-08-22 00:39:52 +0100 |
---|---|---|
committer | Ian Jackson <ian@chiark.chu.cam.ac.uk> | 1996-08-22 00:39:52 +0100 |
commit | c496eb18f7cffdb660c341d4b4c1f62fb39d4426 (patch) | |
tree | 2606f096a8970542c4b37aedb1b74df3a9d666d0 /dselect | |
parent | 90d5c6916aefd17aa016ceb5010e105afa41e515 (diff) | |
download | dpkg-c496eb18f7cffdb660c341d4b4c1f62fb39d4426.tar.gz |
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
Diffstat (limited to 'dselect')
-rw-r--r-- | dselect/pkgcmds.cc | 17 | ||||
-rw-r--r-- | dselect/pkglist.h | 1 |
2 files changed, 16 insertions, 2 deletions
diff --git a/dselect/pkgcmds.cc b/dselect/pkgcmds.cc index 26a32566e..7950bb9b9 100644 --- a/dselect/pkgcmds.cc +++ b/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; } diff --git a/dselect/pkglist.h b/dselect/pkglist.h index c93db2535..4bfc84352 100644 --- a/dselect/pkglist.h +++ b/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); |