| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
References:
- https://www.reddit.com/r/cpp_questions/comments/pm63yx/why_clangtidy_says_use_emplace_back_instead_of/
- https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html
|
| |
|
|
|
|
|
|
| |
Benchmark:
- https://stackoverflow.com/questions/62058906/why-my-performance-benchmark-gives-me-wrong-results
References:
- https://clang.llvm.org/extra/clang-tidy/checks/performance/prefer-single-char-overloads.html
|
| |
|
|
|
| |
As long as we are running dpkg, keep an inhibitor that
blocks us from sleeping.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Architecture variants are children of an architecture that share
the same ABI but are optimized for different ISA levels. They
are available in Ubuntu 25.10 and newer, and not supported in
Debian or other distributions.
A deb built for a variant contains the Architecture-Variant field,
and the Architecture field points to the baseline, for example:
Architecture: amd64
Architecture-Variant: amd64v3
However, the apt-get indextargets command reports the variant in the
Architecture: field, and most of the code in APT presents the variant
as the architecture.
There are two types of variants:
1. Standalone variants are recorded in the Architectures field of the
Release file as if they were a real architecture:
Architectures: amd64 amd64v3
Standalone architecture variants only fetch the standalone
architecture variant's Packages file. To do this, this patch
changes the code such that the variants indextargets "supplant"
the base targets.
This may have complicated outcomes on the apt-get indextargets
command.
2. Other variants can only be identified by their files being recorded
with hashes in the Release file.
APT fetches both the base architecture's as well as the variant's
Packages file.
Variants are configured in the
APT::Architecture-Variants
list.
Image builders may want to build specific variant images using
APT::Architecture-Variants { "amd64v3"; }
But this commit also implements an automatic discovery mechanism
using the varianttable and /proc/cpuinfo.
APT::Architecture-Variants "auto";
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Lookup these variables in the constructor once, rather than
once per package.
This requires a bit of care as debListParser::UsePackage()
defaults to "all" for essential when unset, hence we simply
change its == "all" comparisons to == "all" || .empty().#
This removes any per-paragraph configuration lookups
from the file parser.
Also parse myArch from ParseProvides down to ParseDepends()
as that call ended up causing it to query APT::Architecture
*again* since the function we call is static.
Together, the removed config lookups safe about 2.3% of
cache generation runtime.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
'Include' allows limiting a repository to a allowlist of packages,
'Exclude' allows removing packages from a repository.
Implementation wise this is not the nicest as it goes via the
IndexTarget options, so we first parse our option value into a
vector, then we turn the vector into a string, and then vectorize
it again. That said, we support both "," and " " as separators due
to the construction (we split by "," then we join using " ").
Gbp-Dch: full
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
string{=> _view})
|
| |
|
|
| |
VectorizeString(), StringSplit(), SubstVar()
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Otherwise if we set e.g. Dir, we end up with the foreign
architectures from the host which is wrong.
Fixes: 8e6a86aa3bc6d5a9013bb42fccea9bbce3fd97e2
|
| |\
| |
| |
| |
| | |
apt-pkg/deb/debsystem.cc: Fall back to "dpkg" when Dir::Bin::dpkg is not found
See merge request apt-team/apt!419
|
| | |
| |
| |
| |
| |
| | |
The custom dpkg binary may be removed by apt and that breaks the end of
the operation. This can be observed when using eatmydata as dpkg and
removing the symlink to eatmydata when removing the apt-eatmydata package.
|
| | |
| |
| |
| | |
References: a00fbbdb28cc31e78882301c2efe7218583ab4cb
|
| | |
| |
| |
| |
| |
| |
| |
| | |
C++14 includes the standard attribute, so we can use that instead.
Note that we drop the deprecation of {Pkg,Dep}Iterator::operator<< as
this is ignored (a friends declaration must be a definition to have
attributes) very noisily by GCC >= 12 and the methods can be somewhat
useful in debugging if you are to lazy to get APT::Pretty{Pkg,Dep}.
|
| | |
| |
| |
| |
| | |
[[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.
|
| |/
|
|
|
| |
There were some references to APT::StringView that don't make much
sense anymore.
|
| |
|
|
|
| |
The version that accepted APT::StringView was marked
public.
|
| |
|
|
| |
Suggested-by: mhoye on IRC
|
| |\
| |
| |
| |
| | |
DEFER
See merge request apt-team/apt!392
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
std::string_view
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
package name
|
| |
|
|
|
| |
Also remove useless condition:
sscanf() already direct-matches non-whitespace bytes
|
| | |
|
| |
|
|
| |
getpwuid_r() instead of 255
|
| | |
|
| |
|
|
| |
for reading lines instead of 1k buffer
|
| |
|
|
| |
Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
|
| |
|
|
|
|
|
|
| |
Another instance of our parser written for sane clean input, but
nowadays used also for user-provided input which can contain very many
strange formatting and especially white spaces all over the place.
Closes: #1071219
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
If dpkg-gencontrol was involved in the creation of a package we will not
usually encounter empty or otherwise useless fields, but apparently not
everyone is using it.
It isn't recommended to have these empty lines, but it isn't too hard to
ignore for Provides as we did for dependencies already and apt-ftparchive
can be convinced to produce empty files (if you feed it such a package)
as well, so lets be nice and provide users with a more accepting parser.
Closes: #1069874
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All other entries in a dependency line get substantial leeway about the
amount of spaces surrounding the entry itself and its individual parts,
but the very last entry was required to have a version constraint be
at least 4 chars long (excluding opening bracket and spaces following
it), so if the version is short and a single-char relation used a space
had to make up for it. This is a bit unfair in comparison to the other
entries who do not have such unreasonable demands, so we reduce our
demand to 3 chars or longer, which is satisfied by "=1)".
If it is a good idea to hate spaces that much remains unanswered by this
commit, but in practice most tools (re)writing the files we parse will
include spaces, so its only in files (or on the satisfy command line)
directly edited by users that we can encounter such a situation, which
is a relatively new development given this line came unchanged from
the introduction of this method in 1998.
LP: #2061834
|
| |
|
|
| |
This reverts commit 9bb953fddae0246a4dcedddb769d75d3521e1f2f.
|
| |
|
|
|
|
|
| |
The TagFile parser will have already parsed further and can't go
back so it needs to reopen the file if compressed.
Closes: #1067440
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libapt has a NotEquals relation for version constraints in
dependencies, which is used internally e.g. in the MultiArch
implementation, but this relation is not supported by Debian
policy and as such can not be used in packages.
Our parser here is extremely accepting, even unknown relations are
parsed as Equals relation – but the version that must match will be a
rather strange one…
For our own testcases and e.g. on the command line with 'satisfy' it
can make sense to have != available… and what strange things apt does
parsing unsupported relations is not really much of a concern. Real
packages will not have such relations anyhow as we are (mostly) just
a consumer, not a producer of packages and index files.
|