[wpkg-users] [Bug 139] New: inconsistent variable interpolation causing commands to fail

bugzilla-daemon at bugzilla.wpkg.org bugzilla-daemon at bugzilla.wpkg.org
Tue Jan 13 12:24:02 CET 2009


http://bugzilla.wpkg.org/show_bug.cgi?id=139

           Summary: inconsistent variable interpolation causing commands to
                    fail
           Product: WPKG
           Version: other
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: wpkg.js
        AssignedTo: mangoo at wpkg.org
        ReportedBy: graham at mailinator.com
         QAContact: wpkg-users at lists.wpkg.org


I thick this is probably a general issue with how variables are evaluated and
interpolated; the examples I have are for two specific commands.
This issue is a real pain because it means (1) I never know when I use a
variable whether it will work or not; (2) I end up with a lot of hard-coded
rules, which is naff and less maintainable for something like mozilla
extensions which are all basically the same.
(It would also be *really* nice to have a "template" package which would just
be instantiated with a single line for each real package! But I digress...)


Example 1 - interpolation of simple variable value into a path

<!-- This variant WORKS -->
<check type="file" condition="exists" path="C:\Program Files\Mozilla
Firefox\extensions\{3d7eb24f-2740-49df-8937-200b1cc08f8a}\install.rdf" />

<!-- This variant FAILS -->
<variable name="ffextid" value="{3d7eb24f-2740-49df-8937-200b1cc08f8a}"/>
<check type="file" condition="exists" path="C:\Program Files\Mozilla
Firefox\extensions\%ffextid%\install.rdf" />


Example 2 - interpolation of a variable which contains spaces and path
separators

<!-- This variant WORKS -->
<variable name="ffexe" value="Mozilla Firefox\firefox.exe"/>
<install cmd='"%PROGRAMFILES%\%ffexe%" -install-global-extension ... '/>

<!-- This variant FAILS -->
<variable name="ffexe" value="%PROGRAMFILES%\\Mozilla Firefox\\firefox.exe"/>
or
<variable name="ffexe" value="%PROGRAMFILES%\Mozilla Firefox\firefox.exe"/>
<install cmd='"%ffexe%" -install-global-extension ... '/>


-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the wpkg-users mailing list