* [Buildroot] [PATCH] core: do not remove dl/ directory on distclean @ 2016-07-10 21:55 Yann E. MORIN 2016-07-11 3:26 ` Baruch Siach 2016-07-12 14:28 ` Thomas Petazzoni 0 siblings, 2 replies; 7+ messages in thread From: Yann E. MORIN @ 2016-07-10 21:55 UTC (permalink / raw) To: buildroot Currently, if the dl/ directory is the default location, it is removed on distclean. However, the dl/ directory is a precious location: it contains all the tarballs downloaded so far, and some can be relatively huge, taking some previous time to re-download, especially on slowish links. Don't remove it on distclean. If the user really needs to regain some space, leave it to him to clean this directory up manually. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 027f21c..5d840f6 100644 --- a/Makefile +++ b/Makefile @@ -901,9 +901,6 @@ clean: $(LEGAL_INFO_DIR) $(GRAPHS_DIR) distclean: clean -ifeq ($(DL_DIR),$(TOPDIR)/dl) - rm -rf $(DL_DIR) -endif ifeq ($(O),output) rm -rf $(O) endif -- 2.7.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] core: do not remove dl/ directory on distclean 2016-07-10 21:55 [Buildroot] [PATCH] core: do not remove dl/ directory on distclean Yann E. MORIN @ 2016-07-11 3:26 ` Baruch Siach 2016-07-11 16:34 ` Yann E. MORIN 2016-07-12 14:28 ` Thomas Petazzoni 1 sibling, 1 reply; 7+ messages in thread From: Baruch Siach @ 2016-07-11 3:26 UTC (permalink / raw) To: buildroot Hi Yann, On Sun, Jul 10, 2016 at 11:55:49PM +0200, Yann E. MORIN wrote: > Currently, if the dl/ directory is the default location, it is removed > on distclean. > > However, the dl/ directory is a precious location: it contains all the > tarballs downloaded so far, and some can be relatively huge, taking some > previous time to re-download, especially on slowish links. > > Don't remove it on distclean. If the user really needs to regain some > space, leave it to him to clean this directory up manually. Current Makefile help text for 'distclean' says: delete all non-source files (including .config) Not deleting the dl/ directory is not consistent with this description, IMO. baruch > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > --- > Makefile | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/Makefile b/Makefile > index 027f21c..5d840f6 100644 > --- a/Makefile > +++ b/Makefile > @@ -901,9 +901,6 @@ clean: > $(LEGAL_INFO_DIR) $(GRAPHS_DIR) > > distclean: clean > -ifeq ($(DL_DIR),$(TOPDIR)/dl) > - rm -rf $(DL_DIR) > -endif > ifeq ($(O),output) > rm -rf $(O) > endif -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il - ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] core: do not remove dl/ directory on distclean 2016-07-11 3:26 ` Baruch Siach @ 2016-07-11 16:34 ` Yann E. MORIN 2016-07-11 20:03 ` Peter Korsgaard 0 siblings, 1 reply; 7+ messages in thread From: Yann E. MORIN @ 2016-07-11 16:34 UTC (permalink / raw) To: buildroot Baruch, All, On 2016-07-11 06:26 +0300, Baruch Siach spake thusly: > On Sun, Jul 10, 2016 at 11:55:49PM +0200, Yann E. MORIN wrote: > > Currently, if the dl/ directory is the default location, it is removed > > on distclean. > > > > However, the dl/ directory is a precious location: it contains all the > > tarballs downloaded so far, and some can be relatively huge, taking some > > previous time to re-download, especially on slowish links. > > > > Don't remove it on distclean. If the user really needs to regain some > > space, leave it to him to clean this directory up manually. > > Current Makefile help text for 'distclean' says: > > delete all non-source files (including .config) > > Not deleting the dl/ directory is not consistent with this description, IMO. Well, I do understand it the other way: non-source files are deleted, but source files are not deleted. And I would argue that the content of dl/ *are* source files. If anything, they are the archetype of source files. Ergo, distclean should not remove them. Regards, Yann E. MORIN. > baruch > > > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > > --- > > Makefile | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index 027f21c..5d840f6 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -901,9 +901,6 @@ clean: > > $(LEGAL_INFO_DIR) $(GRAPHS_DIR) > > > > distclean: clean > > -ifeq ($(DL_DIR),$(TOPDIR)/dl) > > - rm -rf $(DL_DIR) > > -endif > > ifeq ($(O),output) > > rm -rf $(O) > > endif > > -- > http://baruch.siach.name/blog/ ~. .~ Tk Open Systems > =}------------------------------------------------ooO--U--Ooo------------{= > - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il - -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] core: do not remove dl/ directory on distclean 2016-07-11 16:34 ` Yann E. MORIN @ 2016-07-11 20:03 ` Peter Korsgaard 2016-07-11 20:22 ` Yann E. MORIN 0 siblings, 1 reply; 7+ messages in thread From: Peter Korsgaard @ 2016-07-11 20:03 UTC (permalink / raw) To: buildroot >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes: > Baruch, All, > On 2016-07-11 06:26 +0300, Baruch Siach spake thusly: >> On Sun, Jul 10, 2016 at 11:55:49PM +0200, Yann E. MORIN wrote: >> > Currently, if the dl/ directory is the default location, it is removed >> > on distclean. >> > >> > However, the dl/ directory is a precious location: it contains all the >> > tarballs downloaded so far, and some can be relatively huge, taking some >> > previous time to re-download, especially on slowish links. >> > >> > Don't remove it on distclean. If the user really needs to regain some >> > space, leave it to him to clean this directory up manually. >> >> Current Makefile help text for 'distclean' says: >> >> delete all non-source files (including .config) >> >> Not deleting the dl/ directory is not consistent with this description, IMO. > Well, I do understand it the other way: non-source files are deleted, > but source files are not deleted. > And I would argue that the content of dl/ *are* source files. If > anything, they are the archetype of source files. > Ergo, distclean should not remove them. Sorry, I agree with Baruch. Distclean should leave the directory structure like it was when the buildroot tarball was extracted (or git cloned) E.G. the GNU standard make targets state: https://www.gnu.org/prep/standards/standards.html#Standard-Targets ?distclean? Delete all files in the current directory (or created by this makefile) that are created by configuring or building the program. If you have unpacked the source and built the program without creating any other files, ?make distclean? should leave only the files that were in the distribution. However, there is no need to delete parent directories that were created with ?mkdir -p?, since they could have existed anyway. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] core: do not remove dl/ directory on distclean 2016-07-11 20:03 ` Peter Korsgaard @ 2016-07-11 20:22 ` Yann E. MORIN 2016-07-11 22:13 ` Peter Korsgaard 0 siblings, 1 reply; 7+ messages in thread From: Yann E. MORIN @ 2016-07-11 20:22 UTC (permalink / raw) To: buildroot Peter, All, On 2016-07-11 22:03 +0200, Peter Korsgaard spake thusly: > >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes: > > Baruch, All, > > On 2016-07-11 06:26 +0300, Baruch Siach spake thusly: > >> On Sun, Jul 10, 2016 at 11:55:49PM +0200, Yann E. MORIN wrote: > >> > Currently, if the dl/ directory is the default location, it is removed > >> > on distclean. > >> > > >> > However, the dl/ directory is a precious location: it contains all the > >> > tarballs downloaded so far, and some can be relatively huge, taking some > >> > previous time to re-download, especially on slowish links. > >> > > >> > Don't remove it on distclean. If the user really needs to regain some > >> > space, leave it to him to clean this directory up manually. > >> > >> Current Makefile help text for 'distclean' says: > >> > >> delete all non-source files (including .config) > >> > >> Not deleting the dl/ directory is not consistent with this description, IMO. > > > Well, I do understand it the other way: non-source files are deleted, > > but source files are not deleted. > > > And I would argue that the content of dl/ *are* source files. If > > anything, they are the archetype of source files. > > > Ergo, distclean should not remove them. > > Sorry, I agree with Baruch. Distclean should leave the directory > structure like it was when the buildroot tarball was extracted (or git > cloned) Right, on principle. Except... > E.G. the GNU standard make targets state: > > https://www.gnu.org/prep/standards/standards.html#Standard-Targets > > ?distclean? > > Delete all files in the current directory (or created by this makefile) > that are created by configuring or building the program. If you have > unpacked the source and built the program without creating any other > files, ?make distclean? should leave only the files that were in the > distribution. However, there is no need to delete parent directories > that were created with ?mkdir -p?, since they could have existed anyway. ... we could (should?) consider that dl/ is a special case. It really holds content that can be difficult to retrieve. Think of a tarball made from a git clone from a Linux kernel for example. This can be really costly to download, especially on slow links. For example: Downloaded Repo ----------------------------------------------------------------------------- 1.02 GiB git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1.43 GiB git://github.com/raspberrypi/linux.git But Oh well... I'm not impacted as I have BR2_DL_DIR in my environment pointing somehwere else and reliable... I find it just sad that unsuspecting users, especially newcomers) would hit that when told to start over from scratch... Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] core: do not remove dl/ directory on distclean 2016-07-11 20:22 ` Yann E. MORIN @ 2016-07-11 22:13 ` Peter Korsgaard 0 siblings, 0 replies; 7+ messages in thread From: Peter Korsgaard @ 2016-07-11 22:13 UTC (permalink / raw) To: buildroot >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes: Hi, > ... we could (should?) consider that dl/ is a special case. It really > holds content that can be difficult to retrieve. > Think of a tarball made from a git clone from a Linux kernel for > example. This can be really costly to download, especially on slow > links. For example: > Downloaded Repo > ----------------------------------------------------------------------------- > 1.02 GiB git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > 1.43 GiB git://github.com/raspberrypi/linux.git > But Oh well... I'm not impacted as I have BR2_DL_DIR in my environment > pointing somehwere else and reliable... I find it just sad that > unsuspecting users, especially newcomers) would hit that when told to > start over from scratch... But aren't those people using 'make clean' instead of 'make distclean'? They should. -- Venlig hilsen, Peter Korsgaard ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] core: do not remove dl/ directory on distclean 2016-07-10 21:55 [Buildroot] [PATCH] core: do not remove dl/ directory on distclean Yann E. MORIN 2016-07-11 3:26 ` Baruch Siach @ 2016-07-12 14:28 ` Thomas Petazzoni 1 sibling, 0 replies; 7+ messages in thread From: Thomas Petazzoni @ 2016-07-12 14:28 UTC (permalink / raw) To: buildroot Hello, On Sun, 10 Jul 2016 23:55:49 +0200, Yann E. MORIN wrote: > Currently, if the dl/ directory is the default location, it is removed > on distclean. > > However, the dl/ directory is a precious location: it contains all the > tarballs downloaded so far, and some can be relatively huge, taking some > previous time to re-download, especially on slowish links. > > Don't remove it on distclean. If the user really needs to regain some > space, leave it to him to clean this directory up manually. > > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Like Baruch and Peter, I don't really see the need to change this behavior. Buildroot has beeing removing the default dl/ location during distclean for many years, without anybody complaining. It matches the GNU definition of "distclean" and changing this would break existing behavior with no good benefit. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-07-12 14:28 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-07-10 21:55 [Buildroot] [PATCH] core: do not remove dl/ directory on distclean Yann E. MORIN 2016-07-11 3:26 ` Baruch Siach 2016-07-11 16:34 ` Yann E. MORIN 2016-07-11 20:03 ` Peter Korsgaard 2016-07-11 20:22 ` Yann E. MORIN 2016-07-11 22:13 ` Peter Korsgaard 2016-07-12 14:28 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox