Opened 12 years ago

Closed 11 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


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)

bash-builtins.patch (1.9 KB ) - added by mmadia 12 years ago.

Download all attachments as: .zip

Change History (8)

by mmadia, 12 years ago

Attachment: bash-builtins.patch added

comment:1 by mmadia, 12 years ago

patch: 01

comment:2 by bonefish, 12 years ago

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.

comment:3 by bonefish, 11 years ago

Owner: changed from bonefish to mmadia
Status: newassigned

You have commit access anyway and I'm lazy... :-)

comment:4 by humdinger, 11 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:5 by mmadia, 11 years ago

Status: assignedin-progress

Heh. Almost forgot about this patch.

comment:6 by mmadia, 11 years ago

Applied in hrev43980

comment:7 by mmadia, 11 years ago

Resolution: fixed
Status: in-progressclosed
Note: See TracTickets for help on using tickets.