This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=13a71507c19914950fec3cdd3573440b5cde9991

commit 13a71507c19914950fec3cdd3573440b5cde9991
Author: Guillem Jover <[email protected]>
AuthorDate: Mon Mar 28 20:09:03 2022 +0200

    libdpkg: Rename f_revision() to f_obs_revision()
    
    The purpose of this function is to parse an obsolete field. Make it
    a bit more clear by stating so in the function name itself.
---
 lib/dpkg/fields.c    | 6 +++---
 lib/dpkg/parse.c     | 6 +++---
 lib/dpkg/parsedump.h | 6 +++++-
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c
index e540796e4..6bb991876 100644
--- a/lib/dpkg/fields.c
+++ b/lib/dpkg/fields.c
@@ -280,9 +280,9 @@ f_version(struct pkginfo *pkg, struct pkgbin *pkgbin,
 }
 
 void
-f_revision(struct pkginfo *pkg, struct pkgbin *pkgbin,
-           struct parsedb_state *ps,
-           const char *value, const struct fieldinfo *fip)
+f_obs_revision(struct pkginfo *pkg, struct pkgbin *pkgbin,
+               struct parsedb_state *ps,
+               const char *value, const struct fieldinfo *fip)
 {
   char *newversion;
 
diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index 274a4c325..a671a6721 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -85,12 +85,12 @@ const struct fieldinfo fieldinfos[]= {
   { FIELD("Triggers-Pending"), f_trigpend,        w_trigpend                   
              },
   { FIELD("Triggers-Awaited"), f_trigaw,          w_trigaw                     
              },
   /* Note that aliases are added to the nicknames table. */
-  { FIELD("Revision"),         f_revision,        w_null                       
              },
   { FIELD("Recommended"),      f_dependency,      w_null                       
              },
   { FIELD("Optional"),         f_dependency,      w_null                       
              },
   { FIELD("Class"),            f_priority,        w_null                       
              },
-  { FIELD("Package-Revision"), f_revision,        w_null                       
              },
-  { FIELD("Package_Revision"), f_revision,        w_null                       
              },
+  { FIELD("Revision"),         f_obs_revision,    w_null                       
              },
+  { FIELD("Package-Revision"), f_obs_revision,    w_null                       
              },
+  { FIELD("Package_Revision"), f_obs_revision,    w_null                       
              },
   { NULL                                                                       
              }
 };
 
diff --git a/lib/dpkg/parsedump.h b/lib/dpkg/parsedump.h
index 316cd1b51..6fd27b41d 100644
--- a/lib/dpkg/parsedump.h
+++ b/lib/dpkg/parsedump.h
@@ -105,7 +105,11 @@ freadfunction f_charfield;
 freadfunction f_priority;
 freadfunction f_section;
 freadfunction f_status;
-freadfunction f_boolean, f_dependency, f_conffiles, f_version, f_revision;
+freadfunction f_boolean;
+freadfunction f_dependency;
+freadfunction f_conffiles;
+freadfunction f_version;
+freadfunction f_obs_revision;
 freadfunction f_configversion;
 freadfunction f_multiarch;
 freadfunction f_architecture;

-- 
Dpkg.Org's dpkg

Reply via email to