12

I recently started building Ubuntu packages for my software on Launchpad. They are pretty simple; most of them just contain some files and scripts that are trigged through the .install .preinst .postinst .prerm and .postrm files. Installation and removing seems to work OK. However, upgrading from one version to the next is tricky.

What exactly happens when a package is being upgraded? Is it the same thing as uninstalling the previous version and installing the new version? Are all the files from the previous packages removed, and replaced with the files in the .install list from the new package? Are all of the .prerm, postrm, preinst, postinst scripts executed? How do I distinguish stuff that should only happen during a 'new install' and an upgrade?

16

The debian wiki is pretty much usefull to understand the process (which is explained in details here).

For example :

  • the case of a simple installation of package

    enter image description here

    • the case of a the upgrade of a package

enter image description here

1
  • Can't believe you're the first one to point me to this page. Thanks this is really helpful. – Jeroen Jan 16 '12 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.