Ticket #54 (closed Defect: wontfix)

Opened 1 year ago

Last modified 2 months ago

makepackage fails when you include paths with spaces in them.

Reported by: blakemadden2 Assigned to: taj
Priority: Medium Milestone:
Component: main Version: 1.2.4
Severity: Normal Keywords:
Cc:

Description

If you include any folders in your [Imports] section that contains spaces in the name of the folder then you will get an error when it tries to copy it into the "tmp" folder. Let's say you have a command like this:

[Imports] echo $source_dir/release/* | import

If you have a folder inside of the "release" folder that has a space in it, then makepackage will fail because it doesn't quote the paths when it tries to copy everything into the tmp folder.

Change History

09/25/07 18:03:41 changed by UnFleshed One

Easy workaround to this is to set IFS to split on linebreak. Although that is a hack, since it can be broken if something changes inside import().

[Import]

OLD_IFS="$IFS"
IFS=$'\n'

echo $source_dir/release/* | import

IFS="$OLD_IFS"

09/25/07 18:05:36 changed by UnFleshed One

(Also, just in case, make sure echo command gives you correct output)

09/30/07 14:31:16 changed by isak

Try putting quotes around the the echo statement:

echo '$source_dir/release/*' | import

The import command expects filenames to be one filename per line (i.e., separated by newline).

10/17/07 12:40:03 changed by isak

After re-reading your bug report, I'm not sure I see the problem here.

Do you want your package to contain EVERYTHING under $source_dir/release? If so, skipping the * should do it.

If you for some reason want import to include all directories separately (to preserve a directory hierarchy), you have the options to:

  • Use the IFS hack, which should be safe and IMO isn't even a hack.
  • enumerate everything to import:
    import <<<EOF
    $source_dir/release/foo
    $source_dir/release/bar
    ...
    EOF
    
  • Make your prepareBuild section put everything in a nice hierarchy so that you can just send a single dir to import.
  • Use my suggestion from comment:3

08/03/08 14:52:48 changed by Jan-Nik

  • status changed from new to closed.
  • resolution set to wontfix.

I am closing this because Isak pointed out how to fix it. Feel free to reopen though.