Re: [gentoo-portage-dev] [PATCH] portage/__init__.py: Fix live versioning to look for portage tags only
On Mon, 5 Dec 2016 13:00:36 -0800 Zac Medicowrote: > On 12/05/2016 12:41 PM, Brian Dolbec wrote: > > From 5074b2bfb36b6b9117f188588da55de3b5c01435 Mon Sep 17 00:00:00 > > 2001 From: Brian Dolbec > > Date: Mon, 5 Dec 2016 11:56:02 -0800 > > Subject: [PATCH] portage/__init__.py: Fix live versioning to look > > for portage tags only > > > > --- > > pym/portage/__init__.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py > > index 057dc6b..c8e8b56 100644 > > --- a/pym/portage/__init__.py > > +++ b/pym/portage/__init__.py > > @@ -631,7 +631,7 @@ if VERSION == 'HEAD': > > return VERSION > > if > > os.path.isdir(os.path.join(PORTAGE_BASE_PATH, '.git')): encoding = > > _encodings['fs'] > > - cmd = [BASH_BINARY, "-c", ("cd > > %s ; git describe --tags || exit $? ; " + \ > > + cmd = [BASH_BINARY, "-c", ("cd > > %s ; git describe --match 'portage-*' || exit $? ; " + \ "if [ -n > > \"`git diff-index --name-only --diff-filter=M HEAD`\" ] ; " + \ > > "then echo modified ; git rev-list --format=%%ct -n 1 HEAD ; fi ; " > > + \ "exit 0") % _shell_quote(PORTAGE_BASE_PATH)] > > LGTM merged. -- Brian Dolbec
Re: [gentoo-portage-dev] [PATCH] repoman: Fix versioning system
On Mon, 5 Dec 2016 13:10:38 -0800 Zac Medicowrote: > On 12/05/2016 12:32 PM, Brian Dolbec wrote: > > On Mon, 5 Dec 2016 11:42:10 -0800 > > Brian Dolbec wrote: > > > >> From 1586f1a25c41fb6036a24b47cfa58e3e818b8a58 Mon Sep 17 00:00:00 > >> 2001 From: Brian Dolbec > >> Date: Mon, 5 Dec 2016 11:27:15 -0800 > >> Subject: [PATCH] repoman: Fix versioning system > >> > >> Repoman had been showing the portage version. Which was the same > >> for the last release. Copy the live versions code from portage, > >> Modify as needed to get the correct tag info. Add portage version > >> to --version output. --- > >> repoman/pym/repoman/__init__.py | 70 > >> + > > > > For some reason, without the single quoting the match string, "git > > describe --match portage-*" would fail while "git describe --match > > repoman-*" would without the single quotes. > > > > Anyway, I updated the repoman patch to single quote it. > > Yeah, it definitely needs to be quoted, in order to prevent shell > expansion. Apparently you had a file or directory patching portage-* > in your working directory. merged -- Brian Dolbec
Re: [gentoo-portage-dev] [PATCH] repoman: Fix versioning system
On 12/05/2016 12:32 PM, Brian Dolbec wrote: > On Mon, 5 Dec 2016 11:42:10 -0800 > Brian Dolbecwrote: > >> From 1586f1a25c41fb6036a24b47cfa58e3e818b8a58 Mon Sep 17 00:00:00 2001 >> From: Brian Dolbec >> Date: Mon, 5 Dec 2016 11:27:15 -0800 >> Subject: [PATCH] repoman: Fix versioning system >> >> Repoman had been showing the portage version. Which was the same for >> the last release. Copy the live versions code from portage, Modify as >> needed to get the correct tag info. Add portage version to --version >> output. --- >> repoman/pym/repoman/__init__.py | 70 >> + > > For some reason, without the single quoting the match string, "git describe > --match portage-*" > would fail while "git describe --match repoman-*" would without the single > quotes. > > Anyway, I updated the repoman patch to single quote it. Yeah, it definitely needs to be quoted, in order to prevent shell expansion. Apparently you had a file or directory patching portage-* in your working directory. -- Thanks, Zac
[gentoo-portage-dev] [PATCH] portage/__init__.py: Fix live versioning to look for portage tags only
From 5074b2bfb36b6b9117f188588da55de3b5c01435 Mon Sep 17 00:00:00 2001 From: Brian DolbecDate: Mon, 5 Dec 2016 11:56:02 -0800 Subject: [PATCH] portage/__init__.py: Fix live versioning to look for portage tags only --- pym/portage/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 057dc6b..c8e8b56 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -631,7 +631,7 @@ if VERSION == 'HEAD': return VERSION if os.path.isdir(os.path.join(PORTAGE_BASE_PATH, '.git')): encoding = _encodings['fs'] - cmd = [BASH_BINARY, "-c", ("cd %s ; git describe --tags || exit $? ; " + \ + cmd = [BASH_BINARY, "-c", ("cd %s ; git describe --match 'portage-*' || exit $? ; " + \ "if [ -n \"`git diff-index --name-only --diff-filter=M HEAD`\" ] ; " + \ "then echo modified ; git rev-list --format=%%ct -n 1 HEAD ; fi ; " + \ "exit 0") % _shell_quote(PORTAGE_BASE_PATH)] -- 2.9.3 -- Brian Dolbec
Re: [gentoo-portage-dev] [PATCH] repoman: Fix versioning system
On Mon, 5 Dec 2016 11:42:10 -0800 Brian Dolbecwrote: > From 1586f1a25c41fb6036a24b47cfa58e3e818b8a58 Mon Sep 17 00:00:00 2001 > From: Brian Dolbec > Date: Mon, 5 Dec 2016 11:27:15 -0800 > Subject: [PATCH] repoman: Fix versioning system > > Repoman had been showing the portage version. Which was the same for > the last release. Copy the live versions code from portage, Modify as > needed to get the correct tag info. Add portage version to --version > output. --- > repoman/pym/repoman/__init__.py | 70 > + For some reason, without the single quoting the match string, "git describe --match portage-*" would fail while "git describe --match repoman-*" would without the single quotes. Anyway, I updated the repoman patch to single quote it. -- Brian Dolbec