| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Deduplicate the copies in a central one, mark it unavailable to
external users.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is the first step that introduces a 1:1 mapping between version
and source version. In a future version this can use the fields
currently marked unavailable to deduplicate the SourceVersion
objects across the group.
The policy gains a member for storing pins for sourceversions.
Together, in the future we should be able to determine candidates
for source versions.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Avoiding duplications is one thing, but it could also be handy to know
all sources for a description so that you can e.g. avoid opening another
file or similar such if its also present in one you already have open.
Given how the structures were set up this was probably intended all
along and either worked at some point or was abandoned for the
duplicates that we started culling heavily with the introduction of
MultiArch as at that point they blew up the cache and needed to be dealt
with.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same reason as with the description size before, but this one had
actually one extremely dated user in src:apt left with dumpavail,
which is changed to an implementation that is (in comparison) a bit
slower, but should be good enough for a command that is ideally not
used anymore (even if codesearch suggests otherwise).
After all, what makes this a bit slower is not that we don't know the
size, but that this one does additional work preparing for accessing
the fields which we don't do. In exchange pkgTagFile has a better
implementation for "Jitter" than the old code that we would "just"
need to copy here if speed were really an issue.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This handles rewriting .list entries to .sources ones; the
only options handled are
- signed-by => Signed-By
- trusted => Trusted
The options to specify architectures, check-valid-until, etc.
are not supported as they are not exposed in the code. We
probably should refactor the parser at some point so we can
actually read the parsed entry rather than the abstract objects
we create from it.
This can be improved further:
- Keyrings from /etc/apt/trusted.gpg.d should be moved to
/etc/apt/keyrings.
- automatic detection by trying to verify using each keyring
in trusted.gpg.d until we find the right one and then using
that for Signed-By rather than leave some sources empty.
|
| |
|
|
|
| |
[[noreturn]] is a C++11 feature and so we can just use it
unconditionally.
|
| |
|
|
|
|
|
|
|
| |
We were rather inconsistent in using it and as our public headers
contain deduction guides (a c++17 feature) it seems silly to try to hide
a c++11 feature in a macro, so lets stop this charade and drop the
macro and while we are changing all these lines lets apply [[nodiscard]]
(another c++17 feature) and other suggestions from clang-tidy and
formatting for a little more consistency.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This allows you to test out gpgv-sq by just installing it, which
is nice.
|
| | |
|
| | |
|
| |
|
|
| |
std::array<char, APT_BUFFER_SIZE>
|
| |
|
|
|
|
|
|
|
| |
This is useful on every system and only was in apt-utils for
historical reasons. Move it to the main apt package, and also
move it out of the path.
Add a symbolic link in /usr/bin to apt-utils and keep the manual
pages in tere.
|
| |
|
|
|
|
|
| |
This avoids the fragile --help check. This option is not documented
in the manual page but seems to be there.
Thanks: Justus Winter for the idea
|
| |
|
|
|
| |
This invokes the 3.0 solver. It has a nicer name for
a binary, matching the communicated codename.
|
| |
|
|
| |
Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The assertion can be overriden using apt::key::assert-pubkey-algo,
the default is the most opinionated one.
This will inform the user during apt-cdrom add as we do not
pass --quiet to user, so adjust test case.
Add a simple test case for it to test-method-gpgv.
LP: #2055193
|
| |
|
|
|
|
| |
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.
|
| |\
| |
| |
| |
| | |
apt-key: remove carriage returns from armored keyrings before dearmoring
See merge request apt-team/apt!309
|
| | |
| |
| |
| |
| |
| |
| | |
Without this, the awk script returns nothing if the armored keyring
uses Windows/DOS-style CRLF line endings (since awk is designed for
processing Unix text files). This would result in a NO_PUBKEY error
during the signature verification part of an apt-get update.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
|
|
|
| |
Use a rightmost match for / so that if we end up with a Section: a/b/c,
a 'c' matcher still matches.
If the section does not contain any /, it can be matched using /pattern,
e.g. /c only matches Section: c, but not Section: a/b/c.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hard coding each and every component is not only boring but given that
everyone is free to add or use more we end up in situations in which apt
behaves differently for the same binary package just because metadata
said it is in different components (e.g. non-free vs. non-free-firmware).
It is also probably not what the casual user would expect.
So we instead treat a value without a component as if it applies for all
of them. The previous behaviour can be restored by prefixing the value
with "<undefined>/" as in the component is not defined.
In an ideal world we would probably use "*/foo" for the new default
instead of changing the behaviour for "foo", but it seems rather
unlikely that the old behaviour is actually desired. All existing values
were duplicated for all (previously) known components in Debian and
Ubuntu.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
With apt-key going away, people need to manage key files, rather
than keys, so they need to know if any keys are in the legacy keyring.
|
| | |
|
| |
|
|
|
|
|
|
| |
In order to be consistent with other uses of cmp and to improve compatiblity
with other implementations, like busybox one, change long options to short
ones.
Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
|
| |
|
|
|
|
|
|
|
|
| |
`which` has been deprecated in debianutils 5.0+. The recommended
replacement, `command -v`, is mandated by Debian policy these days, in
addition to being required by POSIX and its predecessor specs at least
since 1994.
Not found commands cause no output from `command -v` per POSIX, so
remove the redundant 2>&1's while at it.
|
| |
|
|
|
|
|
| |
As we never display the information in these code paths there isn't a
lot of point in calculating it first saving us some precious CPU cycles.
References: d6f3458badf2cfea3ca7de7632ae31daff5742be
|
| |\
| |
| |
| |
| | |
Count uninstallable packages in "not upgraded"
See merge request apt-team/apt!169
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If a first step of the solver can figure out that a package is
uninstallable it might reset the candidate so that later steps are
prevented from exploring this dead end. While that helps the resolver it
can confuse the display of the found solution as this will include an
incorrect count of packages not upgraded in this solution.
It was possible before, but happens a fair bit more with the April/May
resolver changes last year so finally doing proper counting is a good
idea.
Sadly this is a bit harder than just getting the number first and than
subtracting the packages we upgraded from it as the user can influence
candidates via the command line and a package which could be upgraded,
but is removed instead shouldn't count as not upgraded as we clearly did
something with it. So we keep a list of packages instead of a number
which also help in the upgrade cmds as those want to show the list.
Closes: #981535
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An interactive tool like aptitude needs these flags current far more
often than we do as a user can see them in apt only in one very well
defined place – the autoremove display block – so we don't need to run
it up to four times while a normal "apt install" is processed as that is
just busywork.
The effect on runtime is minimal, as a single run doesn't take too long
anyhow, but it cuts down tremendously on debug output at the expense of
requiring some manual handholding.
This is opt-in so that aptitude doesn't need to change nor do we need to
change our own tools like "apt list" where it is working correctly as
intended.
A special flag and co is needed as we want to prevent the ActionGroup
inside pkgDepCache::Init to be inhibited already so we need to insert
ourselves while the DepCache is still in the process of being built.
This is also the reason why the debug output in some tests changed to
all unmarked, but that is fine as the marking could have been already
obsoleted by the actions taken, just inhibited by a proper action group.
|
| |
|
|
|
|
| |
Our http method encodes the URI again which results in the double
encoding we have unwrap in the webserver (we did already, but we skip
the filename handling now which does the first decode).
|
| |
|
|
|
|
|
|
|
| |
We accidentally excluded virtual packages by excluding every
group that had a package, but where the package had no versions.
Rewrite the code so the lookup consistently uses VersionList()
instead of FirstVersion and FindPkg("any") - those are all the
same, and this is easier to read.
|
| |
|
|
|
|
|
| |
We passed "false" instead of false, and that apparently got
cast to bool, because it's a non-null pointer.
LP: #1876495
|
| |\
| |
| |
| |
| | |
Remove master/slave terminology
See merge request apt-team/apt!124
|
| | |
| |
| |
| | |
Sorry!
|
| |\ \
| |/
|/|
| |
| | |
Fully deprecate apt-key, schedule removal for Q2/2022
See merge request apt-team/apt!119
|
| | |
| |
| |
| |
| | |
Maintainer scripts that need to use apt-key del might as well
depend on gpg, they don't need the full gnupg suite.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
People are still using apt-key add and friends, despite that not
being guaranteed to work. Let's tell them to stop doing so.
We might still want a list command at a future point, but this
needs deciding, and a blanket ban atm seems like a sensible step
until we figured that out.
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The analyze-pattern helper parses a pattern and then renders
the parsed pattern, allowing you to analyze how the parser
interpreted the string.
This can be useful to analyse (yes, analyse-pattern also works)
why a pattern is different from aptitude or why it does not
work as expected.
It can also be used to check if apt has pattern support, although
that will miss out on the version shipped in eoan, but who really
cares about that longer term anyway?
|
| | |
|