Bug 13353 - bitbake git fetcher does not honour BB_FETCH_PREMIRRORONLY
Summary: bitbake git fetcher does not honour BB_FETCH_PREMIRRORONLY
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.7
Hardware: All Multiple
: Medium+ normal
Target Milestone: 4.1 M1
Assignee: Pavel Zhukov
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-05-16 20:31 UTC by Adrian Bunk
Modified: 2022-06-09 06:56 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
package.json (330 bytes, application/json)
2019-06-21 07:00 UTC, Kristupas Savickas
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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