Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to tell Portage that a package is equivalent to another?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
reguila
n00b
n00b


Joined: 18 Jan 2018
Posts: 2

PostPosted: Thu Jan 18, 2018 3:55 pm    Post subject: How to tell Portage that a package is equivalent to another? Reply with quote

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
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 22160
Location: here

PostPosted: Thu Jan 18, 2018 4:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 5672
Location: Removed by Neddy

PostPosted: Thu Jan 18, 2018 6:41 pm    Post subject: Reply with quote

or submit a bugreport so a virtual can be created
_________________
The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6292

PostPosted: Thu Jan 18, 2018 7:26 pm    Post subject: Reply with quote

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:
  1. Call your package x11-libs/vte despite it downloads/installs some other tarball, or
  2. 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
  3. Bite the bullet and manage all packages with corresponding dependencies in your overlay (regularly updating manually from the gentoo repository).
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7090

PostPosted: Thu Jan 18, 2018 8:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
reguila
n00b
n00b


Joined: 18 Jan 2018
Posts: 2

PostPosted: Thu Jan 18, 2018 10:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6292

PostPosted: Fri Jan 19, 2018 6:00 am    Post subject: Reply with quote

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
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7090

PostPosted: Fri Jan 19, 2018 11:46 am    Post subject: Reply with quote

mv wrote:
Unfortunately, package.provided is deprecated

Since what portage version? my man still doesn't tag it as deprecated.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6292

PostPosted: Fri Jan 19, 2018 1:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Jan 22, 2018 12:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum