Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 640538 - games-action/descent1-data: fetch failure (missing RESTRICT=mirror?)
Summary: games-action/descent1-data: fetch failure (missing RESTRICT=mirror?)
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 687024
  Show dependency tree
 
Reported: 2017-12-10 16:21 UTC by Michał Górny
Modified: 2019-05-30 18:20 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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-12-10 16:21:21 UTC
Not sure why repoman attempts to fetch this file from our mirrors, CC-ing dev-portage@.

>>> Downloading 'http://ftp.fi.muni.cz/pub/linux/gentoo/distfiles/setup_descent_2.1.0.8.exe'
--2017-12-10 17:17:53--  http://ftp.fi.muni.cz/pub/linux/gentoo/distfiles/setup_descent_2.1.0.8.exe
Resolving ftp.fi.muni.cz (ftp.fi.muni.cz)... 147.251.48.205, 2001:718:801:230::cd
Connecting to ftp.fi.muni.cz (ftp.fi.muni.cz)|147.251.48.205|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-12-10 17:17:54 ERROR 404: Not Found.

!!! Couldn't download 'setup_descent_2.1.0.8.exe'. Aborting.
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2017-12-10 16:43:06 UTC
I don't think repoman looks at the RESTRICT variable for this. If the source is not found in distfiles, then it tries to download it normally mirrors first. 

RESTRICT="bindist !cdinstall? ( fetch )"

So either run a regex on the RESTRICT variable looking for fetch in any way or using more portage api code top parse the restrict state.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-12-10 16:48:26 UTC
Couldn't it just skip plain filenames in SRC_URI?
Comment 3 Zac Medico gentoo-dev 2017-12-10 21:09:00 UTC
The digestgen function is too greedy about fetching files here:

	if required_hash_types.difference(myhashes):
		missing_files.append(myfile)

Once it decides to fetch a file there, it's going to report an error if the file fails to fetch.
Comment 4 Zac Medico gentoo-dev 2017-12-10 21:16:30 UTC
The digestgen function became too greedy in this hunk from commit e1de82ebe6ef2dbaab7b56bcf2bb6ff75743a000:

@@ -72,7 +72,7 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None):
                # exist before and after the transition.
                required_hash_types = set()
                required_hash_types.add("size")
-               required_hash_types.add(MANIFEST2_REQUIRED_HASH)
+               required_hash_types.update(repo_required_hashes)
Comment 5 Zac Medico gentoo-dev 2017-12-10 21:27:11 UTC
(In reply to Zac Medico from comment #4)
> The digestgen function became too greedy in this hunk from commit
> e1de82ebe6ef2dbaab7b56bcf2bb6ff75743a000:
> 
> @@ -72,7 +72,7 @@ def digestgen(myarchives=None, mysettings=None,
> myportdb=None):
>                 # exist before and after the transition.
>                 required_hash_types = set()
>                 required_hash_types.add("size")
> -               required_hash_types.add(MANIFEST2_REQUIRED_HASH)
> +               required_hash_types.update(repo_required_hashes)

Actually, I just checked and repo_required_hashes only contains SHA512 here, which is good. @mgorny, how did you trigger the fetch? Did you remove the existing Manifest file or DIST entry?
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-12-10 22:22:45 UTC
I've changed required-hashes to force it to update everything. So attempting to fetch distfiles for this package was fully desired.

However, this is not the same behavior as Portage exhibited for other fetch-restricted packages (in which case it didn't attempt fetching from mirrors).