Opened 9 years ago

Closed 7 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:
Has a Patch: yes 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)

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

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by mmadia

Attachment: bash-builtins.patch added

comment:1 Changed 9 years ago by mmadia

Has a Patch: set

comment:2 Changed 9 years ago by bonefish

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 Changed 7 years ago by bonefish

Owner: changed from bonefish to mmadia
Status: newassigned

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

comment:4 Changed 7 years ago by humdinger

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 Changed 7 years ago by mmadia

Status: assignedin-progress

Heh. Almost forgot about this patch.

comment:6 Changed 7 years ago by mmadia

Applied in hrev43980

comment:7 Changed 7 years ago by mmadia

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