Просмотр исходного кода

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.

Wichert Akkerman лет назад: 25
Родитель
Сommit
2b4528471f
3 измененных файлов с 11 добавлено и 5 удалено
  1. 9 0
      ChangeLog
  2. 1 4
      main/filesdb.c
  3. 1 1
      main/help.c

+ 9 - 0
ChangeLog

@@ -1,8 +1,17 @@
+Sun Apr 22 17:13:17 CEST 2001 Wichert Akkerman <wakkerma@debian.org>
+
+  * main/filesdb.c: fix putat logic we broke earlier today
+
 Sun Apr 22 16:42:22 CEST 2001 Wichert Akkerman <wakkerma@debian.org>
 
   * 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 <wakkerma@debian.org>
+
+  * 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 <doogie@debian.org>
 
   * dpkg-deb/build.c, dpkg-deb/extract.c, dpkg-deb/main.c, lib/mlib.c(*),

+ 1 - 4
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;

+ 1 - 1
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;