[wpkg-users] [Bug 166] Change function scanUninstallKeys to support RegExp in nameSearched

bugzilla-daemon at bugzilla.wpkg.org bugzilla-daemon at bugzilla.wpkg.org
Sun Aug 23 19:48:26 CEST 2009


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


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

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




--- Comment #1 from Rainer Meier <r.meier at wpkg.org>  2009-08-23 19:48:19 ---
Hi Stefan

Again this is a request which was already pending on my ideas list. So I've
tried to implement it. I really hope it does not cause overmatching in some
special cases but I don't think so (at least I don't have such an example). The
reason why I am thinking about this overmatching is that for example the period
"." character is treated as "any character" in regular expression matching.
WPKG now tries to match the string directly and if it fails it will try to use
the string as a regular expression. This might fail too if the expression is
not a valid regular expression or the expression does not match too.

Please note that this does not specifically help in your case where a laptop
user might upgrade before the administrator upgrades the package. When the
administrator decides to upgrade the package then this will cause WPKG to
install this version (even if it's the same one which is already installed).
This is due to the fact that WPKG internally still thinks the package installed
by the administrator is installed and now it's time for an upgrade.

However regular expression matching might help in other cases where you don't
want to update the uninstall checks each time.

Here is the change description:
NEW: Added expression matching to uninstall key scanner. This allows to specify
     a check as follows:
     <check type='uninstall' condition='exists' path='Mozilla Firefox.*' />
     This matches all Firefox versions. In this case the check remains true if
     the user changes to another Firefox versions. Note that in this case WPKG
     would not even complain/reinstall the package if the user downgrades.
     To prevent this you might specify
     <check type='uninstall' condition='exists'
         path='Mozilla Firefox \(3\.5\.[0-9]*\)' />
     This would allow any Firefox 3.5.x version to be installed by the user.
     Plese note that this does not prevent WPKG to upgrade the package when
     the administrator provides a new version.
     For example the Administrator might install Firefox 3.5.1. Then version
     3.5.2 is released and manually installed by the user. WPKG will accept
     this new version due to the regular expression and will not try to
     re-install (downgrade in this case) to version 3.5.1. But as soon as
     the administrator releases version 3.5.2 officially and increases the
     package version then WPKG will enforce to install the version provided
     by the administrator.
     Please also note that the regular expression you give has to match the
     full string read from the uninstall key. The heading "^" and trailing
     "$" are automatically added to the regular expression.
     This implements change request included in Bug 166.
     Thanks to Stefan Pendl.

Please test carefully and give some feedback.

Download here:
<http://wpkg.svn.sourceforge.net/viewvc/wpkg/wpkg/stable/1.1/wpkg.js?view=log>


br,
Rainer

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