On Sat, 2008-02-16 at 11:44 +0900, Paul Wise wrote: > On Feb 16, 2008 11:13 AM, Kamaraju S Kusumanchi <kamaraju@bluebottle.com> wrote: > > > Is there any equivalent to 'apt-get autoclean' to remove unnecessary > > packages installed by pbuilder? I looked in > > http://www.netfort.gr.jp/~dancer/software/pbuilder-doc/pbuilder-doc.html > > but could not find anything. > > You can make any changes you want to pbuilder's chroot using one of these: > > pbuilder --login --save-after-login No. As far as the apt cache is concerned, using 'apt-get autoclean' here does not remove the files from the *external* aptcache, only from within the chroot and is therefore pointless because precisely the same files are then copied back into the chroot when you next extract it. i.e. pbuilder (and probably cowbuilder) has a one-way copy operation built into the aptcache handler. New files downloaded in the chroot are added, existing or missing files are ignored. In essence, --save-after-login has no effect on the aptcache, only on the rest of the chroot because the aptcache isn't actually ever saved into the base tgz, it is copied in afresh each time. Try it - you'll see exactly the same files persist. (empdebuild from emdebian-tools uses pbuilder code extensively and in extending pbuilder to work with a cross building toolchain, I've learnt a bit about pbuilder internals.) pbuilder does support a clean mode but this removes all files from the aptcache, not just the unwanted ones. The current solution is to run --clean once in a while and face the hassle of having to download a lot of files that have just been deleted during the next run of pdebuild etc. If I can work out a suitable solution for empdebuild in emdebian-tools, I'll see if pbuilder can support 'autoclean' using the same patch. The idea would be to delete files in the external cache if they no longer exist inside the cache in the chroot. I suspect pbuilder has a good reason for not doing it this way so this isn't an easy fix. The main problem is breaking support for people who have pbuilder tarballs for sid, lenny and etch (or Ubuntu equivalents). Creating individual aptcaches for each is not a viable alternative. It's probably just as easy to run a cron job to remove the pbuilder aptcache once a month or so. -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
Attachment:
signature.asc
Description: This is a digitally signed message part