Opened 14 years ago
Closed 13 years ago
#6746 closed bug (fixed)
jam -q bash, mkbuiltins can pollute HAIKU_TOP
Reported by: | mmadia | Owned by: | mmadia |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Build System | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This occurs only when HAIKU_TOP and HAIKU_OUTPUT_DIR are different volumes and you build from within HAIKU_TOP.
haiku/trunk/src/bin/bash/builtins/mkbuiltins.c#L337 has a rename function, which will not work across volumes and will leave a stray "mk-*" file.
if (structfile) { write_longdocs (structfile, saved_builtins); fclose (structfile); rename (temp_struct_filename, struct_filename); }
The attached patch introduces a commandline option to specify the filename of the temp_struct_filename, allowing the buildsystem to place it on the same volume as HAIKU_OUTPUT_DIR.
I believe this to be acceptable, as the build system should be only using HAIKU_OUTPUT_DIR for writing (temporary) files.
Attachments (1)
Change History (8)
by , 14 years ago
Attachment: | bash-builtins.patch added |
---|
comment:1 by , 14 years ago
patch: | 0 → 1 |
---|
comment:2 by , 14 years ago
comment:3 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
You have commit access anyway and I'm lazy... :-)
comment:4 by , 13 years ago
Yeah, please do commit. I applied it locally and finally I don't have these "mk-xxxx" files popping up in the HAIKU_TOP folder. :)
comment:7 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
I would probably just have placed the temp file in the same directory as the actual output file, but your patch is OK, too. Hoping that we'll eventually outsource bash, that isn't all that important anyway.