| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
This adds a bit more code but avoids any surprises later on by
having both the shadowed and non-shadowed meta index in the
list.
Gbp-Dch: ignore
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert sources.list Snapshot option from opt-in to automatic. If
we can find a snapshot server, Snapshot: yes is assumed if a snapshot
is specified.
On the implementation side, we record automatic snapshot enablement
by adding a '?' suffix to the snapshot timestamp, if any is specified,
this avoids introducing bugs into the code where we could end up with
an empty snapshot.
This has an annoying internal implementation caveat: Since we call
GetDebReleaseIndexBy() with the SHADOWED option emplaced, if we do
not find a server, we need to remove the SHADOWED option again, but
we already have inserted a shadowed release index into the list.
This will simply insert the release index a second time without the
SHADOWED option which in preliminary testing works fine, but it would
arguably be more correct to also remove the release index again if
we have created it.
FIXME: This only has one test case: A source with supported snapshot
server is auto-discovered. We should also add a test case where we
cannot detect a server and then don't fail in automatic mode.
|
| |
|
|
|
|
| |
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 avoids the rabbit hole of md5 on FIPS systems, and repositories
have moved to including the value as well.
Also stop validating the field, this can be an arbitrary string
as far as we are concerned.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
If we know both SHA256, and they're different, the packages are. This
approach stores the SHA256 only at runtime, avoiding the overhead of
storing it on-disk, because when we update repositories we update all
of them anyhow.
Note that pkgCacheGenerator is hidden, so we can just modify its
ABI, hooray.
Closes: #931175
LP: #2029268
|
| |
|
|
|
| |
We did not handle multiple components properly, add a contrib
component to the test case.
|