Re: removal of unneeded packages installed by pbuilder

2008-02-16 Thread Neil Williams
On Sat, 2008-02-16 at 11:44 +0900, Paul Wise wrote:
 On Feb 16, 2008 11:13 AM, Kamaraju S Kusumanchi [EMAIL PROTECTED] 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/




signature.asc
Description: This is a digitally signed message part


Re: removal of unneeded packages installed by pbuilder

2008-02-16 Thread Kapil Hari Paranjape
Hello,

One way to use pbuilder and avoid using aptcache is to  use a
local mirroring tool as the MIRRORSITE. I use approx but YMMV.

Another way to avoid the massive file copying is to use a
BINDMOUNTS and set APTCACHE to . The tricky part is that 
pbuilder's BINDMOUNTS allows you to specify the source of
the bind but not the target. So one way around this would be
to use BINDMOUNTS as /var/cache/pbuilder/${DISTRIBUTION}/aptcache.
Then you configure apt in the chroot to use this directory
as its cache directory. I had this setup until I hit upon the first
option.

Regards,

Kapil.
--



signature.asc
Description: Digital signature


Re: removal of unneeded packages installed by pbuilder

2008-02-16 Thread Kapil Hari Paranjape
Hello,

On Sun, 17 Feb 2008, Kapil Hari Paranjape wrote:
 Then you configure apt in the chroot to use this directory
 as its cache directory. I had this setup until I hit upon the first
 option.

I forgot to say that you can use the APTCONFDIR option to
give a specialised configuration for APT inside the CHROOT.

Regards,

Kapil.
--


signature.asc
Description: Digital signature


Re: removal of unneeded packages installed by pbuilder

2008-02-16 Thread Kamaraju S Kusumanchi
Paul Wise wrote:

 On Feb 16, 2008 11:13 AM, Kamaraju S Kusumanchi [EMAIL PROTECTED]
 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
 cowbuilder --login --save-after-login
 

Thanks for all the replies. The chroot login is a cool thing to do. I did
not know about it before.

I finally used the --autocleanaptcache option of pbuilder and it worked. I
did not notice this option before posting the question here.

thanks
raju
-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



removal of unneeded packages installed by pbuilder

2008-02-15 Thread Kamaraju S Kusumanchi
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.

thanks
raju
-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: removal of unneeded packages installed by pbuilder

2008-02-15 Thread Paul Wise
On Feb 16, 2008 11:13 AM, Kamaraju S Kusumanchi [EMAIL PROTECTED] 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
cowbuilder --login --save-after-login

-- 
bye,
pabs

http://wiki.debian.org/PaulWise


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]