Browse Source

dpkg: Use pdb_parse_available in process_archive() on --record-avail

When recording the available information from the binary package, we
don't want it to possibly create a duplicate pkginfo entry with the
same (but mixed) architecture, and having to cleanup the obsolete one.
Instead we ignore the cross-grade slot finding logic, and just use the
old available slot matching the architecture.
Guillem Jover 12 years ago
parent
commit
6562fd805b
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/processarc.c

+ 4 - 1
src/processarc.c

@@ -445,7 +445,10 @@ void process_archive(const char *filename) {
 
   strcpy(cidirrest,CONTROLFILE);
 
-  parsedb_flags = pdb_parse_binary;
+  if (cipaction->arg_int == act_avail)
+    parsedb_flags = pdb_parse_available;
+  else
+    parsedb_flags = pdb_parse_binary;
   parsedb_flags |= pdb_ignorefiles;
   if (fc_badversion)
     parsedb_flags |= pdb_lax_version_parser;