mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] barebox: Remove all images from multi-image installs.
@ 2022-02-26 17:28 Christian Melki
  2022-03-04  7:38 ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Melki @ 2022-02-26 17:28 UTC (permalink / raw)
  To: ptxdist

The multi-image install is a bit peculiar.
It installs several target images and decides to softlink
the last image to barebox-image, which is then used for image installs etc.
The barebox-image only by chance pointing at the desired image.

When removing images, only the softlink is removed.
We could go with removal of barebox* but I find that a bit
too indiscriminating. So add removal of anything called barebox-*.img.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 rules/barebox.make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/barebox.make b/rules/barebox.make
index 1c8463e63..dc37e7a62 100644
--- a/rules/barebox.make
+++ b/rules/barebox.make
@@ -212,7 +212,7 @@ $(STATEDIR)/barebox.clean:
 	@$(call clean_pkg, BAREBOX)
 	@$(foreach prog, $(BAREBOX_PROGS_HOST), \
 		rm -vf $(PTXDIST_SYSROOT_HOST)/bin/$(notdir $(prog))$(ptx/nl))
-	@rm -vf $(IMAGEDIR)/barebox-image $(IMAGEDIR)/barebox-default-environment
+	@rm -vf $(IMAGEDIR)/barebox-image $(IMAGEDIR)/barebox-*.img $(IMAGEDIR)/barebox-default-environment
 
 # ----------------------------------------------------------------------------
 # oldconfig / menuconfig
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] barebox: Remove all images from multi-image installs.
  2022-02-26 17:28 [ptxdist] [PATCH] barebox: Remove all images from multi-image installs Christian Melki
@ 2022-03-04  7:38 ` Michael Olbrich
  2022-03-11 10:27   ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2022-03-04  7:38 UTC (permalink / raw)
  To: Christian Melki; +Cc: ptxdist

On Sat, Feb 26, 2022 at 06:28:57PM +0100, Christian Melki wrote:
> The multi-image install is a bit peculiar.
> It installs several target images and decides to softlink
> the last image to barebox-image, which is then used for image installs etc.
> The barebox-image only by chance pointing at the desired image.
> 
> When removing images, only the softlink is removed.
> We could go with removal of barebox* but I find that a bit
> too indiscriminating. So add removal of anything called barebox-*.img.

The problem is, that this may remove files from a different package. E.g.
from another barebox package, created with the barebox template.

We should only delete files that we create. I have a vague idea about that.
Let me think about this some more.

Michael

> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> ---
>  rules/barebox.make | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rules/barebox.make b/rules/barebox.make
> index 1c8463e63..dc37e7a62 100644
> --- a/rules/barebox.make
> +++ b/rules/barebox.make
> @@ -212,7 +212,7 @@ $(STATEDIR)/barebox.clean:
>  	@$(call clean_pkg, BAREBOX)
>  	@$(foreach prog, $(BAREBOX_PROGS_HOST), \
>  		rm -vf $(PTXDIST_SYSROOT_HOST)/bin/$(notdir $(prog))$(ptx/nl))
> -	@rm -vf $(IMAGEDIR)/barebox-image $(IMAGEDIR)/barebox-default-environment
> +	@rm -vf $(IMAGEDIR)/barebox-image $(IMAGEDIR)/barebox-*.img $(IMAGEDIR)/barebox-default-environment
>  
>  # ----------------------------------------------------------------------------
>  # oldconfig / menuconfig
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] barebox: Remove all images from multi-image installs.
  2022-03-04  7:38 ` Michael Olbrich
@ 2022-03-11 10:27   ` Michael Olbrich
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2022-03-11 10:27 UTC (permalink / raw)
  To: Christian Melki, ptxdist

On Fri, Mar 04, 2022 at 08:38:50AM +0100, Michael Olbrich wrote:
> On Sat, Feb 26, 2022 at 06:28:57PM +0100, Christian Melki wrote:
> > The multi-image install is a bit peculiar.
> > It installs several target images and decides to softlink
> > the last image to barebox-image, which is then used for image installs etc.
> > The barebox-image only by chance pointing at the desired image.
> > 
> > When removing images, only the softlink is removed.
> > We could go with removal of barebox* but I find that a bit
> > too indiscriminating. So add removal of anything called barebox-*.img.
> 
> The problem is, that this may remove files from a different package. E.g.
> from another barebox package, created with the barebox template.
> 
> We should only delete files that we create. I have a vague idea about that.
> Let me think about this some more.

Take a look at ptxdist master. I've fixed this in a more generic way.

Michael


> > Signed-off-by: Christian Melki <christian.melki@t2data.com>
> > ---
> >  rules/barebox.make | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/rules/barebox.make b/rules/barebox.make
> > index 1c8463e63..dc37e7a62 100644
> > --- a/rules/barebox.make
> > +++ b/rules/barebox.make
> > @@ -212,7 +212,7 @@ $(STATEDIR)/barebox.clean:
> >  	@$(call clean_pkg, BAREBOX)
> >  	@$(foreach prog, $(BAREBOX_PROGS_HOST), \
> >  		rm -vf $(PTXDIST_SYSROOT_HOST)/bin/$(notdir $(prog))$(ptx/nl))
> > -	@rm -vf $(IMAGEDIR)/barebox-image $(IMAGEDIR)/barebox-default-environment
> > +	@rm -vf $(IMAGEDIR)/barebox-image $(IMAGEDIR)/barebox-*.img $(IMAGEDIR)/barebox-default-environment
> >  
> >  # ----------------------------------------------------------------------------
> >  # oldconfig / menuconfig
> > -- 
> > 2.30.2
> > 
> > 
> > _______________________________________________
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> > 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-11 10:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-26 17:28 [ptxdist] [PATCH] barebox: Remove all images from multi-image installs Christian Melki
2022-03-04  7:38 ` Michael Olbrich
2022-03-11 10:27   ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox