<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/policy.cc, branch 2.9.1</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.9.1</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.9.1'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2024-02-20T12:49:04Z</updated>
<entry>
<title>Modernize standard library includes</title>
<updated>2024-02-20T12:49:04Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-02-20T12:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=40a75722c43ae24cb9a99d6730a3b25b65819c49'/>
<id>urn:sha1:40a75722c43ae24cb9a99d6730a3b25b65819c49</id>
<content type='text'>
This was automated with sed and git-clang-format, and then I had to
fix up the top of policy.cc by hand as git-clang-format accidentally
indented it by two spaces.
</content>
</entry>
<entry>
<title>Allow apt to run if no dpkg/status file exists</title>
<updated>2022-09-02T14:55:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-09-01T13:14:52Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f52c1ce9b31befb71016a20759b96b4946034fcb'/>
<id>urn:sha1:f52c1ce9b31befb71016a20759b96b4946034fcb</id>
<content type='text'>
Not having a dpkg/status file used to be a hard error which from a
boostrap perspective is suspect as in the beginning, there is no
status so you would need to touch it into existence.

We make a difference between factual non-existence and inaccessibility
to catch mistakes in which the file is not readable for some reason,
the testcase test-bug-254770-segfault-if-cache-not-buildable is an
example of this.

Note that apt has already figured out at this point that this is a
Debian-like system which should have a dpkg/status file. This change
does not effect the auto-detection and is not supposed to.
</content>
</entry>
<entry>
<title>policy: Do not override negative pins with 1 due to phasing</title>
<updated>2022-06-28T12:54:42Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2022-06-28T12:53:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=20739359fa936c0851a4c0f37667526d98c22761'/>
<id>urn:sha1:20739359fa936c0851a4c0f37667526d98c22761</id>
<content type='text'>
If a package is already pinned to a negative value, we should not
override this with a positive 1. This causes packages to be installable
that were pinned to -1, which is not intended.

For this, implement phasing as a ceiling of 1 for the pin instead
of a fixed 1 value. An alternative would have been to fix it to
NEVER_PIN, but that would mean entirely NEW packages would not be
installable while phasing which is not the intention either.

LP: #1978125
</content>
</entry>
<entry>
<title>(Temporarily) Rewrite phased updates using a keep-back approach</title>
<updated>2022-06-28T12:25:18Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2022-06-24T14:09:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=db131677bee45c86031d37d7b451e6ece692efb2'/>
<id>urn:sha1:db131677bee45c86031d37d7b451e6ece692efb2</id>
<content type='text'>
This is a lot closer to the original implementation in update-manager,
but still has a couple of differences that might cause bugs:

- When checking whether a version is a security update, we only
  check versions in between and not any later version. This happens
  mostly because we do not know the suite, so we just check if there
  is any version between the installed version and our target that
  is a security update

- We only keep already installed packages, as we run before the
  resolver. update-manager first runs the resolver, and then marks
  for keep all packages that were upgraded or newly installed that
  are phasing (afaict).

This approach has a significant caveat that if you have version 1
installed from a release pocket, version 2 is in security, and version
3 is phasing in updates, that it installs version 3 rather than 2
from security as the policy based implementation does.

It also means that apt install does not respect phasing and would
always install version 3 in such a scenario.

LP: #1979244
</content>
</entry>
<entry>
<title>Use pkgTagSection::Key in more places in src:apt</title>
<updated>2022-04-01T12:16:19Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-01T11:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=472376be6818b5ea43250abcbecfcab53b4a729a'/>
<id>urn:sha1:472376be6818b5ea43250abcbecfcab53b4a729a</id>
<content type='text'>
The speed critical paths were converted earlier, but the remaining
could benefit a tiny bit from this as well especially as we have the
facility now available and can therefore brush up the code in various
places in the process as well.

Also takes the time to add the hidden Exists method advertised in
the headers, but previously not implemented.
</content>
</entry>
<entry>
<title>Spelling fixes</title>
<updated>2021-11-27T10:22:38Z</updated>
<author>
<name>Ville Skyttä</name>
<email>ville.skytta@iki.fi</email>
</author>
<published>2021-11-03T22:08:07Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=01eed4234440d82fc52c8186cf4268517bcd28bc'/>
<id>urn:sha1:01eed4234440d82fc52c8186cf4268517bcd28bc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>policy: Apply phasing to uninstalled packages too</title>
<updated>2021-05-17T08:25:28Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-05-17T08:25:28Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=81eb944c76d99f34b57d7c3efd283c3ffb6e4c1f'/>
<id>urn:sha1:81eb944c76d99f34b57d7c3efd283c3ffb6e4c1f</id>
<content type='text'>
If a package is not installed yet, we do need to apply
phasing as we otherwise get into weird situations when
installing packages:

In the launchpad bug below, ubuntu-release-upgrader-core
was installed, and hence the phasing for the upgrade to it
was applied. However, ubuntu-release-upgrader-gtk was about
to be installed - and hence the phasing did not apply, causing
a version mismatch, because ubuntu-release-upgrader-gtk from
-updates was used, but -core from release pocket. Sigh.

An alternative approach to dealing with this issue could be to
apply phasing to all packages within the same source package,
which would work in most cases. However, there might be unforeseen
side effects and it is of course possible to have = depends between
source packages, such as -signed packages on the unsigned ones for
bootloaders.

This problem does not occur in the update-manager implementation
of phased updates as update-manager only deals with upgrading packages,
but does not install new packages and thus does not see that issue. APT
however, has to apply phasing more broadly, as you can and often do
install additional packages during upgrade, or upgrade packages during
install commands, as both accept package list arguments and have the
same code in the backend.

LP: #1925745
</content>
</entry>
<entry>
<title>Phase using source version to be binNMU-correct</title>
<updated>2021-01-08T13:48:47Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-01-08T13:43:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=bd64bb79537fac17e1474672402d6b0572dce94a'/>
<id>urn:sha1:bd64bb79537fac17e1474672402d6b0572dce94a</id>
<content type='text'>
If we have different binNMU versions on different architectures,
we don't want madness to ensue.

This is a change from how update-manager does things, as Ubuntu does not
have binNMUs, but I believe it's the right thing to do for a generic
solution.
</content>
</entry>
<entry>
<title>Add support for Phased-Update-Percentage</title>
<updated>2021-01-08T13:48:47Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-08-10T18:16:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c5bc86d45e003905ef411146e66b414d26fb1ff8'/>
<id>urn:sha1:c5bc86d45e003905ef411146e66b414d26fb1ff8</id>
<content type='text'>
This adds support for Phased-Update-Percentage by pinning
upgrades that are not to be installed down to 1.

The output of policy has been changed to add the level of
phasing, and documentation has been improved to document
how phased updates work.

The patch detects if it is running in a chroot, and if so, always
includes phased updates, restoring classic apt behavior to avoid
behavioral changes on buildd chroots.

Various options are added to control this all:

* APT::Get::{Always,Never}-Include-Phased-Updates and their legacy
  update-manager equivalents to always or never include phased updates
* APT::Machine-ID can be set to a UUID string to have all machines in a
  fleet phase the same
* Dir::Etc::Machine-ID is weird in that it's default is sort of like
  ../machine-id, but not really, as ../machine-id would look up
  $PWD/../machine-id and not relative to Dir::Etc; but it allows you to
  override the path to machine-id (as opposed to the value)
* Dir::Bin::ischroot is the path to the ischroot(1) binary which is used
  to detect whether we are running in a chroot.
</content>
</entry>
<entry>
<title>Avoid -Wuseless-cast to int</title>
<updated>2020-04-26T16:19:43Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-04-26T16:19:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=9064a832bf2f02e2fd26c62ee867dd779797235a'/>
<id>urn:sha1:9064a832bf2f02e2fd26c62ee867dd779797235a</id>
<content type='text'>
Reported-By: gcc -Wuseless-cast
Gbp-Dch: Ignore
</content>
</entry>
</feed>
