| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
| |
This checks for the previous boundaries for path sizes; but
we also added a check for many files in a directory, limited
to 4096.
Sadly the directory check did not fail with the old code either,
it's hard to actually get it to fail correctly.
|
| |
|
|
|
|
| |
Add support for testing apt-ftparchive, set valgrind to quiet such
that we can check program output, and pass --error-exitcode=7 to get
an (should be unused) magic error code if it detects errors.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Wstored directory entries as a binary tree, but we did not balance it,
leading to exponential complexity on insertion and potentially
exponential levels of stack recursion in DoPrint(), causing overflows.
Simply use an std::set storing pairs of (path, package) instead,
this is very simple, and handles aspects such as ordering or the
same package appearing multiple times correctly.
Iteration becomes a bit tricky: After seeing (file1, pkg1) when
we see (file1, pkg2) we need to append pkg2 to the current line;
once we see (file2, anything), we need write out the line and
start a new one.
For memory optimization, we use a new class StringInBlock to handle
the block-managed C strings generated by Mystrdup() in a type-safe
manner. This ensures proper lifetime of objects and no accidental
conversions to std::string. This saves a significant amount of
space (a pair of std::string is 64-byte large; a pair of pointers
is 16 byte large, a 48 byte saving per entry); reproducing the Contents
file of Ubuntu 24.10, using straight-forward std::string resulted in
GB of memory usage, whereas the C-style string only uses 1.35 GB.
As a side effect of the patch we also remove arbitrary 1024-byte
buffer sizes. There also is a change in output: The package names
are now sorted alphabetically, instead of being in visit order.
LP: #2083697
|
| |
|
|
|
|
|
|
|
| |
Add a safety check to ensure that the block were are allocating
actually fits the string we want to write. If it doesn't, abort
the program.
While we are here, bump the buffer size from 40 KiB to 4 MiB,
because why bother with smaller buffers.
|
| |
|
|
| |
Closes: #1080210
|
| |\
| |
| |
| |
| | |
Implement 'Pin: source-version <foo>'
See merge request apt-team/apt!372
|
| | |
| |
| |
| | |
As wondered about by Paride some minutes ago.
|
| |\ \
| |/
|/|
| |
| | |
Fix compilation error with clang/libc++ 18
See merge request apt-team/apt!371
|
| |/ |
|
| | |
|
| |\
| |
| |
| |
| | |
Do not return error if `Signed-By` value in source list is empty
See merge request apt-team/apt!364
|
| | |
| |
| |
| | |
Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Basically this boils down to checking that the priority of the
source candidate candidate is higher or equal than the priority
of the package's candidate that is being under consideration.
It stands to reason if we maybe we should actually calculate a
source candidate version; this will look similar but may perhaps
perform slightly different.
|
| |\ \
| | |
| | |
| | |
| | | |
Update Catalan translation
See merge request apt-team/apt!369
|
| | | | |
|
| |/ / |
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
Only revoke weak RSA keys now, add 'next' and 'future' levels
See merge request apt-team/apt!365
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Algorithms not in the next level give a warning, algorithms
in not in the future level introduce an audit message for
the --audit flag.
next: >=rsa2048,ed25519,ed448,nistp256,nistp384,nistp512
future: >=rsa3072,ed25519,ed448
LP: #2073126
|
| | | |
| | |
| | |
| | | |
This checks whether a public key algorithm is asserted.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | |/
|/|
| |
| | |
More code but nicer to read
|
| | |
| |
| |
| | |
Closes: #1075975
|
| | |
| |
| |
| | |
Closes: #1075875
|
| | |
| |
| |
| | |
Closes: #1075874
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The option is supported by the command (as this is done by a bit more
low level code), but the command line parsing did not expect them to
be used for the apt show & list command, so that it would report error.
As such, a workaround for this issue is to use:
-o APT::Snapshot=BANANA
instead of e.g.
-S BANANA
Closes: #1075819
|
| |\ \
| |/
|/|
| |
| | |
Show installed version (not candidate version) while removing a package
See merge request apt-team/apt!362
|
| |/
|
|
|
| |
Showing a package version which was never installed in removals is
confusing.
|
| | |
|
| |\
| |
| |
| |
| | |
Fixes for the Obsolete handling
See merge request apt-team/apt!361
|
| | |
| |
| |
| | |
Run clang-format
|
| | |
| |
| |
| |
| | |
If we are not upgraded, we should continue to keep the installed
package installed if possible.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
This makes more sense, as all package versions are obsolete that
are not the candidate, usually.
Pay special attention to no-strict-pinning: If we don't have
strict pinning, a package without a candidate version may still
be non-obsolete if the latest version is not obsolete.
Likewise, in no-strict-pinning any later source version that exists
will cause the package to be considered obsolete, rather than just
candidates.
|
| |\
| |
| |
| |
| | |
Rewrite the FromDepCache method to be smaller and more correct
See merge request apt-team/apt!360
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactor the various Install requests into a single one and move
some stuff around, this should be a bit easier to maintain and
we don't repeat ourselves all the time.
This accidentally uncovered some bugs in the code, that get fixed
by this:
- The UpgradeManual and InstallManual groups did not work correctly,
Essential packages were Install and others were Upgrade.
- Automatically installed packages falsely got promoted to the
manual groups as they got promoted into the manual code path,
whenever we ran without allowing their removal.
- The combination of --mark-auto --auto-remove now works correctly
We previously skipped the installation of automatically installed
packages when we did autoremoval, but we did not consider if the
action was protected, that is specified on the command-line.
Now we do not autoremove protected actions, and have added a test
case for it.
- The AllowRemoveManual option no longer is applied if removals are
generally denied.
Closes: #1071519
|
| |/
|
|
|
|
| |
We should set the Mark/Garbage flags for all packages so we don't
end up in an inconsistent state, so reset the flags for each package
before evaluating further.
|
| |\
| |
| |
| |
| | |
solver3: Do not accidentally promote Replaces and Enhances to dependencies
See merge request apt-team/apt!359
|
| |/
|
|
|
|
|
|
|
|
| |
As part of the refactoring, we allowed the code to work on unimportant
dependencies as we needed to promote Suggests to Depends if they are
currently satisfied.
However, Replaces and Enhances were not considered properly and both
are not negative dependencies so they were accidentally promoted to
Depends too if they were currently satisfied.
|
| | |
|
| |\
| |
| |
| |
| | |
Fix spelling of @SNAPSHOTID@ in apt.conf.5.xml
See merge request apt-team/apt!353
|
| | |
| |
| |
| | |
Closes: #1072189
|
| |\ \
| | |
| | |
| | |
| | | |
edsp: Parse source version from the Source-Version field
See merge request apt-team/apt!354
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
EDSP uses the Source-Version field instead of storing the source
version in the Source field with the package name, adjust our
parser accordingly.
Use the override in the edspLikeListParser to do so rather than
dumb this into the correct place in the debListParser.
|
| |\ \
| | |
| | |
| | |
| | | |
solver3: Group work items; and helpers
See merge request apt-team/apt!356
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This has two aspects:
1. For a dependency A | B | C we order the obsolete packages last,
that is, if A is obsolete, this gets reordered to B | C | A,
such that we try to pick non-obsolete packages first to ease
upgrade calculation.
2. When comparing two dependencies, we order dependencies into three
groups: First we satisfy dependencies mentioning only non-installed
(NEW) packages, then we satisfy "normal" dependencies, and finally
we satisfy any dependencies mentioning obsolete packages.
This means for example if you have obsolete libfoo1 and a new
libfoo1t64, that we will see Depends: libfoo1t64 before any
Depends: libfoo1 (which may expand to libfoo1 | libfoo1t64),
so we effectively will have selected "replacement" packages
this way already before getting to older packages where we
would have to choose between the obsolete package and its
replacement.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Comparing the size of work items is not strictly needed; we check
if items have a single or no solution and propagate them early on,
but it doesn't matter much if we solve A|B or C|D|E first. This
will allow us to get rid of all the resizing business later on,
and switch to using literal watching where we only watch one of
the literals on the right hand side.
Likewise, the upgrade case mattered initially in testing, but seems
to have resolved itself.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Our backtracking is chronological, so we will first
try alternative choices or skip optional items in
later groups.
So installing manually installed packages before automatically
installed ones allows manually installed packages to remove
automatically installed packages easily. If we did automatic
packages first, we'd keep back upgrades for manual packages
or change choices for their dependencies, or would have to
backtrack harder to get back to the right decision level.
That's silly.
Ordering automatically installed packages last also allows
us to calculate autoremovable packages. Since we will have
installed all dependencies from manually installed packages
by the point where we get to automatically installed packages,
everything that will be installed in those Auto groups is
inherently garbage.
|