| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
We remove new garbage packages from the solution if we can as installing
a new package which is at the same time considered garbage looks silly,
but it could also be a new dependency of another garbage package, so we
have a second round trying to save such packages. In this round we
weren't considering versioned constraints on dependency relations through
so even an unsatisfied old recommends could save which it shouldn't.
|
|
|
|
|
|
|
| |
Not all commands show kept back packages, so even if it hardly matters,
lets not crunch numbers needlessly if we don't need the info which also
reduces the lifetime of the involved variables hopefully also reducing
the mental requirements for a reader.
|
| |
|
|\
| |
| |
| |
| | |
UI changes for 2.9.2
See merge request apt-team/apt!343
|
| |
| |
| |
| |
| |
| | |
This avoids awkward interactions with Installing dependencies and
Suggested packages appearing before it; despite being triggered by
it.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Add a new `note` field to `ShowList` which contains a line to
be displayed after the list itself. This allows `ShowList` to
render a self-contained list block.
|
| |
| |
| |
| | |
We should pass this properly to the TagSection.write()
|
| | |
|
| |
| |
| |
| |
| | |
This option is recommended to be used by repository operators
for testing.
|
|/
|
|
|
|
|
|
|
|
| |
We never used the debug level before, so we can do that. This
allows us to have the new audit level.
We did call DumpErrors() with DEBUG in two debug code paths,
so don't touch those.
debug
|
|
|
|
| |
This is somewhat pointless.
|
|
|
|
| |
Wrap empty else in {} to avoid readability issues
|
| |
|
| |
|
|
|
|
|
| |
This is easier to discover than APT::Color options and matches
best practices.
|
|\
| |
| |
| |
| | |
UI improvements for 2.9.1
See merge request apt-team/apt!338
|
| |
| |
| |
| |
| | |
This especially helps with the running out of space warnings to
be safe.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
dnf shows downgrades as green because the package comes from a remote
repository, but I think yellow is more indicative that they are
unsupported.
Ganneff asked for yellow for kept packages too, however I'm not
adding yellow there, as kept packages are more indicative of an
archive error, likely temporary, rather than an action item for
the user.
|
| | |
|
| |
| |
| |
| |
| |
| | |
This aligns the /boot message with the parent one, and also align
the formatting of the partially downloaded size message to add spaces
around /
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Calculate an estimate of 110% of the biggest initrd + system.map
as the additional space a kernel needs in /boot.
If /boot is a different file system than /usr, print the size of
the kernels + the additional space they will need separately;
otherwise include it in our /usr figure.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also allow us to have utf-8 characters in xgettext, but msgcomm still
fails so ugh.
This avoids translations messing up the formatting a bit more, at
least, and makes apt build again
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
| |
Instead of using Upgrades, Installs, and so on, just use
Upgrading, Installing, etc. This solves the problem of
not having a nice noun for "Not upgrading".
|
|
|
|
|
|
| |
This makes things more useful in combination with the upgrade
command, but introduces a subtle change seen in the test suite
when you use the install command to upgrade packages.
|
|
|
|
|
|
| |
Extract the code to show them into its own function and call
it in the old place for output version < 30, or after the
dependencies being installed for new output format.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The key talking points here are:
1. Instead of long sentences, we use short concise messages,
e.g. "The following NEW packages will be installed" becomes
"Installing".
2. Dependencies are only listed once. We removed the
"The following additional packages will be installed" section
in favor of splitting up the "Installing" section into
"Installing" and "Installing dependencies" (like dnf)
3. The order of the output is different:
1. Packages to be installed manually
2. Packages to be installed automatically
4. Weak dependencies of new packages not installed
3. Packages to be upgraded
4. Packages to be downgraded
5. Packages that have been kept back / are on hold
6. Removals
7. Essential removals
i.e. we logically show you the action that is being
done, followed by lists related to the action.
4. As requested by popey, we have colorful UI, with green for
packages being installed and red for packages being removed.
Caveats:
- The list of recommends and suggests has not been updated yet,
it should move to after the packages being installed (as they
are what triggers them)
This also introduces output format versioning, configured by the
APT::Output-Format option. The default value is 0, except for the
apt(8) binary where it is 30 - which enables the new style.
|
|
|
|
|
|
|
|
|
|
|
| |
It's interesting to the user to see the progress when it happens,
but arguably once it's done it is just visual clutter, so let's
not write newlines, and when we are done, instead of appending
"Done", let's just empty the line.
This requires some effort to keep apt-cdrom happy which just writes
lines to stdout itself. Bad apt-cdrom. Maybe there is a better fix
for it, but this gets us going.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change makes it a bit easier to quickly grasp the changes
about to be performed by apt.
It displays package lists in a columnar format by default,
similar to what `ls` produces for files.
A new long option `--no-list-columns` and an associated
`APT::Get::List-Columns` config setting control the behavior.
Usage example, with 60 column wide terminal:
```
$ sudo apt upgrade |
Reading package lists... Done |
Building dependency tree... Done |
Reading state information... Done |
Calculating upgrade... Done |
The following packages were automatically installed and are |
no longer required: |
libappindicator1 libindicator7 |
libdbusmenu-gtk4 linux-image-5.14.0-4-amd64 |
Use 'sudo apt autoremove' to remove them. |
The following packages have been kept back: |
criu linux-headers-amd64 nvidia-settings |
libxnvctrl0 nvidia-modprobe xwayland |
0 upgraded, 0 newly installed, 0 to remove and 6 not upgrade|
d. |
```
The effect becomes more pronounced with more packages (e.g. when
doing a dist-upgrade).
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces a new line:
The following upgrades have been deferred due to phasing
This is any kept back package that is also phasing. This may
not be 100% accurate as we have kept it back due to other reasons
in an install command, for example, but we don't track for which
packages we applied phasing in reality.
If additional packages are kept back that are not phasing, show
a a notice
"N: Some packages may have been kept back due to phasing."
LP: #1988819
|
|
|
|
|
|
|
|
|
|
| |
It is documented and the code supports it, but the command line parsing
actually refuses -a/--host-architecture=arch … probably a sign how much
"apt-get source -b" is (not) used in practice.
Setting via -o APT::Get::Host-Architecture=arch (which -a is just a
shorthand for) works as it did before and can be used if backward
compatibility is important.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nowadays we only download the index file if we have a non-current file
on disk which we want to patch. If that is the case, any index file for
patches we could have stored is by definition outdated, so storing those
files just takes up disk space.
At least, that is the case if we have a Release file – if we don't this
commit introduces a needless redownload for such repositories but such
repositories are an error by default and if they can't be bothered to
provide a Release file its very unlikely they actually ship diffs, so
adding detection code for this seems pointless at best.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation as-is as various smaller/esoteric bugs and
inconsistencies like apt-get not supporting them, the option -s
being supported in code but not accepted on the command line,
the regex not escaping the dot before the file extension and
exposing more implementation details to public headers than we
actually need.
Also comes with a small test case to ensure it actually works.
References: bd7c126e3fb1b94e76e0e632c657cea854586844
|
|\
| |
| |
| |
| | |
Add 'dist-clean' command to remove packages and list files
See merge request apt-team/apt!290
|
| |
| |
| |
| |
| |
| |
| | |
We assume all files in the 'listsdir' are candidates. Keep only files
ending with Release, Release.gpg, and InRelease.
Closes: #959093
|
| |
| |
| |
| |
| |
| | |
This ensures that things work correctly.
LP: #1995790
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
One warning will be issued before the Y/n prompt, the other will
be issued at the end after package installs have been attempted
or if there were other failures, such that the last line you see
is warnings about unmerged-usr
I do not anticipate this to be the final version either, but
there we go.
Closes: #1052058
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As of bookworm, merged-usr is mandatory, and people got caught
in the crosshairs of the dpkg fsys-unmessusr debacle and inadvertently
reverted back to an unmerged configuration and continue to remain
on an unsupported system unknowingly.
Help them by erroring out when they are installing packages on /,
they are not in a chroot, and a usrmerge package is available.
|
| |
| |
| |
| |
| |
| |
| | |
We want to gently steer users towards having Signed-By for each
source such that we can retire a shared keyring across sources
which improves resilience against configuration issues and
incompetent malicious actors.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Provide snapshot support for offical Debian and Ubuntu archives.
There are two ways to enable snapshots for sources:
1. Add Snapshot: yes to your sources file ([snapshot=yes]). This
will allow you to specify a snapshot to use when updating or
installing using the --snapshot,-S option.
2. Add Snapshot: ID to your sources files to request a specific
snapshot for this source.
Snapshots are discovered using Label and Origin fields in the Release
file of the main source, hence you need to have updated the source at
least once before you can use snapshots.
The Release file may also declare a snapshots server to use, similar
to Changelogs, it can contain a Snapshots field with the values:
1. `Snapshots: https://example.com/@SNAPSHOTID@` where `@SNAPSHOTID@`
is a placeholder that is replaced with the requested snapshot id
2. `Snapshots: no` to disable snapshot support for this source.
Requesting snapshots for this source will result in a failure
to load the source.
The implementation adds a SHADOWED option to deb source entries,
and marks the main entry as SHADOWED when a snapshot has been
requested, which will cause it to be updated, but not included
in the generated cache.
The concern here was that we need to keep generating the shadowed
entries because the cleanup in `apt update` deletes any files not
queued for download, so we gotta keep downloading the main source.
This design is not entirely optimal, but avoids the pitfalls of
having to reimplement list cleanup.
Gaps:
- Ubuntu Pro repositories and PPAs are not yet supported.
|
|/
|
|
|
| |
This runs update before opening the cache and sources.list for
installing/upgrading.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In an ideal world everyone would read release notes, but if the last
sources.list change is any indication a lot of people wont. This is
even more a problem in so far as apt isn't producing errors for
invalid repositories, but instead carries on as normal even through it
will not be able to install upgrades for the moved packages.
This commit implements two scenarios and prints a notice in those cases
pointing to the release notes:
a) User has 'non-free' but not 'non-free-firmware'
b) User has a firmware package which isn't available from anywhere
Both only happen if we are talking about a repository which identifies
itself as one of Debian and is for a release codenamed bookworm (or
sid). Note that as (usually) apt/oldstable is used to upgrade to the
new stable release these suggestions only show for users after they
have upgraded to bookworm on apt command line usage after that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The command line is evaluated in two steps: First all packages given
are marked for install and as a second step the resolver is started on
all of them in turn to get their dependencies installed.
This is done so a user can provide a non-default choice on the command
line and have it respected regardless of where on the command line it
appears.
On the other hand, the order in which dependencies are resolved can
matter, so instead of using a "random" order, we now do this in the
order given on the command line, so if you e.g. have a meta package
pulling in non-default choices and mention it first the choices are
respected predictably instead of depending on first appearance of the
package name while creating the binary cache.
I might have "broken" this more than a decade ago while introducing the
reworked command line parsing for Multi-Arch, which also brought in the
split into the two steps mentioned above which was the far more
impactful 'respect user choice' change. This one should hardly matter in
practice, but as the tests show, order can have surprising side effects.
|
|
|
|
|
| |
Reported-By: gcc
Gbp-Dch: Ignore
|