You are not logged in.
I have an idea of how repo management on Arch could be improved.
Parsing pacman.conf from a script to add/remove or enable/disable repos is no fun
Rather than having a list of repos in pacman.conf, repos could be stored
in individual .repo files in /etc/pacman.d/repos/available/.
Symlinks would be created in /etc/pacman.d/repos/active/ pointing to .repo files in 'available'.
Repos would be ordered similar to udev rules:
10_kde-unstable.repo
20_gnome-unstable.repo
30_testing.repo
40_core.repo
50_extra.repo
60_community-testing.repo
70_community.repo
80_multilib-testing.repo
90_multilib.repo
Example .repo files:
50_extra.repo:
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
Architecture = Both
90_multilib.repo:
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
# This would allow pacman to silently ignore an enabled repo if the architecture is unsupported
Architecture = x86_64
Benefits:
Ability to add/remove repos by copying files into 'available' directory
Ability to enable/disable repos by using symlinks in 'active'
Possibility of adding dbus api and/or shell script to add/remove/reorder repos
No more parsing pacman.conf to add/remove repos via script
Shorter pacman.conf
Drawbacks:
Don't see any. Well, ok, it increases pacman's code complexity.
What are people's thoughts on this?
Last edited by techryda (2012-10-01 10:19:10)
Offline
Do people have that many repos to manage that this actually becomes an advantage?
I do see how this could be great to use with scripts to manage the config file. Like systemctl to add/remove deamons, you could have another tool to manage repos. Nice idea anyways.
Last edited by thoho180192 (2012-10-01 08:26:53)
Offline
It's not that editing pacman.conf by hand is a hassle but I sometimes have cause to add / remove repos
via a script and parsing pacman.conf to do that is a hassle IMHO. I'm all for human editable text files for
configuring linux apps/services but they should also be scriptable
I'm a big fan of udev, systemd, etc which all seem to have found the right mix of human editable, easily scriptable
configuration interfaces. I think it would be a nice option for Arch going forward.
Offline
I like the idea, and I dont see that it will be any more complicated for the user to manage pacman. Thats the inportant aspect in my opinion. I dont like it if its going to be impossible for the user to actually understand what is going on.
I wonder what other peoples thought are thoug.
Offline
I don't think it's hard to understand or interact with at all. Definately not any harder than it is to work with udev or systemd.
And...this is Arch. We're a community of reasonably competent users or ambitious new users with a desire to learn
and we have a wiki to assist.
Offline
So if suddenly I want to point at a different config with different repos enabled for the purposes of maintaining chroots, how do you propose I do this?
I think a more natural way to extend this would be to introduce an IncludeDir directive in the current config.
Offline
Good point! I hadn't considered that and I should have because I use that functionality often.
I like your suggestion, it's the best of both worlds.
Offline
So, a default install would have the following "template" repos in a repo/template directory?
30_testing.repo
40_core.repo
50_extra.repo
60_community-testing.repo
70_community.repo
80_multilib-testing.repo [64-bit only]
90_multilib.repo [64-bit only]
And the following repos (copies of the above) would be in a repo/active directory?
40_core.repo
50_extra.repo
70_community.repo
With a RepoDir= line in pacman.conf
I like it!
Note: I'm not married to the names/locations of the repo dirs, just using them as examples.
Last edited by techryda (2012-10-01 11:26:42)
Offline
So, @falconindy, how do I file an 'official' feature request for this?
Do I bring it up on the mailing list, file a bug?
Thanks.
Offline
Bugtracker I think
Offline
Added feature request, please vote if you're interested.
Edit: oops, posted link to the wrong bug (fixed)
Last edited by techryda (2012-10-01 15:18:56)
Offline
Maybe having multiple pacman.conf files would solve it as well (until IncludeDir that falconindy mentioned gets implemented :-) ).
Consider two config files: the regular pacman.conf and pacmantesting.conf. The difference is the latter has testing repos uncommented. You can use it like this:
pacman --config /etc/pacmantesting.conf -Syu
Offline