Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 463734 - Provide a way to enforce using packages from a repo even if newer version is elsewhere
Summary: Provide a way to enforce using packages from a repo even if newer version is ...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 240187
  Show dependency tree
 
Reported: 2013-03-29 13:15 UTC by Michał Górny
Modified: 2013-04-21 09:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-03-29 13:15:32 UTC
Let's say that I have a semi-autogenerated repository of hacked packages. Shortly saying, I run a script, it takes a few packages from gx86, patches them and puts in a repo.

Due to the semi-automatic nature of the repo generation, there is some delay between a new ebuild being committed to gx86 and the same ebuild being copied and patched in the repo. If someone syncs during that delay, portage will want to install the newer, non-patched version from gx86.

Therefore, I ask: could you please provide a way to let a repository force its own packages even if other repositories provide newer versions?

I'm thinking of a layout.conf key. If that key/feature is enabled, during dependency resolution emerge would look up all the repos having it for matching $PN. If any of them has that $PN, emerge would only use the 'highest priority' repo having it. Otherwise, it will use the regular version comparison.


Example:

repo A [highest prio, switch enabled]
- app-misc/foo-1

repo B [middle prio, switch enabled]
- app-misc/foo-2

repo C [middle prio, switch disabled]
- dev-libs/libfoo-1

repo D [lowest prio, switch disabled]
- app-misc/foo-3
- dev-libs/libfoo-2


When user asks for app-misc/foo, portage will notice that repos A & B enforce repo priorities and have app-misc/foo. Therefore, only repo with the highest priority (repo A) will be considered.

When user asks for dev-libs/libfoo, portage will use the regular lookup since repos A & B don't have that package. Repo D will be used due to highest $PV.

What are your thoughts? I think the progress overlay could benefit from this one too.
Comment 1 Zac Medico gentoo-dev 2013-03-29 21:58:44 UTC
You can get similar behavior for specific packages by adding atom::repo to your world file.

It seems like giving this kind of privilege to repos could be unwanted, but I suppose the user could always override it with /etc/portage/repos.conf.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-03-29 22:08:22 UTC
(In reply to comment #1)
> You can get similar behavior for specific packages by adding atom::repo to
> your world file.

That would require keeping track of those packages, and having them all in @world.

> It seems like giving this kind of privilege to repos could be unwanted, but
> I suppose the user could always override it with /etc/portage/repos.conf.

Yes, it could. I don't mind big fat warnings or something like that. Preferably the explicit ACK on layman's side would be good.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2013-03-30 04:45:34 UTC
In Progress Overlay it is possible to use repository dependencies with REPOSITORY variable (e.g. RDEPEND="dev-libs/something::${REPOSITORY}").
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-03-30 08:18:02 UTC
(In reply to comment #3)
> In Progress Overlay it is possible to use repository dependencies with
> REPOSITORY variable (e.g. RDEPEND="dev-libs/something::${REPOSITORY}").

That doesn't help when a leaf package gets upgraded to ::gentoo.