FS#25568 - support listing expanded directory names
Attached to Project:
Pacman
Opened by Dieter Plaetinck (Dieter_be) - Sunday, 14 August 2011, 09:37 GMT
Last edited by Eli Schwartz (eschwartz) - Friday, 09 February 2018, 06:45 GMT
Opened by Dieter Plaetinck (Dieter_be) - Sunday, 14 August 2011, 09:37 GMT
Last edited by Eli Schwartz (eschwartz) - Friday, 09 February 2018, 06:45 GMT
|
Details
I would like a pacman option that outputs all expanded,
defined repositories.
It's easier to explain with an example: If you have this config: [core] /repo/$repo/$arch [testing] /somedir/$repo/$arch [community] Include = /etc/pacman.d/mirrorlist I want something like: $ pacman --listrepos core /repo/core/i686 testing /somedir/testing/i686 community /etc/pacman.d/mirrorlist Why? In AIF i track repositories in their unexpanded form (with variables, so that pacman can expand them correctly), but in AIF I also need to configure CacheDirs for pacman, in which these variables make no sense, so I want the expanded forms. |
This task depends upon
Closed by Eli Schwartz (eschwartz)
Friday, 09 February 2018, 06:45 GMT
Reason for closing: Implemented
Additional comments about closing: https://git.archlinux.org/pacman.git/com mit/?id=170bb80a1f8a020595738c7febdb15c6 8574ce29
Friday, 09 February 2018, 06:45 GMT
Reason for closing: Implemented
Additional comments about closing: https://git.archlinux.org/pacman.git/com mit/?id=170bb80a1f8a020595738c7febdb15c6 8574ce29
Wouldn't we also want to recursively expand the Include if we are going to expand the variables?
Finally, you're conflating servers with directories with repositories here- it seems like you are asking for a way to get expanded server URLs for all repositories- is that correct? And finally, I'm not following your CacheDirs logic, but I don't think that has much to do with the actual feature request here so no worries.
[core]
Server = /repo/$repo/$arch
[testing]
Server = /somedir/$repo/$arch
[community]
Include = /etc/pacman.d/mirrorlist
I know this is often not the recommended approach, but it is technically possible to combine local and remote repositories, and it can make sense (if the user knows what he's doing and for example created the local or remote repository himself)
There are no multiple servers and/or includes per [repo] section.
As for the CacheDirs: this is for archiso images: I need to know all actual directory names for all local repositories (like /repo/$repo/$arch), so they can be used as cachedirs (the package files are in there already, might as well use them as read only cache, with 1 extra cachedir for all files not found in local repositories). And it's cleaner to let pacman expand the $repo and $arch variables rather then trying to do it in AIF.
I didn't think about expanding the Includes at first but you're right that it would be more consistent.
Maybe an output format like this?:
core Server /repo/core/i686
testing Server /somedir/testing/i686
community Include /etc/pacman.d/mirrorlist http://mirrors.kernel.org/archlinux/community/os/i686 [,*more repository locations could go here, depending on what's uncommented in /etc/pacman.d/mirrrolist*]
```
$ pacman-conf --repo extra Server
http://mirror.lty.me/archlinux/extra/os/x86_64
http://mirrors.rit.edu/archlinux/extra/os/x86_64
http://mirror.epiphyte.network/archlinux/extra/os/x86_64
http://arch.mirror.square-r00t.net/extra/os/x86_64
http://mirror.f4st.host/archlinux/extra/os/x86_64
http://mirror.metalgamer.eu/archlinux/extra/os/x86_64
```