[wpkg-users] [Bug 259] Feature Request - configuration elements for common operations
bugzilla-daemon at bugzilla.wpkg.org
bugzilla-daemon at bugzilla.wpkg.org
Mon Dec 19 11:19:07 CET 2011
http://bugzilla.wpkg.org/show_bug.cgi?id=259
Rainer Meier <r.meier at wpkg.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |r.meier at wpkg.org
Resolution| |WONTFIX
--- Comment #1 from Rainer Meier <r.meier at wpkg.org> ---
To be honest I currently dislike this idea. And I am going to tell you why.
Currently WPKG is developed as platform-independent as possible. What you're
asking for is to add a couple of "special action" which YOU think are often
used. These actions will heavily depend on the use-case and if we start to
implement "shorthand" actions in WPKG for commands which are heavily used by
any WPKG user, then I will end up in spending my whole spare time to fix these
commands on every possible environment out there. In addition some people will
start complain that the copy special command does not work in their special
setup where they copy from FTP, others will complain because it does not work
with HTTP, RSYNC or whatever. In addition this makes WPKG dependent on external
tools which might not even be available on some systems. Even worse, on future
systems (e.g. Windows 8) all this functionality will have to be tested or even
re-written/extended to the new system; which is simply not the goal of WPKG.
I think in such case it's much more flexible to provide a couple of tools which
are maintained by WPKG community or specific users. As an example there was a
similar request for the download tag which is still supported by WPKG since
very early days of WPKG. Unfortunately we run exactly into the problem
described above. The download functionality was too limited for some users. So
we have created a simple tool called "downloader" (find it in tools/downloader/
folder of the distribution package). Now all users willing to download files
(which included doing copies from UNC paths by the way) can use a single syntax
for it:
<install cmd='"%SOFTWARE%\downloader\downloader.cmd"
"%SOFTWARE%\source"
"%TEMP%\destination" />
So for current WPKG versions using the well-known command syntax is much more
flexible than using built-in limited download functionality using the <download
/> tag.
This script performs the job well and even supports advanced features like SHA1
and MD5 verification which WPKG itself could not even do if we would
(implementing SHA1 in WSH is not practically feasible).
So I strongly recommend to create simple helper scripts for common tasks, so
you will have to write them only once and re-use them. But moving all this
platform-dependent functionality into WPKG code makes it big, prone to errors,
platform-dependent and hard to maintain while still being extremely limited to
the intersection of functions available on all systems where WPKG is supported.
Another note:
WPKG also supports XML transforms on package XML files (actually on all XML
files read). So you might even move common commands to templates and "include"
them on demand using XSLT. Have a look at Bug 257 - Falko was using this
functionality already.
I personally recommend the solution to create helpers for common actions.
Please feel free to comment further if you believe WPKG would really need to go
down this road. But likely we would need additional code maintainers to deal
with these extensions.
Alternatively feel free to contribute simple helpers (like downloader.cmd) for
your purposes and provide support for them in the future. If they are
generically usable then we might just add them to the tools/ section of WPKG
shipment.
--
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