Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 9754] New: cannot escape spaces in configure options

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 9754] New: cannot escape spaces in configure options
  • Date: 5 Apr 2006 03:32:43 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=9754

Summary: cannot escape spaces in configure options
Product: Sorcery
Version: 1.13.x
Platform: Other
OS/Version: other
Status: NEW
Severity: enhancement
Priority: P2
Component: Cast
AssignedTo: sm-sorcery-bugs AT lists.ibiblio.org
ReportedBy: disk AT sourcemage.org


Discussed with Karsten on IRC.

To be reproduced :

Try the gnome-volume-manager spell in devel. Add
--with-mount-command="/usr/bin/pmount-hal %h" when prompted about extra
configure options (this would be the same in CONFIGURE), you will notice at
the
end of configure script, in the summary, that it took "/usr/bin/pmount-hal as
the command, ignoring the "


------- Additional Comments From BearPerson AT gmx.net 2005-09-11 12:04 -------
It basically boils down to the fact that we use $OPTS as configure options, so
that bash just does word splitting after expansion.
I don't currently know of any way to escape whitespace in a variable so that
it
does not fall under word splitting, so we might have to use eval.

--


------- Additional Comments From acedit AT armory.com 2005-09-11 18:57 -------
Most people just set a sentinal value through the depends commands and then
replace it in BUILD on the configure command line. I dont think this blocks
your
spell, you'll just need a custom BUILD file.

I dont know of any nice way to make a variable parse into multiple parameters
but still group certain parameters that include spaces together. Variables
just
dont nest in bash.

Changing the ./configure line to eval ./configure doesnt seem to fix this
right
away. Probably need to do some complicated quoting looping thing.

--


------- Additional Comments From acedit AT armory.com 2005-09-11 19:20 -------
If I change OPTS to be an array and use "${OPTS[@]}" that seems to work,
however
that'll probably break a lot of existing spells. If I setup a new variable
existing spells with custom BUILDS will break. I could setup both OPTS and the
new variable, that would mean that if the spell modifies OPTS in BUILD then
calls default_build i'd have to use the old behavior, otherwise use the new
variable.

--


------- Additional Comments From BearPerson AT gmx.net 2005-09-11 19:40 -------
Note that this is a bug that may occur in semi-custom BUILDs as well as in
CONFIG_LOC.

--


------- Additional Comments From acedit AT armory.com 2005-09-12 18:14 -------
Flavien: Please let me know if you need any help working around this issue for
your spell.

--


------- Additional Comments From disk AT sourcemage.org 2005-09-25 15:43 -------
I managed to get it, with the help of Karsten. Here is what he asked me to
change in /var/lib/sorcery/modules/build_api/api2 :

in the function function real_default_build()

eval "./configure --prefix=${INSTALL_ROOT}/usr
--sysconfdir=${INSTALL_ROOT}/etc --localstatedir=${INSTALL_ROOT}/var
--mandir=${INSTALL_ROOT}/usr/share/man
--infodir=${INSTALL_ROOT}/usr/share/info $OPTS"
&&

in the BUILD file, I can now use either :
OPTS="$OPTS --with-mount-command='/usr/bin/pmount-hal %h'
--with-unmount-command='/usr/bin/pumount %d'"
or
OPTS="$OPTS --with-mount-command="/usr/bin/pmount-hal %h"
--with-unmount-command="/usr/bin/pumount %d""

I think I will now see if this trick breaks other spells...

--


------- Additional Comments From acedit AT armory.com 2006-04-04 22:32 -------
is this still a problem or something we need to solve on the sorcery side?

--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



  • [SM-Sorcery-Bugs] [Bug 9754] New: cannot escape spaces in configure options, bugzilla-daemon, 04/04/2006

Archive powered by MHonArc 2.6.24.

Top of Page