--keep-apt and --keep-apt-components are no longer functional

Bug #1053008 reported by Nobuto Murata
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-defaults-builder (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

--keep-apt and --keep-apt-components manipulates /var/lib/apt/lists/* in config/hooks/90_cleanup.chroot.
but /var/lib/apt/lists/ will be re-generated on `lb_chroot_archives chroot remove` after config/hooks/90_cleanup.chroot.

for example, /var/lib/apt/lists/*_Translation* is re-downloaded in spite of config/hooks/90_cleanup.chroot deleted it.

live-build: 3.0~a57-1ubuntu4
ubuntu-defaults-builder: 0.38

Revision history for this message
Nobuto Murata (nobuto) wrote :

I will attach a log of building an image.
I added 'set -x' in /usr/lib/live/build/lb_chroot_archives.

Revision history for this message
Nobuto Murata (nobuto) wrote :

official quantal desktop image will not be fit into a CD, so removing Translation* to reduce size of an image is no longer needed, I'm afraid.

How about removing --keep-apt and --keep-apt-components options from ubuntu-defaults-image of quantal?

Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :

I will attach a log without --mirror.

Revision history for this message
Nobuto Murata (nobuto) wrote :

build log of
`ubuntu-defaults-image --package ~/ubuntu-defaults-ja_0.1_all.deb --components main,restricted --keep-apt-components main --release precise`

$ apt-cache policy ubuntu-defaults-builder live-build
ubuntu-defaults-builder:
  Installed: 0.40
  Candidate: 0.40
  Version table:
 *** 0.40 0
        500 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
        100 /var/lib/dpkg/status
live-build:
  Installed: 3.0~a57-1ubuntu4
  Candidate: 3.0~a57-1ubuntu4
  Version table:
 *** 3.0~a57-1ubuntu4 0
        500 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Nobuto Murata (nobuto) wrote :

without --mirror option, it's true that --keep-apt and --keep-apt-components make no difference.

the behavior is:

1. --keep-apt and --keep-apt-components manipulates chroot/var/cache/apt/lists/ in config/hooks/90_cleanup.chroot.

2. after that, `lb_chroot_archives chroot remove` removes chroot/var/lib/apt/lists/ completely without any condition.
    See. line 634 in /usr/lib/live/build/lb_chroot_archives

3. `apt-get --yes update` executed without any condition.
    See. line 871

4. if LB_APT_INDICES=false, remove chroot/var/lib/apt/lists again.
    See. line 880

5. chroot/var/lib/apt/lists/*-{updates,security,proposed}_* removed
    See. line 887

Revision history for this message
Nobuto Murata (nobuto) wrote :

With live-build 3.0~a57-1ubuntu4, keeping chroot/var/lib/apt/lists except -{updates,security,proposed} seems a default behavior.

The motivation of introducing --keep-apt was working apport on live-session (Bug #942180) as far as I understand.
Now working it with a development release by default.

With a point release like Ubuntu 12.04.1 LTS, apport does not work on live session to -{updates,security,proposed} packages, but it's not an ubuntu-defaults-builder specific issue.
the official Ubuntu 12.04 LTS image also does not have -{updates,security,proposed} indices, so I can reproduce the apport-not-working issue by executing `ubuntu-bug base-files`.

$ apt-cache policy base-files
base-files:
  Installed: 6.5ubuntu6.2
  Candidate: 6.5ubuntu6.2
  Version table:
 *** 6.5ubuntu6.2 0
        100 /var/lib/dpkg/status
     6.5ubuntu6 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

so my conclusion is:
 1. --keep-apt is now the default behavior.
     if someone wants all indices removed, LB_APT_INDICES=false can be passed by --remove-apt or something.
     apport is still not working to -{updates,security,proposed} packages, but it's not an ubuntu-defaults-builder specific issue.

 2. if someone wants --keep-apt-components behavior, we need a new hook after `lb_chroot_archives chroot remove`.

Please correct me if I'm wrong.

Revision history for this message
Nobuto Murata (nobuto) wrote :

> the official Ubuntu 12.04 LTS image also does not have -{updates,security,proposed} indices,

Sorry, I meant 12.04.1.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-defaults-builder (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.