public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + EAPI 6
@ 2015-11-27 13:53 Michał Górny
  2015-11-27 13:53 ` [gentoo-dev] [PATCH 1/3] bash-completion-r1.eclass: Die on pkg-config getter failure Michał Górny
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Michał Górny @ 2015-11-27 13:53 UTC (permalink / raw
  To: gentoo-dev

Hi,

A quick patch set to bash-completion-r1.eclass. Adds missing ||die,
||return to bashcomp_alias for nonfatal and enables EAPI 6. Please
review.

--
Best regards,
Michał Górny


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gentoo-dev] [PATCH 1/3] bash-completion-r1.eclass: Die on pkg-config getter failure
  2015-11-27 13:53 [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + EAPI 6 Michał Górny
@ 2015-11-27 13:53 ` Michał Górny
  2015-11-27 13:53 ` [gentoo-dev] [PATCH 2/3] bash-completion-r1.eclass: bashcomp_alias, always return on first failure Michał Górny
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2015-11-27 13:53 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/bash-completion-r1.eclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
index 2551973..9877baa 100644
--- a/eclass/bash-completion-r1.eclass
+++ b/eclass/bash-completion-r1.eclass
@@ -41,12 +41,13 @@ _bash-completion-r1_get_bashdir() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
-		local path="$($(tc-getPKG_CONFIG) --variable=$1 bash-completion)"
+		local path
+		path=$($(tc-getPKG_CONFIG) --variable="${1}" bash-completion) || die
 		# we need to return unprefixed, so strip from what pkg-config returns
 		# to us, bug #477692
 		echo "${path#${EPREFIX}}"
 	else
-		echo $2
+		echo "${2}"
 	fi
 }
 
-- 
2.6.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-dev] [PATCH 2/3] bash-completion-r1.eclass: bashcomp_alias, always return on first failure
  2015-11-27 13:53 [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + EAPI 6 Michał Górny
  2015-11-27 13:53 ` [gentoo-dev] [PATCH 1/3] bash-completion-r1.eclass: Die on pkg-config getter failure Michał Górny
@ 2015-11-27 13:53 ` Michał Górny
  2015-11-27 13:53 ` [gentoo-dev] [PATCH 3/3] bash-completion-r1.eclass: Enable EAPI 6 Michał Górny
  2015-11-29 10:07 ` [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + " Michał Górny
  3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2015-11-27 13:53 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Return from bashcomp_alias on the first dosym failure if nonfatal is
used.
---
 eclass/bash-completion-r1.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
index 9877baa..325769c 100644
--- a/eclass/bash-completion-r1.eclass
+++ b/eclass/bash-completion-r1.eclass
@@ -130,6 +130,7 @@ bashcomp_alias() {
 	shift
 
 	for f; do
-		dosym "${base}" "$(_bash-completion-r1_get_bashcompdir)/${f}"
+		dosym "${base}" "$(_bash-completion-r1_get_bashcompdir)/${f}" \
+			|| return
 	done
 }
-- 
2.6.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-dev] [PATCH 3/3] bash-completion-r1.eclass: Enable EAPI 6
  2015-11-27 13:53 [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + EAPI 6 Michał Górny
  2015-11-27 13:53 ` [gentoo-dev] [PATCH 1/3] bash-completion-r1.eclass: Die on pkg-config getter failure Michał Górny
  2015-11-27 13:53 ` [gentoo-dev] [PATCH 2/3] bash-completion-r1.eclass: bashcomp_alias, always return on first failure Michał Górny
@ 2015-11-27 13:53 ` Michał Górny
  2015-11-29 10:07 ` [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + " Michał Górny
  3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2015-11-27 13:53 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/bash-completion-r1.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
index 325769c..e5809f8 100644
--- a/eclass/bash-completion-r1.eclass
+++ b/eclass/bash-completion-r1.eclass
@@ -26,7 +26,7 @@
 inherit toolchain-funcs
 
 case ${EAPI:-0} in
-	0|1|2|3|4|5) ;;
+	0|1|2|3|4|5|6) ;;
 	*) die "EAPI ${EAPI} unsupported (yet)."
 esac
 
-- 
2.6.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + EAPI 6
  2015-11-27 13:53 [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + EAPI 6 Michał Górny
                   ` (2 preceding siblings ...)
  2015-11-27 13:53 ` [gentoo-dev] [PATCH 3/3] bash-completion-r1.eclass: Enable EAPI 6 Michał Górny
@ 2015-11-29 10:07 ` Michał Górny
  3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2015-11-29 10:07 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

On Fri, 27 Nov 2015 14:53:36 +0100
Michał Górny <mgorny@gentoo.org> wrote:

> Hi,
> 
> A quick patch set to bash-completion-r1.eclass. Adds missing ||die,
> ||return to bashcomp_alias for nonfatal and enables EAPI 6. Please
> review.

This was trivial. Merged now.

-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-29 10:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27 13:53 [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + EAPI 6 Michał Górny
2015-11-27 13:53 ` [gentoo-dev] [PATCH 1/3] bash-completion-r1.eclass: Die on pkg-config getter failure Michał Górny
2015-11-27 13:53 ` [gentoo-dev] [PATCH 2/3] bash-completion-r1.eclass: bashcomp_alias, always return on first failure Michał Górny
2015-11-27 13:53 ` [gentoo-dev] [PATCH 3/3] bash-completion-r1.eclass: Enable EAPI 6 Michał Górny
2015-11-29 10:07 ` [gentoo-dev] [PATCHES] bash-completion-r1.eclass: Error handling cleanup + " Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox