[arch-general] makepkg/PKGBUILD - handle same files provided by 2 non-dependent packages?
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. -- David C. Rankin, J.D.,P.E.
Why not making a third package 'trinity-services' and both packages depend on this? Am 25.03.2012 06:44, schrieb David C. Rankin:
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.
On 03/25/2012 12:44 AM, 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.
This is simple. Split those files out of both packages and put them into a separate file. Then make both packages depend on the new split-out package.
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?
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? -- David C. Rankin, J.D.,P.E.
su, 2012-03-25 kello 12:24 -0500, David C. Rankin kirjoitti:
Is there a go-by PKGBUILD that anyone can think of that does just that?
In tdesdk's PKGBUILD do somthing like this build () { pach -Np -i patches sed 's|clause|fix|' file.c .configure --prefix } package_tdesdk () { make install rm "$pkgdir/opt/trinity/share/services/"svn* } package_tdeservices () { cp "$srcdir/tdeskd/src/service/generated/"svn*.protocol \ "$pkgdir/opt/trinity/share/services/" } Thats kind of thng should do it :D Also the assumption here is that the tdesdk and tdesvn pkgs provide exactly same version of those .protocol files :D
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 03/25/2012 12:30 PM, Jesse Juhani Jaara wrote:
In tdesdk's PKGBUILD do somthing like this build () { pach -Np -i patches sed 's|clause|fix|' file.c .configure --prefix }
package_tdesdk () { make install rm "$pkgdir/opt/trinity/share/services/"svn* }
package_tdeservices () { cp "$srcdir/tdeskd/src/service/generated/"svn*.protocol \ "$pkgdir/opt/trinity/share/services/" }
Thats kind of thng should do it :D Also the assumption here is that the tdesdk and tdesvn pkgs provide exactly same version of those .protocol files :D
Thank you Jesse! The files are not identical, but should be functionally equivalent. The only difference is that tdesvn files use 'exec=kio_ksvn' while tdesdk uses 'exec=kio_svn'. They are essentially the same .protocol files otherwise (except for some additional translation 'Description=' lines which are irrelevant to the operation of the protocol. I am still investigating whether using kio_ksvn for everything will make any difference. If anybody has historical knowledge of the difference between kio_svn and kio_ksvn, I would welcome your input. Otherwise, I'll just test after install and see how it goes. - -- David C. Rankin, J.D.,P.E. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9vXUAACgkQZMpuZ8CyrchRnACdEMqR1YDA7UUTf32lrF0RxCUo Km8AnRrvLsK7Kux6Ghpi8h9OI4EP2r4J =AtEY -----END PGP SIGNATURE-----
On 03/25/2012 02:00 PM, David C. Rankin wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 03/25/2012 12:30 PM, Jesse Juhani Jaara wrote:
In tdesdk's PKGBUILD do somthing like this build () { pach -Np -i patches sed 's|clause|fix|' file.c .configure --prefix }
package_tdesdk () { make install rm "$pkgdir/opt/trinity/share/services/"svn* }
package_tdeservices () { cp "$srcdir/tdeskd/src/service/generated/"svn*.protocol \ "$pkgdir/opt/trinity/share/services/" }
Thats kind of thng should do it :D Also the assumption here is that the tdesdk and tdesvn pkgs provide exactly same version of those .protocol files :D Thank you Jesse!
The files are not identical, but should be functionally equivalent. The only difference is that tdesvn files use 'exec=kio_ksvn' while tdesdk uses 'exec=kio_svn'. They are essentially the same .protocol files otherwise (except for some additional translation 'Description=' lines which are irrelevant to the operation of the protocol. I am still investigating whether using kio_ksvn for everything will make any difference. If anybody has historical knowledge of the difference between kio_svn and kio_ksvn, I would welcome your input. Otherwise, I'll just test after install and see how it goes.
- -- David C. Rankin, J.D.,P.E. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9vXUAACgkQZMpuZ8CyrchRnACdEMqR1YDA7UUTf32lrF0RxCUo Km8AnRrvLsK7Kux6Ghpi8h9OI4EP2r4J =AtEY -----END PGP SIGNATURE-----
You may have a bigger problem then, you may/will have to put them into unrelated directories so they do not conflict with each other. I originally thought you could sed this thing but I don't think that will work.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 03/25/2012 05:01 PM, Baho Utot wrote:
You may have a bigger problem then, you may/will have to put them into unrelated directories so they do not conflict with each other.
I originally thought you could sed this thing but I don't think that will work.
I am still trying to see if the kio_ksvn is functionally equivalent of kio_svn. If tdesdk will use kio_ksvn for it's svn functions (which I can't think why it wouldn't), then it will simply use the files provided by tdesvn. However, reading, tdesdk and tdesvn use their own implementations of the kio slave, so there is a chance that they are not functionally equivalent. The kdedevelopers for kde4 haven't solve the issue. Debian and kubuntu have gone back and forth creating 'kio_plugins' that hold these files. The current opensuse 3.5.10 eliminates the .protocol files from kdesdk and just uses those provided by kdesvn, so that seems like a workable solution. I haven't looked at their patches yet, but I have looked at the files provided by both the kdesvn and kdesdk rpms. I think rather than split packaging, we just drop the .protocol files from tdesdk and make tdesvn a dependency of tdesdk. The tdesvn package is only 1.8M so it's not a lot of overhead for someone who wants just tdesdk and not tdesvn. Otherwise, I think it is hack the code time and patch tdesdk to put its protocol files in a new location. - -- David C. Rankin, J.D.,P.E. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9vqmoACgkQZMpuZ8Cyrci9wQCfX+hwP40beS8YyqZv5aOyYNv6 TAgAnRzKAwBPJJ9DFc3aDagocEBY3h+j =Xt2U -----END PGP SIGNATURE-----
On 03/25/2012 07:29 PM, David C. Rankin wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
You may have a bigger problem then, you may/will have to put them into unrelated directories so they do not conflict with each other.
I originally thought you could sed this thing but I don't think that will work. I am still trying to see if the kio_ksvn is functionally equivalent of kio_svn. If tdesdk will use kio_ksvn for it's svn functions (which I can't think why it wouldn't), then it will simply use the files provided by tdesvn. However, reading, tdesdk and tdesvn use their own implementations of the kio slave, so
On 03/25/2012 05:01 PM, Baho Utot wrote: there is a chance that they are not functionally equivalent. The kdedevelopers for kde4 haven't solve the issue. Debian and kubuntu have gone back and forth creating 'kio_plugins' that hold these files.
The current opensuse 3.5.10 eliminates the .protocol files from kdesdk and just uses those provided by kdesvn, so that seems like a workable solution. I haven't looked at their patches yet, but I have looked at the files provided by both the kdesvn and kdesdk rpms.
I think rather than split packaging, we just drop the .protocol files from tdesdk and make tdesvn a dependency of tdesdk. The tdesvn package is only 1.8M so it's not a lot of overhead for someone who wants just tdesdk and not tdesvn. Otherwise, I think it is hack the code time and patch tdesdk to put its protocol files in a new location.
Well OK, I am not working on tde at all any more as I have standardized on KDE4. Good luck with your project.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 03/25/2012 06:29 PM, David C. Rankin wrote:
I think rather than split packaging, we just drop the .protocol files from tdesdk and make tdesvn a dependency of tdesdk. The tdesvn package is only 1.8M so it's not a lot of overhead for someone who wants just tdesdk and not tdesvn. Otherwise, I think it is hack the code time and patch tdesdk to put its protocol files in a new location.
Baho, For the moment, that is what I've done, I just have tdesvn provide the .protocol files and list it as a dependency of tdesdk. You can grab all of the current PKGBUILD.tar.gz files I have currently at: (all in one tarball) http://www.3111skyline.com/dl/dt/tde/src/tde-pkgbuild-src.tar.gz NOTE: read the following for setup and building http://www.3111skyline.com/dl/dt/tde/src/README-building.txt - -- David C. Rankin, J.D.,P.E.
Am Sun, 25 Mar 2012 20:30:52 +0300 schrieb Jesse Juhani Jaara <jesse.jaara@gmail.com>:
su, 2012-03-25 kello 12:24 -0500, David C. Rankin kirjoitti:
Is there a go-by PKGBUILD that anyone can think of that does just that?
In tdesdk's PKGBUILD do somthing like this build () { pach -Np -i patches sed 's|clause|fix|' file.c .configure --prefix }
package_tdesdk () { make install rm "$pkgdir/opt/trinity/share/services/"svn* }
package_tdeservices () { cp "$srcdir/tdeskd/src/service/generated/"svn*.protocol \ "$pkgdir/opt/trinity/share/services/" }
Thats kind of thng should do it :D Also the assumption here is that the tdesdk and tdesvn pkgs provide exactly same version of those .protocol files :D
AUR still doesn't support split packages, and split packages can't be handled by the AUR wrappers. So this is really the worst ideas for AUR, and should only be used for binary repos for now. The better way is to create three single packages which depend on each other. Heiko
Am Sun, 25 Mar 2012 22:08:43 +0200 schrieb Heiko Baums <lists@baums-on-web.de>:
AUR still doesn't support split packages, and split packages can't be handled by the AUR wrappers. So this is really the worst ideas for AUR, and should only be used for binary repos for now.
The better way is to create three single packages which depend on each other.
Sorry, missed that it is meant for the trinity binary repo. Sorry for the noise. Heiko
On 03/25/2012 04:09 PM, Heiko Baums wrote:
Am Sun, 25 Mar 2012 22:08:43 +0200 schrieb Heiko Baums<lists@baums-on-web.de>:
AUR still doesn't support split packages, and split packages can't be handled by the AUR wrappers. So this is really the worst ideas for AUR, and should only be used for binary repos for now.
The better way is to create three single packages which depend on each other. Sorry, missed that it is meant for the trinity binary repo. Sorry for the noise.
Heiko
You stiil had/have a workable solution though
Am Sun, 25 Mar 2012 18:02:33 -0400 schrieb Baho Utot <baho-utot@columbus.rr.com>:
You stiil had/have a workable solution though
But you don't mean this "solution"? pkgbase="splittest" pkgname="splittest" true && pkgname=('splittest' 'splittest-foo') This doesn't really work as already explained once on aur-general and in the AUR comments for some of those split packages. Heiko
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.
participants (7)
-
Baho Utot
-
baho Utot
-
David C. Rankin
-
Heiko Baums
-
Jesse Juhani Jaara
-
martin kalcher
-
Matthew Monaco