Bug#586434: Let's clean the apt cache

2010-06-20 Thread Frans Pop
On Saturday 19 June 2010, Martin Michlmayr wrote:
 I see no reason for leaving .deb files in /var/cache/apt/archives on a
 fresh installation, so let's run apt-get clean before reboot.

This has been suggested and discussed before. IIRC (but I may be mistaken) 
Joey has always been against it.

The main reason IIRC is that leaving the packages makes it unnecessary to 
download them again if part of e.g. tasksel fails for whatever reason and 
the user has to install some packages manually (after ignoring that 
error - which is a real option as the base system should still be 
functional - and completing the installation).
Think of a (partially) failed desktop install over a relatively slow 
network connection.

IMO that argument is valid, but I also don't think that by itself it's 
enough to decide one way or another.

I have no very strong feelings about this. Cleaning up is a good idea in 
general, but I don't think there is any huge gain in doing it here.
I don't see any real problem with leaving the system admin responsible to 
do this cleanup (which he has to do anyway for any later package 
installs/updates).

Any disk space savings are IMO illusionary as the cache will fill up again 
anyway during later updates and any system that does not have sufficient 
disk space to hold a decent package cache will also have serious problems 
during later stable updates.

I can only see a real gain for installs to embedded systems that are not 
expected to be updated in any regular way. But those should not be 
installed using D-I anyway, or at least already always require some 
customized post-installation.

Note also that this is not an issue for packages that are installed from CD 
as they are not copied to the cache.



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201006201227.02244.elen...@planet.nl



Bug#586434: Let's clean the apt cache

2010-06-20 Thread Frans Pop
On Sunday 20 June 2010, Frans Pop wrote:
 The main reason IIRC is that leaving the packages makes it unnecessary
 to download them again if part of e.g. tasksel fails for whatever reason
 and the user has to install some packages manually [...].

Note that the above argument is only really valid for packages installed 
*after* base-installer. If base-installer fails we generally consider the 
whole installation broken so only cleaning the cache at the end of that 
(and not also during finish-install) could be something to consider.



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201006201234.06330.elen...@planet.nl



Bug#586434: Let's clean the apt cache

2010-06-20 Thread Frans Pop
On Sunday 20 June 2010, Frans Pop wrote:
 Any disk space savings are IMO illusionary as the cache will fill up
 again anyway during later updates and any system that does not have
 sufficient disk space to hold a decent package cache will also have
 serious problems during later stable updates.

I mainly mean upgrades from one stable release to the next (e.g. lenny - 
squeeze). Point releases and individual security updates are much smaller 
and thus less of a problem.



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201006201241.59620.elen...@planet.nl



Bug#586434: Let's clean the apt cache

2010-06-20 Thread Christian PERRIER
Quoting Frans Pop (elen...@planet.nl):

 The main reason IIRC is that leaving the packages makes it unnecessary to 
 download them again if part of e.g. tasksel fails for whatever reason and 
 the user has to install some packages manually (after ignoring that 
 error - which is a real option as the base system should still be 
 functional - and completing the installation).
 Think of a (partially) failed desktop install over a relatively slow 
 network connection.
 
 IMO that argument is valid, but I also don't think that by itself it's 
 enough to decide one way or another.
 
 I have no very strong feelings about this. Cleaning up is a good idea in 

.../...

Since yesterday, I was trying to find out why I was recently wondering
the same thing...and I finally found today..:-)

Indeed, I witnessed my son installing Debian on a Dell mini 9
netbook. He did choose a default desktop install (with Gnome and
stuff) as these beasts are powerful enough for such heavy desktop
environment. Still, he was monitoring the disk space ans was wondering
whether everything would fit in, particularly at the critical moment
where .deb files are downloaded...and the time they're all installed.

I explained him that it if goes well (it did) he should apt-get
clean after the installation so that downloaded files no longer eat
the short disk spaces he has.

And, of course, he asked me THE question: but why don't you guys
clean this out automatically at the end of the install? I have to
admit that I was having hard times finding a good argument to
explain..:-)

So, yes, I'd vote to have, by default a cleaning of the package cache
at the end of the install. IMHO, that fits the most common use
case. Maybe, for more corner cases where keepign the cache would be
good, could we have a low priority option (or a preseed-only choice)
to *not* clean the cache?







signature.asc
Description: Digital signature


Bug#586434: Let's clean the apt cache

2010-06-20 Thread Frans Pop
On Sunday 20 June 2010, Christian PERRIER wrote:
 Maybe, for more corner cases where keepign the cache would be
 good, could we have a low priority option (or a preseed-only choice)
 to *not* clean the cache?

I don't think it has anything to do with user choice or preseeding. Making 
this a debconf option makes absolutely no sense IMO.

The only reason I see to keep the cache is when some packages (after 
base-installer) fail to install. If we want to cover that case it should 
be detected automatically by testing the result of tasksel [1]. The final 
cleanup could be omitted in that case.

[1] Checking installation of packages using apt-install is much harder to 
do as there are many different calls and failure may be expected in some 
cases. It also gains much less as their total size is much less.



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201006201328.27722.elen...@planet.nl



Bug#586434: Let's clean the apt cache

2010-06-20 Thread Petter Reinholdtsen

[Frans Pop]
 The only reason I see to keep the cache is when some packages (after 
 base-installer) fail to install. If we want to cover that case it should 
 be detected automatically by testing the result of tasksel [1]. The final 
 cleanup could be omitted in that case.

Sound like a good idea.

 [1] Checking installation of packages using apt-install is much
 harder to do as there are many different calls and failure may be
 expected in some cases. It also gains much less as their total size
 is much less.

I believe it would not be very hard.  We would have to add code to
apt-install, and to the udeb handling the queue updated by apt-install
before base-installer is exeucted.  No need to update all those
calling apt-install for this.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/2flwrtthldo@login2.uio.no



Bug#586434: Let's clean the apt cache

2010-06-20 Thread Frans Pop
On Sunday 20 June 2010, Petter Reinholdtsen wrote:
  [1] Checking installation of packages using apt-install is much
  harder to do as there are many different calls and failure may be
  expected in some cases. It also gains much less as their total size
  is much less.

 I believe it would not be very hard.  We would have to add code to
 apt-install, and to the udeb handling the queue updated by apt-install
 before base-installer is exeucted.  No need to update all those
 calling apt-install for this.

You missed the main point. apt-install can fail without there being an 
error (example: package being apt-installed isn't available; this is quite 
common). So you cannot test the result.



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201006201642.53482.elen...@planet.nl



Bug#586434: Let's clean the apt cache

2010-06-20 Thread Otavio Salvador
Hello,

On Sun, Jun 20, 2010 at 10:41 AM, Petter Reinholdtsen p...@hungry.com wrote:

 [Frans Pop]
 The only reason I see to keep the cache is when some packages (after
 base-installer) fail to install. If we want to cover that case it should
 be detected automatically by testing the result of tasksel [1]. The final
 cleanup could be omitted in that case.

 Sound like a good idea.

Agreed.

 [1] Checking installation of packages using apt-install is much
 harder to do as there are many different calls and failure may be
 expected in some cases. It also gains much less as their total size
 is much less.

 I believe it would not be very hard.  We would have to add code to
 apt-install, and to the udeb handling the queue updated by apt-install
 before base-installer is exeucted.  No need to update all those
 calling apt-install for this.

Agreed as well.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br



--
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktim0qiupg89bfoa-o8xdl14ldw_7t1gxrvea9...@mail.gmail.com



Bug#586434: Let's clean the apt cache

2010-06-19 Thread Martin Michlmayr
Package: finish-install
Version: 2.23
Severity: wishlist
Tags: patch

I see no reason for leaving .deb files in /var/cache/apt/archives on a
fresh installation, so let's run apt-get clean before reboot.

OK to apply?


Index: finish-install.d/30cleanup
===
--- finish-install.d/30cleanup  (revision 0)
+++ finish-install.d/30cleanup  (revision 0)
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+chroot /target apt-get clean
+

Property changes on: finish-install.d/30cleanup
___
Added: svn:executable
   + *

-- 
Martin Michlmayr
http://www.cyrius.com/



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100619135715.ga10...@jirafa.cyrius.com



Bug#586434: Let's clean the apt cache

2010-06-19 Thread Otavio Salvador
Hello Martin,

On Sat, Jun 19, 2010 at 10:57 AM, Martin Michlmayr t...@cyrius.com wrote:
 Package: finish-install
 Version: 2.23
 Severity: wishlist
 Tags: patch

 I see no reason for leaving .deb files in /var/cache/apt/archives on a
 fresh installation, so let's run apt-get clean before reboot.

 OK to apply?

I fully agree with you and I do it every time I finish an install so
it does looks like the logical thing to do is to move it to d-i :)

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktikkesv2nnr2ssw3mh45kxdeslxzlrqr2_sit...@mail.gmail.com



Bug#586434: Let's clean the apt cache

2010-06-19 Thread Petter Reinholdtsen

[Martin Michlmayr]
 I see no reason for leaving .deb files in /var/cache/apt/archives on
 a fresh installation, so let's run apt-get clean before reboot.

 OK to apply?

See my comment in #586434.  If it is done, please make sure it is done
as late as possible.  Doing it late in finish-install.d should not as
far as I can see affect the Debian Edu installation, while doing it
earlier will.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/2flpqzmj4vh@login2.uio.no



Bug#586434: Let's clean the apt cache

2010-06-19 Thread Martin Michlmayr
* Petter Reinholdtsen p...@hungry.com [2010-06-19 19:42]:
 See my comment in #586434.  If it is done, please make sure it is done
 as late as possible.  Doing it late in finish-install.d should not as
 far as I can see affect the Debian Edu installation, while doing it
 earlier will.

I've done it after you get the Installation complete message.
Can you confirm that this is late enough?

-- 
Martin Michlmayr
http://www.cyrius.com/



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100619181207.gr1...@jirafa.cyrius.com



Bug#586434: Let's clean the apt cache

2010-06-19 Thread Petter Reinholdtsen
[Martin Michlmayr]
 I've done it after you get the Installation complete message.
 Can you confirm that this is late enough?

Yes.  The last Debian Edu script is at 13debian-edu-profile-udeb
before the installation complete message.  The LTSP build is done in
its own udeb between pkgsel and finish-install.

But I would suggest to move it even later, perhaps as late as 60, just
after the backup network setup is done.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100619182114.gp13...@login2.uio.no