Skip to content
Commit 2977aea4 authored by segfault's avatar segfault
Browse files

Test suite: Fix additional software scenario

This fixes the scenario "Recovering in offline mode after Additional
Software previously failed to upgrade and then succeed to upgrade when
online".

We do these steps in this order during the test:

1. Add an APT source asp-test-upgrade-cowsay and pin cowsay to use that source
2. Update APT
3. Remove the asp-test-upgrade-cowsay source
4. Update APT again (this happens as part of
   tails-additional-software-upgrade.service which is run when Tor is
   connected)
5. Add asp-test-upgrade-cowsay source again
6. Reboot and expect cowsay to be installed from source asp-test-upgrade-cowsay

The issue is that updating APT in step 4 removes the source
asp-test-upgrade-cowsay from /var/lib/apt/lists. Because we don't
update APT again between step 5 and 6, step 6 does not install cowsay
from that source because APT doesn't have state information for that
source in /var/lib/apt/lists. It tries to install it from the default bullseye
source instead.

The fix is to only remove the pinning in step 3 and not the sources.list
entry, which avoids that the source is removed from /var/lib/apt/lists.
parent a3b57078
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment