Project

General

Profile

Bug #12400

tails-additional-software should clean obsolete cached .deb's

Added by intrigeri over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Elevated
Assignee:
-
Category:
-
Target version:
Start date:
03/21/2017
Due date:
% Done:

100%

Feature Branch:
bugfix/12400-additional-software-autoclean
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Additional Software Packages

Description

… otherwise obsolete packages will pile up endlessly: we've had to disable apt-daily.timer to ensure it doesn't 1. waste RAM; 2. run at the same time as tails-additional-software (which would break the latter).

I think this must be run:

  • after a successful apt-get update (once APT knows which packages are not available anymore)
  • before the installation step (so that we don't try to store all packages twice, e.g. after upgrading to 3.0)

It would be nice if this was done in time for Tails 3.0, so that Jessie packages are removed from the cache and this feature doesn't suddenly require twice as much storage space as before on the Persistent volume.


Related issues

Related to Tails - Bug #12390: Consider disabling apt-daily.timer Resolved 03/20/2017

Associated revisions

Revision 10fdd168 (diff)
Added by alant over 2 years ago

autoclean package cache after upgrade

…otherwise obsolete packages will pile up endlessly: we've had to disable
apt-daily.timer to ensure it doesn't 1. waste RAM; 2. run at the same time as
tails-additional-software (which would break the latter).

Will-fix: #12400

Revision aa1c50a1 (diff)
Added by intrigeri over 2 years ago

Fix typos is comment (refs: #12400).

Revision fbcfa321 (diff)
Added by intrigeri over 2 years ago

Update variable name to better reflect what kind of beast it currently is.

refs: #12400

Revision a88cadd3 (diff)
Added by intrigeri over 2 years ago

Update a docstring to match what the corresponding code currently does.

refs: #12400

Revision 85c648ec (diff)
Added by intrigeri over 2 years ago

tails-additional-software: don't abort on failure to clear obsolete cached packages (refs: #12400).

History

#1 Updated by intrigeri over 2 years ago

  • Related to Bug #12390: Consider disabling apt-daily.timer added

#2 Updated by intrigeri over 2 years ago

  • Assignee set to alant

Alan, wanna take care of this?

#3 Updated by intrigeri over 2 years ago

  • Priority changed from Normal to Elevated

Ping? This has the potential to break stuff on upgrades to 3.0, so if you can't handle it by May 15, please reassign to me :)

#4 Updated by alant over 2 years ago

  • Status changed from Confirmed to In Progress

I'm taking care of this during the upgrade setp, between `apt-get update` and `apt-get install`.
I don't see the need of doing it during the initial install, as there is no reason for the cache to have changed since the last update.

#5 Updated by alant over 2 years ago

  • Assignee changed from alant to intrigeri
  • QA Check set to Ready for QA
  • Feature Branch set to bugfix/12400-additional-software-autoclean

I think the feature branch fixes the issue. Tested by live patching only though.

#6 Updated by intrigeri over 2 years ago

  • % Done changed from 0 to 60

Code review passes, pushed a few typo fixes on top. Will set up a persistence on 2.x with additional packages, upgrade to an ISO built from this branch, and see if it indeeds deletes the obsolete packages.

#7 Updated by intrigeri over 2 years ago

  • Target version changed from Tails_3.0 to Tails_3.0~rc1

#8 Updated by intrigeri over 2 years ago

  • Assignee changed from intrigeri to alant
  • Target version changed from Tails_3.0~rc1 to Tails_3.0
  • QA Check changed from Ready for QA to Dev Needed

So the code works as intended, but apt-get autoclean doesn't do what we want: the old, i386 packages are still around, and thus the issue this ticket is about is still there.

#9 Updated by intrigeri over 2 years ago

One (ugly, but simple and efficient) way to solve the problem could be to delete all .deb's from the cache whenever i386 APT lists are present. This could be done very early, even before running apt-get update, as on a Tails amd64 system we know these lists shouldn't be around.

#10 Updated by intrigeri over 2 years ago

  • Subject changed from tails-additional-software should run apt-get autoclean to tails-additional-software should clean obsolete cached .deb's

#11 Updated by alant over 2 years ago

  • Assignee changed from alant to intrigeri
  • % Done changed from 60 to 70
  • QA Check changed from Dev Needed to Ready for QA

One (ugly, but simple and efficient) way to solve the problem could be to delete all .deb's from the cache whenever i386 APT lists are present.

Done, please review.

#12 Updated by intrigeri over 2 years ago

Code review:

I'll now test the current state of my (not pushed yet branch):

  1. start Tails 2.12 on a USB stick
  2. create a persistent volume & enable APT features
  3. reboot and unlock persistence
  4. add packages to the list of additional software
  5. reboot
  6. check that the expected packages are in the cache
  7. shutdown
  8. upgrade the USB stick with an ISO built from the topic branch
  9. boot the resulting USB stick, unlock persistence
  10. check that the old packages are gone and the new ones are installed
  11. check in the logs that nothing bad happened

#13 Updated by intrigeri over 2 years ago

  • Assignee changed from intrigeri to alant
  • % Done changed from 70 to 80

Tests completed successfully => assuming you'll trust my testing procedure, please review my code changes and merge into testing (and then testing into devel). Thanks!

#14 Updated by alant over 2 years ago

  • Status changed from In Progress to Fix committed
  • Assignee deleted (alant)
  • % Done changed from 80 to 100

Merged, thanks!

#15 Updated by anonym over 2 years ago

  • QA Check changed from Ready for QA to Pass

#16 Updated by intrigeri over 2 years ago

  • Status changed from Fix committed to Resolved

Also available in: Atom PDF