From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 3/3] app-portage/eix: Convert to tmpfiles.eclass (example)
Date: Sun, 30 Apr 2017 21:06:55 +0200 [thread overview]
Message-ID: <20170430190655.9946-3-mgorny@gentoo.org> (raw)
In-Reply-To: <20170430190655.9946-1-mgorny@gentoo.org>
Replace the use of systemd.eclass with more generic tmpfiles.eclass to
install the tmpfiles.d file. Use tmpfiles_process to ensure that
the directory is created and correctly owned instead of keepdir-ing it
(which triggers QA warnings from Portage) and chown-ing it
in pkg_postinst() (which is a hack to workaround Portage design issues).
---
app-portage/eix/{eix-0.32.5-r1.ebuild => eix-0.32.5-r2.ebuild} | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
rename app-portage/eix/{eix-0.32.5-r1.ebuild => eix-0.32.5-r2.ebuild} (93%)
diff --git a/app-portage/eix/eix-0.32.5-r1.ebuild b/app-portage/eix/eix-0.32.5-r2.ebuild
similarity index 93%
rename from app-portage/eix/eix-0.32.5-r1.ebuild
rename to app-portage/eix/eix-0.32.5-r2.ebuild
index 2026b44a4b15..1d6fa3801834 100644
--- a/app-portage/eix/eix-0.32.5-r1.ebuild
+++ b/app-portage/eix/eix-0.32.5-r2.ebuild
@@ -4,7 +4,7 @@
EAPI=6
PLOCALES="de ru"
-inherit autotools bash-completion-r1 l10n systemd flag-o-matic
+inherit autotools bash-completion-r1 l10n flag-o-matic tmpfiles
DESCRIPTION="Search and query ebuilds"
HOMEPAGE="https://github.com/vaeth/eix/"
@@ -83,20 +83,18 @@ src_configure() {
src_install() {
default
dobashcomp bash/eix
- systemd_dotmpfilesd tmpfiles.d/eix.conf
+ dotmpfiles tmpfiles.d/eix.conf
insinto /usr/share/${PN}
doins "${ED}"/usr/bin/eix-functions.sh
rm -r "${ED}"/usr/bin/eix-functions.sh || die
-
- keepdir /var/cache/eix
}
pkg_postinst() {
if ! use prefix; then
# note: if this is done in src_install(), portage:portage
# ownership may be reset to root
- chown portage:portage "${EROOT%/}"/var/cache/eix || die
+ tmpfiles_process eix.conf
fi
local obs=${EROOT%/}/var/cache/eix.previous
--
2.13.0.rc1
next prev parent reply other threads:[~2017-04-30 19:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-30 19:06 [gentoo-dev] [PATCH 1/3] tmpfiles.eclass: Support using on non-Linux systems Michał Górny
2017-04-30 19:06 ` [gentoo-dev] [PATCH 2/3] tmpfiles.eclass: Explicit warn on ROOT != / to avoid breakage Michał Górny
2017-04-30 19:06 ` Michał Górny [this message]
2017-05-02 14:38 ` [gentoo-dev] [PATCH 1/3] tmpfiles.eclass: Support using on non-Linux systems William Hubbs
2017-05-02 14:56 ` Michał Górny
2017-05-02 16:21 ` Mike Gilbert
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=20170430190655.9946-3-mgorny@gentoo.org \
--to=mgorny@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