Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

How could I tell portage a package is already installed?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
ciges
n00b
n00b
Posts: 3
Joined: Mon Sep 25, 2017 9:51 am

How could I tell portage a package is already installed?

  • Quote

Post by ciges » Mon Sep 25, 2017 10:38 am

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?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Sep 25, 2017 10:47 am

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: Select all

man portage
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Mon Sep 25, 2017 10:48 am

I think that package.provided might be the answer
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Mon Sep 25, 2017 12:33 pm

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.
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Tue Sep 26, 2017 7:58 am

Also "pretending" that a package is installed while it is not can cause build or runtime errors.
Top
Letharion
Veteran
Veteran
Posts: 1344
Joined: Mon Jun 13, 2005 8:04 am
Location: Sweden

  • Quote

Post by Letharion » Tue Sep 26, 2017 8:30 am

mv wrote:The better alternative is to put the ebuild with the undesired dependency into your local overlay, removing that dependency.
++
Top
LIsLinuxIsSogood
Veteran
Veteran
Posts: 1186
Joined: Sat Feb 13, 2016 11:41 pm

  • Quote

Post by LIsLinuxIsSogood » Wed Dec 06, 2017 8:10 am

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)?
Top
Havin_it
Veteran
Veteran
Posts: 1343
Joined: Sun Jul 17, 2005 10:26 am
Location: Edinburgh, UK
Contact:
Contact Havin_it
Website

  • Quote

Post by Havin_it » Sat Nov 28, 2020 4:05 pm

I just tried using package.provided (first time in many years) and it seems to be ignored. My syntax was just

Code: Select all

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?
Top
Ionen
Developer
Developer
User avatar
Posts: 3013
Joined: Thu Dec 06, 2018 2:23 pm

  • Quote

Post by Ionen » Sat Nov 28, 2020 4:19 pm

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.
Top
Havin_it
Veteran
Veteran
Posts: 1343
Joined: Sun Jul 17, 2005 10:26 am
Location: Edinburgh, UK
Contact:
Contact Havin_it
Website

  • Quote

Post by Havin_it » Sat Nov 28, 2020 5:59 pm

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 ;)
Top
Post Reply

10 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic