dskvr / opkg

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

Support prerm scripts for the old package #104

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When upgrading e.g. foo from v1 to v2, opkg (like rpm and dpkg) should allow 
foo v1 to run a prerm script before foo v2 runs its preinst/postinst scripts.

Original issue reported on code.google.com by ross.bur...@intel.com on 25 Sep 2013 at 9:03

GoogleCodeExporter commented 8 years ago
This is already stubbed out, just needs implementing:

    static int
    prerm_upgrade_old_pkg(pkg_t *pkg, pkg_t *old_pkg)
    {
         /* DPKG_INCOMPATIBILITY:
            dpkg does some things here that we don't do yet. Do we care?

            1. If a version of the package is already installed, call
               old-prerm upgrade new-version
            2. If the script runs but exits with a non-zero exit status
               new-prerm failed-upgrade old-version
               Error unwind, for both the above cases:
               old-postinst abort-upgrade new-version
         */
         return 0;
    }

Is this the behaviour you want? Should be reasonably straightforward to 
implement for the next release milestone (0.3).

Original comment by paul.betafive on 25 Sep 2013 at 10:10

GoogleCodeExporter commented 8 years ago
Yeah, that's why I filed the bug. :)  Copying dpkg where it's possible seems 
reasonable to me.

Original comment by ross.bur...@intel.com on 25 Sep 2013 at 10:24

GoogleCodeExporter commented 8 years ago
This is now fixed in master thanks to a patch from Peter Urbanec.

Original comment by paul.betafive on 24 Oct 2014 at 10:42