[arch-general] makepkg/PKGBUILD - handle same files provided by 2 non-dependent packages?
Baho Utot
baho-utot at columbus.rr.com
Sun Mar 25 17:55:46 EDT 2012
On 03/25/2012 01:24 PM, David C. Rankin wrote:
> On 03/25/2012 06:55 AM, Matthew Monaco wrote:
>> On 03/24/2012 10:44 PM, David C. Rankin wrote:
>>> Guys,
>>>
>>> I need to know if makepkg/PKGBUILD can handle a check to see whether the same
>>> files provided by two different packages (which are not dependencies of each
>>> other) exist in the file system to prevent an installation failure due to
>>> conflicting files?
>>>
>>> The situation is this. Both tdesdk and tdesvn both provide:
>>>
>>> /opt/trinity/share/services/svn+file.protocol
>>> /opt/trinity/share/services/svn+http.protocol
>>> /opt/trinity/share/services/svn+https.protocol
>>> /opt/trinity/share/services/svn+ssh.protocol
>>> /opt/trinity/share/services/svn.protocol
>>>
>>> Since neither package is a dependency for the other, tdesvn needs to provide
>>> the files if tdesdk isn't installed and tdesdk needs to provide the files if
>>> tdesvn isn't installed, but avoid the conflict if both are installed. Is this
>>> possible?
>>>
>>> If they were dependencies of each other, then that would be an easy fix. If
>>> both were assured to be installed, that would also be an easy fix by rm'ing the
>>> files from one package or the other, but in the case when either or both can be
>>> installed -- How do you handle this?? Thanks for any ideas you have.
>>>
>> how about tdeproto or the like?
>>
> Martin, Baho, Matthew,
>
> That is exactly what I will do. Hmm.. How would I do that? Could I just
> include another package() statement in the pkgbuild that simply packages those
> files? I've worked with sip which creates a split package, but it includes a
> completely separate build() as well as package. tdesdk is a huge file that I
> would not want to have to cp and build twice to get a split package with just 5
> files.
>
> Is there a go-by PKGBUILD that anyone can think of that does just that?
>
1. determine if the files are exactly the same.
2. build the first package and rm the files in question. ( PKGBUILD 1
) / ( package() {} 1 )
3. cp PKBUILD 1 to PKGBUILD 2
4. edit PKGBUILD 2, pkgname change and rm everything except the proto
files. ( package() [] 2 )
Steps 2 to 4 could be accomplished in a split build if you wanted to do
that, just adjust the build() / package() functions accordingly.
More information about the arch-general
mailing list