Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 371413 - [Future EAPI] Allow selective fetch restriction
Summary: [Future EAPI] Allow selective fetch restriction
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: PMS/EAPI
URL:
Whiteboard: feasible-for-next-eapi
Keywords:
Depends on:
Blocks: future-eapi
  Show dependency tree
 
Reported: 2011-06-13 12:15 UTC by Justin Lecher
Modified: 2019-09-29 09:43 UTC (History)
4 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 Justin Lecher gentoo-dev 2011-06-13 12:15:35 UTC
If fetch restriction is turned on, but we provide additional "free" files like patches icons etc. we have a problem. It would be nice if the "free" part could be fetched directly and only the non-free part has to fetch by the user.
Comment 1 Zac Medico gentoo-dev 2011-06-13 12:38:03 UTC
It's worth noting that portage already supports this for files that have mirror:// in SRC_URI. Aside from that, we'll need an EAPI bump in order to add syntax extensions to SRC_URI.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-06-13 17:54:05 UTC
Could you point us to an example ebuild which would use this?
Comment 3 Justin Lecher gentoo-dev 2011-06-13 17:56:27 UTC
sci-chemistry/vmd

I placed the files on our miror, but if I want to put them on my devspace it fails.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-09-08 18:34:33 UTC
Given that we don't have Exherbo annotations in SRC_URI, what syntax would we use for this?
Comment 5 Ulrich Müller gentoo-dev 2017-12-07 14:42:50 UTC
(In reply to Michał Górny from comment #4)
> Given that we don't have Exherbo annotations in SRC_URI, what syntax would
> we use for this?

A possible syntax was suggested in this thread:
https://archives.gentoo.org/gentoo-dev/message/b0823618d5d3cc61bbed1e88dc2f144d

Especially:
https://archives.gentoo.org/gentoo-dev/message/57393f180e7c0236d635860cfa6af2e7

In a nutshell:
- mirror+http: (or mirror+ftp: etc.) ignore mirror restriction for this file,
- fetch+http: ignore fetch restriction for this file.

(Is there an actual use case for the second one, though? I cannot come up with an example where we would want to lift fetch restriction for a specific tarball, but keep mirror restriction for it.)
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-09-28 17:56:07 UTC
(In reply to Ulrich Müller from comment #5)
> In a nutshell:
> - mirror+http: (or mirror+ftp: etc.) ignore mirror restriction for this file,
> - fetch+http: ignore fetch restriction for this file.
> 
> (Is there an actual use case for the second one, though? I cannot come up
> with an example where we would want to lift fetch restriction for a specific
> tarball, but keep mirror restriction for it.)

Wouldn't that be a case if an ebuild used three components, one free, one proprietary disallowing mirroring, and third that needed to be fetched manually? ;-)
Comment 7 Ulrich Müller gentoo-dev 2019-09-29 09:43:28 UTC
(In reply to Michał Górny from comment #6)
> > - mirror+http: (or mirror+ftp: etc.) ignore mirror restriction for this file,

Actually, mirror+ would imply that both fetch and mirror restrictions are ignored.

> > - fetch+http: ignore fetch restriction for this file.
> > 
> > (Is there an actual use case for the second one, though? I cannot come up
> > with an example where we would want to lift fetch restriction for a specific
> > tarball, but keep mirror restriction for it.)
> 
> Wouldn't that be a case if an ebuild used three components, one free, one
> proprietary disallowing mirroring, and third that needed to be fetched
> manually? ;-)

The two typical scenarios are RESTRICT="mirror" plus some free files (appearing as "mirror+..." in SRC_URI), or RESTRICT="fetch" plus free files (again, "mirror+..." in SRC_URI).

I think there aren't many use cases (if any) for RESTRICT="fetch" plus some files that are mirror (but not fetch) restricted. OTOH, having both fetch+ and mirror+ will just make things error prone.