From: Christopher Larson <kergoth@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: Christopher Larson <chris_larson@mentor.com>
Subject: [PATCH 1/3] bb.fetch.git: remove leading '.' from gitsrcname
Date: Wed, 26 Aug 2015 09:37:45 -0700 [thread overview]
Message-ID: <1440607067-14461-2-git-send-email-kergoth@gmail.com> (raw)
In-Reply-To: <1440607067-14461-1-git-send-email-kergoth@gmail.com>
From: Christopher Larson <chris_larson@mentor.com>
When using an absolute file URI, there's no host, and the path starts with
'/', the dir under ${DL_DIR}/git2/ ends up starting with '.', so is hidden.
Remove any leading '.' to fix this.
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
lib/bb/fetch2/git.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 374d846..40658ff 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -137,7 +137,10 @@ class Git(FetchMethod):
ud.unresolvedrev[name] = ud.revisions[name]
ud.revisions[name] = self.latest_revision(ud, d, name)
- gitsrcname = '%s%s' % (ud.host.replace(':','.'), ud.path.replace('/', '.').replace('*', '.'))
+ gitsrcname = '%s%s' % (ud.host.replace(':', '.'), ud.path.replace('/', '.').replace('*', '.'))
+ if gitsrcname.startswith('.'):
+ gitsrcname = gitsrcname[1:]
+
# for rebaseable git repo, it is necessary to keep mirror tar ball
# per revision, so that even the revision disappears from the
# upstream repo in the future, the mirror will remain intact and still
--
2.2.1
next prev parent reply other threads:[~2015-08-26 16:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 16:37 [PATCH 0/3] A few fetch bugfixes Christopher Larson
2015-08-26 16:37 ` Christopher Larson [this message]
2015-08-26 16:37 ` [PATCH 2/3] bb.fetch: handle checksums consistently for mirrors Christopher Larson
2015-08-26 16:37 ` [PATCH 3/3] bb.fetch: don't remove the clone when an update fails Christopher Larson
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=1440607067-14461-2-git-send-email-kergoth@gmail.com \
--to=kergoth@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=chris_larson@mentor.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox