Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 790500 - app-portage/mirrorselect should work when make.conf is a directory
Summary: app-portage/mirrorselect should work when make.conf is a directory
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-16 11:19 UTC by Einstok Fair
Modified: 2021-05-16 16:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Einstok Fair 2021-05-16 11:19:46 UTC
«If make.conf is a directory, then all the files in that directory will be sorted in lexical order by file name and summed together as if it were a single file.» - https://devmanual.gentoo.org/eclass-reference/make.conf/index.html

# mirrorselect -s 1
* Using url: https://api.gentoo.org/mirrors/distfiles.xml
* Downloading a list of mirrors...
 Got 196 mirrors.
* Using netselect to choose the top 1 mirrors...Done.

* Modifying /etc/portage/make.conf with new mirrors...
	Writing new /etc/portage/make.conf
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.8/mirrorselect", line 61, in <module>
    MirrorSelect().main(sys.argv)
  File "/usr/lib/python3.8/site-packages/mirrorselect/main.py", line 383, in main
    self.change_config(fsmirrors + urls, options.output,
  File "/usr/lib/python3.8/site-packages/mirrorselect/main.py", line 122, in change_config
    write_make_conf(self.output, config_path, var, mirror_string)
  File "/usr/lib/python3.8/site-packages/mirrorselect/configs.py", line 111, in write_make_conf
    config = open(config_path, 'w')
IsADirectoryError: [Errno 21] Is a directory: '/etc/portage/make.conf'

I need this to have several GENTOO_MIRRORS lines - one per overlay, like this:
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/"
GENTOO_MIRRORS="${GENTOO_MIRRORS} mirror://einflay"
Comment 1 Einstok Fair 2021-05-16 11:37:16 UTC
see also https://bugs.gentoo.org/790506