Upgrade install not removing obsolete files.

Answered

Comments

3 comments

  • Avatar
    wojciechka

    Unfortunately the update installer does not allow automatically removing files that are not present in the original installation.

    If this applies to specific directory, what you can do is rename the directory before installation and then (after a successful installation) delete the temporary (renamed) directory which will only leave the new files installed.

    If not, it will require creating multiple <deleteFile> action invocation. You may write a script that will generate an XML file with the delete actions to avoid creating them manually - such as compare contents of ls / dir command output and add <deleteeFile path="..." /> line for each file not found in new set of files.

    0
    Comment actions Permalink
  • Avatar
    sventhegrinch

    Hm, so if the upgrade installer doesn't track changes in the manifest (and act upon those), what does it do for me?

    0
    Comment actions Permalink
  • Avatar
    sventhegrinch

    Not sure how others do this but we basically always create a complete installer (but the installer can then switch into upgrade mode). Sounds like your intended use for the upgrade is different (although the docs seem to indicate that my use case is at least considered, as the switch to upgrade install is listed there). That way the installer can be used for new installs as well as upgrades. I would argue that in that scenario handling removed files as part of that would be as important as handling newly added files (without me having to track what those files are... the installer framework should have all information it needs to do that).

    1. Fresh install with complete manifest
    2. Upgrade install with new complete manifest
    3. Added files are installed and added to uninstall
    4. Removed files compared to prior manifest are removed from filesystem and removed from uninstall
    0
    Comment actions Permalink

Please sign in to leave a comment.