From 2b4528471fd05ab93a6870e490826a794ce41224 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Sun, 22 Apr 2001 15:23:56 +0000 Subject: [PATCH] main/filesdb.c: fix putat logic we broke earlier today main/help.c: ensure_package_clientdata() only needs to allocate memory for a perpackagestate struct, not a pkginfoperfile. --- ChangeLog | 9 +++++++++ main/filesdb.c | 5 +---- main/help.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 80a488d7..47677909 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,17 @@ +Sun Apr 22 17:13:17 CEST 2001 Wichert Akkerman + + * main/filesdb.c: fix putat logic we broke earlier today + Sun Apr 22 16:42:22 CEST 2001 Wichert Akkerman * main/filesdb.c: don't read a statoverride or .list file if they are 0 bytes +Sun Apr 22 15:15:56 CEST 2001 Wichert Akkerman + + * main/help.c: ensure_package_clientdata() only needs to allocate memory + for a perpackagestate struct, not a pkginfoperfile. + Sun Apr 22 02:46:06 CDT 2001 Adam Heath * dpkg-deb/build.c, dpkg-deb/extract.c, dpkg-deb/main.c, lib/mlib.c(*), diff --git a/main/filesdb.c b/main/filesdb.c index 2e40aba3..209f8094 100644 --- a/main/filesdb.c +++ b/main/filesdb.c @@ -58,8 +58,6 @@ static int saidread=0; * list if it is there but stale */ void ensure_packagefiles_available(struct pkginfo *pkg) { - static struct varbuf fnvb; - int fd; const char *filelistfile; struct fileinlist **lendp, *newent, *current; @@ -170,8 +168,6 @@ void ensure_packagefiles_available(struct pkginfo *pkg) { pop_cleanup(ehflag_normaltidy); /* fd= open() */ if (close(fd)) ohshite(_("error closing files list file for package `%.250s'"),pkg->name); - if (fnvb.used) - ohshit(_("files list file for package `%.250s' is truncated"),pkg->name); onerr_abort--; @@ -187,6 +183,7 @@ void ensure_packagefiles_available(struct pkginfo *pkg) { packageslump= nfmalloc(sizeof(struct filepackages)); packageslump->more= newent->namenode->packages; newent->namenode->packages= packageslump; + putat= 0; } packageslump->pkgs[putat]= pkg; if (++putat < PERFILEPACKAGESLUMP) packageslump->pkgs[putat]= 0; diff --git a/main/help.c b/main/help.c index 5919dadf..561a14a1 100644 --- a/main/help.c +++ b/main/help.c @@ -113,7 +113,7 @@ void checkpath(void) { void ensure_package_clientdata(struct pkginfo *pkg) { if (pkg->clientdata) return; - pkg->clientdata= nfmalloc(sizeof(struct pkginfoperfile)); + pkg->clientdata= nfmalloc(sizeof(struct perpackagestate)); pkg->clientdata->istobe= itb_normal; pkg->clientdata->fileslistvalid= 0; pkg->clientdata->files= 0; -- 2.39.5