Skip to contentSkip to conversation

Small fixes for fetch2

PATCH Applied Martin Jansa 2 participants 9 messages Sep 16, 2011 – Sep 19, 2011

lore
Share & tools
lore
#0 lore raw

cover Small fixes for fetch2

The following changes since commit 2d5c71ae78b13e935548fe6ff5174b1c09b3077d:

fetch2: export LD_LIBRARY_PATH (2011-09-16 09:27:12 +0200)

are available in the git repository at:
git://gitorious.org/shr/bitbake jansa/pull

Martin Jansa (3):
fetch2/git: fix typo logggin/logger
fetch2/git: be more carefull in _contains_ref when checking git log
output
fetch2: export LD_LIBRARY_PATH

 lib/bb/fetch2/__init__.py |    2 +-
 lib/bb/fetch2/git.py      |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.6.1
#1 lore raw

PATCH 1/3 fetch2/git: fix typo logggin/logger

---
 lib/bb/fetch2/git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/fetch2/git.py +1 -1
index 9a578ae..26236b8 100644
@@ -280,7 +280,7 @@ class Git(FetchMethod):
         # Check if we have the rev already
 
         if not os.path.exists(ud.clonedir):
-            logging.debug("GIT repository for %s does not exist in %s.  \
+            logger.debug(1, "GIT repository for %s does not exist in %s.  \
                           Downloading.", url, ud.clonedir)
             self.download(None, ud, d)
             if not os.path.exists(ud.clonedir):
Signature · 1 line
1.7.6.1
#2 lore raw

PATCH 2/3 fetch2/git: be more carefull in _contains_ref when checking git log output

* in some cases there could be output like this
ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded: ignored. before wc -l output and returned 'output.split()[0] != 0' is always True

---
 lib/bb/fetch2/git.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
lib/bb/fetch2/git.py +4 -1
index 26236b8..4a4c30d 100644
@@ -239,7 +239,10 @@ class Git(FetchMethod):
 
     def _contains_ref(self, tag, d):
         basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
-        output = runfetchcmd("%s log --pretty=oneline -n 1 %s -- 2> /dev/null | wc -l" % (basecmd, tag), d, quiet=True)
+        cmd = "%s log --pretty=oneline -n 1 %s -- 2> /dev/null | wc -l" % (basecmd, tag)
+        output = runfetchcmd(cmd, d, quiet=True)
+        if len(output.split()) > 1:
+            raise bb.fetch2.FetchError("The command '%s' gave output with more then 1 line unexpectedly, output: '%s'" % (cmd, output))
         return output.split()[0] != "0"
 
     def _revision_key(self, url, ud, d, name):
Signature · 1 line
1.7.6.1
#3 lore raw

Re: [PATCH 2/3] fetch2/git: be more carefull in _contains_ref when checking git log output

Quoted 8 lines · Martin Jansa

* in some cases there could be output like this
ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded: ignored. before wc -l output and returned 'output.split()[0] != 0' is always True

---
 lib/bb/fetch2/git.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard

#4 lore raw

PATCH 3/3 fetch2: export LD_LIBRARY_PATH

In reply to Martin Jansa

* in some cases git calls omits extra output like this
ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded: ignored. and because runfetchcmd redirects stderr to stdout it ends in output which we're parsing ie in _contains_ref

---
 lib/bb/fetch2/__init__.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/fetch2/__init__.py +1 -1
index f6fa46c..8a8a636 100644
@@ -385,7 +385,7 @@ def runfetchcmd(cmd, d, quiet = False, cleanup = []):
     exportvars = ['PATH', 'GIT_PROXY_COMMAND', 'GIT_PROXY_HOST',
                   'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy',
                   'https_proxy', 'no_proxy', 'ALL_PROXY', 'all_proxy',
-                  'SSH_AUTH_SOCK', 'SSH_AGENT_PID', 'HOME']
+                  'SSH_AUTH_SOCK', 'SSH_AGENT_PID', 'HOME', 'LD_LIBRARY_PATH']
 
     for var in exportvars:
         val = bb.data.getVar(var, d, True)
Signature · 1 line
1.7.6.1
#5 lore raw
In reply to Martin Jansa
Quoted 13 lines · Martin Jansa

The following changes since commit 2d5c71ae78b13e935548fe6ff5174b1c09b3077d:

fetch2: export LD_LIBRARY_PATH (2011-09-16 09:27:12 +0200)

are available in the git repository at:
git://gitorious.org/shr/bitbake jansa/pull

Martin Jansa (3):
fetch2/git: fix typo logggin/logger
fetch2/git: be more carefull in _contains_ref when checking git log
output
fetch2: export LD_LIBRARY_PATH

Quoted 3 lines
 lib/bb/fetch2/__init__.py |    2 +-
 lib/bb/fetch2/git.py      |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

Hi,

Is there any reason why this wasn't merged and this
http://git.openembedded.org/cgit.cgi/bitbake/commit/?id=38a598731b49c8a0ba0ede570adc33eb1e848235
was merged instead?

Notice missing debug level as first param..

Regards,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#6 lore raw

PATCH 1/1 fetch2/git: fix logger.debug

* logging/logger typo was fixed in 38a598731b49c8a0ba0ede570adc33eb1e848235 but debug level is still missing

---
 lib/bb/fetch2/git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/fetch2/git.py +1 -1
index 275536f..26236b8 100644
@@ -280,7 +280,7 @@ class Git(FetchMethod):
         # Check if we have the rev already
 
         if not os.path.exists(ud.clonedir):
-            logger.debug("GIT repository for %s does not exist in %s.  \
+            logger.debug(1, "GIT repository for %s does not exist in %s.  \
                           Downloading.", url, ud.clonedir)
             self.download(None, ud, d)
             if not os.path.exists(ud.clonedir):
Signature · 1 line
1.7.6.1
#7 lore raw

Re: [PATCH] fetch2/git: fix logger.debug

Quoted 7 lines · Martin Jansa

* logging/logger typo was fixed in 38a598731b49c8a0ba0ede570adc33eb1e848235 but debug level is still missing

---
 lib/bb/fetch2/git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard

#8 lore raw
In reply to Martin Jansa
Quoted 18 lines · Martin Jansa
Quoted 13 lines · Martin Jansa

The following changes since commit 2d5c71ae78b13e935548fe6ff5174b1c09b3077d:

fetch2: export LD_LIBRARY_PATH (2011-09-16 09:27:12 +0200)

are available in the git repository at:
git://gitorious.org/shr/bitbake jansa/pull

Martin Jansa (3):
fetch2/git: fix typo logggin/logger
fetch2/git: be more carefull in _contains_ref when checking git log
output
fetch2: export LD_LIBRARY_PATH

Quoted 3 lines
 lib/bb/fetch2/__init__.py |    2 +-
 lib/bb/fetch2/git.py      |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
Quoted 5 lines

Hi,

Is there any reason why this wasn't merged and this
http://git.openembedded.org/cgit.cgi/bitbake/commit/?id=38a598731b49c8a0ba0ede570adc33eb1e848235
was merged instead?

I wasn't seeing emails to bitbake-devel due to some mail filtering issues after the LinuxFoundation email redirection changes. Those are fixed now and I've fixed my broken commit.

Cheers,

Richard