<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg, branch 2.3.9</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.3.9</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.3.9'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2021-09-06T14:51:27Z</updated>
<entry>
<title>Improve error handling of cycling delayed queues</title>
<updated>2021-09-06T14:51:27Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-09-06T14:51:27Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e664bdcfb287e7456f084e0335b7c68bab89d6e7'/>
<id>urn:sha1:e664bdcfb287e7456f084e0335b7c68bab89d6e7</id>
<content type='text'>
When an item has been delayed and the queue is cycled to start
it, we did not properly report an error from the cycling, and
we would then fail in the assert(), causing all errors to be
lost.

Propagate the error instead and make the assert a warning.
</content>
</entry>
<entry>
<title>Increase recursion limits from 100 to 3000</title>
<updated>2021-08-29T12:23:26Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2021-08-29T11:50:31Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5f6bbfa53c32ec30aff6a2bc8c412616049eab18'/>
<id>urn:sha1:5f6bbfa53c32ec30aff6a2bc8c412616049eab18</id>
<content type='text'>
If you install dpkg on an empty status file with all recommends and
suggests apt wants to install 4000+ packages. The deepest chain
seemingly being 236 steps long. And dpkg isn't even the worst (~259).

That is a problem as libapt has a hardcoded recursion limit for
MarkInstall and friends … set to 100. We are saved by the fact that
chains without suggests are much shorter (dpkg has 5, max seems ~43),
but I ignored Conflicts in these chains, which typically trigger
upgrades, so if two of the worst are chained together we suddenly get
dangerously close to the limit still.

So, lets just increase the limit into oblivion as it is really just a
safety measure we should not be running into to begin with. MarkPackage
was running years without it after all. 3000 is picked as a nice number
as any other and because it is roughly the half of the stack crashs I
saw previously in this branch.
</content>
</entry>
<entry>
<title>Stop autoremover from endlessly exploring cyclic providers</title>
<updated>2021-08-28T20:21:35Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2021-08-28T13:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c7e368aafe099dcd966cf5994ae7fb418d268278'/>
<id>urn:sha1:c7e368aafe099dcd966cf5994ae7fb418d268278</id>
<content type='text'>
fullyExplored is needed to keep track of having explored all providers
of a package name, while Marked is tracking if we have explored a given
real package (along its chosen version), so we should stop MarkPackage
from exploring a (real) package if it is marked and let fullyExplored
only guard the looping over the individual dependencies.

The testcase is deceptively simple, but in practice only an ecosystem
like rust who makes heavy use of cyclic dependency relations intermixed
with versioned provides actually triggers this as seen by the buggy code
being in use for four months in Debian and Ubuntu development releases.
(easier to trigger if most packages are marked manual installed)

Note that the testcase is successful already due to the earlier changes
as we exit the recursion eventually and all packages are marked as they
need to be already, but this fix does work standalone as well.

Closes: #992993
</content>
</entry>
<entry>
<title>Don't venture too deeply in AutoRemovers MarkPackage</title>
<updated>2021-08-28T20:21:35Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2021-08-28T17:49:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e4701219cf821d24f7f48ed6e4d8123c11d47c8b'/>
<id>urn:sha1:e4701219cf821d24f7f48ed6e4d8123c11d47c8b</id>
<content type='text'>
MarkInstall has the same depth limit, so lets use this arbitrary limit
to avoid trying to hard as that usually means we will never stop – at
least not until we crash, which is not a very good error case.
</content>
</entry>
<entry>
<title>Move hidden MarkPackage to a static function</title>
<updated>2021-08-28T20:21:35Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2021-08-28T17:22:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d7e9f0779043814d6e7a4141170fa7f18cd90803'/>
<id>urn:sha1:d7e9f0779043814d6e7a4141170fa7f18cd90803</id>
<content type='text'>
We can't have external users as its marked hidden and as we don't even
have users outside of pkgDepCache itself we can remove the function
completely from the public eye. That adds many new parameters, but it
also allows to add a few more like avoiding constantly checking the
debug config value.

Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>Simplify selection of highest source version providers</title>
<updated>2021-08-28T20:21:35Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2021-08-28T11:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=b104891d015d0b8e152d8ac723027f824077948a'/>
<id>urn:sha1:b104891d015d0b8e152d8ac723027f824077948a</id>
<content type='text'>
The old code is a bit longer and does a sort (N*log(N)) + find (at most N)
It is replaced by max_element (N) + remove_if (N). The practical
difference is minimal as the N we operate on is rather small, but the
replacement is hopefully easier to understand at a glance as well.

Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>Add support for a maximum delay and testing of delay</title>
<updated>2021-07-28T11:08:35Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-07-28T10:43:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4001af8920389e2bb2672b673b181c4e92515872'/>
<id>urn:sha1:4001af8920389e2bb2672b673b181c4e92515872</id>
<content type='text'>
This is very basic support on the testing side, we just test
the debug output but not how long it actually took. Would be
nice to check time really.
</content>
</entry>
<entry>
<title>Properly convert PulseInterval to timeval</title>
<updated>2021-07-28T11:08:35Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-07-27T15:14:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=51ee79e385d8ccb2f32195cc01f3f9c943197603'/>
<id>urn:sha1:51ee79e385d8ccb2f32195cc01f3f9c943197603</id>
<content type='text'>
Fix the typo, and use the helper function to convert it, so we
do not end up with 5 seconds encoded as 0s and 5*10^6 microseconds.
</content>
</entry>
<entry>
<title>Convert to monotonic clock</title>
<updated>2021-07-28T11:08:35Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-07-27T14:40:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=48a7ece8d0e065240153a85089f544383e16137f'/>
<id>urn:sha1:48a7ece8d0e065240153a85089f544383e16137f</id>
<content type='text'>
This yields more accurate delays and avoids issues with clock
skew.
</content>
</entry>
<entry>
<title>acquire: Automatically reduce select() timeout as needed</title>
<updated>2021-07-28T11:08:32Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-07-13T10:21:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7e88def0548a92112f8295686c2a12379e4028be'/>
<id>urn:sha1:7e88def0548a92112f8295686c2a12379e4028be</id>
<content type='text'>
If there is an item with fetchAfter at the top of a queue,
reduce sleep() timeout so we can detect it and start it,
by calling Cycle() on the queue in the next iteration.

For some reasons we have to call select() with a 0s timeout
if we just marked an item as ready. Oh well.

Previous versions of this patch only called global Bump() after a timeout
from select(); this was unfortunately incorrect - it meant that we
never bumped a queue that did not start yet while other queues were
running, potentially significantly delaying retries.
</content>
</entry>
</feed>
