Opened 3 years ago

Closed 3 years ago

#7745 closed defect (fixed)

"make clean": too many args

Reported by: pett Owned by: Zach Pearson
Priority: moderate Milestone:
Component: Build System Version:
Keywords: Cc: chimera-programmers
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Basically any bundle, but addh for example:

iMac:/Users/pett/src/chimerax/src/bundles/addh<174> make clean
if [ -x ../../../ChimeraX.app/Contents/bin/python3.9 -I -m chimerax.core -a -e bundle_info.xml ]; then \

../../../ChimeraX.app/Contents/bin/python3.9 -I -m chimerax.core --nogui --safemode --exit --cmd "devel clean . exit true" ; \

else \

rm -rf build dist *.egg-info src/pycache src/*/pycache ; \

fi

/bin/sh: line 0: [: too many arguments
if [ -n "" ]; then \

rm -rf ; \

fi

Change History (3)

comment:1 by Zach Pearson, 3 years ago

if [ -x ../../../ChimeraX.app/Contents/bin/python3.9 -I -m chimerax.core -a -e bundle_info.xml ]; then

This is the malformed if condition. I'm not sure if "-a -e" are arguments meant for ChimeraX for for sh; do you? It looks to me like this should be

if [ -x $(CHIMERAX_EXE) && -e bundle_info.xml ]

But I'm not sure.

comment:2 by Greg Couch, 3 years ago

&& won't work. && is for anding commands. -a is for anding test conditions.

The problem here is that it should be [ -x ../../../ChimeraX.app/Contents/sbin/python3.9 -a -e bundle_info.xml ]. The change to using "python3 -I -m chimerax.core" instead of the ChimeraX executable broke it.

comment:3 by Zach Pearson, 3 years ago

Resolution: fixed
Status: assignedclosed

I don't think that would have worked either, because calling make clean with a partially built ChimeraX shouldn't try to invoke the core module.

We still want to use the Python executable where possible, so I put back a version of the variable that points to the ChimeraX binary to restore the old logic of that if statement.

Note: See TracTickets for help on using tickets.