|
@@ -56,6 +56,10 @@ int sincenothing = 0, dependtry = 0;
|
|
|
void
|
|
void
|
|
|
enqueue_package(struct pkginfo *pkg)
|
|
enqueue_package(struct pkginfo *pkg)
|
|
|
{
|
|
{
|
|
|
|
|
+ ensure_package_clientdata(pkg);
|
|
|
|
|
+ if (pkg->clientdata->enqueued)
|
|
|
|
|
+ return;
|
|
|
|
|
+ pkg->clientdata->enqueued = true;
|
|
|
pkg_queue_push(&queue, pkg);
|
|
pkg_queue_push(&queue, pkg);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -208,6 +212,9 @@ void process_queue(void) {
|
|
|
if (!pkg)
|
|
if (!pkg)
|
|
|
continue; /* Duplicate, which we removed earlier. */
|
|
continue; /* Duplicate, which we removed earlier. */
|
|
|
|
|
|
|
|
|
|
+ ensure_package_clientdata(pkg);
|
|
|
|
|
+ pkg->clientdata->enqueued = false;
|
|
|
|
|
+
|
|
|
action_todo = cipaction->arg_int;
|
|
action_todo = cipaction->arg_int;
|
|
|
|
|
|
|
|
if (sincenothing++ > queue.length * 2 + 2) {
|
|
if (sincenothing++ > queue.length * 2 + 2) {
|