[wpkg-users] How about allowing a comma separated list for exit codes?
Rainer Meier
r.meier at wpkg.org
Fri Jul 22 10:28:45 CEST 2011
Hi Stefan,
On 22.07.2011 03:50, Stefan Pendl wrote:
> Allowing a comma separated list for exit codes would shorten for instance the RoboCopy template shipping with WPKG.
>
> What does the group think?
In general it is always better to have a clear interface to specify multple
values. In case of exit codes you can easily specify as many exit code nodes in
the XML structure as you want - in addition you can specify "any" code to match
all codes.
Using a value with some special format in order to squeeze multiple values into
a single attribute shall always be the last possible option since it has some
drawbacks like the requirement for splitting the value properly and knowing the
exact format. So usually it's much better to define independent attributes.
I admit that WPKG uses some comma-separated values. For example for LCIDs and
also a pipe-separated list of environment variables in extended host matches.
Although this is mainly due to the fact that these values have to be specified
within a single attribute. In case of exit codes this is not required and
therefore I prefer a clear specification of exit codes - one-by-one.
In fact thinking about this it might even have been better to also specify
extended host matches in a similar way. For example:
<install ...>
<hostmatch>
<os value="some-os" />
<lcid value="408" />
<lcid value="409" />
...
</hostmatch>
</install>
But now it's implemented in attributes. Well, we might clean this up in future
versions, but this would clearly break existing packages now.
br,
Rainer
More information about the wpkg-users
mailing list