~juliank/ubuntu/+source/dpkg:ubuntu/bionic-updates

Last commit made on 2019-07-16
Get this branch:
git clone -b ubuntu/bionic-updates https://git.launchpad.net/~juliank/ubuntu/+source/dpkg
Only Julian Andres Klode can upload to this branch. If you are Julian Andres Klode please log in for upload directions.

Branch merges

Branch information

Name:
ubuntu/bionic-updates
Repository:
lp:~juliank/ubuntu/+source/dpkg

Recent commits

121e1e6... by Julian Andres Klode

releasse

0789bdc... by Guillem Jover <email address hidden>

dpkg: Introduce a new dependency try level for trigger cycle checks

This new dependtry level will also check trigger cycles on trigger
process deferral due to unsatisfiable dependencies.

Closes: #928429
(cherry picked from commit b5c50b3c6f0739f45aaa03afa3e5c857e7895c8c)

f83d39c... by Guillem Jover <email address hidden>

dpkg: Introduce a new dependency try level for trigger processing

The introduction of dependency satisfiability for trigger processing,
which was in the original spec but not the implementation, there has
been countless problems with bogus detection of trigger cycles.

The problem is that whenever we try to process triggers for a package,
we might not be able to due to dependency unsatisfiaiblity, which means
we have to put the package back into the queue. If we add the state into
the cycle detection tracker, then multiple visits to these packages will
hit the cycle detection for artificially generated cycles. But we cannot
avoid performing the checks because that will miss dynamic cycles coming
from maintainer scripts, for example.

To avoid most of these problems (while possibly not fixing all potential
ones), we should delay trigger processsing entirely until we have
emptied the processing queue as much as possible. We do that by
introducing a new dependency try level, after the dependency cycle
breaking one.

We will also make the trigger cycle detection unconditional of the
dependency try, because for the trigproc try-queued it will not matter
anymore as we will only ented on higher dependency tries, and for the
other trigproc types we should not care about any queue-specific
dependency try level.

Closes: #810724, #854478, #911620
(cherry picked from commit 7f43bf5f93c857bdb419892abfc014a5e9c3c273)

08ed49a... by Guillem Jover <email address hidden>

dpkg: Move trigproc cycle reset inside try-deferred conditional

We should only reset the cycle detection in case we are not bailing out
from the processing with an error, otherwise we could come back to this
package and detect an artificial trigger cycle.

(cherry picked from commit d0be735f160c8f5f69d29c8154b9a6c2879733b9)

0fdc12a... by Guillem Jover <email address hidden>

dpkg: Convert one trigger processing required type into the new try-queued

This makes the code stop skipping unsatisfiable dependency checks.

(cherry picked from commit 725828a60a04d2852b35a760bd584d48b28a6024)

c8e7dd0... by Guillem Jover <email address hidden>

dpkg: Split trigger processing types into required, try-queued and try-deferred

Each of these reasons for processing triggers have different requirements
and attributes:

 - The required one, must perform all checks as it is done as part of a
   simple loop to guarantee Pre-Depends satisfiability.
 - The try-deferred one, must not fail on unsatisfiable dependencies, as
   we are doing opportunistic trigger processing, after a normal
   processing queue run.
 - The try-queued one, must perform all checks and fail hard if any
   unsatisfiable scenario occurs.

(cherry picked from commit a23fdc82c44011d2aa54138df4c4af37bd4d5e9e)

607cdcd... by Guillem Jover <email address hidden>

dpkg: Reset progress_bytrigproc once we have injected into the current iteration

We should not leave the package that could be used to make progress by
way of trigger processing in this variable, because it might not have
its dependencies satisfied, which means we'll be trying to process it on
every next loop, and get into artificialy detected trigger cycles.

(cherry picked from commit b166c999d28cc56e5befe7f13329ec5aa8f448ca)

bd1c628... by Guillem Jover <email address hidden>

dpkg: Switch dependtry from an int to an enum

Thiw makes the code way easier to understand as there no magic numbers
anymore. It will also make it trivial to add new levels in-between.

(cherry picked from commit 61bbb77adb5f2c8d6a6d9bff18efa63a4cd2047f)

3f46637... by Guillem Jover <email address hidden>

dpkg: Mark the package we are giving up on a trigger cycle as istobe normal

Once we are giving up on a package that we will stop processing, we need
to mark it as PKG_ISTOBE_NORMAL so that the dependency checks know they
cannot expect this package to be processed anymore. Otherwise we might
end up never detecting that we are not making progress, as we expect to
process this package at a later point, when that will never happen
anymore. This then would end up causing asserts in the process queue
loop.

Closes: #901127, #910819
(cherry picked from commit d4f6b91fda91803b62972c186a81cd07edf300e4)

4ccd9c1... by Guillem Jover <email address hidden>

dpkg: Factor trigproc_new_cyclenode() out from check_trigger_cycle()

(cherry picked from commit a709de31f6b6bf6f394fb7c053e73d92e34a825b)