public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-portage/eix/
Date: Sun,  6 Nov 2016 15:34:51 +0000 (UTC)	[thread overview]
Message-ID: <1478446472.777d014757d5eaa27b34d20c295f0aadb65cf982.mgorny@gentoo> (raw)

commit:     777d014757d5eaa27b34d20c295f0aadb65cf982
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  1 14:48:07 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Nov  6 15:34:32 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=777d0147

app-portage/eix: Major ebuild cleanup

Clean up the ebuild: wrap and sort values, shorten description,
improve readability, use bash syntax, add a lot of missing ||die,
simplify awkward logic and kill double negations.

 app-portage/eix/eix-0.32.1.ebuild | 75 ++++++++++++++++++++++++---------------
 1 file changed, 46 insertions(+), 29 deletions(-)

diff --git a/app-portage/eix/eix-0.32.1.ebuild b/app-portage/eix/eix-0.32.1.ebuild
index 3a9d4bf..c6effcd 100644
--- a/app-portage/eix/eix-0.32.1.ebuild
+++ b/app-portage/eix/eix-0.32.1.ebuild
@@ -7,17 +7,18 @@ EAPI=6
 PLOCALES="de ru"
 inherit bash-completion-r1 l10n systemd
 
-DESCRIPTION="Search and query ebuilds, portage incl. local settings, ext. overlays and more"
+DESCRIPTION="Search and query ebuilds"
 HOMEPAGE="https://github.com/vaeth/eix/"
 SRC_URI="https://github.com/vaeth/eix/releases/download/v${PV}/${P}.tar.xz"
 
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug +dep doc nls optimization +required-use security strong-optimization strong-security sqlite swap-remote tools"
+IUSE="debug +dep doc nls optimization +required-use security strong-optimization
+	strong-security sqlite swap-remote tools"
 
-BOTHDEPEND="sqlite? ( >=dev-db/sqlite-3 )
-	nls? ( virtual/libintl )"
+BOTHDEPEND="nls? ( virtual/libintl )
+	sqlite? ( >=dev-db/sqlite-3:= )"
 RDEPEND="${BOTHDEPEND}
 	app-shells/push
 	app-shells/quoter"
@@ -26,31 +27,39 @@ DEPEND="${BOTHDEPEND}
 	nls? ( sys-devel/gettext )"
 
 pkg_setup() {
-	case " ${REPLACING_VERSIONS}" in
-	*\ 0.[0-9].*|*\ 0.1[0-9].*|*\ 0.2[0-4].*|*\ 0.25.0*)
-		local eixcache="${EROOT}/var/cache/${PN}"
-		test -f "${eixcache}" && rm -f -- "${eixcache}";;
-	esac
+	# remove stale cache file to prevent collisions
+	local old_cache=${EROOT%/}/var/cache/${PN}
+	if [[ -f ${old_cache} ]]; then
+		rm "${old_cache}" || die
+	fi
 }
 
 src_prepare() {
-	sed -i -e "s'/'${EPREFIX}/'" -- "${S}"/tmpfiles.d/eix.conf || die
-	eapply_user
+	default
+	sed -i -e "s:/:${EPREFIX}/:" tmpfiles.d/eix.conf || die
 }
 
 src_configure() {
-	econf $(use_with sqlite) $(use_with doc extra-doc) \
-		$(use_enable nls) $(use_enable tools separate-tools) \
-		$(use_enable security) $(use_enable optimization) \
-		$(use_enable strong-security) \
-		$(use_enable strong-optimization) $(use_enable debug debugging) \
-		$(use_enable swap-remote) \
-		$(use_with prefix always-accept-keywords) \
-		$(use_with dep dep-default) \
-		$(use_with required-use required-use-default) \
-		--with-zsh-completion \
-		--with-portage-rootpath="${ROOTPATH}" \
+	local myconf=(
+		$(use_enable debug debugging)
+		$(use_enable nls)
+		$(use_enable optimization)
+		$(use_enable security)
+		$(use_enable strong-optimization)
+		$(use_enable strong-security)
+		$(use_enable swap-remote)
+		$(use_enable tools separate-tools)
+		$(use_with dep dep-default)
+		$(use_with doc extra-doc)
+		$(use_with prefix always-accept-keywords)
+		$(use_with required-use required-use-default)
+		$(use_with sqlite)
+		--with-zsh-completion
+		--with-portage-rootpath="${ROOTPATH}"
 		--with-eprefix-default="${EPREFIX}"
+	)
+
+	econf "${myconf[@]}"
 }
 
 src_install() {
@@ -60,14 +69,22 @@ src_install() {
 }
 
 pkg_postinst() {
-	test -d "${EROOT}var/cache/${PN}" || {
-		mkdir "${EROOT}var/cache/${PN}"
-		use prefix || chown portage:portage "${EROOT}var/cache/${PN}"
-	}
-	local obs="${EROOT}var/cache/eix.previous"
-	! test -f "${obs}" || ewarn "Found obsolete ${obs}, please remove it"
+	local cache=${EROOT%/}/var/cache/${PN}
+	if [[ ! -d ${cache} ]]; then
+		mkdir "${cache}" || die
+		if ! use prefix; then
+			chown portage:portage "${cache}" || die
+		fi
+	fi
+
+	local obs=${EROOT%/}/var/cache/eix.previous
+	if [[ -f ${obs} ]]; then
+		ewarn "Found obsolete ${obs}, please remove it"
+	fi
 }
 
 pkg_postrm() {
-	[ -n "${REPLACED_BY_VERSION}" ] || rm -rf -- "${EROOT}var/cache/${PN}"
+	if [[ ! -n ${REPLACED_BY_VERSION} ]]; then
+		rm -rf "${EROOT%/}/var/cache/${PN}" || die
+	fi
 }


             reply	other threads:[~2016-11-06 15:34 UTC|newest]

Thread overview: 275+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-06 15:34 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-04 17:28 [gentoo-commits] repo/gentoo:master commit in: app-portage/eix/ Michał Górny
2025-01-04 17:12 Sam James
2024-12-28  9:14 Arthur Zamarin
2024-12-28  9:06 Arthur Zamarin
2024-12-28  8:59 Arthur Zamarin
2024-12-28  8:59 Arthur Zamarin
2024-12-28  8:58 Arthur Zamarin
2024-12-28  8:58 Arthur Zamarin
2024-12-28  8:54 Arthur Zamarin
2024-12-07 10:52 Florian Schmaus
2024-12-04 10:59 Florian Schmaus
2024-03-24 14:43 Mike Gilbert
2023-08-03  4:49 Michał Górny
2023-08-02 23:02 Sam James
2023-08-02 13:35 Sam James
2023-08-02  4:27 Sam James
2023-07-24 11:03 Jakov Smolić
2023-05-29  4:37 Michał Górny
2023-04-08 18:45 Michał Górny
2023-04-08 18:12 Arthur Zamarin
2023-04-08 18:05 Arthur Zamarin
2023-04-08 17:43 Arthur Zamarin
2023-04-08 17:42 Arthur Zamarin
2023-04-08 17:37 Arthur Zamarin
2023-04-08 17:32 Arthur Zamarin
2023-04-08 17:31 Arthur Zamarin
2023-04-08 16:59 Arthur Zamarin
2023-01-29 15:47 Michał Górny
2022-09-16 12:14 Michał Górny
2022-09-16  8:40 Arthur Zamarin
2022-09-05 14:03 Agostino Sarubbo
2022-09-04 21:49 Jakov Smolić
2022-09-04 18:26 Arthur Zamarin
2022-09-04 18:21 Arthur Zamarin
2022-09-04 17:48 Sam James
2022-09-04 17:48 Sam James
2022-09-04 17:45 Sam James
2022-08-23  5:24 Sam James
2022-07-30 11:19 Michał Górny
2022-07-30  9:51 Arthur Zamarin
2022-07-26  2:17 Sam James
2022-07-26  2:05 Sam James
2022-07-26  2:05 Sam James
2022-07-26  2:05 Sam James
2022-07-26  2:05 Sam James
2022-07-26  1:36 Sam James
2022-07-26  1:36 Sam James
2022-06-07  7:15 Michał Górny
2022-06-07  6:45 Sam James
2022-06-07  6:43 Jakov Smolić
2022-06-06 11:52 Jakov Smolić
2022-06-06 11:01 Jakov Smolić
2022-06-06 10:24 Jakov Smolić
2022-06-06 10:22 Jakov Smolić
2022-06-06 10:22 Jakov Smolić
2022-06-06 10:20 Jakov Smolić
2022-06-06  9:39 Jakov Smolić
2022-05-05  7:10 WANG Xuerui
2022-05-02 12:46 Joonas Niilola
2022-04-18 18:39 Michał Górny
2022-04-18 18:22 Arthur Zamarin
2022-04-15  4:39 Sam James
2022-03-26 19:11 Arthur Zamarin
2022-03-25  7:48 Agostino Sarubbo
2022-03-25  7:47 Agostino Sarubbo
2022-03-25  7:46 Agostino Sarubbo
2022-03-24 19:03 Jakov Smolić
2022-03-24 19:03 Jakov Smolić
2022-03-24 19:03 Jakov Smolić
2022-01-13 21:51 Michał Górny
2021-11-07  8:16 Michał Górny
2021-11-07  8:16 Michał Górny
2021-11-06 20:43 Sam James
2021-10-30 22:55 Sam James
2021-10-30 22:55 Sam James
2021-10-30 17:29 Sam James
2021-10-30 17:29 Sam James
2021-10-30 17:22 Agostino Sarubbo
2021-10-29 18:53 Sam James
2021-10-29 18:53 Sam James
2021-10-03  6:46 Michał Górny
2021-08-06  3:32 Michał Górny
2021-08-06  0:30 Sam James
2021-08-03 15:36 Agostino Sarubbo
2021-08-01  5:14 Sam James
2021-08-01  5:14 Sam James
2021-07-31 22:23 Sam James
2021-06-10 23:13 Michał Górny
2021-06-07 18:38 Michał Górny
2021-06-06  6:01 Michał Górny
2021-02-25 19:36 Michał Górny
2021-02-25 18:34 Sergei Trofimovich
2021-02-21  4:30 Sam James
2021-02-19 17:21 Sam James
2021-02-19 16:11 Sam James
2021-02-19  3:47 Sam James
2021-02-19  3:43 Sam James
2021-02-19  2:54 Sam James
2021-02-19  2:45 Sam James
2021-02-19  1:51 Thomas Deutschmann
2021-01-15 18:34 Michał Górny
2021-01-06 13:23 Fabian Groffen
2020-12-27 14:01 Fabian Groffen
2020-12-20 20:34 Michał Górny
2020-12-20 19:07 Thomas Deutschmann
2020-12-18 20:49 Sergei Trofimovich
2020-12-18 18:45 Sam James
2020-12-18 14:22 Sam James
2020-12-18 10:25 Sergei Trofimovich
2020-12-17  4:55 Sam James
2020-12-16 21:24 Sergei Trofimovich
2020-12-16 19:51 Sam James
2020-11-18  9:12 Michał Górny
2020-11-17 19:05 Agostino Sarubbo
2020-10-31 11:06 Mikle Kolyada
2020-10-28 20:08 Michał Górny
2020-10-28 16:18 Sam James
2020-10-26 23:51 Sergei Trofimovich
2020-10-26 23:49 Sergei Trofimovich
2020-10-26 23:47 Sergei Trofimovich
2020-10-26 23:44 Sergei Trofimovich
2020-10-26  1:13 Sam James
2020-10-25 21:34 Thomas Deutschmann
2020-10-25  6:41 Michał Górny
2020-09-18  9:38 Michał Górny
2020-09-13  7:13 Michał Górny
2020-09-09  7:18 Michał Górny
2020-09-08 20:37 Michał Górny
2020-09-08 19:11 Michał Górny
2020-09-06 18:15 Michał Górny
2020-08-05 15:18 Michał Górny
2020-08-05 14:17 Agostino Sarubbo
2020-08-05 14:06 Agostino Sarubbo
2020-08-02 11:39 Sergei Trofimovich
2020-08-01  9:01 Sergei Trofimovich
2020-07-31 23:31 Sam James
2020-07-31 17:53 Sergei Trofimovich
2020-05-31 21:00 Michał Górny
2020-05-21 11:07 Michał Górny
2020-05-21  7:08 Michał Górny
2020-05-20 17:59 Michał Górny
2020-05-08 20:58 Mart Raudsepp
2020-05-08 10:46 Agostino Sarubbo
2020-05-06 17:34 Sergei Trofimovich
2020-05-05  6:46 Agostino Sarubbo
2020-05-03 19:11 Agostino Sarubbo
2020-05-03 10:25 Agostino Sarubbo
2020-05-03 10:22 Agostino Sarubbo
2020-05-03 10:12 Agostino Sarubbo
2020-03-30  8:01 Mikle Kolyada
2020-01-17 11:14 Mikle Kolyada
2020-01-17 11:14 Mikle Kolyada
2020-01-17 10:47 Agostino Sarubbo
2019-12-15 13:00 Michał Górny
2019-12-13  7:44 Mikle Kolyada
2019-12-13  6:41 Mikle Kolyada
2019-07-29 15:13 Mikle Kolyada
2019-07-29 15:13 Mikle Kolyada
2019-07-28  6:41 Michał Górny
2019-07-28  6:41 Michał Górny
2019-06-14  7:25 Mikle Kolyada
2019-05-04 13:33 Andreas K. Hüttel
2019-04-12  7:06 Sergei Trofimovich
2019-04-10 15:07 Michał Górny
2019-04-10 14:09 Mikle Kolyada
2019-04-10 14:08 Mikle Kolyada
2019-04-10 14:08 Mikle Kolyada
2019-04-10 14:08 Mikle Kolyada
2019-04-10 14:08 Mikle Kolyada
2019-04-10 14:08 Mikle Kolyada
2019-04-08 22:07 Sergei Trofimovich
2019-04-08 20:49 Aaron Bauman
2019-04-07  9:41 Mikle Kolyada
2019-04-07  9:38 Mikle Kolyada
2019-02-25 19:43 Mikle Kolyada
2019-01-10  8:26 Mikle Kolyada
2019-01-07 21:17 Mart Raudsepp
2019-01-05 22:34 Sergei Trofimovich
2019-01-01 10:52 Sergei Trofimovich
2018-12-30 21:13 Mikle Kolyada
2018-12-23 19:52 Matt Turner
2018-12-08 11:54 Mikle Kolyada
2018-12-08  9:44 Sergei Trofimovich
2018-12-08  9:36 Sergei Trofimovich
2018-11-29 14:42 Mikle Kolyada
2018-11-28 23:11 Sergei Trofimovich
2018-11-28  9:26 Mikle Kolyada
2018-11-28  9:24 Mikle Kolyada
2018-11-25 10:11 Michał Górny
2018-11-23 17:15 Mikle Kolyada
2018-11-23 11:09 Mikle Kolyada
2018-11-21 20:32 Mikle Kolyada
2018-11-11 14:01 Mikle Kolyada
2018-11-05 15:11 Mikle Kolyada
2018-10-22 15:04 Michał Górny
2018-10-05  4:56 Markus Meier
2018-10-02 14:02 Tobias Klausmann
2018-09-29  8:16 Michał Górny
2018-09-19 17:35 Thomas Deutschmann
2018-09-19 10:12 Mikle Kolyada
2018-09-18 22:11 Sergei Trofimovich
2018-09-18  0:59 Matt Turner
2018-09-18  0:59 Matt Turner
2018-09-17 21:49 Mart Raudsepp
2018-09-17 19:27 Andreas Sturmlechner
2018-09-15 18:27 Mikle Kolyada
2018-03-04 12:05 Michał Górny
2018-03-03 15:21 Michał Górny
2018-03-02 14:40 Manuel Rüger
2018-01-05 15:38 Ulrich Müller
2018-01-01 10:34 Michał Górny
2017-12-09  1:36 Michael Weber
2017-12-09  1:36 Michael Weber
2017-11-08 20:14 Sergei Trofimovich
2017-11-05 18:06 Sergei Trofimovich
2017-10-19 13:01 Manuel Rüger
2017-10-17 19:07 Markus Meier
2017-10-14 21:43 Michał Górny
2017-10-14 21:43 Michał Górny
2017-10-08  9:27 Michał Górny
2017-10-06 10:30 Sergei Trofimovich
2017-10-03 15:25 Sergei Trofimovich
2017-10-03 10:26 Thomas Deutschmann
2017-10-02 16:07 Robin H. Johnson
2017-06-07  7:09 Michael Weber
2017-04-19 11:45 Michael Weber
2017-04-18  6:58 Jeroen Roovers
2017-03-21 14:11 Ian Stakenvicius
2017-02-17 10:56 Agostino Sarubbo
2017-02-15 13:49 Tobias Klausmann
2017-02-12 14:48 Agostino Sarubbo
2017-02-10  9:43 Michael Weber
2017-02-10  9:43 Michael Weber
2017-02-10  9:43 Michael Weber
2017-02-10  1:12 Michael Weber
2017-02-10  1:12 Michael Weber
2017-02-10  0:20 Michael Weber
2017-01-16 19:02 Brian Evans
2016-11-15 16:22 Michał Górny
2016-11-06 15:34 Michał Górny
2016-11-06 15:34 Michał Górny
2016-10-29 14:35 Ian Stakenvicius
2016-10-10 15:14 Jeroen Roovers
2016-10-01 12:19 Jeroen Roovers
2016-09-26 20:06 Manuel Rüger
2016-08-31 12:29 Manuel Rüger
2016-08-31 12:29 Manuel Rüger
2016-08-16 19:29 Manuel Rüger
2016-08-16 19:29 Manuel Rüger
2016-08-16 10:29 Manuel Rüger
2016-05-25 21:01 Matt Turner
2016-05-17 18:34 Markus Meier
2016-05-13  8:41 Agostino Sarubbo
2016-02-14 22:09 Manuel Rüger
2016-02-09 20:32 Manuel Rüger
2016-02-09 20:30 Manuel Rüger
2016-01-12 12:55 Fabian Groffen
2016-01-08 16:04 William Hubbs
2016-01-08 16:04 William Hubbs
2016-01-04 16:54 Ian Stakenvicius
2016-01-04 16:54 Ian Stakenvicius
2015-12-13  0:17 Manuel Rüger
2015-11-08 21:49 Manuel Rüger
2015-11-07 13:20 Manuel Rüger
2015-10-22 16:08 Ian Stakenvicius
2015-10-20 21:10 Manuel Rüger
2015-10-11 12:06 Mikle Kolyada
2015-10-02 11:05 Mikle Kolyada
2015-10-01 20:41 Markus Meier
2015-09-27 18:10 Patrice Clement
2015-09-25 14:13 Agostino Sarubbo
2015-09-24 10:36 Agostino Sarubbo
2015-09-22  4:21 Jeroen Roovers
2015-09-20 12:31 Tobias Klausmann

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=1478446472.777d014757d5eaa27b34d20c295f0aadb65cf982.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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