Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fallback repo in case of missing overlay?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
z4
n00b
n00b


Joined: 21 Jul 2019
Posts: 19

PostPosted: Wed Mar 25, 2020 6:16 pm    Post subject: Fallback repo in case of missing overlay? Reply with quote

Is there a way to set up repositories in a way that would "fallback" to the ::gentoo repo if I don't have an overlay repo present?

For instance, if I do
Code:
emerge app-admin/rasdaemon:0::my_repo

but ::my_repo isn't present, is there a way to configure make.conf or repos.d to fallback and do
Code:
emerge app-admin/rasdaemon:0

automatically instead?

Thanks...
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24023
Location: here

PostPosted: Wed Mar 25, 2020 7:21 pm    Post subject: Reply with quote

Portage already already works that way. You can change repository priority
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
z4
n00b
n00b


Joined: 21 Jul 2019
Posts: 19

PostPosted: Wed Mar 25, 2020 7:47 pm    Post subject: Reply with quote

Yes, but not quite what I meant. To build on my previous example, I don't even have a /etc/portage/repos.d/my_repo.conf file, which of course results in an error:
Code:

emerge: there are no ebuilds to satisfy "app-admin/rasdaemon:0::my_repo"


So its not that my package's ebuild doesn't exist in a particular repo, but rather the entire repo is absent, along with any .conf relating to it. So it's not as simple as that, AFAIK...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15294

PostPosted: Thu Mar 26, 2020 2:18 am    Post subject: Reply with quote

Why are you specifying a repository qualifier if you want Portage to be able to pick from a repository other than the one specified? Leave out the repository qualifier and rely on repository priority to prefer the overlay over the main tree.
Back to top
View user's profile Send private message
z4
n00b
n00b


Joined: 21 Jul 2019
Posts: 19

PostPosted: Fri Mar 27, 2020 5:36 pm    Post subject: Reply with quote

Thank you for the response. I guess the framing of my question isn't really clear, so to answer your question, if I don't specify the ::my_repo specifier, what happens is portage picks the "best" version of the ebuild available. In my case, I have a local modification to the package that I want to keep, when the repo is present. I do different builds, and have scripts to run a lot of this, so I'm just using command-line examples for simplicity.

In other words, I have

=app-admin/rasdaemon-0.6.4::my_repo

and

=app-admin/rasdaemon-0.6.5::gentoo

If I don't specify ::my_repo, the 0.6.5 version from ::gentoo is emerged, _even when_ ::my_repo is present _and_ had higher priority. I don't know if this is a bug or a known behavior. On the other hand, if I do specify ::my_repo, but it's in a build where ::my_repo isn't present, I get an error.

So is there a way to configure priorities/repos. so that ::my_repo is picked even when there is a "better" version in ::gentoo, and done in a way that if ::my_repo is not present, ::gentoo is used? Sorry I wasn't clear earlier.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24023
Location: here

PostPosted: Fri Mar 27, 2020 6:00 pm    Post subject: Reply with quote

z4 wrote:
If I don't specify ::my_repo, the 0.6.5 version from ::gentoo is emerged, _even when_ ::my_repo is present _and_ had higher priority. I don't know if this is a bug or a known behavior. On the other hand, if I do specify ::my_repo, but it's in a build where ::my_repo isn't present, I get an error.

No it isn't a bug portage try to update to latest version possible regardless overlay.

z4 wrote:
So is there a way to configure priorities/repos. so that ::my_repo is picked even when there is a "better" version in ::gentoo, and done in a way that if ::my_repo is not present, ::gentoo is used? Sorry I wasn't clear earlier.

I don't think there is a way for your scenario, but I could be wrong
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 18434

PostPosted: Sat Mar 28, 2020 2:19 am    Post subject: Reply with quote

In the repo, try putting in my_repo/profiles/package.mask/ any packages that exist in my_repo but add ::gento.

So for example, you might put in my_repo/profiles/package.mask/block_packages_in_repo_gentoo
app-admin/rasdaemon::gentoo

That would require updating any time a packages was added or removed from my_repo, but it might help get closer to what you're trying to accomplish, as when my_repo was not present, the mask of ::gentoo would not be in place.

If not, then you may have to do that in /etc/portage/package.mask instead, which would have to change if my_repo wasn't present. Maybe something that managed a symbolic link if the repo was available?
_________________
The media sells it and you live the role.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3653
Location: Illinois, USA

PostPosted: Sat Mar 28, 2020 2:57 am    Post subject: Reply with quote

An example with explanatory note, excerpted from my package.mask
Code:
#mate is entirely supported out of oldgentoo
mate-base/mate::gentoo
mate-base/mate-applets-meta::gentoo
mate-base/mate-applets::gentoo
mate-base/mate-panel::gentoo
mate-base/mate-session-manager::gentoo
mate-base/mate-session-manager::gentoo
mate-extra/mate-media::gentoo
mate-extra/mate-screensaver::gentoo
mate-extra/mate-sensors-applet::gentoo
x11-misc/mozo::gentoo


Warning. I (you!) am responsible for maintenance on those overlay packages including updating the EAPI
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6480

PostPosted: Sat Mar 28, 2020 3:13 am    Post subject: Reply with quote

Create a file in $overlay/profiles/sets/ containing the packages you want, *with* the repo specifier. Symlink that to /etc/portage/sets/ and add it to world_sets.
Add the package name *without* the repo specifier to the world file.
When the overlay exists, the set will override the world file entry. When it doesn't exist, the symlink will be broken (portage won't report an error for this) and it'll use the world entry instead.
Back to top
View user's profile Send private message
z4
n00b
n00b


Joined: 21 Jul 2019
Posts: 19

PostPosted: Sat Mar 28, 2020 6:24 pm    Post subject: Reply with quote

Thanks everyone for the ideas. Looks like there's some potential to accomplish this. I'll try implementing the suggestions and post back with results.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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