View previous topic :: View next topic |
Author |
Message |
reguila n00b

Joined: 18 Jan 2018 Posts: 2
|
Posted: Thu Jan 18, 2018 3:55 pm Post subject: How to tell Portage that a package is equivalent to another? |
|
|
Hello,
I hope you can help me sorting this out...
Is there a way to "tell" portage the some package (from local repository / overlay) replaces or provides the same functionality as other package that currently exists in portage. I've read about the PROVIDE option but it refers it should only be used by Virtuals...
Let me give you an example, it might be easier to understand what i'm asking, since my english is not that good
I would like to install the Termite terminal, which requires a patched version of VTE named VTE-ng. No problem here, i'm able to use the overlays or make my own local ebuild for this two packages and emerge them successfully. The problem is that i also need VIRT-Manager wich depends on VTE. Off course VTE-ng blocks VTE, because they are "the same". So, when i do an emerge world i get a blockage. How can i tell portage that x11-libs/VTE-ng is the same as x11-libs/VTE, so when i tried to emerge VIRT-Manager portage checked either in system?
Obviously i could just copy the virt-manager ebuild to my local repository and modify this dependency, but it's not practical since i need to do it every time the package was updated, and if there were other packages depending on this it would mean do that for those packages also.
How do you guys deal with this?
Thanks, |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31568 Location: here
|
Posted: Thu Jan 18, 2018 4:07 pm Post subject: |
|
|
One solution is to create your local overlay changing name of vte-ng to vte and mask vte from official portage tree (echo "x11-libs/vte::gentoo" >> /etc/portage/package.mask).
Another way is to copy all (that you need) ebuild that depend on vte and changing dependency from
Code: | RDEPEND="
>=x11-libs/vte-0.28:2.91
" |
to
Code: | RDEPEND="
|| (
>=x11-libs/vte-0.28:2.91
x11-libs/vte-ng
)
" |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
Naib Watchman


Joined: 21 May 2004 Posts: 6073 Location: Removed by Neddy
|
Posted: Thu Jan 18, 2018 6:41 pm Post subject: |
|
|
or submit a bugreport so a virtual can be created _________________ #define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0; |
|
Back to top |
|
 |
mv Watchman


Joined: 20 Apr 2005 Posts: 6780
|
Posted: Thu Jan 18, 2018 7:26 pm Post subject: |
|
|
It is very sad that there is no generic solution for your problem: The current gentoo dependency system cannot deal with this.
I once had submitted a feature request to allow for a local override of dependencies which would allow such kind of modification without managing all dependent packages in an overlay, but this suggestion has been ignored.
The PROVIDE you read about is for so-called old-style virtuals only which have been obsoleted meanwhile. This variable has become meaningless.
Pragmatically, there are only 3 things which you can do:
- Call your package x11-libs/vte despite it downloads/installs some other tarball, or
- Put a package x11-libs/vte in your overlay and let it "act" like a virtual package, i.e. essentially it contains just a dependency on x11-libs/vte-ng, or
- Bite the bullet and manage all packages with corresponding dependencies in your overlay (regularly updating manually from the gentoo repository).
|
|
Back to top |
|
 |
krinn Watchman


Joined: 02 May 2003 Posts: 7471
|
Posted: Thu Jan 18, 2018 8:26 pm Post subject: |
|
|
You have package.provided that hold list of packages portage should assume install and working, which satisfy any deps trying to use it.
So for you it mean, adding x11-libs/vte to it, and portage will assume it is on your system, and if you then use vte-ng and that vte-ng is able to met the needs of any package that expect something from vte, you'll good to go. |
|
Back to top |
|
 |
reguila n00b

Joined: 18 Jan 2018 Posts: 2
|
Posted: Thu Jan 18, 2018 10:12 pm Post subject: |
|
|
First of all i want to thank you for your answers, i'm back to Gentoo after some years and i really missed this "quality" replies, always keeping focus on helping and adding value to the subject.
I'll go for the krinn answer, using the package.provided seems the most "clean" way to do it without many drawbacks as long as i keep vte-ng installed.
I'm marking this solved.
Thanks guys.
Cheers |
|
Back to top |
|
 |
mv Watchman


Joined: 20 Apr 2005 Posts: 6780
|
Posted: Fri Jan 19, 2018 6:00 am Post subject: |
|
|
reguila wrote: | I'll go for the krinn answer, using the package.provided seems the most "clean" way to do it |
Unfortunately, package.provided is deprecated and will not work if a package requires a certain SLOT or USE-flags for the dependency. Moreover, it is a bad idea if you should want to make your overlay public.
However, if neither of these requirements is the case for you, you can use it (until probably eventually it will be removed from portage). |
|
Back to top |
|
 |
krinn Watchman


Joined: 02 May 2003 Posts: 7471
|
Posted: Fri Jan 19, 2018 11:46 am Post subject: |
|
|
mv wrote: | Unfortunately, package.provided is deprecated |
Since what portage version? my man still doesn't tag it as deprecated. |
|
Back to top |
|
 |
mv Watchman


Joined: 20 Apr 2005 Posts: 6780
|
Posted: Fri Jan 19, 2018 1:22 pm Post subject: |
|
|
krinn wrote: | mv wrote: | Unfortunately, package.provided is deprecated |
Since what portage version? my man still doesn't tag it as deprecated. |
My formulation was unclear. It is considered as deprecated by several developers (because of the mentioned problems with slot- and use-dependencies). Currently, it still works (with portage; perhaps already not with other package managers). |
|
Back to top |
|
 |
steveL Watchman

Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Mon Jan 22, 2018 12:50 am Post subject: |
|
|
mv wrote: | My formulation was unclear. It is considered as deprecated by several developers (because of the mentioned problems with slot- and use-dependencies). Currently, it still works (with portage; perhaps already not with other package managers). | Bad idea to remove it, IMO.
It's an admin backstop, and those should not be thrown away (lightly, or at all AFAIC.) |
|
Back to top |
|
 |
|