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

libdpkg: Add new pdb_parse_update flag

This allows to distinguish when the code is parsing the update log
files, which should behave differently than simple status file parsing.
Guillem Jover лет назад: 14
Родитель
Сommit
c30a50a8a1
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 1
      lib/dpkg/dbmodify.c
  2. 1 0
      lib/dpkg/dpkg-db.h

+ 1 - 1
lib/dpkg/dbmodify.c

@@ -88,7 +88,7 @@ static void cleanupdates(void) {
   if (cdn) {
     for (i=0; i<cdn; i++) {
       strcpy(updatefnrest, cdlist[i]->d_name);
-      parsedb(updatefnbuf, pdb_parse_status, NULL);
+      parsedb(updatefnbuf, pdb_parse_update, NULL);
       if (cstatus < msdbrw_write) free(cdlist[i]);
     }
 

+ 1 - 0
lib/dpkg/dpkg-db.h

@@ -312,6 +312,7 @@ enum parsedbflags {
 
   /* Standard operations. */
   pdb_parse_status = pdb_lax_parser | pdb_weakclassification,
+  pdb_parse_update = pdb_parse_status | pdb_deb_control,
   pdb_parse_available = pdb_recordavailable | pdb_rejectstatus | pdb_lax_parser,
   pdb_parse_binary = pdb_recordavailable | pdb_rejectstatus | pdb_deb_control,
 };