Opened 16 years ago

Closed 16 years ago

#1682 closed bug (fixed)

AddSourceDirectoryToHaikuImage doesn't work with spaces in file names

Reported by: ekdahl Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Description says it all.

Attachments (1)

jam_output.txt (126.7 KB ) - added by ekdahl 16 years ago.
jam -dx output

Download all attachments as: .zip

Change History (9)

comment:1 by ekdahl, 16 years ago

Oops, I meant summary.

comment:2 by ekdahl, 16 years ago

If I use this line AddSourceDirectoryToHaikuImage test-files ; to include trunk/test-files, a directory called HaikuSourcesest-files is created under /boot/home with the contents of test-files.

comment:3 by bonefish, 16 years ago

That spaces won't work in the directory names is a limitation of how the mechanism is working. It uses a single shell variable to hold the list of all directory paths, and AFAIK this simply can't work for paths with spaces. I don't think I'll change that, since none of the directory names in the Haiku tree should contain spaces.

Regarding your latest comment, I just tested that with hrev23495 under OpenSuse Linux 10.3, and it works as expected. I tried a directory "test-files" and also "src/kits/storage". Both end up on the image as they should. Can you please check the command line executed for this action:

AddVariableToScript1 /home/bonefish/develop/haiku/haiku/generated-gcc2/haiku.image-init-vars

(your path name with differ). Just run jam with option "-dx" to have the command lines printed (or -n to have them printed, but not executed).

in reply to:  3 comment:4 by ekdahl, 16 years ago

Replying to bonefish:

That spaces won't work in the directory names is a limitation of how the mechanism is working. It uses a single shell variable to hold the list of all directory paths, and AFAIK this simply can't work for paths with spaces. I don't think I'll change that, since none of the directory names in the Haiku tree should contain spaces.

Ok, I was thinking about using the command in a more general way, like AddDirectoryToHaikuImage. That's an easy way to bring test files to the image.

Regarding your latest comment, I just tested that with hrev23495 under OpenSuse Linux 10.3, and it works as expected. I tried a directory "test-files" and also "src/kits/storage". Both end up on the image as they should. Can you please check the command line executed for this action:

AddVariableToScript1 /home/bonefish/develop/haiku/haiku/generated-gcc2/haiku.image-init-vars

(your path name with differ). Just run jam with option "-dx" to have the command lines printed (or -n to have them printed, but not executed).

I'm attaching the "jam -dx" output. I think the interesting lines are in the beginning of the file. One thing I forgot to mention is that it also creates the directory HaikuSources, ie. I have both HaikuSources and HaikuSourcesest-files under /boot/home and HaikuSourcesest-files contains the files from test-files.

I'm using Ubuntu 7.10.

Unfortunately I can't boot Haiku natively to test again atm because of a graphic card upgrade.

by ekdahl, 16 years ago

Attachment: jam_output.txt added

jam -dx output

comment:5 by bonefish, 16 years ago

Should be fixed in hrev23544. Please test.

Regarding copying test files to the image, you probably already know that you can copy individual files using the AddFilesToHaikuImage rule. Copying directories recursively is not provided by a rule. You can define the build system variable HAIKU_IMAGE_LATE_USER_SCRIPTS to refer to a shell script that will be sourced by the build_haiku_image script. In this script you can customize your image/installation at your heart's desire. E.g. copying a directory to the image would look like this:

$cp -r "${sPrefix}/path/to/directory" "${tPrefix}home/whereever"

comment:6 by ekdahl, 16 years ago

Sorry, forgot to test this. Will do ASAP.

comment:7 by ekdahl, 16 years ago

It works as expected now. Thanks!

comment:8 by stippi, 16 years ago

Resolution: fixed
Status: newclosed

Ok, thanks for notifying!

Note: See TracTickets for help on using tickets.