[wpkg-users] [Bug 202] Expand environment variables in download urls

bugzilla-daemon at bugzilla.wpkg.org bugzilla-daemon at bugzilla.wpkg.org
Fri Sep 9 12:09:32 CEST 2011


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

wpkg at trash-mail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wpkg at trash-mail.com
           Severity|enhancement                 |normal

--- Comment #1 from wpkg at trash-mail.com  ---
In a statement like 
<download url='https://example/firefox/Firefox Setup %PKGVER%.exe'
target='software\Firefox Setup %PKGVER%.exe' /> 
the variable is expanded in the "target" attribute, but not in the "url"
attribute. This looks like a bug to me, because it makes the variables
pointless.

In my opinion an "expand" attribute in the "download" element isn't necessary,
since I know of no good reason why the URL should not be expanded. Setup files
do not contain percent signs and even if they would, the package base
maintainer can simply rename them.
Also the ExpandEnvironmentStrings() function only replaces variables that are
actually set, so downloading a file called literally "%setup%.exe" should still
work as long as "%SETUP%" isn't set on the client.

That reduces the patch to an one liner:
url = new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings(url);

-- 
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