Hi everybody,
The "clean" command in RosBE has often been criticized for not cleaning what the user expected. While in the past, it had just issued commands to delete the four files/folders "makefile.auto", "obj-i386", "output-i386" and "reactos" in the current directory, it's general behaviour has been changed significantly over time, in particular by these two commits:
- 38756 If you set a different object or output directory for the built files through RosBE Options, these directories are always cleaned instead of "obj-i386" or "output-i386" in the current directory.
- 39138 If no dedicated object or output directory is set through RosBE Options, we always clean the one set after RosBE has been started or which has been set by "chdefdir". We even do so if this directory is not the current working directory.
Especially the latter commit seems to have caused problems for many people as you could easily clean the wrong tree now. Therefore I made some efforts to rework this command a bit and published by current script at http://reactos.colinfinck.de.
This script now first checks whether "makefile.auto", "obj-i386", "output-i386" and "reactos" exist in the current directory. If all of them exist, they are cleaned. If not, it checks whether different object and output directories were set using RosBE Options and checks for them instead of "obj-i386" and "output-i386". If they exist together with "makefile.auto" and "reactos" in the current working directory, all of them are cleaned. Of course, this also works for every other architecture we support, i386 was just taken as the most popular example here.
I'm posting this here now, because I don't want to upset other people now that the script logic is changed again. If you rather like the current "clean" logic instead of my proposal, please tell me. I leave this discussion opened for several weeks as I currently don't have much time anyway. If there are no negative comments, the new script will be committed afterwards.
Best regards,
Colin
Kudos to you for this change.
If i may have a little thing to add, i think the scritp, in case no obj/output dir and makefile.auto is found in current dir, should prompt about cleaning the tree from default location, instead of doing it automagically. Simple yes/no would suffice and all would be perfect.
Best regards
2009/11/27 Colin Finck mail@colinfinck.de
Hi everybody,
The "clean" command in RosBE has often been criticized for not cleaning what the user expected. While in the past, it had just issued commands to delete the four files/folders "makefile.auto", "obj-i386", "output-i386" and "reactos" in the current directory, it's general behaviour has been changed significantly over time, in particular by these two commits:
- 38756
If you set a different object or output directory for the built files through RosBE Options, these directories are always cleaned instead of "obj-i386" or "output-i386" in the current directory.
- 39138
If no dedicated object or output directory is set through RosBE Options, we always clean the one set after RosBE has been started or which has been set by "chdefdir". We even do so if this directory is not the current working directory.
Especially the latter commit seems to have caused problems for many people as you could easily clean the wrong tree now. Therefore I made some efforts to rework this command a bit and published by current script at http://reactos.colinfinck.de.
This script now first checks whether "makefile.auto", "obj-i386", "output-i386" and "reactos" exist in the current directory. If all of them exist, they are cleaned. If not, it checks whether different object and output directories were set using RosBE Options and checks for them instead of "obj-i386" and "output-i386". If they exist together with "makefile.auto" and "reactos" in the current working directory, all of them are cleaned. Of course, this also works for every other architecture we support, i386 was just taken as the most popular example here.
I'm posting this here now, because I don't want to upset other people now that the script logic is changed again. If you rather like the current "clean" logic instead of my proposal, please tell me. I leave this discussion opened for several weeks as I currently don't have much time anyway. If there are no negative comments, the new script will be committed afterwards.
Best regards,
Colin
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Olaf Siejka wrote:
in case no obj/output dir and makefile.auto is found in current dir, should prompt about cleaning the tree from default location
To solve potential misunderstandings: If no directories containing built files are found in the current directory, the script checks for different object and output directories set using RosBE Options and cleans it if applicable. It does _not_ just clean the default directory (meaning the one which has been set using "chdefdir" or at RosBE startup). Such a logic has been removed completely from the script.
Simple yes/no would suffice and all would be perfect.
I've already thought about this, but scrapped the idea very quickly.
It would mean that the script prompts you _everytime_ about cleaning the tree, when different object or output directories are set using RosBE Options. Consider that these manually set object or output directories don't belong to any ReactOS working copy. A constant prompt like this had already been added in r31142 of the clean script and was reverted about two hours later. :-)
Best regards,
Colin