Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#65343 - pacman should be able to find configs files in /etc/pacman.d/ by default

Attached to Project: Pacman
Opened by Fabian (Tids) - Saturday, 01 February 2020, 10:55 GMT
Last edited by Allan McRae (Allan) - Saturday, 01 February 2020, 11:05 GMT
Task Type Feature Request
Category General
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Very Low
Priority Low
Reported Version 5.2.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Summary and Info:
Right now, pacman uses /etc/pacman.conf as it's config file and this is fine by itself. it also creates a directory /etc/pacman.d for, where we place the mirrorlist for example.
I think pacman should also use this directory for configuration files. In order to not alter the original pacman.conf (and by this, make it non-automatic-upgradable by pacman) you could just put config files to that directory and are fine.

For example I always include to the pacman.conf

```
Include = /etc/pacman.d/*.conf
```

Because of this. I can add my repo (for software I write) to /etc/pacman.d/70-mystuff.conf, also multilib for me is enabled via /etc/pacman.d/01-mulitilib.conf
(for the numbers I use 01-10 for official Arch repos, 11-20 for configuration option (ILoveCandy and blah), >=70 for unofficial stuff. But thats just me.)

This change would make it much easier to add repos for official Arch supporters, like Mega, or sublime-text. Both of them push repos directly to pacman.conf and might not remove them in a clean way at uninstallation.


Given this change, pacman.conf could move itself then even to a "only for package-content" position, like /usr/share/pacman and admin can just fine use *.conf files on /etc/pacman.d only. But that would be at best a far-away goal, I think.
This task depends upon

Comment by Andrew Gregory (andrewgregory) - Saturday, 01 February 2020, 15:45 GMT
How would this work with the --config switch?
Comment by Eli Schwartz (eschwartz) - Saturday, 01 February 2020, 23:42 GMT
I use --config to select specific conf files in /etc/pacman.d/ which are mutually exclusive, for goals like "introspect the parabola downstream derivative repos", or "do search/upgrade operations without factoring in my custom repos". So at least I'd need to exclude this personally.

There are various common pacnew programs which can merge changes automatically for you, FWIW.
Comment by Fabian (Tids) - Sunday, 02 February 2020, 00:07 GMT
@Andrew I dont think there would be any change in --config behavior. Its really just like with Include = /etc/pacman.d/*.conf in pacman.conf. Once you switch away from pacman.conf to some own "main config" file ( --config), nothing will parse the other config files (except you want them to do)

@Eli
That shouldnt be a problem, right? You can give them a prefix that is not *.conf and they wont conflict in any way. Just like mirrorlist right now. They will still work for --config
Comment by Andrew Gregory (andrewgregory) - Sunday, 02 February 2020, 01:22 GMT
Are you suggesting that --config=/etc/pacman.conf work differently than calling pacman without --config?
Comment by Eli Schwartz (eschwartz) - Sunday, 02 February 2020, 01:26 GMT
So this is actually about adding a default Include to the vendor distributed pacman.conf? If so, it's a packaging bug.

As for changing my "prefix" I don't see why doing something ugly and unnatural to my setup and changing the *suffix* is a good solution. I'd much rather some way disable it entirely. Which not including an Include line in /etc/pacman.conf does for me, then again I don't have anything remotely close to the stock one on my system and don't want to, so I'd just ignore the resulting pacnew.

(I still don't see what's wrong with using a pacnew merging program, which you need anyway for lots of other packages.)

Loading...