Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Aug 2014 21:19:48 +0200 (CEST)
From:      Melvyn Sopacua <melvyn@magemana.nl>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   Re: How to tell pkg it's OK to overwrite files by another port
Message-ID:  <alpine.BSF.2.00.1408062112220.72407@fire.magemana.nl>
In-Reply-To: <20140805143415.GD17537@ivaldir.etoilebsd.net>
References:  <alpine.BSF.2.00.1408050528170.52235@fire.magemana.nl> <20140805143415.GD17537@ivaldir.etoilebsd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Baptiste,

On Tue, 5 Aug 2014, Baptiste Daroussin wrote:

> On Tue, Aug 05, 2014 at 05:35:03AM +0200, Melvyn Sopacua wrote:
>> Hi,
>>
>> the issue:
>> for www/magento there is a sample data package. I'd like to make a port
>> for it, but the sample data overwrites a few files in the www/magento
>> port's installed files to match the sample theme.
>>
>> This is OK and needed. But I don't know how to tell pkg this.
>>
>> I can make the sample data an option in the magento port and keep it in
>> one port, but this would put a large burdon on maintaining the pkg-plist
>> on upgrades as sample-data is only updated when backwards incompatible
>> changes are made to the core that make the older sample data unusable.
>> So I prefer to maintain it as a separate port.
>>
> There is a problem if that is how the port works. If magento expect some data to
> be replaced changed etc then it should not be tracked by the package to avoid an
> upgrade of the package to overwrite the user special version which is why pkg(8)
> has a strong hold on which files belongs to which package.
>
> So I think magento should be fixed in that regard. otherwise there is the
> PERMISSIVE options for pkg(8) but this is really really not recommanded to use.
> The best is again to fix the magento port so it allows the normal use cases.

It's going to be a hack either way.
Think of it as two sample files from different sources:
default.conf.sample
optimized.conf.sample

Both are candidates for myconfig.conf, where optimized should win and
otherwise default, but they come from two different ports. This may
actually be the way to handle it, if @sample didn't assume the same
basename.

So I guess I have to install two different .sample files and a
pkg-(de)install script that updates to the right one, keeping the actual
file out of the pkg-plist.

That's the least hack-ish I can come up with for now, but I'm open to
suggestions.

--
Melvyn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1408062112220.72407>