Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937054 - [guru] FAQ.md: prohibit the use of RESTRICT=mirror to skip fetching from GENTOO_MIRRORS?
Summary: [guru] FAQ.md: prohibit the use of RESTRICT=mirror to skip fetching from GENT...
Status: UNCONFIRMED
Alias: None
Product: GURU
Classification: Unclassified
Component: Other bugs (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: GURU project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-01 10:00 UTC by Lucio Sauer
Modified: 2024-08-01 19:43 UTC (History)
1 user (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 Lucio Sauer 2024-08-01 10:00:23 UTC
Several ebuilds that package FOSS programs (e.g. app-admin/chezmoi-2.49.0) set RESTRICT="mirror", presumably to force package managers to fetch the sources directly from the original location.
The FAQ.md file encourages this:
> - #### Can I use RESTRICT="mirror"?
>
> Sure, since GURU packages are not mirrored on the [Gentoo mirrors](https://devmanual.gentoo.org/general-concepts/mirrors/index.html) anyway, it makes no difference. You can use RESTRICT="mirror" to avoid unnecessary fetch attempts. This is not required by GURU nor is it prohibited, just be sure to remove it if you want to move your package to the main Gentoo repository.

I see several issues with this:
- It ignores part of the PMS' explanation of RESTRICT=mirror:
  > The package’s SRC_URI entries may not be mirrored, and mirrors should not be checked when fetching.
  Most of the time sources may very well be mirrored, we just choose not to.
- It's not applied consistently across the repo, which may leave new contributors wondering about the meaning of RESTRICT=mirror being set.
- Lastly, if we ever decide to mirror GURU sources, it'll mean extra work, the longer we allow this use case of RESTRICT=mirror to proliferate.

I suggest we encourage users to configure Portage like this...
echo 'GENTOO_MIRRORS=""' > /etc/portage/env/guru-global
echo '*/*::guru guru-global' > /etc/portage/package.env/default

... instead, amend https://wiki.gentoo.org/wiki/Project:GURU/Information_for_End_Users and remove or edit the offending FAQ section.

This solution resolves the first two issues, is not dependent on RESTRICT=mirror being set and can be overridden per package.

Reproducible: Always