fenn_ is now known as fenn
SWPadnos_ is now known as SWPadnos
hmmm. the config picker doesn't like names with spaces in them
I wonder if stepconf should either warn the user about that or convert spaces to '_'
somebody should file a bug against the config picker, then fix it
that's the other option :)
* skunkworks is glad he isn't 'somebody'
it seems 'somebody' has a lot of bugs to fix lately
this somebody will file the bug report. fixing it is a tcl problem (which is a big problem for me ;) )
maybe we should add a "somebody" to the asignment drop-down
instead of nobody
fwiw the emc run script also has problems with that
bah. to fix tcl: try adding quotes. if that doesn't work, try adding curly braces
but I'd rather they be fixed than ostriched
so - now there is a virus warning email going around that says it is confirmed by snopes. But the link to snopes say is it a spoof ;) funny.
it looks like both are there
* it is
hmm. should I add a category for "Other user utilities" or similar?
or just stick it in the AXIS or tkemc category
I'm trying to fix emc.in
cradek: I have it mostly fixed already
the problem I saw is in the config picker, though I didn't go beyond that
I think the node names are the same as the dir/ini file names
[pid 25859] execve("/net/filesrv1/sd3a/users/jepler/emc2-src/bin/halcmd", ["halcmd", "loadusr", "-Wn", "iocontrol", "io", "-ini", "/net/filesrv1/sd3a/users/jepler/emc2/configs/Bad Idea/worse idea.ini"], [/* 62 vars */]) = 0
[pid 25860] execve("/net/filesrv1/sd3a/users/jepler/emc2-src/bin/io", ["io", "-ini", "/net/filesrv1/sd3a/users/jepler/emc2/configs/Bad", "Idea/worse", "idea.ini"], [/* 62 vars */]) = 0
crap, the broken extends down into halcmd :(
tcl error messages here if it helps: http://pastebin.ca/981006
but it looks like it may not help any more :)
(damn you guys are fast)
oh crap. gotta run. bbl
see you SWPLinux
EMC: 03jepler 07TRUNK * 10emc2/scripts/emc.in: (log message trimmed)
EMC: * Fix problems when various things contain spaces (but config paths with spaces
EMC: don't work yet due to other bugs in halcmd and pickconfig)
EMC: * Change print and debug redirection so that they go to stdout/stderr
EMC: instead of to the terminal and can be subject to further shell redirection
EMC: * "-" as an inifile name allows use of the last inifile but preserves
EMC: positional arguments. This allows you to open the last configuration *and*
In terms of an easy fix to halcmd, I think I have two choices: add \"...\" on the commandlines in the emc runscript (then the less common case of files with quotes in them will be broken) OR disable [INI]FILE substitution for 'halcmd cmd args' (command given on commandline, not from -f)
would you say what/where the problem is? I can't quite divine it from your two proposed solutions
halcmd joins its commandline with spaces, then performs its own built-in parsing which includes word splitting and [INI]VAR substitution
why does it join with spaces? I don't see how that's required for inivar sub
that's the way it's presently written.
isn't the fix then "don't do that"?
(note I haven't looked at it)
it would change the meaning of [FOO]ARGS=a b c / halcmd loaduser foo [FOO]ARGS
EMC: 03jepler 07TRUNK * 10emc2/src/hal/utils/halcmd_main.c:
EMC: make stuff like
EMC: halcmd loadusr io -ini "path with spaces"
EMC: work. this disables inivar substitution on commands given on the halcmd
EMC: commandline but that feature doesn't seem to be used.
EMC: 03jepler 07TRUNK * 10emc2/tcl/bin/pickconfig.tcl: fix configuration paths with embedded spaces
I just hate it when I accidentally knock the power connector out of my laptop just before leaving the house for a few hours
I guess I should fix my code some day. the ini var replacement should take tokens from the command line rather than putting them into a string
but then what to do?
if an argument gets replaced by something that's intended to be multiple tokens, you can't just replace characters, you need to generate essentially a new set of tokens
well the root of the problem is that you don't know what an ini var with spaces is supposed to mean
shuffling argv around is just what makes it tedious to code, it's not a fundamental problem
as for spaces, the way things work now allows the command itself to be specified in the replaced text
so you could have something like "loadusr -Wn fred pyvcp -c fred"
as the replaced text
there's no reason that you can't fix the commandline problem I encountered but keep the present word-splitting property of substitutions
result = 
for t in tokens:
^^ something like the above logic, but written painfully in C
if simple(t): result = result + [t]
else: result = result + expand(t) # expand() returns a list
when a word is simple (whatever that means) it's not subject to further expansion. when it's not, the result of the expansion is a list of zero or more tokens
simple(x) = x.contains_any_of("substitution_delimiter_chars");
^^ the above written painfully in C :)
something like that
on the other hand, maybe things are fine after my modification, which just disables re-splitting and expansion for commandline commands and doesn't change anything about scripts run with halcmd -f.
... because restoring the expansion (but not the re-splitting) still means that a commandline user of halcmd has to specially quote paths that contain [, $ or "
it kind of depends on how [HAL]HALCMD=xxx lines are dealt with
emc emc2/configs/My $#@]%^(! Config/inch.ini
since it's a potentially incompatible change I don't plan to make it in 2.2 -- there we'll have to advise people not to use whitespace
emc emc2/configs/My $#@]%^(! Config better work this time/inch.ini