From: Darren Hart <dvhart@linux.intel.com>
To: poky@yoctoproject.org
Cc: Darren Hart <dvhart@linux.intel.com>
Subject: [PATCH 1/3] fetch2/git: ensure network check log matches actual command
Date: Fri, 20 May 2011 16:06:12 -0700 [thread overview]
Message-ID: <a7b1f9d56b42890f49f020db58c07cc5d955e456.1305932581.git.dvhart@linux.intel.com> (raw)
In-Reply-To: <cover.1305932581.git.dvhart@linux.intel.com>
From: Darren Hart <dvhart@linux.intel.com>
The git command string logged via check_network_access() does not match
the actual command executed in a few places. Ensure that it does.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Yu Ke <ke.yu@intel.com>
---
bitbake/lib/bb/fetch2/git.py | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 82721c6..c6c4cc9 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -137,8 +137,10 @@ class Git(FetchMethod):
# If the repo still doesn't exist, fallback to cloning it
if not os.path.exists(ud.clonedir):
- bb.fetch2.check_network_access(d, "git clone --bare %s%s" % (ud.host, ud.path))
- runfetchcmd("%s clone --bare %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir), d)
+ clone_cmd = "%s clone --bare %s://%s%s%s %s" % \
+ (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir)
+ bb.fetch2.check_network_access(d, clone_cmd)
+ runfetchcmd(clone_cmd, d)
os.chdir(ud.clonedir)
# Update the checkout if needed
@@ -147,7 +149,6 @@ class Git(FetchMethod):
if not self._contains_ref(ud.revisions[name], d):
needupdate = True
if needupdate:
- bb.fetch2.check_network_access(d, "git fetch %s%s" % (ud.host, ud.path), ud.url)
try:
runfetchcmd("%s remote prune origin" % ud.basecmd, d)
runfetchcmd("%s remote rm origin" % ud.basecmd, d)
@@ -155,7 +156,9 @@ class Git(FetchMethod):
logger.debug(1, "No Origin")
runfetchcmd("%s remote add origin %s://%s%s%s" % (ud.basecmd, ud.proto, username, ud.host, ud.path), d)
- runfetchcmd("%s fetch --all -t" % ud.basecmd, d)
+ fetch_cmd = "%s fetch --all -t" % ud.basecmd
+ bb.fetch2.check_network_access(d, fetch_cmd, ud.url)
+ runfetchcmd(fetch_cmd, d)
runfetchcmd("%s prune-packed" % ud.basecmd, d)
runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d)
ud.repochanged = True
@@ -216,9 +219,10 @@ class Git(FetchMethod):
else:
username = ""
- bb.fetch2.check_network_access(d, "git ls-remote %s%s %s" % (ud.host, ud.path, ud.branches[name]))
basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
- cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name])
+ cmd = "%s ls-remote %s://%s%s%s %s" % \
+ (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name])
+ bb.fetch2.check_network_access(d, cmd)
output = runfetchcmd(cmd, d, True)
if not output:
raise bb.fetch2.FetchError("The command %s gave empty output unexpectedly" % cmd, url)
--
1.7.1
next prev parent reply other threads:[~2011-05-20 23:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 23:06 [PATCH 0/3] fetch2/git: debug updates and minor cleanup Darren Hart
2011-05-20 23:06 ` Darren Hart [this message]
2011-05-20 23:06 ` [PATCH 2/3] fetch2/git: use urldata basecmd when available Darren Hart
2011-05-20 23:06 ` [PATCH 3/3] fetch2/git: use logging.debug() and clarify messages Darren Hart
2011-05-27 17:18 ` [PATCH 0/3] fetch2/git: debug updates and minor cleanup Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a7b1f9d56b42890f49f020db58c07cc5d955e456.1305932581.git.dvhart@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=poky@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.