All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] fetch2/git.py:_latest_revision: respect BB_FETCH_PREMIRRORONLY
@ 2016-01-07  7:38 Robert Yang
  2016-01-07  7:38 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Yang @ 2016-01-07  7:38 UTC (permalink / raw)
  To: bitbake-devel

The following changes since commit f8185ff9f8ac697733b41f023cb3a4b98b2f823f:

  bitbake: ast: Add filename/lineno to mapped functions (2016-01-06 15:27:35 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib rbt/fetcher
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=rbt/fetcher

Robert Yang (1):
  fetch2/git.py:_latest_revision: respect BB_FETCH_PREMIRRORONLY

 bitbake/lib/bb/fetch2/git.py |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] fetch2/git.py:_latest_revision: respect BB_FETCH_PREMIRRORONLY
  2016-01-07  7:38 [PATCH 0/1] fetch2/git.py:_latest_revision: respect BB_FETCH_PREMIRRORONLY Robert Yang
@ 2016-01-07  7:38 ` Robert Yang
  2016-01-07 13:56   ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Yang @ 2016-01-07  7:38 UTC (permalink / raw)
  To: bitbake-devel

Fixed when use a local BB_FETCH_PREMIRRORONLY for AUTOREV recipes:
SRCREV = "${AUTOREV}"
BB_NO_NETWORK = "1"
For example, the refpolicy-mls from meta-selinux:
$ bitbake refpolicy-mls -ccleanall/fetch

Log data follows:
| DEBUG: Executing python function do_cleanall
| DEBUG: Python function do_cleanall finished
| ERROR: Function failed: Network access disabled through BB_NO_NETWORK (or set indirectly due to use of BB_FETCH_PREMIRRORONLY) but access requested with command git -c core.fsyncobjectfiles=0 ls-remote git://github.com/TresysTechnology/refpolicy.git  (for url None)
ERROR: Task 3 (/path/to/meta-selinux/recipes-security/refpolicy/refpolicy-mls_git.bb, do_cleanall) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4 tasks of which 0 didn't need to be rerun and 1 failed.

Check BB_FETCH_PREMIRRORONLY before ls-remote will fix the problem.

[YOCTO #8893]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/fetch2/git.py |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 5ffab22..7f7296f 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -356,7 +356,10 @@ class Git(FetchMethod):
         """
         Compute the HEAD revision for the url
         """
-        output = self._lsremote(ud, d, "")
+        if d.getVar("BB_FETCH_PREMIRRORONLY", True) and ud.proto != "file":
+            return "HEAD"
+        else:
+            output = self._lsremote(ud, d, "")
         # Tags of the form ^{} may not work, need to fallback to other form
         if ud.unresolvedrev[name][:5] == "refs/":
             head = ud.unresolvedrev[name]
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] fetch2/git.py:_latest_revision: respect BB_FETCH_PREMIRRORONLY
  2016-01-07  7:38 ` [PATCH 1/1] " Robert Yang
@ 2016-01-07 13:56   ` Richard Purdie
  2016-01-08  6:14     ` Robert Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2016-01-07 13:56 UTC (permalink / raw)
  To: Robert Yang, bitbake-devel

On Wed, 2016-01-06 at 23:38 -0800, Robert Yang wrote:
> Fixed when use a local BB_FETCH_PREMIRRORONLY for AUTOREV recipes:
> SRCREV = "${AUTOREV}"
> BB_NO_NETWORK = "1"
> For example, the refpolicy-mls from meta-selinux:
> $ bitbake refpolicy-mls -ccleanall/fetch


This test case is incorrect, you shouldn't set BB_NO_NETWORK if you
want to BB_FETCH_PREMIRRORONLY...

Cheers,

Richard


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] fetch2/git.py:_latest_revision: respect BB_FETCH_PREMIRRORONLY
  2016-01-07 13:56   ` Richard Purdie
@ 2016-01-08  6:14     ` Robert Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Yang @ 2016-01-08  6:14 UTC (permalink / raw)
  To: Richard Purdie, bitbake-devel



On 01/07/2016 09:56 PM, Richard Purdie wrote:
> On Wed, 2016-01-06 at 23:38 -0800, Robert Yang wrote:
>> Fixed when use a local BB_FETCH_PREMIRRORONLY for AUTOREV recipes:
>> SRCREV = "${AUTOREV}"
>> BB_NO_NETWORK = "1"
>> For example, the refpolicy-mls from meta-selinux:
>> $ bitbake refpolicy-mls -ccleanall/fetch
>
>
> This test case is incorrect, you shouldn't set BB_NO_NETWORK if you
> want to BB_FETCH_PREMIRRORONLY...

Sorry, I'm a little confused about this, the PREMIRROR can be on local
disk, so I think that we can set both BB_NO_NETWORK and BB_FETCH_PREMIRRORONLY ?

The commit message isn't correct enough, it should be:
"Fixed when use a local PREMIRROR for AUTOREV recipes"

// Robert

>
> Cheers,
>
> Richard
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-08  6:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-07  7:38 [PATCH 0/1] fetch2/git.py:_latest_revision: respect BB_FETCH_PREMIRRORONLY Robert Yang
2016-01-07  7:38 ` [PATCH 1/1] " Robert Yang
2016-01-07 13:56   ` Richard Purdie
2016-01-08  6:14     ` Robert Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.