<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/doc/examples, branch 2.9.18</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.9.18</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.9.18'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2024-12-18T09:25:24Z</updated>
<entry>
<title>Introduce automatic pager for read commands</title>
<updated>2024-12-18T09:25:24Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-12-16T16:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=6e260e26e4cd671f781151e24d89a17b29a55530'/>
<id>urn:sha1:6e260e26e4cd671f781151e24d89a17b29a55530</id>
<content type='text'>
Automatically show the output of `show`, `policy`, `list`,
`search`, `showsrc` in a pager.

The pager setup is inspired by git's pager setup. Notably,
the pager is found using APT_PAGER and PAGER variables.

We wait for the pager to be setup somewhat correctly by
using a notify pipe to figure out whether execvp() was
succesful - then the pipe will read EOF as the other end
got closed by CLOEXEC during exec - or not, then the pipe
will contain an errno.

We set up the correct handlers for signals and exit to close
the fds and wait for the pager. Notably inside the signal
handler we cannot flush our streams, only close them, so
there is some duplication.

We call the InitOutputPager() function from inside the
various Do...() functions rather than setting it up
generally in InitOutput(). Doing so allows us to first
render the progress without a pager, and then setup
the pager for the content only which improves user
experience.

When we setup a pager we also take care to disable
standard input, as we should not be prompting users
while a pager is running (the pager will be reading
from the tty directly). We do this by dup2-ing() a
/dev/null over it; if we just close()d the fd, another
open() might reuse the fd number and problems could
occur.
</content>
</entry>
<entry>
<title>Merge branch 'fix/partialfilemirror' into 'main'</title>
<updated>2024-11-22T16:12:34Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-11-22T16:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1818699c1bc8a5be2d6542fe3212f26af7fa912a'/>
<id>urn:sha1:1818699c1bc8a5be2d6542fe3212f26af7fa912a</id>
<content type='text'>
Support uncompressed indexes from partial file:/ mirrors

See merge request apt-team/apt!235</content>
</entry>
<entry>
<title>Allow AutoDetectProxy to work with more than just http(s)</title>
<updated>2024-11-22T12:40:10Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-26T20:22:46Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d9601bce6e1fa61cbb3dc4d66e5492f9885eef8f'/>
<id>urn:sha1:d9601bce6e1fa61cbb3dc4d66e5492f9885eef8f</id>
<content type='text'>
It is a bit unfair for third-party methods wrapping e.g. http to not
have access to such tools, same for our old ftp and e.g. our tor even
if in practice this isn't used much even for http.

At least that is one less FIXME in the code.
</content>
</entry>
<entry>
<title>Rewrite hidden config option checker for more patterns</title>
<updated>2024-11-22T12:40:10Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-26T19:33:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=eb1e6fc4973a844adbea0297c6425b00f64e8b7b'/>
<id>urn:sha1:eb1e6fc4973a844adbea0297c6425b00f64e8b7b</id>
<content type='text'>
The previous version allowed only foo::*::bar as a pattern, now you can
have as many starred parts as you want allowing for a finer control
instead of hardcoding specific common star-values or giving up with **.

It also adds a new INVALID type for an option to mark options which
should not be used, but are covered by a pattern which would normally
allow it.

Our tests are more or less the only users of this hidden feature making
this change not very risky even through it has no dedicated test itself.
</content>
</entry>
<entry>
<title>Avoid unnormalized paths for CMake install destinations</title>
<updated>2024-11-22T12:11:13Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2024-11-19T21:58:13Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7578b7031921231400be78fa8c2893bbd5ea18df'/>
<id>urn:sha1:7578b7031921231400be78fa8c2893bbd5ea18df</id>
<content type='text'>
CMake 3.31 is very noisy about our manpage (and to a lesser extend
documentation in general) building as we used "//" and "/../" there.

`cmake --help-policy CMP0177` documents the warning, so we could just
decide on a value and deal with it, but given our usage is not really
needed and rather trivial to change lets not pick a value and instead
use a normalized path so we don't use different code paths in CMake
depending on which CMake version we happen to be build with.
</content>
</entry>
<entry>
<title>Add a --comment option to record Comment: in history</title>
<updated>2024-11-18T19:15:08Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-11-18T19:07:02Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1c4fa81cc398e21868ad237509f1ea8e772d76de'/>
<id>urn:sha1:1c4fa81cc398e21868ad237509f1ea8e772d76de</id>
<content type='text'>
Suggested-by: mhoye on IRC
</content>
</entry>
<entry>
<title>http: use Retry-After HTTP header to optimize retries</title>
<updated>2024-11-18T12:44:49Z</updated>
<author>
<name>Felix Moessbauer</name>
<email>felix.moessbauer@siemens.com</email>
</author>
<published>2024-11-08T14:04:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7b9dea5a7c43fd91bcd23d1585d39a726d098285'/>
<id>urn:sha1:7b9dea5a7c43fd91bcd23d1585d39a726d098285</id>
<content type='text'>
Some mirrors like snapshot.debian.org apply strict http rate limits.
While apt already has an exponential backoff mechanism implemented, this
is not sufficient due to the following reasons:

1. all retries happen roughly at the same time
2. the retry-after information from the server is not used

We fix this by improving the algorithm: First, if present, the timestamp
or duration of the Retry-After header is added to the exponential
backoff, optimizing for success-on-second-try. Second, a random delay is
added (delay += [0, delay]) to distribute the retries to not immediately
run into the limit again. To avoid super-long delays, this is capped by
the configured maximum delay. This logic only becomes active if the
option Acquire::Retries::HandleRetryAfter is enabled.

Signed-off-by: Felix Moessbauer &lt;felix.moessbauer@siemens.com&gt;
</content>
</entry>
<entry>
<title>Only revoke weak RSA keys for now, add 'next' and 'future' levels</title>
<updated>2024-07-15T17:17:55Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-07-15T17:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=47deb766c0a11c54d122197531279677545459af'/>
<id>urn:sha1:47deb766c0a11c54d122197531279677545459af</id>
<content type='text'>
Algorithms not in the next level give a warning, algorithms
in not in the future level introduce an audit message for
the --audit flag.

next: &gt;=rsa2048,ed25519,ed448,nistp256,nistp384,nistp512
future: &gt;=rsa3072,ed25519,ed448

LP: #2073126
</content>
</entry>
<entry>
<title>solver3: Implement APT::Solver::RemoveManual to allow removing manual packages</title>
<updated>2024-05-24T11:43:56Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-05-24T11:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=67a8a6470ddb8a603db02c5fab84aa225dc00f8d'/>
<id>urn:sha1:67a8a6470ddb8a603db02c5fab84aa225dc00f8d</id>
<content type='text'>
This is mostly going to be useful for the test suite for now,
implement a function there to set it up so we can use it to
improve test suite correctness.
</content>
</entry>
<entry>
<title>Initial implementation of the 3.0 solver</title>
<updated>2024-05-14T09:56:18Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-05-06T13:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=89dcc342e17dd2439d97a5d27200cf5c26ba35bc'/>
<id>urn:sha1:89dcc342e17dd2439d97a5d27200cf5c26ba35bc</id>
<content type='text'>
This is a simple backtracking brute-force solver with heurisitcs,
this initial version has the following known gaps:

- Errors are not kept from branches, the error reporting after
  backtracking isn't particularly useful.
- We cannot show automatically removed packages
- We cannot replace packages with others
- We do not have conflict-driven clause learning yet

Untested:

- Multi-arch

This solver is fundamentally different in key aspects:

- It solves smaller dependency groups before larger ones, leading
  us to avoid installing A in A|B if B is installed more often and
  more consistently.

- It only keeps the automatic packages reachable via the strongest
  path. Currently it only implements autoremoval, but not display
  of autoremoval as we simply enqueue all automatically installed
  packages at the end when not doing automatic removal.

  This will need some translation where we Solve() first, and then
  Solve() again with the automatically installed packages added such
  that we can mark them as Garbage for display purposes.

- It does not remove manually installed packages.

Hook the solver in via the EDSP framework, this allows us to achieve
easy initial integration without lots of issues.

A lot of this work was planned and executed in my free time and then
some leaked into work time I suppose.

Implementation notes:

- Restore the full backlog of items

  The annoying thing is that we record only when an item was enqueued
  and not the level at which it was installed, so when going back a
  decision level we might have to reinstall packages that were queued
  at an earlier decision level because they were only installed at a
  later decision level.

- When picking one version, reject the others

- Propagate conflicts up to reverse dependencies

  This will recursively mark every reverse dependency that can
  no longer be satisfied as MUSTNOT.

  Also make sure to recursively call Reject(Ver) from Reject(Pkg)
  to make sure we trigger the Rejections there.

  This means we now end up having Recursion in the algorithm. An
  alternative approach would be to push *reject* items to the heap
  and then do them, but this is not entirely straight forward and
  it may simply not be necessary.

-  Sort upgrades before other optional installs containing subsets

  If I want to upgrade a package A, I schedule A3|A2|A1; if another
  thing depends specifically on A1; we'd not be installed. Hence we
  need to sort upgrades first.

  This only is needed for optional packages; manual packages will
  figure this out naturally.

- Rescoring is lazily implemented. Instead of calling make_heap()
  after rescoring items, we just mark the items as dirty and reinsert
  them. We also only rescore from the main solve loop, Reject() marks
  the heap as needing a rescore due to a Conflict (as some versions will
  no longer be installable), and RescoreWorkIfNeeded() then will do the
  rescoring.

- Recursive unit propagation: Install() and Reject() recursively call
  each other to promote decisions across single-version dependencies
  (or across not-anymore satisfiable reverse-depends).

- Make Reason constructors explicit, this enhances readability

  This makes calls like the one in here be

    Reject(object, Reason(otherObject))

  Ensuring that it's clear that the 2nd argument is a reason at the
  caller side.

- Split Decision into Decision and Hint vs. first draft

  When branching/deciding, we do not want to override SHOULD and MAY.
  We do not actually use them yet, and we do actually clean them when
  backtracking, but let's at least keep the data structure correct.

  Convert the enum to a 16-bit integer so we can still fit in the same
  space as before.
</content>
</entry>
</feed>
