All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] fetch2/git.py: fix _latest_revision for local PREMIRROR
@ 2015-08-13  7:08 ` Robert Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Yang @ 2015-08-13  7:08 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 64da20b8555350e1b0d761c36499532e83ca9827:

  multilib_global.bbclass: fix PREFERRED_VERSION for cross-canadian (2015-08-12 23:51:13 -0700)

are available in the git repository at:

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

Robert Yang (1):
  fetch2/git.py: fix _latest_revision for local PREMIRROR

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

-- 
1.7.9.5



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

* [PATCH 0/1] fetch2/git.py: fix _latest_revision for local PREMIRROR
@ 2015-08-13  7:08 ` Robert Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Yang @ 2015-08-13  7:08 UTC (permalink / raw)
  To: bitbake-devel

The following changes since commit 64da20b8555350e1b0d761c36499532e83ca9827:

  multilib_global.bbclass: fix PREFERRED_VERSION for cross-canadian (2015-08-12 23:51:13 -0700)

are available in the git repository at:

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

Robert Yang (1):
  fetch2/git.py: fix _latest_revision for local PREMIRROR

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

-- 
1.7.9.5



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

* [PATCH 1/1] fetch2/git.py: fix _latest_revision for local PREMIRROR
  2015-08-13  7:08 ` Robert Yang
  (?)
@ 2015-08-13  7:08 ` Robert Yang
  2015-08-17  7:46   ` Richard Purdie
  -1 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2015-08-13  7:08 UTC (permalink / raw)
  To: bitbake-devel

- Fixed when SRCREV = "${AUTOREV}", and set BB_NO_NETWORK = "1":
$ bitbake <recipe> -ccleanall
| DEBUG: Executing python function do_cleanall
| DEBUG: Python function do_cleanall finished
| ERROR: Function failed: Network access disabled through BB_NO_NETWORK ...

- Fixed when SRCREV = "${AUTOREV}", set BB_NO_NETWORK = "1"  and use
  local PREMIRROR:
$ bitbake <recipe> -cfetchall
| DEBUG: Python function do_fetch finished
| ERROR: Function failed: Network access disabled through BB_NO_NETWORK ...

Stop running "git ls-remote" when BB_NO_NETWORK would fix the problem.

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

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 374d846..67ee107 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -350,7 +350,6 @@ class Git(FetchMethod):
         """
         Compute the HEAD revision for the url
         """
-        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]
@@ -358,6 +357,12 @@ class Git(FetchMethod):
         else:
             head = "refs/heads/%s" % ud.unresolvedrev[name]
             tag = "refs/tags/%s" % ud.unresolvedrev[name]
+        # Only ls-remote when url is "file://" or BB_NO_NETWORK != "1",
+        # this makes local mirror works.
+        if ud.proto.lower() == 'file' or d.getVar("BB_NO_NETWORK", True) != "1":
+            output = self._lsremote(ud, d, "")
+        else:
+            output = "%s %s" % (name, head)
         for s in [head, tag + "^{}", tag]:
             for l in output.split('\n'):
                 if s in l:
-- 
1.7.9.5



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

* Re: [PATCH 0/1] fetch2/git.py: fix _latest_revision for local PREMIRROR
  2015-08-13  7:08 ` Robert Yang
  (?)
  (?)
@ 2015-08-13  7:20 ` Robert Yang
  -1 siblings, 0 replies; 6+ messages in thread
From: Robert Yang @ 2015-08-13  7:20 UTC (permalink / raw)
  To: openembedded-core


Sorry, please ignore this one, wrong mailing list.

// Robert

On 08/13/2015 03:08 PM, Robert Yang wrote:
> The following changes since commit 64da20b8555350e1b0d761c36499532e83ca9827:
>
>    multilib_global.bbclass: fix PREFERRED_VERSION for cross-canadian (2015-08-12 23:51:13 -0700)
>
> are available in the git repository at:
>
>    git://git.pokylinux.org/poky-contrib rbt/auto
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=rbt/auto
>
> Robert Yang (1):
>    fetch2/git.py: fix _latest_revision for local PREMIRROR
>
>   bitbake/lib/bb/fetch2/git.py |    7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>


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

* Re: [PATCH 1/1] fetch2/git.py: fix _latest_revision for local PREMIRROR
  2015-08-13  7:08 ` [PATCH 1/1] " Robert Yang
@ 2015-08-17  7:46   ` Richard Purdie
  2015-08-17  7:52     ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2015-08-17  7:46 UTC (permalink / raw)
  To: Robert Yang; +Cc: bitbake-devel

On Thu, 2015-08-13 at 00:08 -0700, Robert Yang wrote:
> - Fixed when SRCREV = "${AUTOREV}", and set BB_NO_NETWORK = "1":
> $ bitbake <recipe> -ccleanall
> | DEBUG: Executing python function do_cleanall
> | DEBUG: Python function do_cleanall finished
> | ERROR: Function failed: Network access disabled through BB_NO_NETWORK ...
> 
> - Fixed when SRCREV = "${AUTOREV}", set BB_NO_NETWORK = "1"  and use
>   local PREMIRROR:
> $ bitbake <recipe> -cfetchall
> | DEBUG: Python function do_fetch finished
> | ERROR: Function failed: Network access disabled through BB_NO_NETWORK ...
> 
> Stop running "git ls-remote" when BB_NO_NETWORK would fix the problem.
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  bitbake/lib/bb/fetch2/git.py |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
> index 374d846..67ee107 100644
> --- a/bitbake/lib/bb/fetch2/git.py
> +++ b/bitbake/lib/bb/fetch2/git.py
> @@ -350,7 +350,6 @@ class Git(FetchMethod):
>          """
>          Compute the HEAD revision for the url
>          """
> -        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]
> @@ -358,6 +357,12 @@ class Git(FetchMethod):
>          else:
>              head = "refs/heads/%s" % ud.unresolvedrev[name]
>              tag = "refs/tags/%s" % ud.unresolvedrev[name]
> +        # Only ls-remote when url is "file://" or BB_NO_NETWORK != "1",
> +        # this makes local mirror works.
> +        if ud.proto.lower() == 'file' or d.getVar("BB_NO_NETWORK", True) != "1":
> +            output = self._lsremote(ud, d, "")
> +        else:
> +            output = "%s %s" % (name, head)
>          for s in [head, tag + "^{}", tag]:
>              for l in output.split('\n'):
>                  if s in l:

The idea is that when BB_NO_NETWORK is set, network accesses show
errors. This would stop that happening in all cases and lead to silent
failures which would be bad for user experience.

So no, this isn't an acceptable way to fix this, sorry.

Cheers,

Richard










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

* Re: [PATCH 1/1] fetch2/git.py: fix _latest_revision for local PREMIRROR
  2015-08-17  7:46   ` Richard Purdie
@ 2015-08-17  7:52     ` Robert Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Yang @ 2015-08-17  7:52 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel



On 08/17/2015 03:46 PM, Richard Purdie wrote:
> On Thu, 2015-08-13 at 00:08 -0700, Robert Yang wrote:
>> - Fixed when SRCREV = "${AUTOREV}", and set BB_NO_NETWORK = "1":
>> $ bitbake <recipe> -ccleanall
>> | DEBUG: Executing python function do_cleanall
>> | DEBUG: Python function do_cleanall finished
>> | ERROR: Function failed: Network access disabled through BB_NO_NETWORK ...
>>
>> - Fixed when SRCREV = "${AUTOREV}", set BB_NO_NETWORK = "1"  and use
>>    local PREMIRROR:
>> $ bitbake <recipe> -cfetchall
>> | DEBUG: Python function do_fetch finished
>> | ERROR: Function failed: Network access disabled through BB_NO_NETWORK ...
>>
>> Stop running "git ls-remote" when BB_NO_NETWORK would fix the problem.
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>>   bitbake/lib/bb/fetch2/git.py |    7 ++++++-
>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
>> index 374d846..67ee107 100644
>> --- a/bitbake/lib/bb/fetch2/git.py
>> +++ b/bitbake/lib/bb/fetch2/git.py
>> @@ -350,7 +350,6 @@ class Git(FetchMethod):
>>           """
>>           Compute the HEAD revision for the url
>>           """
>> -        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]
>> @@ -358,6 +357,12 @@ class Git(FetchMethod):
>>           else:
>>               head = "refs/heads/%s" % ud.unresolvedrev[name]
>>               tag = "refs/tags/%s" % ud.unresolvedrev[name]
>> +        # Only ls-remote when url is "file://" or BB_NO_NETWORK != "1",
>> +        # this makes local mirror works.
>> +        if ud.proto.lower() == 'file' or d.getVar("BB_NO_NETWORK", True) != "1":
>> +            output = self._lsremote(ud, d, "")
>> +        else:
>> +            output = "%s %s" % (name, head)
>>           for s in [head, tag + "^{}", tag]:
>>               for l in output.split('\n'):
>>                   if s in l:
>
> The idea is that when BB_NO_NETWORK is set, network accesses show
> errors. This would stop that happening in all cases and lead to silent
> failures which would be bad for user experience.

Thanks, do you have any ideas on how to fix the problem when use local
mirror for SRCREV = "${AUTOREV}" recipes, please ?

// Robert

>
> So no, this isn't an acceptable way to fix this, sorry.
>
> Cheers,
>
> Richard
>
>
>
>
>
>
>
>
>
>


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

end of thread, other threads:[~2015-08-17  7:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-13  7:08 [PATCH 0/1] fetch2/git.py: fix _latest_revision for local PREMIRROR Robert Yang
2015-08-13  7:08 ` Robert Yang
2015-08-13  7:08 ` [PATCH 1/1] " Robert Yang
2015-08-17  7:46   ` Richard Purdie
2015-08-17  7:52     ` Robert Yang
2015-08-13  7:20 ` [PATCH 0/1] " 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.