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: 3

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: 54097
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
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
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: 6747

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: 9507
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: 1342
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
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

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
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1246
Location: Edinburgh, UK

PostPosted: Sat Nov 28, 2020 4:05 pm    Post subject: Reply with quote

I just tried using package.provided (first time in many years) and it seems to be ignored. My syntax was just
Code:
sys-auth/libfprint-1.90.1

I also tried prepending '=' as in other package.* files when you specify version, but no dice.

Has this functionality quietly died?
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2702

PostPosted: Sat Nov 28, 2020 4:19 pm    Post subject: Reply with quote

Havin_it wrote:
Has this functionality quietly died?
No, it still works. But my guess is that you used /etc/portage/package.provided rather than /etc/portage/profile/package.provided, see the aformentioned wiki link or portage(5) for details.
Back to top
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1246
Location: Edinburgh, UK

PostPosted: Sat Nov 28, 2020 5:59 pm    Post subject: Reply with quote

Gah! You are quite correct. I actually came from that very page and yet had completely mentally glossed over that extra dir level. There's no helping me but thank you for trying ;)
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