Explorar o código

dpkg: Rename add_to_queue() to enqueue_package()

Guillem Jover %!s(int64=12) %!d(string=hai) anos
pai
achega
fe8204dc99
Modificáronse 7 ficheiros con 11 adicións e 11 borrados
  1. 1 1
      src/cleanup.c
  2. 1 1
      src/configure.c
  3. 1 1
      src/main.h
  4. 5 5
      src/packages.c
  5. 1 1
      src/remove.c
  6. 1 1
      src/trigproc.c
  7. 1 1
      src/unpack.c

+ 1 - 1
src/cleanup.c

@@ -131,7 +131,7 @@ void ok_prermdeconfigure(int argc, void **argv) {
   struct pkginfo *deconf= (struct pkginfo*)argv[0];
 
   if (cipaction->arg_int == act_install)
-    add_to_queue(deconf);
+    enqueue_package(deconf);
 }
 
 /*

+ 1 - 1
src/configure.c

@@ -373,7 +373,7 @@ deferred_configure(struct pkginfo *pkg)
 	if (ok == dep_check_defer) {
 		varbuf_destroy(&aemsgs);
 		pkg->clientdata->istobe = itb_installnew;
-		add_to_queue(pkg);
+		enqueue_package(pkg);
 		return;
 	}
 

+ 1 - 1
src/main.h

@@ -176,7 +176,7 @@ int clearselections(const char *const *argv);
 /* from packages.c, remove.c and configure.c */
 
 void md5hash(struct pkginfo *pkg, char *hashbuf, const char *fn);
-void add_to_queue(struct pkginfo *pkg);
+void enqueue_package(struct pkginfo *pkg);
 void process_queue(void);
 int packages(const char *const *argv);
 void removal_bulk(struct pkginfo *pkg);

+ 5 - 5
src/packages.c

@@ -53,7 +53,7 @@ static struct pkg_queue queue = PKG_QUEUE_INIT;
 int sincenothing = 0, dependtry = 0;
 
 void
-add_to_queue(struct pkginfo *pkg)
+enqueue_package(struct pkginfo *pkg)
 {
   pkg_queue_push(&queue, pkg);
 }
@@ -95,7 +95,7 @@ enqueue_pending(void)
     default:
       internerr("unknown action '%d'", cipaction->arg_int);
     }
-    add_to_queue(pkg);
+    enqueue_package(pkg);
   }
   pkg_db_iter_free(it);
 }
@@ -122,7 +122,7 @@ enqueue_specified(const char *const *argv)
         badusage(_("you must specify packages by their own names,"
                    " not by quoting the names of the files they come in"));
     }
-    add_to_queue(pkg);
+    enqueue_package(pkg);
   }
 }
 
@@ -213,7 +213,7 @@ void process_queue(void) {
 
     if (sincenothing++ > queue.length * 2 + 2) {
       if (progress_bytrigproc && progress_bytrigproc->trigpend_head) {
-        add_to_queue(pkg);
+        enqueue_package(pkg);
         pkg = progress_bytrigproc;
         action_todo = act_configure;
       } else {
@@ -419,7 +419,7 @@ deppossi_ok_found(struct pkginfo *possdependee, struct pkginfo *requiredby,
       notice(_("also configuring '%s' (required by '%s')"),
              pkg_name(possdependee, pnaw_nonambig),
              pkg_name(requiredby, pnaw_nonambig));
-      add_to_queue(possdependee);
+      enqueue_package(possdependee);
       sincenothing = 0;
       return found_defer;
     } else {

+ 1 - 1
src/remove.c

@@ -136,7 +136,7 @@ void deferred_remove(struct pkginfo *pkg) {
   if (rok == dep_check_defer) {
     varbuf_destroy(&raemsgs);
     pkg->clientdata->istobe= itb_remove;
-    add_to_queue(pkg);
+    enqueue_package(pkg);
     return;
   } else if (rok == dep_check_halt) {
     sincenothing= 0;

+ 1 - 1
src/trigproc.c

@@ -67,7 +67,7 @@
  *
  *
  * For --triggers-only and --configure, we go through each thing in the
- * argument queue (the add_to_queue queue) and check what its state is
+ * argument queue (the enqueue_package queue) and check what its state is
  * and if appropriate we trigproc it. If we didn't have a queue (or had
  * just --pending) we search all triggers-pending packages and add them
  * to the deferred trigproc list.

+ 1 - 1
src/unpack.c

@@ -1436,5 +1436,5 @@ void process_archive(const char *filename) {
   }
 
   if (cipaction->arg_int == act_install)
-    add_to_queue(pkg);
+    enqueue_package(pkg);
 }