Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sets.conf | how to reference the origin repository location?
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
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3687
Location: Rasi, Finland

PostPosted: Mon Sep 02, 2024 4:47 pm    Post subject: sets.conf | how to reference the origin repository location? Reply with quote

I have created
my-repo-root/sets.conf:
[zucca-sets]
class = portage.sets.files.StaticFileSet
multiset = true
directory = ./sets
name_pattern = ${name}-zucca
... and I have a directory sets at the repository root too.
The directory option doesn't work as intended. So I'd need to reference the repository location.
I'd guess I just need a right variable for this to work like %(REPO_LOCATION) or something like it. I just cannot find such information from portage documentation.

Any help?
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


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

PostPosted: Mon Sep 02, 2024 5:27 pm    Post subject: Reply with quote

According to the source of StaticFileSet it supports a ${repository:repository_name} variable to access the path of a named repository for both "filename" and "directory" options. There is however no way to reference the "current" repository as the sets module has no concept of that.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3687
Location: Rasi, Finland

PostPosted: Mon Sep 02, 2024 7:00 pm    Post subject: Reply with quote

Dang... So close. Although using that variable should work in almost every case.
I was hopeful and tried to use %(repo.location)s, but it resulted in error when running emerge --list-sets.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
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