Merge lp:~sil2100/livecd-rootfs/remove_apt_lists into lp:livecd-rootfs

Proposed by Łukasz Zemczak on 2015-09-22
Status: Merged
Merged at revision: 1209
Proposed branch: lp:~sil2100/livecd-rootfs/remove_apt_lists
Merge into: lp:livecd-rootfs
Diff against target: 13 lines (+9/-0)
1 file modified
live-build/ubuntu-touch/hooks/99-remove-lists.chroot (+9/-0)
To merge this branch: bzr merge lp:~sil2100/livecd-rootfs/remove_apt_lists
Reviewer Review Type Date Requested Status
Michael Vogt Approve on 2015-09-25
Oliver Grawert 2015-09-22 Approve on 2015-09-23
Review via email: mp+271951@code.launchpad.net

Commit Message

Add a hook that would remove all the apt lists post-build for touch images to save up space. Our apparmor no longer needs those on the read-only filesystem for crashes.

Description of the Change

Add a hook that would remove all the apt lists post-build for touch images to save up space. Our apparmor no longer needs those on the read-only filesystem for crashes.

To post a comment you must log in.
Oliver Grawert (ogra) wrote :

looks fine to me (make sure it is executable)

review: Approve
Michael Vogt (mvo) wrote :

You may want to also remove all files under /var/cache/apt/

Michael Vogt (mvo) wrote :

If those are empty already, its fine of course.

Łukasz Zemczak (sil2100) wrote :

We could do that, I suppose that should be safe. Should I modify this merge?

Oliver Grawert (ogra) wrote :

IIRC live-build makes sure the cache is emptied before tarring up the rootfs, there should be no need to wipe it explicitly.

Michael Vogt (mvo) :
review: Approve
Łukasz Zemczak (sil2100) wrote :

Can I ask someone to merge this in? Thank you ;)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'live-build/ubuntu-touch/hooks/99-remove-lists.chroot'
2--- live-build/ubuntu-touch/hooks/99-remove-lists.chroot 1970-01-01 00:00:00 +0000
3+++ live-build/ubuntu-touch/hooks/99-remove-lists.chroot 2015-09-22 12:01:37 +0000
4@@ -0,0 +1,9 @@
5+#!/bin/sh
6+
7+# remove-lists: Remove all apt lists for space as our apport does not need them
8+#
9+# Author: Łukasz 'sil2100' Zemczak <achiang@canonical.com>
10+# Date : September 22, 2015
11+
12+echo "Removing /var/lib/apt/lists/*"
13+find /var/lib/apt/lists/ -type f | xargs rm -f

Subscribers

People subscribed via source and target branches