Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How could I tell portage a package is already installed?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ciges
n00b
n00b


Joined: 25 Sep 2017
Posts: 2

PostPosted: Mon Sep 25, 2017 10:38 am    Post subject: How could I tell portage a package is already installed? Reply with quote

Hi

Is there a way to tell portage that a package is already installed? I would like that a package from a dependency not to be installed and the easiest way could be to "pretend" it is already in the system.

Any idea?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 39287
Location: 56N 3W

PostPosted: Mon Sep 25, 2017 10:47 am    Post subject: Reply with quote

ciges,

If its a dependency, it will be needed, your build may fail if the package is not present.
Still, it your Gentoo.

Read about /etc/portage/package.provided in
Code:
man portage

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16891
Location: here

PostPosted: Mon Sep 25, 2017 10:48 am    Post subject: Reply with quote

I think that package.provided might be the answer
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 5750

PostPosted: Mon Sep 25, 2017 12:33 pm    Post subject: Reply with quote

package.provided has many drawbacks.
When I really needed this, I usually either created a dummy package in a local overlay or I have overridden the phases by dummy functions from /etc/protage/env/category/package.

The better alternative is to put the ebuild with the undesired dependency into your local overlay, removing that dependency.

The latter is much better, because if you "pretend" that a package is installed, nothing will warn you if some day you install/upgrade some other package which really needs this package and thus you might get a broken system for a hard-to-find reason.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9184
Location: beyond the rim

PostPosted: Tue Sep 26, 2017 7:58 am    Post subject: Reply with quote

Also "pretending" that a package is installed while it is not can cause build or runtime errors.
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1287
Location: Sweden

PostPosted: Tue Sep 26, 2017 8:30 am    Post subject: Reply with quote

mv wrote:
The better alternative is to put the ebuild with the undesired dependency into your local overlay, removing that dependency.

++
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Guru
Guru


Joined: 13 Feb 2016
Posts: 458

PostPosted: Wed Dec 06, 2017 8:10 am    Post subject: Reply with quote

Sorry to hijack here, but since the question is the same one anyway I want to know how to tell portage the package has been installed, given that it was already from another source. I opened another post but since the package.provided question seems rather less documented. I thought I would check. I too would like to tell Portage that a package is installed, and would like some help to make sure it gets into Portage the right way.

Given the options (would it be easiest) if I don't want to rebuild any packages to just add a list of packages that I have installed from source in my /opt folder. Can the file package.provided actually accept multiple versions (like slots in portage)?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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