Hi, On 3/31/20 9:25 PM, Alec Warner wrote: > > From thirdpartymirrors file I can see more examples... The mirror type > can be any label that I decide to use? > > > man portage(5) says: > Whenever portage encounters a mirror:// style URI it will look up the > actual hosts here. If the mirror set is not found here, it will > check the > global mirrors file at > /var/db/repos/gentoo/profiles/thirdpartymirrors. You may also set a > special mirror type called "local". This list of mirrors will be > checked before GENTOO_MIRRORS and will be used even if the package has > RESTRICT="mirror" or RESTRICT="fetch". > > We have a bunch of existing mirror types (as you noticed). This lets > us do things like "mirror://github" and then globally change the uri > for github easily without editing the entire set of ebuilds because we > late-bind the URI matching.
Ok, so it works as an alias... The format definition led me to misunderstand: > - mirror type followed by a list of hosts I interpreted mirror type as some internal definition not an alias. > > Is URI mirror:// style deprecated in ebuilds and should use > restric="mirror" instead? > > > I don't understand how you could arrive at this conclusion. What would > this do? > > RESTRICT=mirror is for things we are not legally allowed to mirror. > That's basically all its for; it has nothing to do with custom mirrors > or anything. Sorry for my dumb question, but my previous understanding of the context was that, since mirror:// is always accessed before the SRC_URI, there is no need to use mirror:// in ebuild SRC_URI, with the sources being downloaded from any available mirror (also remembering the dev manuals documentation related to mirror://gentoo policy for auto mirroring the sources). But after your explanation, I understand now that mirror types provides alias to use in ebuild SRC_URI, specially useful for the update task (awesome). Looking into overlay context, I think that I could add thirpartymirrors file inside overlay profiles directory to use mirror://<alias> in SRC_URI to simplify ebuild URI management in the end. For example, to all JetBrains software this will be awesome. Thanks, Samuel
signature.asc
Description: OpenPGP digital signature