Bug 13353

Summary: bitbake git fetcher does not honour BB_FETCH_PREMIRRORONLY
Product: [Build System, Metadata & Runtime] BitBake Reporter: Adrian Bunk <bunk>
Component: bitbakeAssignee: Pavel Zhukov <pavel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: akuster, kristupas.savickas, liezhi.yang, pavel, poky.bs.watcher, poky.watcher, randy.macleod, richard.purdie
Version: 2.7   
Target Milestone: 4.1 M1   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
package.json none

Description Adrian Bunk 2019-05-16 20:31:35 UTC
With BB_FETCH_PREMIRRORONLY set:

If there is no tarball of the git repo on the premirror, then a normal download from upstream is performed.

IF there is an outdated git tarball that does not contain the wanted revision on the premirror, then upstream is added as branch and fetched from.

Neither of these should happen with BB_FETCH_PREMIRRORONLY, both cases should result in fetch failures just as happens for tarballs.

This bug makes it pretty hard to ensure that a local premirror contains all the sources so that images can still be rebuilt years or decades later.
Comment 1 Richard Purdie 2019-05-21 22:09:35 UTC
The email:

From:	richard.purdie@linuxfoundation.org
To:	Robert Yang <liezhi.yang@windriver.com>, bitbake-devel@lists.openembedded.org
Subject:	Re: [bitbake-devel] [PATCH 2/2] fetch2: Unify BB_FETCH_PREMIRRORONLY
Date:	Fri, 22 Mar 2019 11:18:38 +0000

has some further background on this issue, its one we never quite got resolved.
Comment 2 Kristupas Savickas 2019-06-21 07:00:06 UTC
Created attachment 4533 [details]
package.json
Comment 3 Kristupas Savickas 2019-06-21 07:00:43 UTC
Sorry, this got attached to the wrong issue.
Comment 4 Randy MacLeod 2019-08-15 15:27:57 UTC
Armin can't get to this so I've asked Robert to do so for M4.
Comment 5 Pavel Zhukov 2022-06-09 06:56:05 UTC
This should be fixed in: https://git.openembedded.org/bitbake/commit/?id=b47ecab3e3aad5c5c376ec023aa82a51aa0f3b86

In case if expected revision is missed in the mirror and BB_FETCH_PREMIRRORONLY is set NetworkAccess exception is raised