Bug#586428: Please clear the apt cache
Hello, On Sun, Jul 25, 2010 at 5:56 AM, Petter Reinholdtsen p...@hungry.com wrote: Because of this, I would prefer to leave the complete APT cache in place until the end of the installation, at least in the common case. What about only purging the apt cache if there is little space on the disk or little ram in the machine only? What about we clean it by default and let it be disabled using a preseed? So Debian-Edu could preserve the old behaviour just setting false to a template? -- 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-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
[Martin Michlmayr] I didn't hear any objections to this approach. Petter, can you please test the following patch to make sure it doesn't break LTSP (it shouldn't). If you confirm, I'll commit it. I tested this patch to bootstrap-base.postinst, and this did affect LTSP negatively. :( With this patch in place, several packages had to be downloaded again when installing LTSP via PXE. Did not locate the complete list, but noticed cron, aptitude and tasksel had to be downloaded again. Because of this, I would prefer to leave the complete APT cache in place until the end of the installation, at least in the common case. What about only purging the apt cache if there is little space on the disk or little ram in the machine only? Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
* Petter Reinholdtsen p...@hungry.com [2010-06-20 19:39]: Yes, assuming it is done right after debootstrap, and before the extra packages (like the kernel) is done. The extra packages will be useful to cache for the LTSP chroot building. I didn't hear any objections to this approach. Petter, can you please test the following patch to make sure it doesn't break LTSP (it shouldn't). If you confirm, I'll commit it. Index: bootstrap-base.postinst === --- bootstrap-base.postinst (revision 64063) +++ bootstrap-base.postinst (working copy) @@ -131,6 +131,8 @@ exit_error base-installer/debootstrap-failed fi + in-target apt-get clean + # Progress bar is now stepped to 100 } -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
[Martin Michlmayr] I didn't hear any objections to this approach. Petter, can you please test the following patch to make sure it doesn't break LTSP (it shouldn't). If you confirm, I'll commit it. Thanks to #589646, LTSP do no longer install in squeeze, so I can't test at the moment. Working on that at the moment, so in a few days time I hope LTSP is operational again and I can test this. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
* Petter Reinholdtsen p...@hungry.com [2010-06-19 19:38]: When Debian Edu set up its thin client server, the installer reuse the APT cache by bind-mounting /var/cache/apt/archives into the chroot to avoid having to download the same packages again when creating the LTSP chroot. Because of this, I would suggest to not clear the cache by default until at the very end of the installation run. Would it be a major problem simply to use a web proxy instead? (Just curious). What about making the apt cache cleaning optional and default to not doing it, and allow the systems with little disk space to remove it? I guess one way would be to use a post-base-installer.d script (as Otavio has suggested) and then Debian Edu could remove delete this script. Or we could introduce a config variable, but this is getting more complicated that I originally expected. Any opionions on the best solutions welcome (especially from Otavio, Frans and Colin who see the big picture of d-i). -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
* Frans Pop elen...@planet.nl [2010-06-20 07:17]: cleanup () { + rm -f /target/var/cache/apt/archives/*.deb 2/dev/null || true rm -f $KERNEL_LIST $KERNEL_LIST.unfiltered } Shouldn't this call 'apt-get cleanup' in /target instead? Yeah, I was wondering about that too. I wasn't sure whether it's smart to use apt-get at this point, but I don't really see a reason why not to. -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
* Otavio Salvador ota...@ossystems.com.br [2010-06-19 12:35]: The following patch, which clears the cache after debootstrap and then again at the end (after kernel/extra packages), works for me. OK to apply? Conceptually it is OK but why not move it to post-base-installer.d? Well, my idea was to clean it twice, once after debootstrap and once at the end (after kernel and extra packages). Doing it in post-base-installer.d would not clean the kernel and extra packages. -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
[Martin Michlmayr] Would it be a major problem simply to use a web proxy instead? (Just curious). For some sites, yes. :) For others, no. We do provide a squid proxy already as part of Debian Edu, but as this reuse of the apt cache is an optimization, it should be fairly obvious that it is a worse optimisation to have to download the packages twice, even if it is from a proxy. :) Also, the Debian Edu proxy can't be used to install the proxy server, which might also include the LTSP chroot, and thus it is at least one common setup where reusing the apt cache is wanted. Is it a major problem to wait until finish-install to clear the cache? Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
On Sunday 20 June 2010, Martin Michlmayr wrote: * Otavio Salvador ota...@ossystems.com.br [2010-06-19 12:35]: The following patch, which clears the cache after debootstrap and then again at the end (after kernel/extra packages), works for me. OK to apply? Conceptually it is OK but why not move it to post-base-installer.d? Well, my idea was to clean it twice, once after debootstrap and once at the end (after kernel and extra packages). Doing it in post-base-installer.d would not clean the kernel and extra packages. IMO it should only be done once during base-installer: at the very end (and only if successful). Doing it twice does not gain anything. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
* Petter Reinholdtsen p...@hungry.com [2010-06-20 12:05]: Is it a major problem to wait until finish-install to clear the cache? Yes, when you have only 512 MB of storage, those 70-80 MB of debs that are downloaded during base install really hurt. -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
On Sun, Jun 20, 2010 at 6:37 AM, Martin Michlmayr t...@cyrius.com wrote: * Otavio Salvador ota...@ossystems.com.br [2010-06-19 12:35]: The following patch, which clears the cache after debootstrap and then again at the end (after kernel/extra packages), works for me. OK to apply? Conceptually it is OK but why not move it to post-base-installer.d? Well, my idea was to clean it twice, once after debootstrap and once at the end (after kernel and extra packages). Doing it in post-base-installer.d would not clean the kernel and extra packages. It looks it will need to be optional otherwise this is going to break Debian EDU. But I see your point in doing it twice :) -- 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-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
On Jun 20, 2010, at 6:06 AM, Frans Pop wrote: On Sunday 20 June 2010, Martin Michlmayr wrote: * Otavio Salvador ota...@ossystems.com.br [2010-06-19 12:35]: The following patch, which clears the cache after debootstrap and then again at the end (after kernel/extra packages), works for me. OK to apply? Conceptually it is OK but why not move it to post-base-installer.d? Well, my idea was to clean it twice, once after debootstrap and once at the end (after kernel and extra packages). Doing it in post-base-installer.d would not clean the kernel and extra packages. IMO it should only be done once during base-installer: at the very end (and only if successful). Doing it twice does not gain anything. If you are *very* short of disk space, doing it twice might make sense. Rick -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
[Otavio Salvador] It looks it will need to be optional otherwise this is going to break Debian EDU. But I see your point in doing it twice :) One setup that would not break Debian Edu is to clean the apt cache once just after debootstrap, as bind-mounting the apt cache is only done after debootstrap is done when building the LTSP chroot. The reason is simply that as far as I know, there is no way to get debootstrap to use an existing apt cache, so those packages are downloaded every time. It is at the moment ~50 MiB of debs. The remaining 3 GiB of packages are fetched from the apt cache, thought. :) And it can also be cleaned at the very end of the installation, after the LTSP chroot is created between pkgsel and finish-install. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
On Sunday 20 June 2010, Rick Thomas wrote: If you are *very* short of disk space, doing it twice might make sense. Nonsense. If you're that short on diskspace you have a totally unusable system anyway. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
Hello Frans, On Sun, Jun 20, 2010 at 11:21 AM, Frans Pop elen...@planet.nl wrote: On Sunday 20 June 2010, Rick Thomas wrote: If you are *very* short of disk space, doing it twice might make sense. Nonsense. If you're that short on diskspace you have a totally unusable system anyway. Not really; 80 or 90mb can be a big difference on this case. So there're cases it will be important. What we need to discuss is if it ought or not to be supported by d-i. I think it could have a preseed option for it and do it so it is easier for 'short-on-disk' devices to work. -- 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-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
Hello, On Sun, Jun 20, 2010 at 10:54 AM, Petter Reinholdtsen p...@hungry.com wrote: One setup that would not break Debian Edu is to clean the apt cache once just after debootstrap, as bind-mounting the apt cache is only done after debootstrap is done when building the LTSP chroot. The reason is simply that as far as I know, there is no way to get debootstrap to use an existing apt cache, so those packages are downloaded every time. It is at the moment ~50 MiB of debs. The remaining 3 GiB of packages are fetched from the apt cache, thought. :) So it being done at base-installer time would not hurt you, indeed. Then basically it could be always done (and disabled by a preseeding option if needed). -- 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-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
[Otavio Salvador] So it being done at base-installer time would not hurt you, indeed. Yes, assuming it is done right after debootstrap, and before the extra packages (like the kernel) is done. The extra packages will be useful to cache for the LTSP chroot building. Then basically it could be always done (and disabled by a preseeding option if needed). Yeah. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
Package: base-installer Version: 1.107 Severity: wishlist Tags: patch Is there a reason why base-installer doesn't clear the apt cache after installing base? I end up with about 70 MB of .debs in /var/cache/apt/archives and this hurts on machines with little space (such as machines with only 512 MB flash storage). The following patch, which clears the cache after debootstrap and then again at the end (after kernel/extra packages), works for me. OK to apply? Index: debian/bootstrap-base.postinst === --- debian/bootstrap-base.postinst (revision 63510) +++ debian/bootstrap-base.postinst (working copy) @@ -131,6 +131,8 @@ exit_error base-installer/debootstrap-failed fi + cleanup + # Progress bar is now stepped to 100 } Index: library.sh === --- library.sh (revision 63510) +++ library.sh (working copy) @@ -859,5 +859,6 @@ } cleanup () { + rm -f /target/var/cache/apt/archives/*.deb 2/dev/null || true rm -f $KERNEL_LIST $KERNEL_LIST.unfiltered } -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
Hello Martion, On Sat, Jun 19, 2010 at 10:21 AM, Martin Michlmayr t...@cyrius.com wrote: Package: base-installer Version: 1.107 Severity: wishlist Tags: patch Is there a reason why base-installer doesn't clear the apt cache after installing base? I end up with about 70 MB of .debs in /var/cache/apt/archives and this hurts on machines with little space (such as machines with only 512 MB flash storage). The following patch, which clears the cache after debootstrap and then again at the end (after kernel/extra packages), works for me. OK to apply? Conceptually it is OK but why not move it to post-base-installer.d? -- 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-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
[Martin Michlmayr] Is there a reason why base-installer doesn't clear the apt cache after installing base? I end up with about 70 MB of .debs in /var/cache/apt/archives and this hurts on machines with little space (such as machines with only 512 MB flash storage). When Debian Edu set up its thin client server, the installer reuse the APT cache by bind-mounting /var/cache/apt/archives into the chroot to avoid having to download the same packages again when creating the LTSP chroot. Because of this, I would suggest to not clear the cache by default until at the very end of the installation run. What about making the apt cache cleaning optional and default to not doing it, and allow the systems with little disk space to remove it? cleanup () { + rm -f /target/var/cache/apt/archives/*.deb 2/dev/null || true rm -f $KERNEL_LIST $KERNEL_LIST.unfiltered } Is it not better to use 'apt-get clean' or similar? Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#586428: Please clear the apt cache
On Saturday 19 June 2010, Martin Michlmayr wrote: cleanup () { + rm -f /target/var/cache/apt/archives/*.deb 2/dev/null || true rm -f $KERNEL_LIST $KERNEL_LIST.unfiltered } Shouldn't this call 'apt-get cleanup' in /target instead? -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org