Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501352 - >=sys-apps/portage-2.2.0: abort 'ebuild digest' when mirror:// is bogus with or *without* RESTRICT="mirror"
Summary: >=sys-apps/portage-2.2.0: abort 'ebuild digest' when mirror:// is bogus with ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All All
: Low minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2014-02-15 06:10 UTC by Samuli Suominen (RETIRED)
Modified: 2015-03-04 18:32 UTC (History)
0 users

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 Samuli Suominen (RETIRED) gentoo-dev 2014-02-15 06:10:56 UTC
I noticed while writing an ebuild for an tarball from sourceforge.net that if you typo'ed SRC_URI="mirror://sourceforce/foo/foo-1.2.3.tar.gz" (notice sourceforce, not sourceforge :-) the 'ebuild foo-1.2.3.ebuild digest' goes thru and tries to fetch the tarball from Gentoo mirrors silently:

$ ebuild foo-1.2.3.ebuild digest
>>> Downloading 'http://distfiles.gentoo.org/distfiles/foo-1.2.3.tar.gz'
--2014-02-15 08:00:21--  http://distfiles.gentoo.org/distfiles/foo-1.2.3.tar.gz
Resolving distfiles.gentoo.org... 140.211.166.134, 156.56.247.195, 64.50.236.52, ...
Connecting to distfiles.gentoo.org|140.211.166.134|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2014-02-15 08:00:22 ERROR 404: Not Found.

!!! Couldn't download 'foo-1.2.3.tar.gz'. Aborting.
!!! Fetch failed for foo-1.2.3.tar.gz, can't update Manifest

I couldn't notice the typing error and couldn't figure out why it wasn't fetching the tarball from sf.net normally for some minutes, and inserted RESTRICT=mirror to the ebuild for a test:

$ ebuild foo-1.2.3.ebuild digest
No known mirror by the name: sourceforce
Warning: No mirrors available for file 'foo-1.2.3.tar.gz'
!!! Fetch failed for foo-1.2.3.tar.gz, can't update Manifest

This is the output I would have expected even *without* adding the RESTRICT=mirror. As in, why let the digest go through at all if the mirror:// is not available (listed in thirdpartymirrors)?

So I'm requesting more early abortion if mirror:// is bogus
Comment 1 Sebastian Luther (few) 2014-02-15 08:09:14 UTC
Would it help you if the first line of the output be:
!!! No known mirror by the name: sourceforce
?

The problem is that the function that prints the message doesn't know if it is called by ebuild digest or by emerge. So making this fatal could be annoying for users.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2014-02-15 08:46:58 UTC
(In reply to Sebastian Luther (few) from comment #1)
> Would it help you if the first line of the output be:
> !!! No known mirror by the name: sourceforce

yes, that'd be enough

> ?
> 
> The problem is that the function that prints the message doesn't know if it
> is called by ebuild digest or by emerge. So making this fatal could be
> annoying for users.

nod
Comment 3 Sebastian Luther (few) 2014-02-15 12:42:38 UTC
I send a patch here:

http://thread.gmane.org/gmane.linux.gentoo.portage.devel/4171
Comment 4 Zac Medico gentoo-dev 2015-03-04 18:32:48 UTC
This is fixed since portage-2.2.9:

https://github.com/gentoo/portage/commit/82187903f47e3deab8dbb578eb5cd54dad0fc04a