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.
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.
FS#23110 - A different pacman --config, points to a wrong mirrolist file
Attached to Project:
Pacman
Opened by M Carreira Silva (mcsilva) - Wednesday, 02 March 2011, 23:34 GMT
Last edited by Allan McRae (Allan) - Friday, 19 January 2018, 04:20 GMT
Opened by M Carreira Silva (mcsilva) - Wednesday, 02 March 2011, 23:34 GMT
Last edited by Allan McRae (Allan) - Friday, 19 January 2018, 04:20 GMT
|
DetailsSummary and Info:
When using "pacman --config" pointing to another pacman.conf, the pacman.d/mirrorlist file used, is not the one expected to be, but the default /etc/pacman.d/mirrorlist. Steps to Reproduce: Mount a disk with another arch system in /mnt/disk/, and try to install a package in it: # pacman --debug --config /mnt/disk/etc/pacman.conf --root /mnt/disk/ -S somepackage Reading the debug output, one can confirm that /mnt/disk/etc/pacman.conf is not using /mnt/disk/etc/pacman.d/mirrorlist file as it would be expected, but it's using /etc/pacman.d/mirrorlist file (which is the absolute path described in pacman.conf) This can be a tricky situation if someone is not aware of it. I think that "pacman --config" should take care of path in pacman.conf Include options, and consider them as relative path. |
This task depends upon
Closed by Allan McRae (Allan)
Friday, 19 January 2018, 04:20 GMT
Reason for closing: Implemented
Additional comments about closing: --sysroot added in fae33a1faf3f
Friday, 19 January 2018, 04:20 GMT
Reason for closing: Implemented
Additional comments about closing: --sysroot added in fae33a1faf3f
# pacman --debug --root /mnt/disk --dbpath /var/lib/pacman -Q | less
Then you can include also --cachedir, --config, --logfile with the values we want and watch the output.
We always get this line:
debug: config: finished parsing /etc/pacman.d/mirrorlist
So mirrorlist file is never changed.
First, --config is completely different than any of the rest of the options. Unfortunately this is not documented clearly enough in the manpage, but notice the wording under --root:
-r, --root <'path'>
Specify an alternative installation root (default is ‘`/''). This should not be used as a way to install software into
``/usr/local’' instead of “/usr”. This option is used if you want to install a package on a temporary mounted partition which is
"owned" by another system. NOTE: if database path or logfile are not specified on either the command line or in pacman.conf(5),
their default location will be inside this root path.
It does *not* include --config, and for good reason- the config file path has to be done before anything else, and thus can't use information from anywhere else. Why would I point it to a config in one place and expect it to go chasing files elsewhere? What do I do if I specify a root on the command line vs. in the config file? Which do I prefer over the other? What if an Include comes both before and after a DBPath option?
The only thing that needs doing here is better documentation.
This is the point! But is what pacman is doing actually!
If I try to install something in a second disk(other mountpoint/other system), with a config file in that second disk, why is pacman using mirrorlist from the first disk?
You failed to address any of the "when do we resolve path X" questions I asked in my previous comment, so without doing that, I don't know what you want. Patches welcome.