oolite --verify-oxp fails when path has spaces in it

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

oolite --verify-oxp fails when path has spaces in it

Post by Lone_Wolf »

The command oolite --verify-oxp fails when the path has spaces in it (see bottom of post).

It looks like the "oolite --verify-oxp" command treats spaces as delimiters.
This may be correct for windows systems, but on linux folder names with spaces in them are valid.
Common workarounds for this issue like putting the path between double quotes or escaping the spaces by preceding them with \ don't help.
gnustep versions wrote:
gnustep-back 0.24.0-1
gnustep-base 1.24.6-1
gnustep-gui 0.24.0-2
gnustep-make 2.6.6-1

Code: Select all

oolite --verify-oxp ~/Documents/WIP/oolite/ShieldCycler Next 1.1.0/
latest.log wrote:
00:11:51.542 [verifyOXP.badPath]: ***** ERROR: no OXP exists at path "/home/panoramix/Documents/WIP/oolite/ShieldCycler"; nothing to verify.
00:11:51.542 [exit.context]: Exiting: OXP verifier run.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: oolite --verify-oxp fails when path has spaces in it

Post by Zireael »

You can have folders with spaces in them under Windows, too.

And I think that's a known problem, or at least I've heard something to the same effect about compiling Oolite.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: oolite --verify-oxp fails when path has spaces in it

Post by another_commander »

Just wanted to report that on Windows the verifier works if the filename containing spaces is put inside double quotes. This is with gnustep-base version 1.20.1.

Code: Select all

C:\OoliteProject\OoliteTrunk64.app> oolite --verify-oxp "../AddOns/Target Reticle 1.2.1.oxp"
OXP Verifier wrote:
08:56:35.482 Running OXP verifier for ../AddOns/Target Reticle 1.2.1.oxp
08:56:35.504 Scanning files
08:56:35.506 Checking equipment.plist
08:56:35.567 Checking requires.plist
08:56:35.567 Checking for unused files
08:56:35.567 TODO: implement unused files check.
08:56:35.568 OXP verification complete.
08:56:36.099 Exiting: OXP verifier run.
08:56:36.153 .GNUstepDefaults synchronized.

Closing log at 2014-09-08 08:56:36 +0200.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: oolite --verify-oxp fails when path has spaces in it

Post by cim »

Works okay for me on Linux, too.

Code: Select all

oolite.app/oolite.dbg --verify-oxp "/home/cim/.Oolite/AddOns/Galactic_Navy 5.4.3.oxp"
17:51:39.791 Running OXP verifier for /home/cim/.Oolite/AddOns/Galactic_Navy 5.4.3.oxp
17:51:39.792 Scanning files
...etc...
That's calling the app directly, though. I wonder if there's a problem with a wrapper script. I fixed the one we provide after this bug report. Maybe there's another wrapper script on your system (or an old version of that one, perhaps?)
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: oolite --verify-oxp fails when path has spaces in it

Post by Lone_Wolf »

you're spot on, cim.

The fixed wrapper you're referring to is in the pkg-posix-* targets .
The *.run file that's created by those targets includes a setup script that generates that wrapper.

The arch linux package builds oolite from source using make -f Makefile release and none of the release-* targets have any wrapper .
So for archlinux we create our own wrapper, which uses $@ without quotes.

I'll file a bug report to change the archlinux wrapper.

cim, another_commander : who should i contact to discuss changes to the oolite makefile ?
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: oolite --verify-oxp fails when path has spaces in it

Post by another_commander »

Lone_Wolf wrote:
cim, another_commander : who should i contact to discuss changes to the oolite makefile ?
I think it would be best posting a new issue on github, so that all other developers get visibility too and may contribute to the discussion. You will need a github account for that, of course.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: oolite --verify-oxp fails when path has spaces in it

Post by Eric Walch »

On the mac, you can use a backslash as an escape character to insert spaces in a path. So

Code: Select all

oolite --verify-oxp ~/Documents/WIP/oolite/ShieldCycler Next 1.1.0/
becomes

Code: Select all

oolite --verify-oxp ~/Documents/WIP/oolite/ShieldCycler\ Next\ 1.1.0/
I have no idea if this works for windows/linux.
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: oolite --verify-oxp fails when path has spaces in it

Post by Lone_Wolf »

Normally escaping works on linux, but in this case it doesn't change the space being treated as a delimiter.

The wrapper that starts oolite on arch has been adjusted to use

Code: Select all

/usr/share/oolite/oolite "$@"
.
Now paths with spaces are no problem anymore.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: oolite --verify-oxp fails when path has spaces in it

Post by another_commander »

Eric Walch wrote:
...

Code: Select all

oolite --verify-oxp ~/Documents/WIP/oolite/ShieldCycler\ Next\ 1.1.0/
I have no idea if this works for windows/linux.
In Windows it cannot work because the backslash is the directory separator; however, since the double quotes do the job nicely, this is not a problem.
Post Reply