-
Notifications
You must be signed in to change notification settings - Fork 6
Resolved issues #1233 and #1218 #1234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also fixed an error with -u uuidfile where it would not set the test boolean to true if the UUID was "true". The -u uuidfile and -U UUID options may not be used with -i answers, -d or -s seed. Updated man page for the above changes. **IMPORTANT NOTE**: you do NOT need to use this update in order to participate in the IOCCC28!
The -x option to force delete the submission directory and -r rm option to set path to rm(1) were added to mkiocccentry as part of issue ioccc-src#1208. The change in order of args is NOT done and will not be done until AFTER IOCCC28. Fixed bug where overwrite_answers was always true by default (mkiocccentry).
A test was made for a future enhancement (post IOCCC28) and this was accidentally committed.
Since the two options cannot be used together do not check for one if the other failed. Also tell the user they can use the -x option if the submission directory already exists (this comes after the part of telling them to move it, remove it or use a different directory).
Both mkiocccentry and txzchk (the only ones that use other tools) now search $PATH for the tools first by way of the find_utils() function (modified a fair bit) and a new util function in jparse called resolve_path(). The jparse util functions shell_cmd() and pipe_open() were also improved to resolve paths if no / is in the command name. As for make: we now search for gmake first as the Makefiles we need are GNU Makefiles.
Okay that's weird .. have an idea what might have gone wrong. |
The way the fix of checking paths is it has to strdup() the tools found. This means that they have to be allocated to free. But since the default path of tar is set even when test mode is not used it was freed when not allocated dynamically.
If nothing else this should fix an issue that I overlooked. We'll see if I missed something else. |
Hmm .... okay looking further. |
Ah. This should be simple to fix. Looking at why this happened. |
This was introduced in the last commit when fixing the rm - for some reason a / was after the variable name and it never should have been.
Each time something new is going wrong but |
I have this feeling it's to do with the $PATH change. I have a way to test it. |
Fixing ... it is that. |
There's something screwy going on. I know the problem I just have to figure out why it's happening. |
It's actually quite amusing, the problem. Have to figure out how to fix it. |
.. actually it's to me hilarious. I have a fix. |
The problem with having 'txzchk' before './txzchk' is that if it's not installed but one is in the mkiocccentry directory the functions is_file() and is_exec() will happily report that it's an executable file but when it comes time to executing it it won't work because '.' is not in $PATH.
Fixed that problem:
|
There we go! Lesson is probably something I won't end up doing but: if testing a problem one should uninstall the tools to really see what is going on in an environment that does not have the tools installed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 🙏 @xexyl
After processing this PR, we should be in a position to form a new formal release of this repo. However, we will review the status of this repo TOMORROW and perform more test, before forming the release.
Then after the new formal release of this repo has been made (tomorrow), we will process the related PRs in "the other repo" and then announce a summary of these changes in IOCCC news, Mastodon and Discord.
Both mkiocccentry and txzchk (the only ones that use other tools) now
search $PATH for the tools first by way of the find_utils() function
(modified a fair bit) and a new util function in jparse called
resolve_path(). The jparse util functions shell_cmd() and pipe_open()
were also improved to resolve paths if no / is in the command name. As
for make: we now search for gmake first as the Makefiles we need are GNU
Makefiles.