tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: destdir: 'make package' inconsistency

> On Sun, Jan 04, 2009 at 07:09:58PM +0200, Aleksey Cheusov wrote:
 >> > I think that 'make package' behaviour shouldn't change just because of
 >> > the destdir toggle. I suggest adding a separate target for
 >> >   make && create binary package
 >> > and let 'make package' do
 >> >   make && create binary package && make install
 >> > to match what it does without destdir.
 >> > Comments?
 >> IMHO, this is very bad idea. Changing pkgsrc "API"
 >> breaks the third party software.

> I don't understand your comment.
> My complaint is that turning destdir on is changing the API and I'm
> looking for a way to make it hurt (me ;) ) less.

I understand your logic but it's too late to change the target 'package'.

A) pkgsrc's DESTDIR support is documented for ~2 years now.
   See section 5.3

    DESTDIR support changes the behaviour of various targets
    slightly. To install a package after building it, use
    package-install. package and install don't do that any
    longer. package-install can be used as DEPENDS_TARGET. bin-install
    will ask for the root password to install the package and fail,
    package-install will ask again.

B) It is always better to keep changes to pkgsrc backward compatible
  unless you REALLY have reasons to break backward compatibility.
  The target 'package' "inconsistency" is not such a reason.
  That fact that 'make package' (without destdir set) installs
  the package to / is just m-m-m-m just a mistake made more
  than decade ago, this mistake is a side effect of the implementation.
  I don't think 'make package' (with destdir) should follow
  this bad logic. If you need new functionality, create a new target.

Best regards, Aleksey Cheusov.

Home | Main Index | Thread Index | Old Index