Hi, On 25.11.2010 12:29, Marco Gaiarin wrote: > > I've hit a VLC installer bug of version 1.1.0, on (un)install simply the > installer crash and delete the uninstall.exe binary. > Subsequent execution of the recipe simply stall. > > So i've complicated the check condition looking also at the > uninstaller: > > <check type="logical" condition="and"> > <check type="uninstall" condition="exists" path="VLC media > player 1.1.4" /> > <check type="file" condition="exists" > path='%ProgramFiles%\VideoLAN\VLC\uninstall.exe' /> > </check> > > and added to the install action some brute-force: > > <install cmd='%COMSPEC% /c if exist > "%ProgramFiles%\VideoLAN\VLC\uninstall.exe" start "" /wait > "%ProgramFiles%\VideoLAN\VLC\uninstall.exe" /S > _?=%ProgramFiles%\VideoLAN\VLC' /> > <install cmd='%COMSPEC% /c if not exist > "%ProgramFiles%\VideoLAN\VLC\uninstall.exe" if exist > "%ProgramFiles%\VideoLAN\VLC\vlc.exe" rd /q /s "%ProgramFiles%\VideoLAN"' /> > <install cmd='reg delete > "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\VLC media player" > /va /f' /> > <install cmd='"%SOFTWARE%\WPKG\vlc-1.1.4-win32.exe" /S' /> > > But i've discovered that anyway the ''upgrade'' actions are executed, > even if the new check condition are false for a ''broken'' vlc > installation.
If the package is already installed (exists in local wpkg.xml) and you increase the revision, then WPKG will always execute the upgrade command. That's simply the way WPKG has to determine if there is an upgrade. > Seems to me that WPKG evaluate on upgrade the old check condition, and > not the new one (or better: evaluate on pre-action the old one, and on > post-action the new one). WPKG uses the local (you name it "old") check condition to verify a package which is still installed and the server-side revision was not incremented. This is done on purpose since verification can also take place off-line. When you increment the revision of the VLC package then WPKG always executes the upgrade commands and not the install commands (install commands are always only executed at initial installation). If you want to enforce a re-installation of your VLC package then give it another ID. In this case WPKG will remove the old VLC package and then just install the new VLC package (using the install commands defined). Remember that the checks you defined above would be used just after install/upgrade of the package to _VERIFY_ that the package has been properly upgraded. WPKG never uses checks to check whether a package is already upgraded or not. The only case where WPKG uses the checks for something else than to verify an install/upgrade/remove action is when the package is entirely new to a system and has never been applied before. Then WPKG will use the checks to detect if a certain software is potentially already installed and then it prevents a useless re-install. This is useful in particular when adding an existing machine to WPKG-control. So unless I got something completely wrong in your request it is perfectly intended behavior what you experience. br, Rainer ------------------------------------------------------------------------- wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/ _______________________________________________ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users