소스 검색

dpkg: Change debug output to always arch-qualify package names

Guillem Jover 14 년 전
부모
커밋
7e81416f7f
7개의 변경된 파일40개의 추가작업 그리고 40개의 파일을 삭제
  1. 5 5
      src/archives.c
  2. 2 2
      src/depcon.c
  3. 6 6
      src/help.c
  4. 6 6
      src/packages.c
  5. 7 7
      src/processarc.c
  6. 5 5
      src/remove.c
  7. 9 9
      src/trigproc.c

+ 5 - 5
src/archives.c

@@ -119,7 +119,7 @@ filesavespackage(struct fileinlist *file,
   struct pkginfo *thirdpkg;
 
   debug(dbg_eachfiledetail,"filesavespackage file `%s' package %s",
-        file->namenode->name, pkg_name(pkgtobesaved, pnaw_nonambig));
+        file->namenode->name, pkg_name(pkgtobesaved, pnaw_always));
 
   /* If the file is a contended one and it's overridden by either
    * the package we're considering disappearing or the package
@@ -142,7 +142,7 @@ filesavespackage(struct fileinlist *file,
   iter = filepackages_iter_new(file->namenode);
   while ((thirdpkg = filepackages_iter_next(iter))) {
     debug(dbg_eachfiledetail, "filesavespackage ... also in %s",
-          pkg_name(thirdpkg, pnaw_nonambig));
+          pkg_name(thirdpkg, pnaw_always));
 
     /* Is this not the package being installed or the one being
      * checked for disappearance? */
@@ -223,8 +223,8 @@ does_replace(struct pkginfo *newpigp, struct pkgbin *newpifp,
   struct dependency *dep;
 
   debug(dbg_depcon,"does_replace new=%s old=%s (%s)",
-        pkgbin_name(newpigp, newpifp, pnaw_nonambig),
-        pkgbin_name(oldpigp, oldpifp, pnaw_nonambig),
+        pkgbin_name(newpigp, newpifp, pnaw_always),
+        pkgbin_name(oldpigp, oldpifp, pnaw_always),
         versiondescribe(&oldpifp->version, vdew_always));
   for (dep= newpifp->depends; dep; dep= dep->next) {
     if (dep->type != dep_replaces || dep->list->ed != oldpigp->set)
@@ -683,7 +683,7 @@ tarobject(void *ctx, struct tar_entry *ti)
       if (otherpkg == tc->pkg)
         continue;
       debug(dbg_eachfile, "tarobject ... found in %s",
-            pkg_name(otherpkg, pnaw_nonambig));
+            pkg_name(otherpkg, pnaw_always));
 
       if (nifd->namenode->divert && nifd->namenode->divert->useinstead) {
         /* Right, so we may be diverting this file. This makes the conflict

+ 2 - 2
src/depcon.c

@@ -147,7 +147,7 @@ foundcyclebroken(struct cyclesofarlink *thislink, struct cyclesofarlink *sofar,
   sol->possi->cyclebreak = true;
 
   debug(dbg_depcon, "cycle broken at %s -> %s",
-        pkg_name(sol->possi->up->up, pnaw_nonambig), sol->possi->ed->name);
+        pkg_name(sol->possi->up->up, pnaw_always), sol->possi->ed->name);
 
   return true;
 }
@@ -179,7 +179,7 @@ findbreakcyclerecursive(struct pkginfo *pkg, struct cyclesofarlink *sofar)
     }
     varbuf_end_str(&str_pkgs);
     debug(dbg_depcondetail, "findbreakcyclerecursive %s %s",
-          pkg_name(pkg, pnaw_nonambig), str_pkgs.buf);
+          pkg_name(pkg, pnaw_always), str_pkgs.buf);
     varbuf_destroy(&str_pkgs);
   }
   thislink.pkg= pkg;

+ 6 - 6
src/help.c

@@ -69,7 +69,7 @@ namenodetouse(struct filenamenode *namenode, struct pkginfo *pkg,
   }
 
   debug(dbg_eachfile,"namenodetouse namenode=`%s' pkg=%s",
-        namenode->name, pkgbin_name(pkg, pkgbin, pnaw_nonambig));
+        namenode->name, pkgbin_name(pkg, pkgbin, pnaw_always));
 
   r=
     (namenode->divert->useinstead && namenode->divert->pkgset != pkg->set)
@@ -500,13 +500,13 @@ dir_has_conffiles(struct filenamenode *file, struct pkginfo *pkg)
   size_t namelen;
 
   debug(dbg_veryverbose, "dir_has_conffiles '%s' (from %s)", file->name,
-        pkg_name(pkg, pnaw_nonambig));
+        pkg_name(pkg, pnaw_always));
   namelen = strlen(file->name);
   for (conff= pkg->installed.conffiles; conff; conff= conff->next) {
       if (strncmp(file->name, conff->name, namelen) == 0 &&
           conff->name[namelen] == '/') {
 	debug(dbg_veryverbose, "directory %s has conffile %s from %s",
-	      file->name, conff->name, pkg_name(pkg, pnaw_nonambig));
+	      file->name, conff->name, pkg_name(pkg, pnaw_always));
 	return true;
       }
   }
@@ -525,12 +525,12 @@ dir_is_used_by_others(struct filenamenode *file, struct pkginfo *pkg)
   struct pkginfo *other_pkg;
 
   debug(dbg_veryverbose, "dir_is_used_by_others '%s' (except %s)", file->name,
-        pkg ? pkg_name(pkg, pnaw_nonambig) : "<none>");
+        pkg ? pkg_name(pkg, pnaw_always) : "<none>");
 
   iter = filepackages_iter_new(file);
   while ((other_pkg = filepackages_iter_next(iter))) {
     debug(dbg_veryverbose, "dir_is_used_by_others considering %s ...",
-          pkg_name(other_pkg, pnaw_nonambig));
+          pkg_name(other_pkg, pnaw_always));
     if (other_pkg == pkg)
       continue;
 
@@ -554,7 +554,7 @@ dir_is_used_by_pkg(struct filenamenode *file, struct pkginfo *pkg,
   size_t namelen;
 
   debug(dbg_veryverbose, "dir_is_used_by_pkg '%s' (by %s)",
-        file->name, pkg ? pkg_name(pkg, pnaw_nonambig) : "<none>");
+        file->name, pkg ? pkg_name(pkg, pnaw_always) : "<none>");
 
   namelen = strlen(file->name);
 

+ 6 - 6
src/packages.c

@@ -403,7 +403,7 @@ deppossi_ok_found(struct pkginfo *possdependee, struct pkginfo *requiredby,
       *fixbytrig = possdependee->trigaw.head->pend;
       debug(dbg_depcondetail,
             "      triggers-awaited, fixbytrig '%s', defer",
-            pkg_name(*fixbytrig, pnaw_nonambig));
+            pkg_name(*fixbytrig, pnaw_always));
       return found_defer;
     }
     if (possdependee->clientdata &&
@@ -463,7 +463,7 @@ breaks_check_one(struct varbuf *aemsgs, enum dep_check *ok,
   struct varbuf depmsg = VARBUF_INIT;
 
   debug(dbg_depcondetail, "      checking breaker %s virtbroken %s",
-        pkg_name(breaker, pnaw_nonambig),
+        pkg_name(breaker, pnaw_always),
         virtbroken ? virtbroken->name : "<none>");
 
   if (breaker->status == stat_notinstalled ||
@@ -556,8 +556,8 @@ dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing,
   interestingwarnings= 0;
   ok = dep_check_ok;
   debug(dbg_depcon,"checking dependencies of %s (- %s)",
-        pkg_name(pkg, pnaw_nonambig),
-        removing ? pkg_name(removing, pnaw_nonambig) : "<none>");
+        pkg_name(pkg, pnaw_always),
+        removing ? pkg_name(removing, pnaw_always) : "<none>");
 
   anycannotfixbytrig = false;
   canfixbytrig = NULL;
@@ -599,7 +599,7 @@ dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing,
           if (provider->up->type != dep_provides)
             continue;
           debug(dbg_depcondetail, "     checking provider %s",
-                pkg_name(provider->up->up, pnaw_nonambig));
+                pkg_name(provider->up->up, pnaw_always));
           thisf = deppossi_ok_found(provider->up->up, pkg, removing,
                                     possi->ed,
                                     &possfixbytrig, &matched, NULL,
@@ -620,7 +620,7 @@ dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing,
     }
     debug(dbg_depcondetail, "  found %d matched %d possfixbytrig %s",
           found, matched,
-          possfixbytrig ? pkg_name(possfixbytrig, pnaw_nonambig) : "-");
+          possfixbytrig ? pkg_name(possfixbytrig, pnaw_always) : "-");
     if (removing && !matched) continue;
     switch (found) {
     case found_none:

+ 7 - 7
src/processarc.c

@@ -347,7 +347,7 @@ pkg_disappear(struct pkginfo *pkg, struct pkginfo *infavour)
          pkg_name(pkg, pnaw_nonambig));
   log_action("disappear", pkg, &pkg->installed);
   debug(dbg_general, "pkg_disappear disappearing %s",
-        pkg_name(pkg, pnaw_nonambig));
+        pkg_name(pkg, pnaw_always));
 
   trig_activate_packageprocessing(pkg);
   maintainer_script_installed(pkg, POSTRMFILE,
@@ -641,18 +641,18 @@ void process_archive(const char *filename) {
       while ((otherpkg = filepackages_iter_next(iter))) {
         debug(dbg_conffdetail,
               "process_archive conffile `%s' in package %s - conff ?",
-              newconff->namenode->name, pkg_name(otherpkg, pnaw_nonambig));
+              newconff->namenode->name, pkg_name(otherpkg, pnaw_always));
         for (searchconff = otherpkg->installed.conffiles;
              searchconff && strcmp(newconff->namenode->name, searchconff->name);
              searchconff = searchconff->next)
           debug(dbg_conffdetail,
                 "process_archive conffile `%s' in package %s - conff ? not `%s'",
-                newconff->namenode->name, pkg_name(otherpkg, pnaw_nonambig),
+                newconff->namenode->name, pkg_name(otherpkg, pnaw_always),
                 searchconff->name);
         if (searchconff) {
           debug(dbg_conff,
                 "process_archive conffile `%s' package=%s %s hash=%s",
-                newconff->namenode->name, pkg_name(otherpkg, pnaw_nonambig),
+                newconff->namenode->name, pkg_name(otherpkg, pnaw_always),
                 otherpkg == pkg ? "same" : "different!",
                 searchconff->hash);
           if (otherpkg == pkg)
@@ -1215,7 +1215,7 @@ void process_archive(const char *filename) {
 	otherpkg->clientdata->istobe == itb_remove ||
         !otherpkg->clientdata->files) continue;
     debug(dbg_veryverbose, "process_archive checking disappearance %s",
-          pkg_name(otherpkg, pnaw_nonambig));
+          pkg_name(otherpkg, pnaw_always));
     assert(otherpkg->clientdata->istobe == itb_normal ||
            otherpkg->clientdata->istobe == itb_deconfigure);
     for (cfile= otherpkg->clientdata->files;
@@ -1308,7 +1308,7 @@ void process_archive(const char *filename) {
     iter = filepackages_iter_new(cfile->namenode);
     while ((otherpkg = filepackages_iter_next(iter))) {
       debug(dbg_eachfiledetail, "process_archive ... found in %s",
-            pkg_name(otherpkg, pnaw_nonambig));
+            pkg_name(otherpkg, pnaw_always));
       /* If !fileslistvalid then it's one of the disappeared packages above
        * and we don't bother with it here, clearly. */
       if (otherpkg == pkg || !otherpkg->clientdata->fileslistvalid)
@@ -1325,7 +1325,7 @@ void process_archive(const char *filename) {
                             otherpkg->clientdata->files, fnnf_elide_other_lists);
       ensure_package_clientdata(otherpkg);
       debug(dbg_veryverbose, "process_archive overwrote from %s",
-            pkg_name(otherpkg, pnaw_nonambig));
+            pkg_name(otherpkg, pnaw_always));
     }
     filepackages_iter_free(iter);
   }

+ 5 - 5
src/remove.c

@@ -60,14 +60,14 @@ static void checkforremoval(struct pkginfo *pkgtoremove,
     if (possi->up->type != dep_depends && possi->up->type != dep_predepends) continue;
     depender= possi->up->up;
     debug(dbg_depcon, "checking depending package `%s'",
-          pkg_name(depender, pnaw_nonambig));
+          pkg_name(depender, pnaw_always));
     if (!(depender->status == stat_installed ||
           depender->status == stat_triggerspending ||
           depender->status == stat_triggersawaited))
       continue;
     if (ignore_depends(depender)) {
       debug(dbg_depcon, "ignoring depending package '%s'",
-            pkg_name(depender, pnaw_nonambig));
+            pkg_name(depender, pnaw_always));
       continue;
     }
     if (dependtry > 1) { if (findbreakcycle(pkgtoremove)) sincenothing= 0; }
@@ -87,7 +87,7 @@ void deferred_remove(struct pkginfo *pkg) {
   struct dependency *dep;
 
   debug(dbg_general, "deferred_remove package %s",
-        pkg_name(pkg, pnaw_nonambig));
+        pkg_name(pkg, pnaw_always));
 
   if (pkg->status == stat_notinstalled) {
     warning(_("ignoring request to remove %.250s which isn't installed."),
@@ -117,7 +117,7 @@ void deferred_remove(struct pkginfo *pkg) {
   if (!f_noact) modstatdb_note(pkg);
 
   debug(dbg_general, "checking dependencies for remove `%s'",
-        pkg_name(pkg, pnaw_nonambig));
+        pkg_name(pkg, pnaw_always));
   rok= 2;
   checkforremoval(pkg, pkg->set, &rok, &raemsgs);
   for (dep= pkg->installed.depends; dep; dep= dep->next) {
@@ -543,7 +543,7 @@ static void removal_bulk_remove_configfiles(struct pkginfo *pkg) {
 void removal_bulk(struct pkginfo *pkg) {
   bool foundpostrm;
 
-  debug(dbg_general, "removal_bulk package %s", pkg_name(pkg, pnaw_nonambig));
+  debug(dbg_general, "removal_bulk package %s", pkg_name(pkg, pnaw_always));
 
   if (pkg->status == stat_halfinstalled || pkg->status == stat_unpacked) {
     removal_bulk_remove_files(pkg);

+ 9 - 9
src/trigproc.c

@@ -99,7 +99,7 @@ trigproc_enqueue_deferred(struct pkginfo *pend)
 		return;
 	pend->clientdata->trigprocdeferred = pkg_queue_push(&deferred, pend);
 	debug(dbg_triggers, "trigproc_enqueue_deferred pend=%s",
-	      pkg_name(pend, pnaw_nonambig));
+	      pkg_name(pend, pnaw_always));
 }
 
 void
@@ -136,7 +136,7 @@ void
 trig_activate_packageprocessing(struct pkginfo *pkg)
 {
 	debug(dbg_triggersdetail, "trigproc_activate_packageprocessing pkg=%s",
-	      pkg_name(pkg, pnaw_nonambig));
+	      pkg_name(pkg, pnaw_always));
 
 	trig_parse_ci(pkgadminfile(pkg, &pkg->installed, TRIGGERSCIFILE), NULL,
 	              trig_cicb_statuschange_activate, pkg, &pkg->installed);
@@ -180,7 +180,7 @@ check_trigger_cycle(struct pkginfo *processing_now)
 	const char *sep;
 
 	debug(dbg_triggers, "check_triggers_cycle pnow=%s",
-	      pkg_name(processing_now, pnaw_nonambig));
+	      pkg_name(processing_now, pnaw_always));
 
 	tcn = nfmalloc(sizeof(*tcn));
 	tcn->pkgs = NULL;
@@ -199,7 +199,7 @@ check_trigger_cycle(struct pkginfo *processing_now)
 	pkg_db_iter_free(it);
 	if (!hare) {
 		debug(dbg_triggersdetail, "check_triggers_cycle pnow=%s first",
-		      pkg_name(processing_now, pnaw_nonambig));
+		      pkg_name(processing_now, pnaw_always));
 		tcn->next = NULL;
 		hare = tortoise = tcn;
 		return NULL;
@@ -285,8 +285,8 @@ check_trigger_cycle(struct pkginfo *processing_now)
 	/* We give up on the _earliest_ package involved. */
 	giveup = tortoise->pkgs->pkg;
 	debug(dbg_triggers, "check_triggers_cycle pnow=%s giveup=%p",
-	      pkg_name(processing_now, pnaw_nonambig),
-	      pkg_name(giveup, pnaw_nonambig));
+	      pkg_name(processing_now, pnaw_always),
+	      pkg_name(giveup, pnaw_always));
 	assert(giveup->status == stat_triggersawaited ||
 	       giveup->status == stat_triggerspending);
 	pkg_set_status(giveup, stat_halfconfigured);
@@ -309,7 +309,7 @@ trigproc(struct pkginfo *pkg)
 	struct trigpend *tp;
 	struct pkginfo *gaveup;
 
-	debug(dbg_triggers, "trigproc %s", pkg_name(pkg, pnaw_nonambig));
+	debug(dbg_triggers, "trigproc %s", pkg_name(pkg, pnaw_always));
 
 	if (pkg->clientdata->trigprocdeferred)
 		pkg->clientdata->trigprocdeferred->pkg = NULL;
@@ -371,7 +371,7 @@ transitional_interest_callback_ro(const char *trig, struct pkginfo *pkg,
 
 	debug(dbg_triggersdetail,
 	      "trig_transitional_interest_callback trig=%s pend=%s",
-	      trig, pkgbin_name(pend, pendbin, pnaw_nonambig));
+	      trig, pkgbin_name(pend, pendbin, pnaw_always));
 	if (pend->status >= stat_triggersawaited)
 		trig_note_pend(pend, nfstrsave(trig));
 }
@@ -403,7 +403,7 @@ trig_transitional_activate(enum modstatdb_rw cstatus)
 		if (pkg->status <= stat_halfinstalled)
 			continue;
 		debug(dbg_triggersdetail, "trig_transitional_activate %s %s",
-		      pkg_name(pkg, pnaw_nonambig),
+		      pkg_name(pkg, pnaw_always),
 		      statusinfos[pkg->status].name);
 		pkg->trigpend_head = NULL;
 		trig_parse_ci(pkgadminfile(pkg, &pkg->installed, TRIGGERSCIFILE),