wpkg 0.8.4 available
There is new version of 0.8.x which includes a few fixes to the command line option library (advgetopt class.) As I was writing a full coverage test, I found out that one of the main feature of the class was actually not properly programmed. There is an example:
wpkg --admindir ~/admin --admindir ~/target/var/lib/wpkg/admin ...
That command line is expected to return the second path (~/target/var/lib/wpkg/admin) as the value of the --admindir option when in fact older versions would return the first path (~/admin). This is wrong first of all because the documentation says otherwise, but especially because we want you to be able to overwrite the configuration file definitions of the sort. So for example the main /etc/wpkg/wpkg.config file may include a line like this:
And then on your command line, for a special test, you'd like to write:
wpkg --admindir ~/other-admin
And you'd be surprised that the ~/admin directory was to be used because it appeared first! Although this should rather rarely be a problem, having the right implementation makes a lot more sense.
As I was unit testing the advgetopt class in version 0.9.1, I also noticed that the lone "-" filename was not added to the list properly. This is because it was taken as if it were an option instead of a filename. I just had to change one call to fix this problem so that was easy to fix and there was no reason not to fix it.
Finally, some options were not allowed in your environment variable (WPKG_OPTIONS) and yet could make it to the list of argument of those options. This only happened with default options so for wpkg it was only if you were to add standalone filenames in the WPKG_OPTIONS. Now an error is generated and you avoid strange behavior as a result.
If you are using 0.8.3 or 0.8.2, you probably want to upgrade to 0.8.4 to make sure that you get these fixes. They are very small so they won't break anything you are used to, although they may make some of your scripts work slightly differently, that too is unlikely.
Note that the advgetopt class is now 100% covered by the corresponding test in 0.9.2. The changes to 0.8.4 come out of that test and thus they work even though the test was not duplicated in 0.8.x.