[LEDE-DEV] [PATCH] sdk: Fix src-git URL for the base feed when on a detached commit (FS#501)
Karl Palsson
karlp at tweak.net.au
Mon Feb 13 02:06:58 PST 2017
Baptiste Jonglez <baptiste at bitsofnetworks.org> wrote:
> From: Baptiste Jonglez <git at bitsofnetworks.org>
>
> When the source repository is on a detached commit (such as
> when building a release tag), the git URL for the "base" feed
> is incorrect in the SDK.
>
> Before this commit:
>
> On branch "master": src-git base git://git.lede-project.org/source
> On branch "lede-17.01": src-git base git://git.lede-project.org/source;lede-17.01
> On tag "v17.01.0-rc2": src-git base git://git.lede-project.org/source;HEAD <-- incorrect
>
> After this commit:
>
> On branch "master": src-git base git://git.lede-project.org/source;master
> On branch "lede-17.01": src-git base git://git.lede-project.org/source;lede-17.01
> On tag "v17.01.0-rc2": src-git base git://git.lede-project.org/source^28b7d7f1dac725157c19236b8899e1c97f19cee9
I'd prefer if you could make it...
On tag "v17.01.0-rc2": src-git base
git://git.lede-project.org/source;v17.01.0-rc2
rather than the hash. Tags work just fine there, I've been using
that locally for my own tags, and it's much "nicer" than just the
hash.
Cheers,
Karl P
>
> Notice that the "master" branch is now explicitly expanded:
> this is just to simplify the new code.
>
> Signed-off-by: Baptiste Jonglez <git at bitsofnetworks.org>
> ---
> target/sdk/Makefile | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/target/sdk/Makefile b/target/sdk/Makefile index
> 719b659d25..34755b2096 100644
> --- a/target/sdk/Makefile
> +++ b/target/sdk/Makefile
> @@ -38,9 +38,10 @@ SDK_DIRS = \
> $(STAGING_SUBDIR_TOOLCHAIN)
>
> GIT_URL:=$(filter git://% http://% https://%,$(shell git config --get remote.origin.url 2>/dev/null))
> -GIT_BRANCH:=$(filter-out master,$(shell git rev-parse
> --abbrev-ref HEAD 2>/dev/null)) +GIT_BRANCH:=$(filter-out
> HEAD,$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null))
> +GIT_DETACHED_COMMIT:=$(shell git rev-parse HEAD 2>/dev/null)
>
> -BASE_FEED:=$(if $(GIT_URL),src-git base $(GIT_URL)$(if
> $(GIT_BRANCH),;$(GIT_BRANCH))) +BASE_FEED:=$(if
> $(GIT_URL),src-git base $(GIT_URL)$(if
> $(GIT_BRANCH),;$(GIT_BRANCH),^$(GIT_DETACHED_COMMIT)))
> BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C git svn info 2>/dev/null | sed -ne 's/^URL: /src-gitsvn base /p'))
> BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C svn info 2>/dev/null | sed -ne 's/^URL: /src-svn base /p'))
> BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),src-git base https://git.lede-project.org/source.git$(if $(GIT_BRANCH),;$(GIT_BRANCH)))
> --
> 2.11.1
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.html
Type: application/pgp-signature
Size: 1161 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170213/e076a9b1/attachment.sig>
More information about the Lede-dev
mailing list