[bitbake-devel] [PATCH] fetch/git: Change to use clearer ssh url syntax for broken servers

Richard Purdie richard.purdie at linuxfoundation.org
Fri Jan 15 15:04:54 UTC 2016


On Thu, 2016-01-14 at 17:50 +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: Olof Johansson
> > Sent: den 14 januari 2016 18:08
> > To: Andre McCurdy; Richard Purdie; bitbake-devel
> > Cc: Peter Kjellerstedt
> > Subject: Re: [bitbake-devel] [PATCH] fetch/git: Change to use
> > clearer
> > ssh url syntax for broken servers
> > 
> > On 16-01-14 08:51 -0800, Andre McCurdy wrote:
> > > > I'm not sure there is one other than special casing bitbucket
> > > > urls
> > in
> > > > the fetcher.
> > > 
> > > But I don't think there is any problem with BitBucket. The
> > > original
> > > bug report was caused by trying to use a URL with a ':' between
> > > the
> > > host and the repo path. A URL like that does not work when
> > > prefixed
> > by
> > > ssh://, it's the same for GitHub URLs too.
> > 
> > Indeed, the reported URL is not an RFC 3986 comformant URI. While
> > 
> >   ssh://example.com:/username/project.git
> > 
> > would be a kind of valid URI (the RFC doesn't forbid having an
> > empty port, see section 3.2.3), not having a path delimiter at
> > all however is not allowed. And fixing this by breaking RFC
> > comformant use cases is very suprising to me.
> > 
> > --
> > olofjn
> 
> I have now looked at the ticket [YOCTO #8864] and actually created an
> account on bitbucket.org to actually verify what is happening, and I 
> can only come to the conclusion that the ticket is gibberish. I have 
> tried the following two URL:s with bitbucket.org, and they both work 
> as expected:
> 
> git at bitbucket.org:Saur2000/test1.git
> ssh://git@bitbucket.org/Saur2000/test1.git
> 
> The real error to the SRC_URI given in the ticket:
> 
> SRC_URI = "git
> ://git at bitbucket.org:<username>/<repository>.git;rev=foo"
> 
> is that it is missing the protocol argument. Changing it to:
> 
> SRC_URI = "git
> ://git at bitbucket.org/<username>/<repository>.git;protocol=ssh;rev=foo
> "
> 
> should make everything work as expected.
> 
> The ticket author obviously did not realize that the git:// scheme 
> used in the SRC_URI is for BitBake and not for Git, and that when 
> the protocol=ssh argument is added, then the rest of the URI must 
> be changed to match the syntax expected by an ssh:// URI even though 
> the scheme in SRC_URI is git://.

I have also double checked this and I agree, the bitbucket servers do
now seem to work as you'd expect.

I swear I had problems originally but I can't figure out what those
were so I will revert the patch.

My point about improving the selftests if there are url formats you
depend upon stands though.

Cheers,

Richard




More information about the bitbake-devel mailing list