Parcourir la source

dpkg: Uppercase, namespace and reword istobe enum type and values

Guillem Jover il y a 12 ans
Parent
commit
3fc4c7daf2
10 fichiers modifiés avec 86 ajouts et 69 suppressions
  1. 8 7
      src/archives.c
  2. 2 2
      src/configure.c
  3. 31 25
      src/depcon.c
  4. 7 6
      src/enquiry.c
  5. 2 1
      src/filesdb.c
  6. 2 2
      src/help.c
  7. 7 7
      src/main.h
  8. 15 8
      src/packages.c
  9. 6 5
      src/remove.c
  10. 6 6
      src/unpack.c

+ 8 - 7
src/archives.c

@@ -961,7 +961,7 @@ tarobject(void *ctx, struct tar_entry *ti)
         continue;
 
       /* Perhaps we're removing a conflicting package? */
-      if (otherpkg->clientdata->istobe == itb_remove)
+      if (otherpkg->clientdata->istobe == PKG_ISTOBE_REMOVE)
         continue;
 
       /* Is the file an obsolete conffile in the other package
@@ -1284,7 +1284,7 @@ enqueue_deconfigure(struct pkginfo *pkg, struct pkginfo *pkg_removal)
   struct pkg_deconf_list *newdeconf;
 
   ensure_package_clientdata(pkg);
-  pkg->clientdata->istobe = itb_deconfigure;
+  pkg->clientdata->istobe = PKG_ISTOBE_DECONFIGURE;
   newdeconf = m_malloc(sizeof(struct pkg_deconf_list));
   newdeconf->next = deconfigure;
   newdeconf->pkg = pkg;
@@ -1377,7 +1377,7 @@ void check_breaks(struct dependency *dep, struct pkginfo *pkg,
     char action[512];
 
     ensure_package_clientdata(fixbydeconf);
-    assert(fixbydeconf->clientdata->istobe == itb_normal);
+    assert(fixbydeconf->clientdata->istobe == PKG_ISTOBE_NORMAL);
 
     sprintf(action, _("installation of %.250s"),
             pkgbin_name(pkg, &pkg->available, pnaw_nonambig));
@@ -1430,7 +1430,7 @@ void check_conflict(struct dependency *dep, struct pkginfo *pkg,
   }
   if (fixbyrm) {
     ensure_package_clientdata(fixbyrm);
-    if (fixbyrm->clientdata->istobe == itb_installnew) {
+    if (fixbyrm->clientdata->istobe == PKG_ISTOBE_INSTALLNEW) {
       fixbyrm= dep->up;
       ensure_package_clientdata(fixbyrm);
     }
@@ -1438,8 +1438,9 @@ void check_conflict(struct dependency *dep, struct pkginfo *pkg,
          (((fixbyrm->want != want_install && fixbyrm->want != want_hold) ||
            does_replace(pkg, &pkg->available, fixbyrm, &fixbyrm->installed)) &&
           (!fixbyrm->installed.essential || fc_removeessential)))) {
-      assert(fixbyrm->clientdata->istobe == itb_normal || fixbyrm->clientdata->istobe == itb_deconfigure);
-      fixbyrm->clientdata->istobe= itb_remove;
+      assert(fixbyrm->clientdata->istobe == PKG_ISTOBE_NORMAL ||
+             fixbyrm->clientdata->istobe == PKG_ISTOBE_DECONFIGURE);
+      fixbyrm->clientdata->istobe = PKG_ISTOBE_REMOVE;
       notice(_("considering removing %s in favour of %s ..."),
              pkg_name(fixbyrm, pnaw_nonambig),
              pkgbin_name(pkg, &pkg->available, pnaw_nonambig));
@@ -1509,7 +1510,7 @@ void check_conflict(struct dependency *dep, struct pkginfo *pkg,
         return;
       }
       /* Put it back. */
-      fixbyrm->clientdata->istobe = itb_normal;
+      fixbyrm->clientdata->istobe = PKG_ISTOBE_NORMAL;
     }
   }
   varbuf_end_str(&conflictwhy);

+ 2 - 2
src/configure.c

@@ -604,7 +604,7 @@ deferred_configure(struct pkginfo *pkg)
 	ok = dependencies_ok(pkg, NULL, &aemsgs);
 	if (ok == DEP_CHECK_DEFER) {
 		varbuf_destroy(&aemsgs);
-		pkg->clientdata->istobe = itb_installnew;
+		pkg->clientdata->istobe = PKG_ISTOBE_INSTALLNEW;
 		enqueue_package(pkg);
 		return;
 	}
@@ -648,7 +648,7 @@ deferred_configure(struct pkginfo *pkg)
 
 	if (f_noact) {
 		pkg_set_status(pkg, stat_installed);
-		pkg->clientdata->istobe = itb_normal;
+		pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
 		return;
 	}
 

+ 31 - 25
src/depcon.c

@@ -76,7 +76,7 @@ deppossi_pkg_iter_next(struct deppossi_pkg_iterator *iter)
       pkgbin = &pkg_cur->available;
       break;
     case wpb_by_istobe:
-      if (pkg_cur->clientdata->istobe == itb_installnew)
+      if (pkg_cur->clientdata->istobe == PKG_ISTOBE_INSTALLNEW)
         pkgbin = &pkg_cur->available;
       else
         pkgbin = &pkg_cur->installed;
@@ -207,7 +207,8 @@ findbreakcyclerecursive(struct pkginfo *pkg, struct cyclesofarlink *sofar)
            providelink = providelink->rev_next) {
         if (providelink->up->type != dep_provides) continue;
         provider= providelink->up->up;
-        if (provider->clientdata->istobe == itb_normal) continue;
+        if (provider->clientdata->istobe == PKG_ISTOBE_NORMAL)
+          continue;
         /* We don't break things at ‘provides’ links, so ‘possi’ is
          * still the one we use. */
         if (foundcyclebroken(&thislink, sofar, provider, possi))
@@ -326,9 +327,10 @@ depisok(struct dependency *dep, struct varbuf *whynot,
   /* The dependency is always OK if we're trying to remove the depend*ing*
    * package. */
   switch (dep->up->clientdata->istobe) {
-  case itb_remove: case itb_deconfigure:
+  case PKG_ISTOBE_REMOVE:
+  case PKG_ISTOBE_DECONFIGURE:
     return true;
-  case itb_normal:
+  case PKG_ISTOBE_NORMAL:
     /* Only installed packages can be make dependency problems. */
     switch (dep->up->status) {
     case stat_installed:
@@ -342,7 +344,8 @@ depisok(struct dependency *dep, struct varbuf *whynot,
       internerr("unknown status depending '%d'", dep->up->status);
     }
     break;
-  case itb_installnew: case itb_preinstall:
+  case PKG_ISTOBE_INSTALLNEW:
+  case PKG_ISTOBE_PREINSTALL:
     break;
   default:
     internerr("unknown istobe depending '%d'", dep->up->clientdata->istobe);
@@ -368,15 +371,15 @@ depisok(struct dependency *dep, struct varbuf *whynot,
       possi_iter = deppossi_pkg_iter_new(possi, wpb_by_istobe);
       while ((pkg_pos = deppossi_pkg_iter_next(possi_iter))) {
         switch (pkg_pos->clientdata->istobe) {
-        case itb_remove:
+        case PKG_ISTOBE_REMOVE:
           sprintf(linebuf, _("  %.250s is to be removed.\n"),
                   pkg_name(pkg_pos, pnaw_nonambig));
           break;
-        case itb_deconfigure:
+        case PKG_ISTOBE_DECONFIGURE:
           sprintf(linebuf, _("  %.250s is to be deconfigured.\n"),
                   pkg_name(pkg_pos, pnaw_nonambig));
           break;
-        case itb_installnew:
+        case PKG_ISTOBE_INSTALLNEW:
           if (versionsatisfied(&pkg_pos->available, possi)) {
             deppossi_pkg_iter_free(possi_iter);
             return true;
@@ -386,8 +389,8 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                   pkgbin_name(pkg_pos, &pkg_pos->available, pnaw_nonambig),
                   versiondescribe(&pkg_pos->available.version, vdew_nonambig));
           break;
-        case itb_normal:
-        case itb_preinstall:
+        case PKG_ISTOBE_NORMAL:
+        case PKG_ISTOBE_PREINSTALL:
           switch (pkg_pos->status) {
           case stat_installed:
           case stat_triggerspending:
@@ -461,7 +464,7 @@ depisok(struct dependency *dep, struct varbuf *whynot,
              provider;
              provider = provider->rev_next) {
           if (provider->up->type != dep_provides) continue;
-          if (provider->up->up->clientdata->istobe == itb_installnew)
+          if (provider->up->up->clientdata->istobe == PKG_ISTOBE_INSTALLNEW)
             return true;
         }
 
@@ -472,23 +475,24 @@ depisok(struct dependency *dep, struct varbuf *whynot,
           if (provider->up->type != dep_provides) continue;
 
           switch (provider->up->up->clientdata->istobe) {
-          case itb_installnew:
+          case PKG_ISTOBE_INSTALLNEW:
             /* Don't pay any attention to the Provides field of the
              * currently-installed version of the package we're trying
              * to install. We dealt with that by using the available
              * information above. */
             continue;
-          case itb_remove:
+          case PKG_ISTOBE_REMOVE:
             sprintf(linebuf, _("  %.250s provides %.250s but is to be removed.\n"),
                     pkg_name(provider->up->up, pnaw_nonambig),
                     possi->ed->name);
             break;
-          case itb_deconfigure:
+          case PKG_ISTOBE_DECONFIGURE:
             sprintf(linebuf, _("  %.250s provides %.250s but is to be deconfigured.\n"),
                     pkg_name(provider->up->up, pnaw_nonambig),
                     possi->ed->name);
             break;
-          case itb_normal: case itb_preinstall:
+          case PKG_ISTOBE_NORMAL:
+          case PKG_ISTOBE_PREINSTALL:
             if (provider->up->up->status == stat_installed ||
                 provider->up->up->status == stat_triggerspending)
               return true;
@@ -537,9 +541,9 @@ depisok(struct dependency *dep, struct varbuf *whynot,
       possi_iter = deppossi_pkg_iter_new(possi, wpb_by_istobe);
       while ((pkg_pos = deppossi_pkg_iter_next(possi_iter))) {
         switch (pkg_pos->clientdata->istobe) {
-        case itb_remove:
+        case PKG_ISTOBE_REMOVE:
           break;
-        case itb_installnew:
+        case PKG_ISTOBE_INSTALLNEW:
           if (!versionsatisfied(&pkg_pos->available, possi))
             break;
           sprintf(linebuf, _("  %.250s (version %.250s) is to be installed.\n"),
@@ -553,12 +557,12 @@ depisok(struct dependency *dep, struct varbuf *whynot,
           nconflicts++;
           *canfixbyremove = pkg_pos;
           break;
-        case itb_deconfigure:
+        case PKG_ISTOBE_DECONFIGURE:
           if (dep->type == dep_breaks)
             break; /* Already deconfiguring this. */
           /* Fall through. */
-        case itb_normal:
-        case itb_preinstall:
+        case PKG_ISTOBE_NORMAL:
+        case PKG_ISTOBE_PREINSTALL:
           switch (pkg_pos->status) {
           case stat_notinstalled:
           case stat_configfiles:
@@ -600,7 +604,8 @@ depisok(struct dependency *dep, struct varbuf *whynot,
            provider;
            provider = provider->rev_next) {
         if (provider->up->type != dep_provides) continue;
-        if (provider->up->up->clientdata->istobe != itb_installnew) continue;
+        if (provider->up->up->clientdata->istobe != PKG_ISTOBE_INSTALLNEW)
+          continue;
         if (provider->up->up->set == dep->up->set)
           continue; /* Conflicts and provides the same. */
         sprintf(linebuf, _("  %.250s provides %.250s and is to be installed.\n"),
@@ -623,18 +628,19 @@ depisok(struct dependency *dep, struct varbuf *whynot,
           continue; /* Conflicts and provides the same. */
 
         switch (provider->up->up->clientdata->istobe) {
-        case itb_installnew:
+        case PKG_ISTOBE_INSTALLNEW:
           /* Don't pay any attention to the Provides field of the
            * currently-installed version of the package we're trying
            * to install. We dealt with that package by using the
            * available information above. */
           continue;
-        case itb_remove:
+        case PKG_ISTOBE_REMOVE:
           continue;
-        case itb_deconfigure:
+        case PKG_ISTOBE_DECONFIGURE:
           if (dep->type == dep_breaks)
             continue; /* Already deconfiguring. */
-        case itb_normal: case itb_preinstall:
+        case PKG_ISTOBE_NORMAL:
+        case PKG_ISTOBE_PREINSTALL:
           switch (provider->up->up->status) {
           case stat_notinstalled: case stat_configfiles:
             continue;

+ 7 - 6
src/enquiry.c

@@ -465,7 +465,7 @@ predeppackage(const char *const *argv)
     /* Ignore packages not available. */
     if (!pkg->files)
       continue;
-    pkg->clientdata->istobe= itb_preinstall;
+    pkg->clientdata->istobe = PKG_ISTOBE_PREINSTALL;
     for (dep= pkg->available.depends; dep; dep= dep->next) {
       if (dep->type != dep_predepends) continue;
       if (depisok(dep, &vb, NULL, NULL, true))
@@ -473,7 +473,7 @@ predeppackage(const char *const *argv)
       /* This will leave dep non-NULL, and so exit the loop. */
       break;
     }
-    pkg->clientdata->istobe= itb_normal;
+    pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
     /* If dep is NULL we go and get the next package. */
   }
   pkg_db_iter_free(it);
@@ -482,7 +482,7 @@ predeppackage(const char *const *argv)
     return 1; /* Not found. */
   assert(pkg);
   startpkg= pkg;
-  pkg->clientdata->istobe= itb_preinstall;
+  pkg->clientdata->istobe = PKG_ISTOBE_PREINSTALL;
 
   /* OK, we have found an unsatisfied predependency.
    * Now go and find the first thing we need to install, as a first step
@@ -496,7 +496,8 @@ predeppackage(const char *const *argv)
 
       possi_iter = deppossi_pkg_iter_new(possi, wpb_available);
       while (!pkg && (trypkg = deppossi_pkg_iter_next(possi_iter))) {
-        if (trypkg->files && trypkg->clientdata->istobe == itb_normal &&
+        if (trypkg->files &&
+            trypkg->clientdata->istobe == PKG_ISTOBE_NORMAL &&
             versionsatisfied(&trypkg->available, possi)) {
           pkg = trypkg;
           break;
@@ -511,7 +512,7 @@ predeppackage(const char *const *argv)
           trypkg = provider->up->up;
           if (!trypkg->files)
             continue;
-          if (trypkg->clientdata->istobe == itb_normal) {
+          if (trypkg->clientdata->istobe == PKG_ISTOBE_NORMAL) {
             pkg = trypkg;
             break;
           }
@@ -528,7 +529,7 @@ predeppackage(const char *const *argv)
              pkgbin_name(dep->up, &dep->up->available, pnaw_nonambig),
              pkgbin_name(startpkg, &startpkg->available, pnaw_nonambig));
     }
-    pkg->clientdata->istobe= itb_preinstall;
+    pkg->clientdata->istobe = PKG_ISTOBE_PREINSTALL;
     for (dep= pkg->available.depends; dep; dep= dep->next) {
       if (dep->type != dep_predepends) continue;
       if (depisok(dep, &vb, NULL, NULL, true))

+ 2 - 1
src/filesdb.c

@@ -4,6 +4,7 @@
  *
  * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk>
  * Copyright © 2000,2001 Wichert Akkerman <wakkerma@debian.org>
+ * Copyright © 2008-2014 Guillem Jover <guillem@debian.org>
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -101,7 +102,7 @@ ensure_package_clientdata(struct pkginfo *pkg)
   if (pkg->clientdata)
     return;
   pkg->clientdata = nfmalloc(sizeof(struct perpackagestate));
-  pkg->clientdata->istobe = itb_normal;
+  pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
   pkg->clientdata->color = white;
   pkg->clientdata->fileslistvalid = false;
   pkg->clientdata->files = NULL;

+ 2 - 2
src/help.c

@@ -3,7 +3,7 @@
  * help.c - various helper routines
  *
  * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk>
- * Copyright © 2007-2012 Guillem Jover <guillem@debian.org>
+ * Copyright © 2007-2014 Guillem Jover <guillem@debian.org>
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -204,7 +204,7 @@ void clear_istobes(void) {
   it = pkg_db_iter_new();
   while ((pkg = pkg_db_iter_next_pkg(it)) != NULL) {
     ensure_package_clientdata(pkg);
-    pkg->clientdata->istobe= itb_normal;
+    pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
     pkg->clientdata->replacingfilesandsaid= 0;
   }
   pkg_db_iter_free(it);

+ 7 - 7
src/main.h

@@ -29,12 +29,12 @@
 struct fileinlist;
 struct filenamenode;
 
-enum istobes {
-	itb_normal,
-	itb_remove,
-	itb_installnew,
-	itb_deconfigure,
-	itb_preinstall
+enum pkg_istobe {
+	PKG_ISTOBE_NORMAL,
+	PKG_ISTOBE_REMOVE,
+	PKG_ISTOBE_INSTALLNEW,
+	PKG_ISTOBE_DECONFIGURE,
+	PKG_ISTOBE_PREINSTALL,
 };
 
 enum pkg_cycle_color {
@@ -44,7 +44,7 @@ enum pkg_cycle_color {
 };
 
 struct perpackagestate {
-  enum istobe istobe;
+  enum pkg_istobe istobe;
 
   /** Used during cycle detection. */
   enum pkg_cycle_color color;

+ 15 - 8
src/packages.c

@@ -159,7 +159,7 @@ void process_queue(void) {
   struct pkginfo *volatile pkg;
   volatile enum action action_todo;
   jmp_buf ejbuf;
-  enum istobes istobe= itb_normal;
+  enum pkg_istobe istobe = PKG_ISTOBE_NORMAL;
 
   if (abort_processing)
     return;
@@ -168,8 +168,14 @@ void process_queue(void) {
 
   switch (cipaction->arg_int) {
   case act_triggers:
-  case act_configure: case act_install:  istobe= itb_installnew;  break;
-  case act_remove: case act_purge:       istobe= itb_remove;      break;
+  case act_configure:
+  case act_install:
+    istobe = PKG_ISTOBE_INSTALLNEW;
+    break;
+  case act_remove:
+  case act_purge:
+    istobe = PKG_ISTOBE_REMOVE;
+    break;
   default:
     internerr("unknown action '%d'", cipaction->arg_int);
   }
@@ -222,7 +228,7 @@ void process_queue(void) {
     if (setjmp(ejbuf)) {
       /* Give up on it from the point of view of other packages, i.e. reset
        * istobe. */
-      pkg->clientdata->istobe= itb_normal;
+      pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
 
       pop_error_context(ehflag_bombout);
       if (abort_processing)
@@ -373,8 +379,9 @@ deppossi_ok_found(struct pkginfo *possdependee, struct pkginfo *requiredby,
     }
     if (possdependee->status == stat_triggersawaited) {
       assert(possdependee->trigaw.head);
-      if (removing || !(f_triggers ||
-                        possdependee->clientdata->istobe == itb_installnew)) {
+      if (removing ||
+          !(f_triggers ||
+            possdependee->clientdata->istobe == PKG_ISTOBE_INSTALLNEW)) {
         if (providing) {
           varbuf_printf(oemsgs,
                         _("  Package %s which provides %s awaits trigger processing.\n"),
@@ -404,7 +411,7 @@ deppossi_ok_found(struct pkginfo *possdependee, struct pkginfo *requiredby,
       return FOUND_DEFER;
     }
     if (possdependee->clientdata &&
-        possdependee->clientdata->istobe == itb_installnew) {
+        possdependee->clientdata->istobe == PKG_ISTOBE_INSTALLNEW) {
       debug(dbg_depcondetail,"      unpacked/halfconfigured, defer");
       return FOUND_DEFER;
     } else if (!removing && fc_configureany &&
@@ -659,7 +666,7 @@ dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing,
     }
   }
   if (ok == DEP_CHECK_HALT &&
-      (pkg->clientdata && pkg->clientdata->istobe == itb_remove))
+      (pkg->clientdata && pkg->clientdata->istobe == PKG_ISTOBE_REMOVE))
     ok = DEP_CHECK_DEFER;
   if (!anycannotfixbytrig && canfixbytrig)
     progress_bytrigproc = canfixbytrig;

+ 6 - 5
src/remove.c

@@ -75,7 +75,8 @@ static void checkforremoval(struct pkginfo *pkgtoremove,
     if (dependtry > 1) { if (findbreakcycle(pkgtoremove)) sincenothing= 0; }
     before= raemsgs->used;
     ok= dependencies_ok(depender,pkgtoremove,raemsgs);
-    if (ok == DEP_CHECK_HALT && depender->clientdata->istobe == itb_remove)
+    if (ok == DEP_CHECK_HALT &&
+        depender->clientdata->istobe == PKG_ISTOBE_REMOVE)
       ok = DEP_CHECK_DEFER;
     if (ok == DEP_CHECK_DEFER)
       /* Don't burble about reasons for deferral. */
@@ -106,7 +107,7 @@ void deferred_remove(struct pkginfo *pkg) {
     sincenothing = 0;
     warning(_("ignoring request to remove %.250s which isn't installed"),
             pkg_name(pkg, pnaw_nonambig));
-    pkg->clientdata->istobe= itb_normal;
+    pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
     return;
   } else if (!f_pending &&
              pkg->status == stat_configfiles &&
@@ -115,7 +116,7 @@ void deferred_remove(struct pkginfo *pkg) {
     warning(_("ignoring request to remove %.250s, only the config\n"
               " files of which are on the system; use --purge to remove them too"),
             pkg_name(pkg, pnaw_nonambig));
-    pkg->clientdata->istobe= itb_normal;
+    pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
     return;
   }
 
@@ -135,7 +136,7 @@ void deferred_remove(struct pkginfo *pkg) {
 
   if (rok == DEP_CHECK_DEFER) {
     varbuf_destroy(&raemsgs);
-    pkg->clientdata->istobe= itb_remove;
+    pkg->clientdata->istobe = PKG_ISTOBE_REMOVE;
     enqueue_package(pkg);
     return;
   } else if (rok == DEP_CHECK_HALT) {
@@ -165,7 +166,7 @@ void deferred_remove(struct pkginfo *pkg) {
            pkg_name(pkg, pnaw_nonambig),
            versiondescribe(&pkg->installed.version, vdew_nonambig));
     pkg_set_status(pkg, stat_notinstalled);
-    pkg->clientdata->istobe= itb_normal;
+    pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
     return;
   }
 

+ 6 - 6
src/unpack.c

@@ -538,7 +538,7 @@ void process_archive(const char *filename) {
 
   /* Check if anything is installed that we conflict with, or not installed
    * that we need. */
-  pkg->clientdata->istobe = itb_installnew;
+  pkg->clientdata->istobe = PKG_ISTOBE_INSTALLNEW;
 
   for (dsearch= pkg->available.depends; dsearch; dsearch= dsearch->next) {
     switch (dsearch->type) {
@@ -1257,7 +1257,7 @@ void process_archive(const char *filename) {
     if (otherpkg == pkg ||
         otherpkg->status == stat_notinstalled ||
         otherpkg->status == stat_configfiles ||
-	otherpkg->clientdata->istobe == itb_remove ||
+        otherpkg->clientdata->istobe == PKG_ISTOBE_REMOVE ||
         !otherpkg->clientdata->files) continue;
     /* Do not try to disappear other packages from the same set
      * if they are Multi-Arch: same */
@@ -1267,8 +1267,8 @@ void process_archive(const char *filename) {
       continue;
     debug(dbg_veryverbose, "process_archive checking disappearance %s",
           pkg_name(otherpkg, pnaw_always));
-    assert(otherpkg->clientdata->istobe == itb_normal ||
-           otherpkg->clientdata->istobe == itb_deconfigure);
+    assert(otherpkg->clientdata->istobe == PKG_ISTOBE_NORMAL ||
+           otherpkg->clientdata->istobe == PKG_ISTOBE_DECONFIGURE);
     for (cfile= otherpkg->clientdata->files;
          cfile && strcmp(cfile->namenode->name, "/.") == 0;
          cfile= cfile->next);
@@ -1282,7 +1282,7 @@ void process_archive(const char *filename) {
     if (cfile) continue;
 
     /* So dependency things will give right answers ... */
-    otherpkg->clientdata->istobe= itb_remove;
+    otherpkg->clientdata->istobe = PKG_ISTOBE_REMOVE;
     debug(dbg_veryverbose, "process_archive disappear checking dependencies");
     for (pdep = otherpkg->set->depended.installed;
          pdep;
@@ -1317,7 +1317,7 @@ void process_archive(const char *filename) {
       }
     break_from_both_loops_at_once:;
     }
-    otherpkg->clientdata->istobe= itb_normal;
+    otherpkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
     if (pdep) continue;
 
     /* No, we're disappearing it. This is the wrong time to go and