summaryrefslogtreecommitdiff
path: root/dselect
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2018-11-21 03:44:15 +0100
committerGuillem Jover <guillem@debian.org>2019-01-22 13:41:54 +0100
commit31eb544919a46c6170ac39f5eebd17ba6d48d508 (patch)
treeab55a2170e6997c2e09d02560237ff889aba3306 /dselect
parentf7e9dc18083d5677a633db108c209675e7602417 (diff)
downloaddpkg-31eb544919a46c6170ac39f5eebd17ba6d48d508.tar.gz
libdpkg: Rename pkg_db symbols to pkg_hash
These are handling a package hash, and db seems to imply some kind of on-disk storage. Rename the pkgiterator too to pkg_hash_iter to make it consistent.
Diffstat (limited to 'dselect')
-rw-r--r--dselect/pkglist.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/dselect/pkglist.cc b/dselect/pkglist.cc
index ced7487d6..9882802bb 100644
--- a/dselect/pkglist.cc
+++ b/dselect/pkglist.cc
@@ -365,7 +365,7 @@ void packagelist::sortmakeheads() {
void packagelist::initialsetup() {
debug(dbg_general, "packagelist[%p]::initialsetup()", this);
- int allpackages = pkg_db_count_pkg();
+ int allpackages = pkg_hash_count_pkg();
datatable= new struct perpackagestate[allpackages];
nallocated= allpackages+150; // will realloc if necessary, so 150 not critical
@@ -390,13 +390,13 @@ void packagelist::finalsetup() {
packagelist::packagelist(keybindings *kb) : baselist(kb) {
// nonrecursive
initialsetup();
- struct pkgiterator *iter;
+ struct pkg_hash_iter *iter;
struct pkginfo *pkg;
nitems = 0;
- iter = pkg_db_iter_new();
- while ((pkg = pkg_db_iter_next_pkg(iter))) {
+ iter = pkg_hash_iter_new();
+ while ((pkg = pkg_hash_iter_next_pkg(iter))) {
struct perpackagestate *state= &datatable[nitems];
state->pkg= pkg;
if (pkg->status == PKG_STAT_NOTINSTALLED &&
@@ -426,7 +426,7 @@ packagelist::packagelist(keybindings *kb) : baselist(kb) {
table[nitems]= state;
nitems++;
}
- pkg_db_iter_free(iter);
+ pkg_hash_iter_free(iter);
if (!nitems)
ohshit(_("there are no packages"));