| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
| |
Not all gpgv implementations support that flag and we no longer
default to gpgv; so we may not have support for it, so let's just
handle it like other gpgv messages.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of deciding if the first or the last error in a retry chain is
the best one to display if the entire chain fails in the end we teach
our progress reporting to collect the ignored errors (if it hasn't shown
them) and print them all together in the Err line.
We de-duplicate the collection which makes it harder to match the Ign
line with the error messages, but for these cases its probably better to
enable direct display of the text anyhow – and repeating the same message
multiple times is boring and probably not that helpful for a user
wanting to know why all the downloads failed even they asked apt to
retry 429 times…
References: 841243df877b39dfcb907a7fab9c4e8b4f65d715
|
| |\
| |
| |
| |
| | |
Support uncompressed indexes from partial file:/ mirrors
See merge request apt-team/apt!235
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ideally copy and file mirrors would support by-hash as well, but its
harder to setup and maintain especially if you want to cache an online
mirror who has by-hash enabled.
We can avoid unneeded roundtrips (in the best case) and entire cache
misses (in the usual worst case) by "just" telling methods that the URI
we passed it has the requested file perhaps also in other paths.
This is done in pseudo-relative paths as we would otherwise need to
teach redirection code to rewrite those URIs as well. A method like http
can easily ignore this value and await explicit instructions to look at
that file, but inspecting the path in local sources via file or copy is
(comparatively) free, so we just do it immediately. If that ends up
being the wrong version of the file as by-hash would have protected us
from we are in this feature branch now falling back to other mirrors
which are like the ones online and in support of by-hash.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Perhaps a common error in the past nowadays thanks to by-hash we rarely
get mismatches due to our calling behaviour and more because the mirror
is genuinely bad especially if this mirror didn't work with by-hash.
Using our "normal" error handling allows falling back to other mirrors
which hopefully do support by-hash and/or are not broken on a filesystem
level making us more resistent to the occasional bad apple in a wild
mirror forest.
|
| | |
| |
| |
| |
| |
| |
| | |
In practice most of them will, but making the acquire process hang in
response if they don't seems like an overly excessive response if we can
just support it gracefully to reply with an error (or actually succeed
in the unlikely event this URI is actually correct).
|
| | |
| |
| |
| |
| |
| |
| |
| | |
It is a bit unfair for third-party methods wrapping e.g. http to not
have access to such tools, same for our old ftp and e.g. our tor even
if in practice this isn't used much even for http.
At least that is one less FIXME in the code.
|
| | |
| |
| |
| |
| |
| |
| | |
If we do not have the requested file we haven't calculated the hashes
for it either and it is likely that the alternative file will be used,
so to save the main thread from being busy with calculating hashes we
do the calculation here in the method.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The main thread calculates the hash sums if the method hasn't to be able
to verify the files, but while a failure is detected and reported, the
error messages did not include the hash sums which looks at least
puzzling.
So to have a complete error message we ensure that the hashes we
calculated are appended to the message from the method so that it looks
for the higher level code as if the method had calculated the hashes.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If a file:/ mirror does not contain the requested compressed file, but
the uncompressed variant of that file the method will sent us a fitting
Done message with data only about the Alt-Filename, but the central hash
verification code in the acquire system does not expect that looking for
the non-existent compressed file to compare its hashes with the expected
result – which fails (if we are verifying at least).
That file:/ as well as the item code deals with this suggests that this
feature was broken by 448c38bdcd72b52f11ec5f326f822cf57653f81c, but I
couldn't (easily) compile that to verify, so this is only a guess.
Supporting this allows using index files from /var/lib/apt/lists –
which are likely uncompressed or can at least made so easily – to
construct a file:/ mirror.
|
| | | |
|
| | |
| |
| |
| |
| | |
Our internal code always generates ENODATA for empty output and
this is checked by the previous commit, so this is entirely safe.
|
| | | |
|
| | |
| |
| |
| | |
Sequioa emits KEYEXPIRED + BADSIG instead of EXPSIG + VALIDSIG
|
| |/
|
|
|
|
| |
The key was only generated in 2010 and only bound in 2016,
so we cannot have signatures from before then, so update
the key accordingly, and change the default expiry to 2017.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The command -v check inadvertently exited 0 because it confusingly
also considers functions and aliases. Check if we are able to run
a valgrind binary instead by querying its version.
Then, the msgdebug in the alternative code path was included in the
output that we are asserting so that was causing failures too and
needs removing.
Everything is horrible :D
|
| |\
| |
| |
| |
| | |
ftparchive: Remove fixed-size buffers
See merge request apt-team/apt!388
|
| | |
| |
| |
| | |
LP: #2087848
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of snprintf() into a fixed-size buffer, construct an
std::string using assign() and append().
A previous version used strprintf() which would have been
hilariously inefficient.
LP: #2087848
|
| | |
| |
| |
| | |
LP: #2087848
|
| |/
|
|
| |
Suggested-by: mhoye on IRC
|
| |
|
|
|
|
|
|
|
|
| |
When enabling Acquire::Retries::HandleRetryAfter, the value of the
Retry-After http header is honored and the retry is not executed earlier
than this point in time (except if that is longer than the max delay
time). The added test checks if the request is delayed at least by the
requested time.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
|
| |\
| |
| |
| |
| | |
JSON: Pass options to hooks in hello message
See merge request apt-team/apt!389
|
| | |
| |
| |
| |
| | |
See the attached documentation. Note that defaults are missing,
so using this is not particularly easy so far.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This also ensures that our JSON is actually correct
JSON.
echo may fail now with EPIPE, given that it is multiline, so
wrap it in 2>/dev/null
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
Fix keeping back removals of obsolete packages
See merge request apt-team/apt!373
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In case of held packages or packages that otherwise can't be kept
back, we should return an error and not require the client to check
the broken_count after calling us.
LP: #2078720
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ResolveByKeepInternal() inadvertently considered packages that were
marked for removals as not being possible to keep back, but that's
not true, all they need is to have a currently installed version.
The test case is a bit awkward to construct because our upgrade code
doesn't get into a place where this happens that we know off. Or maybe
it does with phased upgrades, but here we simplify this by using a
helper binary that dumps state, marks for removal, and then calls
ResolveByKeep and checks the removal is undone.
LP: #2078720
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
These are taken roughly from the MiniSAT paper. We still have a bit
to go in actually encoding all clauses so the reasons are still
variables, and Assume() isn't fully working yet.
Adjust the existing Install()/Reject() code to use these functions,
we already see additional lines in the log that we failed to log
before, and this ensures more consistency.
This is sort of still the wrong direction: Install()/Reject() do the
propagation too; but that is tbd.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
As wondered about by Paride some minutes ago.
|
| |\
| |
| |
| |
| | |
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.
|
| |\ \
| |/
|/|
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
| |
Showing a package version which was never installed in removals is
confusing.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
When a test-* file is created but not executable, we'd ignore
the argument and then our subprocess would run the entire
test suite itself, sequentially. Silly.
Let's just see if the file exists instead, then the test will
fail.
|
| |
|
|
|
|
| |
These got broken by the recent solver3 changes by accident,
and we did not notice as I also broke the test suite detection
with the new statistics feature, hooray.
|
| |
|
|
|
|
|
|
|
| |
We also need to issue a MarkDelete() if the package is marked for
installation currently but should not be, not only if it did not
have a previous version.
This fixes the final test in test-multiarch-barbarian, the others
only needed adjustments to mark all packages as automatic.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When restoring previously solved items, we try to restore items
that have become unsolved again by skipping items that have a
solved solution.
Well at least we thought we did, but we accidentally had a "not"
in there that inverted the meaning, hence we lost work items on
backtracking.
This mostly did not seem to have caused any issues, I stumbled
over it while trying to add `autoremove` listings to `upgrade`,
but fixing it also fixes:
test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
This used to say "E: Broken packages", meaning the solver lost
a non-optional install request and the 2nd stage solver caught
an incomplete solution.
Also test-bug-735967-lib32-to-i386-unavailable restores the legacy
solver behavior, so win win?
|
| |
|
|
|
|
|
| |
This somewhat improves reliability of not breaking Recommends, e.g.
if the Recommends gets tightened. One test case enabled by this now
is the test-resolver-provider-exchange, which with a simple change
to allow removal of automatically installed packages works now.
|
| |
|
|
|
|
| |
As per the test-suggests-promoted-to-recommends test. This is still
a bit messy as we ignore alternative choices and only check the last
one, but um seems useful?
|