Pārlūkot izejas kodu

libdpkg: Rename pdb_deb_control to pdb_single_stanza

The previous name didn't really catch the meaning of the flag.
Guillem Jover 12 gadi atpakaļ
vecāks
revīzija
809bfc52d0
2 mainītis faili ar 6 papildinājumiem un 6 dzēšanām
  1. 4 4
      lib/dpkg/dpkg-db.h
  2. 2 2
      lib/dpkg/parse.c

+ 4 - 4
lib/dpkg/dpkg-db.h

@@ -280,8 +280,8 @@ void pkg_db_report(FILE *);
 /*** from parse.c ***/
 
 enum parsedbflags {
-  /** Parse the control file from a binary .deb package. */
-  pdb_deb_control		= DPKG_BIT(0),
+  /** Parse a single control stanza. */
+  pdb_single_stanza		= DPKG_BIT(0),
   /** Store in ‘available’ in-core structures, not ‘status’. */
   pdb_recordavailable		= DPKG_BIT(1),
   /** Throw up an error if ‘Status’ encountered. */
@@ -300,11 +300,11 @@ enum parsedbflags {
   /* Standard operations. */
 
   pdb_parse_status		= pdb_lax_parser | pdb_weakclassification,
-  pdb_parse_update		= pdb_parse_status | pdb_deb_control,
+  pdb_parse_update		= pdb_parse_status | pdb_single_stanza,
   pdb_parse_available		= pdb_recordavailable | pdb_rejectstatus |
 				  pdb_lax_parser,
   pdb_parse_binary		= pdb_recordavailable | pdb_rejectstatus |
-				  pdb_deb_control,
+				  pdb_single_stanza,
 };
 
 const char *pkg_name_is_illegal(const char *p);

+ 2 - 2
lib/dpkg/parse.c

@@ -489,12 +489,12 @@ static enum parsedbtype
 parse_get_type(struct parsedb_state *ps, enum parsedbflags flags)
 {
   if (flags & pdb_recordavailable) {
-    if (flags & pdb_deb_control)
+    if (flags & pdb_single_stanza)
       return pdb_file_control;
     else
       return pdb_file_available;
   } else {
-    if (flags & pdb_deb_control)
+    if (flags & pdb_single_stanza)
       return pdb_file_update;
     else
       return pdb_file_status;