[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 13:33:03 CEST 2011


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

Rainer Meier <r.meier at wpkg.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |r.meier at wpkg.org
         Resolution|                            |FIXED

--- Comment #2 from Rainer Meier <r.meier at wpkg.org>  ---
Actually there was a reason not to exapnd URL strings. URLs often contain the
percentage sign (%) and anything in between two percentage characters could be
expanded by the environment expansion. This could lead to unexpected results.

Well, it's unlikely but it might happen.

Therefore I've decided to add an attribute called expandURL which can be set to
"false" if URL expansion shall not be done. By default WPKG does expansion on
URL the URL attribute now.

NEW: Expansion of environment variables in download URLs added.
     This allows specification of URLs with variables like the following:
     <download
     url="http://host/%VERSION%/release-%version%.exe"
     target="release.exe"
     />
     Note: As URLs are used to contain some percentage characters (like "%20"
     for spaces) these might be expanded too if the URL matches an environment
     variable which is defined. For example downloading from an URL like
     url="http://host/softwareX%20release%20.exe" would try to expand the
     environment "20release" as well. It's very unlikely that this collides
     with an environment variable you have actually defined but keep it in mind
     when defining download URLs.
     If you really need to disable expansion because the URL collides with
     existing environment variables then use the expandURL="false" attribute:
     <download
     expandURL="false"
     url="http://host/softwareX%20release%20.exe"
     target="release.exe"
     />

This implementation still allows one to disable expansion in case an URL with
percentage characters is used which is potentially colliding with an
environment string.

As always, feel free to get the latest version (1.2.1-RC14) from SVN:

<http://wpkg.svn.sourceforge.net/viewvc/wpkg/wpkg/stable/1.2/>

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