Subject: Re: pkg/30347
To: None <,,,>
From: None <>
List: pkgsrc-bugs
Date: 09/19/2005 06:11:32
Synopsis: +DEINSTALL scripts are incomplete

Responsible-Changed-From-To: jlam->pkg-manager
Responsible-Changed-When: Mon, 19 Sep 2005 06:11:30 +0000
This is not properly just my responsibility.

State-Changed-From-To: open->analyzed
State-Changed-When: Mon, 19 Sep 2005 06:11:30 +0000
The underlying problem is how to require a certain version of the pkg_*
tools to install a given binary package.  This can be solved in a number
of different, two of which I list here:

  (1) Modify the pkg_create tool to add a @pkgtools-version field to
      the +CONTENTS file during package creation that notes the version
      of the pkg_* tools used to create the binary package.  The
      pkg_add tool can then be modified to check this field to see if
      the version of pkg_add is at least as big as the one in 
      @pkgtools-version.  This fix requires no change to the packages

  (2) Modify every package that sets USE_PKGINSTALL (and thus probably
      unpacks +* helper scripts) to add PRE-INSTALL action to the
      +INSTALL scripts that ensures the version of pkg_add being used 
      to add the package is bigger than the one recorded in the +INSTALL
      script, where the recorded version is the version of pkg_create
      used to create the binary package.  This fix requires a PKGREVISION
      bump for all packages that set USE_PKGINSTALL.

Option 1 is definitely nicer because the fix is transparent; however 
it requires modifying the pkg_install sources.  Option 2 is uglier
because of the PKGREVISION bumps, but is extremely easy to implement 
within the existing framework.  I'm in favor of 
option 2 because I wrote the framework and it's
obvious to me how to solve it that way.  I'll let others debate the
way they would prefer to solve this problem.