* [Buildroot] [RFC] Avoid make distclean to remove packages from rootfs @ 2008-10-22 12:06 Roberto A. Foglietta 2008-10-22 12:20 ` [Buildroot] [RFC] Avoid make distclean to remove packages fromrootfs John Schimandle 2008-10-22 12:52 ` [Buildroot] [RFC] Avoid make distclean to remove packages from rootfs Bernhard Reutner-Fischer 0 siblings, 2 replies; 11+ messages in thread From: Roberto A. Foglietta @ 2008-10-22 12:06 UTC (permalink / raw) To: buildroot 2008/10/21 Roberto A. Foglietta <roberto.foglietta@gmail.com>: > 2008/10/21 Roberto A. Foglietta <roberto.foglietta@gmail.com>: >> Hi to all, >> >> I never used buildroot before 5 days ago but it seems to me that once >> a package has been activated in menuconfig a way to remove it from >> rootfs is saving .configs, make distclean; make (i.e.: I compiled Xorg >> modular and then I move on tinyx but tinyx keyboard was not working >> because some incompatible craps remained on the rootfs). [cut] > A solution could be: > > 1) make checks for previous .config and un-install all removed packages (*) > 2) make saves the current .config into > project_build_$ARCH/$project_name/previous.config > 3) people who lose some rootfs customization do it because they > choose to remove packages (their fault) > > (*) supposing all packages have a make uninstall which correctly work > otherwise N patches would be delivered to achieve this result. > A proof of concept of the proposed general solution is attached as solution for bug report n.5564 http://busybox.net/bugs/view.php?id=5564 as you can see checkconfig.sh could be expanded to work on .config changes and acts accordingly Cheers, -- /roberto ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [RFC] Avoid make distclean to remove packages fromrootfs 2008-10-22 12:06 [Buildroot] [RFC] Avoid make distclean to remove packages from rootfs Roberto A. Foglietta @ 2008-10-22 12:20 ` John Schimandle 2008-10-22 12:48 ` Roberto A. Foglietta 2008-10-27 20:42 ` [Buildroot] [PATCH] " Roberto A. Foglietta 2008-10-22 12:52 ` [Buildroot] [RFC] Avoid make distclean to remove packages from rootfs Bernhard Reutner-Fischer 1 sibling, 2 replies; 11+ messages in thread From: John Schimandle @ 2008-10-22 12:20 UTC (permalink / raw) To: buildroot I perform the following steps to rebuild the rootfs. It's fast and easy. rm project_build_ARCH/PROJECT/.root rm -rf project_build_ARCH/PROJECT/root Once these steps are done then the next make will copy in a clean skeleton template and all the other Makefiles will notice the install targets are missing and they will install all the targets. This is the cleanest and fastest method I have found because this only copies files. Maybe this should be added to the top level Makefile. John -----Original Message----- From: buildroot-bounces@uclibc.org [mailto:buildroot-bounces at uclibc.org] On Behalf Of Roberto A. Foglietta Sent: Wednesday, October 22, 2008 5:06 AM To: buildroot at uclibc.org Subject: [Buildroot] [RFC] Avoid make distclean to remove packages fromrootfs 2008/10/21 Roberto A. Foglietta <roberto.foglietta@gmail.com>: > 2008/10/21 Roberto A. Foglietta <roberto.foglietta@gmail.com>: >> Hi to all, >> >> I never used buildroot before 5 days ago but it seems to me that >> once a package has been activated in menuconfig a way to remove it >> from rootfs is saving .configs, make distclean; make (i.e.: I >> compiled Xorg modular and then I move on tinyx but tinyx keyboard was >> not working because some incompatible craps remained on the rootfs). [cut] > A solution could be: > > 1) make checks for previous .config and un-install all removed > packages (*) > 2) make saves the current .config into > project_build_$ARCH/$project_name/previous.config > 3) people who lose some rootfs customization do it because they > choose to remove packages (their fault) > > (*) supposing all packages have a make uninstall which correctly work > otherwise N patches would be delivered to achieve this result. > A proof of concept of the proposed general solution is attached as solution for bug report n.5564 http://busybox.net/bugs/view.php?id=5564 as you can see checkconfig.sh could be expanded to work on .config changes and acts accordingly Cheers, -- /roberto _______________________________________________ buildroot mailing list buildroot at uclibc.org http://busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [RFC] Avoid make distclean to remove packages fromrootfs 2008-10-22 12:20 ` [Buildroot] [RFC] Avoid make distclean to remove packages fromrootfs John Schimandle @ 2008-10-22 12:48 ` Roberto A. Foglietta 2008-10-27 20:42 ` [Buildroot] [PATCH] " Roberto A. Foglietta 1 sibling, 0 replies; 11+ messages in thread From: Roberto A. Foglietta @ 2008-10-22 12:48 UTC (permalink / raw) To: buildroot 2008/10/22 John Schimandle <john_schimandle@hotmail.com>: > I perform the following steps to rebuild the rootfs. It's fast and easy. > > rm project_build_ARCH/PROJECT/.root > rm -rf project_build_ARCH/PROJECT/root > > Once these steps are done then the next make will copy in a clean skeleton > template and all the other Makefiles will notice the install targets are > missing and they will install all the targets. This is the cleanest and > fastest method I have found because this only copies files. > > Maybe this should be added to the top level Makefile. > I have just tried this way but it installs only skeleton, dbus, mcookie, busybox, kernel modules, kernel (in case), uClibc, some libraries (expat, drm, dbus, png, z), rxvt: roberto at rafbook:~/gles/buildroot$ du -ks project_build_i586/ugles/root 44680 project_build_i586/ugles/root roberto at rafbook:~/gles/buildroot$ mv -f project_build_i586/ugles/root project_build_i586/ugles/root.002 roberto at rafbook:~/gles/buildroot$ rm -f project_build_i586/ugles/.root roberto at rafbook:~/gles/buildroot$ make [...] roberto at rafbook:~/gles/buildroot$ du -ks project_build_i586/ugles/root 6676 project_build_i586/ugles/root However it does not resolve the problem to remove ONLY a package from customized rootfs or reset some kernel config parameters back (i.e.: bug report 5564). Cheers, -- /roberto ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] Avoid make distclean to remove packages fromrootfs 2008-10-22 12:20 ` [Buildroot] [RFC] Avoid make distclean to remove packages fromrootfs John Schimandle 2008-10-22 12:48 ` Roberto A. Foglietta @ 2008-10-27 20:42 ` Roberto A. Foglietta 2008-10-27 20:49 ` Bernhard Reutner-Fischer 1 sibling, 1 reply; 11+ messages in thread From: Roberto A. Foglietta @ 2008-10-27 20:42 UTC (permalink / raw) To: buildroot 2008/10/22 John Schimandle <john_schimandle@hotmail.com>: > I perform the following steps to rebuild the rootfs. It's fast and easy. > > rm project_build_ARCH/PROJECT/.root > rm -rf project_build_ARCH/PROJECT/root > ^^^^ these lines are not enough and sometime are too much (i.e.: about losing the customization) rm -rf project_build_ARCH/PROJECT/autotools-stamps ^^^^ this line resolves the problem to reinstall everything (apart libfreetype which buggy installation put them in staging_dir but not in target_dir) > Once these steps are done then the next make will copy in a clean skeleton > template and all the other Makefiles will notice the install targets are > missing and they will install all the targets. This is the cleanest and > fastest method I have found because this only copies files. > > Maybe this should be added to the top level Makefile. Attached patch allow two more targets: make install or make rootclean install I hope this helps, -- /roberto -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile-r23778.patch Type: text/x-diff Size: 1654 bytes Desc: not available Url : http://busybox.net/lists/buildroot/attachments/20081027/81eeb8f1/attachment.patch ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] Avoid make distclean to remove packages fromrootfs 2008-10-27 20:42 ` [Buildroot] [PATCH] " Roberto A. Foglietta @ 2008-10-27 20:49 ` Bernhard Reutner-Fischer 2008-10-27 21:11 ` Roberto A. Foglietta 0 siblings, 1 reply; 11+ messages in thread From: Bernhard Reutner-Fischer @ 2008-10-27 20:49 UTC (permalink / raw) To: buildroot On Mon, Oct 27, 2008 at 09:42:42PM +0100, Roberto A. Foglietta wrote: >2008/10/22 John Schimandle <john_schimandle@hotmail.com>: >> I perform the following steps to rebuild the rootfs. It's fast and easy. >> >> rm project_build_ARCH/PROJECT/.root >> rm -rf project_build_ARCH/PROJECT/root >> > >^^^^ these lines are not enough and sometime are too much (i.e.: about >losing the customization) > >rm -rf project_build_ARCH/PROJECT/autotools-stamps > >^^^^ this line resolves the problem to reinstall everything (apart >libfreetype which buggy installation put them in staging_dir but not >in target_dir) > >> Once these steps are done then the next make will copy in a clean skeleton >> template and all the other Makefiles will notice the install targets are >> missing and they will install all the targets. This is the cleanest and >> fastest method I have found because this only copies files. >> >> Maybe this should be added to the top level Makefile. > > >Attached patch allow two more targets: > >make install > >or > >make rootclean install > > > I hope this helps, >-- >/roberto >--- Makefile (revision 23784) >+++ Makefile (working copy) >@@ -324,7 +324,7 @@ > touch $(STAGING_DIR)/.fakeroot.00000; \ > fi > -find $(TARGET_DIR) -type d -name CVS -o -name .svn | xargs rm -rf >- -find $(TARGET_DIR) -type f -name .empty | xargs rm -rf >+ -find $(TARGET_DIR) -type f -name .empty -delete > touch $@ > > $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root >@@ -341,6 +341,7 @@ > find $(TARGET_DIR)/lib -name '*.a' -delete > find $(TARGET_DIR)/usr/lib -name '*.la' -delete > find $(TARGET_DIR)/lib -name '*.la' -delete >+ find $(TARGET_DIR) -type f -name '*~' -delete No. Use xargs instead. > endif > > source: $(TARGETS_SOURCE) $(HOST_SOURCE) >@@ -357,6 +358,19 @@ > # Cleanup and misc junk > # > ############################################################# >+ >+install: softclean all >+ # TODO: to fix this bug in the proper way >+ name=$$(find $(STAGING_DIR) -name 'libfreetype.so'); \ >+ dest=$$(dirname $$name | sed -e "s,$(STAGING_DIR),$(TARGET_DIR),"); \ >+ cp -af $$name* $$dest; $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $$dest/libfreetype.so >+ >+rootclean: >+ rm -rf $(TARGET_DIR) $(PROJECT_BUILD_DIR)/.root >+ >+softclean: >+ rm -rf $(IMAGE) $(PROJECT_BUILD_DIR)/autotools-stamps >+ No. Adding yet more targets makes absolutely no sense at all. Just make 'make clean' wipe the stamps and let 'make realclean' wipe the built stuff. And DOCUMENT that stuff in 'make help'! If you don't document it then the NACK and revert is implied. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] Avoid make distclean to remove packages fromrootfs 2008-10-27 20:49 ` Bernhard Reutner-Fischer @ 2008-10-27 21:11 ` Roberto A. Foglietta 2008-10-27 21:28 ` Bernhard Reutner-Fischer 2008-10-28 1:04 ` Hamish Moffatt 0 siblings, 2 replies; 11+ messages in thread From: Roberto A. Foglietta @ 2008-10-27 21:11 UTC (permalink / raw) To: buildroot 2008/10/27 Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>: > On Mon, Oct 27, 2008 at 09:42:42PM +0100, Roberto A. Foglietta wrote: [...] > >>--- Makefile (revision 23784) >>+++ Makefile (working copy) >>@@ -324,7 +324,7 @@ >> touch $(STAGING_DIR)/.fakeroot.00000; \ >> fi >> -find $(TARGET_DIR) -type d -name CVS -o -name .svn | xargs rm -rf >>- -find $(TARGET_DIR) -type f -name .empty | xargs rm -rf >>+ -find $(TARGET_DIR) -type f -name .empty -delete >> touch $@ >> >> $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root >>@@ -341,6 +341,7 @@ >> find $(TARGET_DIR)/lib -name '*.a' -delete >> find $(TARGET_DIR)/usr/lib -name '*.la' -delete >> find $(TARGET_DIR)/lib -name '*.la' -delete >>+ find $(TARGET_DIR) -type f -name '*~' -delete > > No. Use xargs instead. Why? >> source: $(TARGETS_SOURCE) $(HOST_SOURCE) >>@@ -357,6 +358,19 @@ >> # Cleanup and misc junk >> # >> ############################################################# >>+ >>+install: softclean all >>+ # TODO: to fix this bug in the proper way >>+ name=$$(find $(STAGING_DIR) -name 'libfreetype.so'); \ >>+ dest=$$(dirname $$name | sed -e "s,$(STAGING_DIR),$(TARGET_DIR),"); \ >>+ cp -af $$name* $$dest; $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $$dest/libfreetype.so >>+ >>+rootclean: >>+ rm -rf $(TARGET_DIR) $(PROJECT_BUILD_DIR)/.root >>+ >>+softclean: >>+ rm -rf $(IMAGE) $(PROJECT_BUILD_DIR)/autotools-stamps >>+ > > No. Adding yet more targets makes absolutely no sense at all. > Just make 'make clean' wipe the stamps and let 'make realclean' wipe the > built stuff. clean remove a lot of things not only the stamps clean: $(TARGETS_CLEAN) rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps a) you want reinstall things in root because they have been corrupted without loosing your customization on scripts/configurations: make install (which for work correctly need to do: softclean all, this is the reason because softclean exist) b) you want remove root and remade it from scratch make rootclean install in both a) and b) cases you want do these things in the fastest way. > > And DOCUMENT that stuff in 'make help'! > If you don't document it then the NACK and revert is implied. > I will made some tests in order to show you how much time people can save in using some targets appropriately. Then if you will agree with me that those targets are really useful I will document them. Testing extensively the buildroot in many configuration implies to move AS FAST AS POSSIBLE from one build to another one without recompiling the WORLD. Cheers, -- /roberto ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] Avoid make distclean to remove packages fromrootfs 2008-10-27 21:11 ` Roberto A. Foglietta @ 2008-10-27 21:28 ` Bernhard Reutner-Fischer 2008-10-27 22:19 ` Roberto A. Foglietta 2008-10-28 1:04 ` Hamish Moffatt 1 sibling, 1 reply; 11+ messages in thread From: Bernhard Reutner-Fischer @ 2008-10-27 21:28 UTC (permalink / raw) To: buildroot On Mon, Oct 27, 2008 at 10:11:12PM +0100, Roberto A. Foglietta wrote: >2008/10/27 Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>: >> On Mon, Oct 27, 2008 at 09:42:42PM +0100, Roberto A. Foglietta wrote: > >[...] > >> >>>--- Makefile (revision 23784) >>>+++ Makefile (working copy) >>>@@ -324,7 +324,7 @@ >>> touch $(STAGING_DIR)/.fakeroot.00000; \ >>> fi >>> -find $(TARGET_DIR) -type d -name CVS -o -name .svn | xargs rm -rf >>>- -find $(TARGET_DIR) -type f -name .empty | xargs rm -rf >>>+ -find $(TARGET_DIR) -type f -name .empty -delete >>> touch $@ >>> >>> $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root >>>@@ -341,6 +341,7 @@ >>> find $(TARGET_DIR)/lib -name '*.a' -delete >>> find $(TARGET_DIR)/usr/lib -name '*.la' -delete >>> find $(TARGET_DIR)/lib -name '*.la' -delete >>>+ find $(TARGET_DIR) -type f -name '*~' -delete >> >> No. Use xargs instead. > > Why? config FEATURE_FIND_DELETE bool "Enable -delete option allowing to delete files" default n >>> source: $(TARGETS_SOURCE) $(HOST_SOURCE) >>>@@ -357,6 +358,19 @@ >>> # Cleanup and misc junk >>> # >>> ############################################################# >>>+ >>>+install: softclean all >>>+ # TODO: to fix this bug in the proper way >>>+ name=$$(find $(STAGING_DIR) -name 'libfreetype.so'); \ >>>+ dest=$$(dirname $$name | sed -e "s,$(STAGING_DIR),$(TARGET_DIR),"); \ >>>+ cp -af $$name* $$dest; $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $$dest/libfreetype.so >>>+ >>>+rootclean: >>>+ rm -rf $(TARGET_DIR) $(PROJECT_BUILD_DIR)/.root >>>+ >>>+softclean: >>>+ rm -rf $(IMAGE) $(PROJECT_BUILD_DIR)/autotools-stamps >>>+ >> >> No. Adding yet more targets makes absolutely no sense at all. >> Just make 'make clean' wipe the stamps and let 'make realclean' wipe the >> built stuff. > >clean remove a lot of things not only the stamps > >clean: $(TARGETS_CLEAN) > rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) >$(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps > >a) you want reinstall things in root because they have been corrupted >without loosing your customization on scripts/configurations: > >make install (which for work correctly need to do: softclean all, this >is the reason because softclean exist) > >b) you want remove root and remade it from scratch > >make rootclean install > >in both a) and b) cases you want do these things in the fastest way. Work out a setup which deals fine via - clean - realclean - distclean Everything else is too finegrained and doesn't help since it's not intuitive. >> And DOCUMENT that stuff in 'make help'! > I will made some tests in order to show you how much time people can >save in using some targets appropriately. Then if you will agree with >me that those targets are really useful I will document them. Testing >extensively the buildroot in many configuration implies to move AS >FAST AS POSSIBLE from one build to another one without recompiling the >WORLD. I don't care about that, personally. My tree is at least 50% faster when configuring stuff (AUTO_CONFIGURE_TARGET) and furthermore compiles packages correctly, as opposed to the thing you're using. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] Avoid make distclean to remove packages fromrootfs 2008-10-27 21:28 ` Bernhard Reutner-Fischer @ 2008-10-27 22:19 ` Roberto A. Foglietta 0 siblings, 0 replies; 11+ messages in thread From: Roberto A. Foglietta @ 2008-10-27 22:19 UTC (permalink / raw) To: buildroot 2008/10/27 Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>: > On Mon, Oct 27, 2008 at 10:11:12PM +0100, Roberto A. Foglietta wrote: >>2008/10/27 Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>: >>> On Mon, Oct 27, 2008 at 09:42:42PM +0100, Roberto A. Foglietta wrote: >> >>[...] >> >>> >>>>--- Makefile (revision 23784) >>>>+++ Makefile (working copy) >>>>@@ -324,7 +324,7 @@ >>>> touch $(STAGING_DIR)/.fakeroot.00000; \ >>>> fi >>>> -find $(TARGET_DIR) -type d -name CVS -o -name .svn | xargs rm -rf >>>>- -find $(TARGET_DIR) -type f -name .empty | xargs rm -rf >>>>+ -find $(TARGET_DIR) -type f -name .empty -delete >>>> touch $@ >>>> >>>> $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root >>>>@@ -341,6 +341,7 @@ >>>> find $(TARGET_DIR)/lib -name '*.a' -delete >>>> find $(TARGET_DIR)/usr/lib -name '*.la' -delete >>>> find $(TARGET_DIR)/lib -name '*.la' -delete >>>>+ find $(TARGET_DIR) -type f -name '*~' -delete >>> >>> No. Use xargs instead. >> >> Why? > > config FEATURE_FIND_DELETE > bool "Enable -delete option allowing to delete files" > default n > Ok, I only emulate people who has used -delete before me. However in this case we are using $HOST command-set and it is supposed that busybox has CONFIG_DESKTOP=y and many other fancy features: roberto at rafbook:~/busybox-1.11.3$ make defconfig roberto at rafbook:~/busybox-1.11.3$ grep FEATURE_FIND_DELETE .config CONFIG_FEATURE_FIND_DELETE=y There is a problem with xargs: if nothing has been found the line fails with error. >>>> source: $(TARGETS_SOURCE) $(HOST_SOURCE) >>>>@@ -357,6 +358,19 @@ >>>> # Cleanup and misc junk >>>> # >>>> ############################################################# >>>>+ >>>>+install: softclean all >>>>+ # TODO: to fix this bug in the proper way >>>>+ name=$$(find $(STAGING_DIR) -name 'libfreetype.so'); \ >>>>+ dest=$$(dirname $$name | sed -e "s,$(STAGING_DIR),$(TARGET_DIR),"); \ >>>>+ cp -af $$name* $$dest; $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $$dest/libfreetype.so >>>>+ >>>>+rootclean: >>>>+ rm -rf $(TARGET_DIR) $(PROJECT_BUILD_DIR)/.root >>>>+ >>>>+softclean: >>>>+ rm -rf $(IMAGE) $(PROJECT_BUILD_DIR)/autotools-stamps >>>>+ >>> >>> No. Adding yet more targets makes absolutely no sense at all. >>> Just make 'make clean' wipe the stamps and let 'make realclean' wipe the >>> built stuff. >> >>clean remove a lot of things not only the stamps >> >>clean: $(TARGETS_CLEAN) >> rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) >>$(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps >> >>a) you want reinstall things in root because they have been corrupted >>without loosing your customization on scripts/configurations: >> >>make install (which for work correctly need to do: softclean all, this >>is the reason because softclean exist) >> >>b) you want remove root and remade it from scratch >> >>make rootclean install >> >>in both a) and b) cases you want do these things in the fastest way. > > Work out a setup which deals fine via > - clean > - realclean > - distclean > > Everything else is too finegrained and doesn't help since it's not > intuitive. > ok, being intuitive for the user is also my mantra. I will propose to add only - install which works in this way just because it is the fastest way I know to write it: install: softclean all softclean: bla bla In that way users should take care only about install which is a 'standard' target >>> And DOCUMENT that stuff in 'make help'! > >> I will made some tests in order to show you how much time people can >>save in using some targets appropriately. Then if you will agree with >>me that those targets are really useful I will document them. Testing >>extensively the buildroot in many configuration implies to move AS >>FAST AS POSSIBLE from one build to another one without recompiling the >>WORLD. > > I don't care about that, personally. > My tree is at least 50% faster when configuring stuff > (AUTO_CONFIGURE_TARGET) and furthermore compiles packages correctly, as > opposed to the thing you're using. > Faster is faster, it is a relative value: two ways to be faster is better than one only. Being correct is an absolute value: 0 or 1. Having a install target should not be wrong. Thanks, -- /roberto -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile-r23778.patch2 Type: application/octet-stream Size: 2296 bytes Desc: not available Url : http://busybox.net/lists/buildroot/attachments/20081027/40c4a320/attachment.obj ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] Avoid make distclean to remove packages fromrootfs 2008-10-27 21:11 ` Roberto A. Foglietta 2008-10-27 21:28 ` Bernhard Reutner-Fischer @ 2008-10-28 1:04 ` Hamish Moffatt 2008-10-28 6:47 ` Roberto A. Foglietta 1 sibling, 1 reply; 11+ messages in thread From: Hamish Moffatt @ 2008-10-28 1:04 UTC (permalink / raw) To: buildroot On Mon, Oct 27, 2008 at 10:11:12PM +0100, Roberto A. Foglietta wrote: > clean remove a lot of things not only the stamps > > clean: $(TARGETS_CLEAN) > rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) > $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps > > a) you want reinstall things in root because they have been corrupted > without loosing your customization on scripts/configurations: You shouldn't edit anything in $(TARGET_DIR) yourself - edit the source, then rebuild. However, there does need to be a way to copy the target_skeleton over the root directory again in case you've edited files (startup scripts, passwd file, fstab etc). And you might not want to copy this over an existing $(TARGET_DIR), because then you might lose changes made by packages. I didn't understand your softclean and rootclean targets though. Here's what I have added to my own tree: root-clean: rm -rf $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps $(TARGET_DIR) Hamish -- Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] Avoid make distclean to remove packages fromrootfs 2008-10-28 1:04 ` Hamish Moffatt @ 2008-10-28 6:47 ` Roberto A. Foglietta 0 siblings, 0 replies; 11+ messages in thread From: Roberto A. Foglietta @ 2008-10-28 6:47 UTC (permalink / raw) To: buildroot 2008/10/28 Hamish Moffatt <hamish@cloud.net.au>: > On Mon, Oct 27, 2008 at 10:11:12PM +0100, Roberto A. Foglietta wrote: >> clean remove a lot of things not only the stamps >> >> clean: $(TARGETS_CLEAN) >> rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) >> $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps >> >> a) you want reinstall things in root because they have been corrupted >> without loosing your customization on scripts/configurations: > > You shouldn't edit anything in $(TARGET_DIR) yourself - edit the > source, then rebuild. Yes and no. Yes you are right once I know what I want to do on the source. No, you are not right if I have to play with rootfs until I decide. > > However, there does need to be a way to copy the target_skeleton over > the root directory again in case you've edited files (startup scripts, > passwd file, fstab etc). And you might not want to copy this over an > existing $(TARGET_DIR), because then you might lose changes made > by packages. > > I didn't understand your softclean and rootclean targets though. Here's > what I have added to my own tree: > my 'softclean' is an internal target in order to do 'install' target. > root-clean: > rm -rf $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps $(TARGET_DIR) > > ok, so it seems to me that: install and rootclean could be two acceptable targets to add. here you are a newer version of the patch + @echo ' rootclean - delete all rootfs content + @echo ' install - (re)install rootfs but not skeleton if it exists' Cheers, -- /roberto -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile-r23778.patch3 Type: application/octet-stream Size: 2568 bytes Desc: not available Url : http://busybox.net/lists/buildroot/attachments/20081028/4492baf1/attachment.obj ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [RFC] Avoid make distclean to remove packages from rootfs 2008-10-22 12:06 [Buildroot] [RFC] Avoid make distclean to remove packages from rootfs Roberto A. Foglietta 2008-10-22 12:20 ` [Buildroot] [RFC] Avoid make distclean to remove packages fromrootfs John Schimandle @ 2008-10-22 12:52 ` Bernhard Reutner-Fischer 1 sibling, 0 replies; 11+ messages in thread From: Bernhard Reutner-Fischer @ 2008-10-22 12:52 UTC (permalink / raw) To: buildroot On Wed, Oct 22, 2008 at 02:06:09PM +0200, Roberto A. Foglietta wrote: >2008/10/21 Roberto A. Foglietta <roberto.foglietta@gmail.com>: >> 2008/10/21 Roberto A. Foglietta <roberto.foglietta@gmail.com>: >>> Hi to all, >>> >>> I never used buildroot before 5 days ago but it seems to me that once >>> a package has been activated in menuconfig a way to remove it from >>> rootfs is saving .configs, make distclean; make (i.e.: I compiled Xorg >>> modular and then I move on tinyx but tinyx keyboard was not working >>> because some incompatible craps remained on the rootfs). > > [cut] > >> A solution could be: >> >> 1) make checks for previous .config and un-install all removed packages (*) >> 2) make saves the current .config into >> project_build_$ARCH/$project_name/previous.config >> 3) people who lose some rootfs customization do it because they >> choose to remove packages (their fault) >> >> (*) supposing all packages have a make uninstall which correctly work >> otherwise N patches would be delivered to achieve this result. >> > > A proof of concept of the proposed general solution is attached as >solution for bug report n.5564 First, bash scripts are not acceptable. The "binary" is something from ulf. > > http://busybox.net/bugs/view.php?id=5564 > > as you can see checkconfig.sh could be expanded to work on .config >changes and acts accordingly no, this is not the proper thing to do. Your solution #1 is already done. Solutiln #2 would be to just index 0325132..19aa785 100644 --- a/target/linux/Makefile.in +++ b/target/linux/Makefile.in @@ -195,7 +195,7 @@ ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) echo "CONFIG_INITRAMFS_ROOT_UID=0" >> $(LINUX26_DIR)/.config echo "CONFIG_INITRAMFS_ROOT_GID=0" >> $(LINUX26_DIR)/.config else - echo "CONFIG_INITRAMFS_SOURCE=\"\"" >> $(LINUX26_DIR)/.config + echo "# CONFIG_INITRAMFS_SOURCE is not set" >> $(LINUX26_DIR)/.config endif ifeq ($(BR2_PACKAGE_BUSYBOX_INITRAMFS),y) # precedence for a small initramfs and your #3 is definitely not correct. What you seem to be referring to above is that that if you unselect a package, it is not automagically -clean and -dircleaned, IIUC. Short of just rm -rf *_${YOURARCH}* && make, you could run the respective -clean target. Note that alot of them do not cleanup properly anyway, i.e. need improvement. ^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-10-28 6:47 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-10-22 12:06 [Buildroot] [RFC] Avoid make distclean to remove packages from rootfs Roberto A. Foglietta 2008-10-22 12:20 ` [Buildroot] [RFC] Avoid make distclean to remove packages fromrootfs John Schimandle 2008-10-22 12:48 ` Roberto A. Foglietta 2008-10-27 20:42 ` [Buildroot] [PATCH] " Roberto A. Foglietta 2008-10-27 20:49 ` Bernhard Reutner-Fischer 2008-10-27 21:11 ` Roberto A. Foglietta 2008-10-27 21:28 ` Bernhard Reutner-Fischer 2008-10-27 22:19 ` Roberto A. Foglietta 2008-10-28 1:04 ` Hamish Moffatt 2008-10-28 6:47 ` Roberto A. Foglietta 2008-10-22 12:52 ` [Buildroot] [RFC] Avoid make distclean to remove packages from rootfs Bernhard Reutner-Fischer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox