From: Samuli Suominen <ssuominen@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: udev.eclass
Date: Tue, 30 Oct 2012 22:19:08 +0200 [thread overview]
Message-ID: <5090363C.1090209@gentoo.org> (raw)
In-Reply-To: <20121030211802.749e4ef3@pomiocik.lan>
On 30/10/12 22:18, Michał Górny wrote:
> On Tue, 30 Oct 2012 17:08:07 -0300
> Alexis Ballier <aballier@gentoo.org> wrote:
>
>> On Tue, 30 Oct 2012 21:57:11 +0200
>> Samuli Suominen <ssuominen@gentoo.org> wrote:
>>
>>> On 30/10/12 21:56, Alexis Ballier wrote:
>>>> On Tue, 30 Oct 2012 19:08:39 +0000 (UTC)
>>>> "Samuli Suominen (ssuominen)" <ssuominen@gentoo.org> wrote:
>>>>
>>>> [...]
>>>>>
>>>>> case ${EAPI:-0} in
>>>>> 0|1|2|3|4) ;;
>>>>> *) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet
>>>>> established." esac
>>>>
>>>> sounds like a useless and annoying check for just exporting one
>>>> function
>>>>
>>>>>
>>>>> RDEPEND=""
>>>>
>>>> useless?
>>>
>>> if the ebuild is EAPI=0 or EAPI=1 then DEPEND expands to RDEPEND, so
>>> setting empty RDEPEND prevents that, or am I missing something?
>>
>> even with eclasses and inheritence ? maybe you're right but i wouldnt
>> bet anything
>>
>>>
>>>>
>>>>> DEPEND="virtual/pkgconfig"
>>>>>
>>>>> # @FUNCTION: _udev_get_udevdir
>>>>> # @INTERNAL
>>>>> # @DESCRIPTION:
>>>>> # Get unprefixed udevdir.
>>>>> _udev_get_udevdir() {
>>>>> if $($(tc-getPKG_CONFIG) --exists udev); then
>>>>> echo -n "$($(tc-getPKG_CONFIG) --variable=udevdir
>>>>> udev)" else
>>>>> echo -n /lib/udev
>>>>> fi
>>>>> }
>>>>>
>>>>> # @FUNCTION: udev_get_udevdir
>>>>> # @DESCRIPTION:
>>>>> # Output the path for the udev directory (not including ${D}).
>>>>> # This function always succeeds, even if udev is not installed.
>>>>> # The fallback value is set to /lib/udev
>>>>> udev_get_udevdir() {
>>>>> has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
>>>>> debug-print-function ${FUNCNAME} "${@}"
>>>>>
>>>>> echo -n "${EPREFIX}$(_udev_get_udevdir)"
>>>>> }
>>>>
>>>> local foo=""
>>>> unfold _udev_get_udevdir there, replacing 'echo -n' by foo=
>>>> printf ...$foo
>>>>
>>>> kill the extra internal fucntion that seems useless.
>>>> echo isn't really reliable for precise formatting, prefer printf
>>>> when it matters. (in this case it doesn't matter but seems good
>>>> practices)
>>>>
>>>> have you checked what is the udevdir value on prefix, if at all
>>>> relevant ? I fear a double prefix issue.
>>>>
>>>
>>> the code is more or less same as systemd.eclass has, I don't want to
>>> diverge too much from that since we are essentially dealing with the
>>> same package (tarball)
>>
>> well, two bad do not make a good
>> consider the above remarks to apply to systemd.eclass too then, and
>> either explain why they're not relevant or apply them to both eclasses
>> if you want to avoid divergence.
>
> Don't even try to touch any of my eclasses without prior asking.
>
> And the additional internal function there was used in order to get
> unprefixed path for do*() and new*() functions.
>
same as i'll propably reuse the function for something like
$(do_udev_rules) later on
the udev.eclass might have one function now, but that's just a
rudementary start to drop most of the duplication from ebuilds
next prev parent reply other threads:[~2012-10-30 20:25 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20121030190839.A9A3D21600@flycatcher.gentoo.org>
2012-10-30 19:17 ` [gentoo-dev] Re: gentoo-x86/eclass: udev.eclass Fabian Groffen
2012-10-30 19:31 ` Samuli Suominen
2012-10-30 19:49 ` Samuli Suominen
2012-10-30 20:47 ` Doug Goldstein
2012-10-30 21:16 ` Fabian Groffen
2012-10-30 21:22 ` Samuli Suominen
2012-10-31 7:50 ` Fabian Groffen
2012-10-31 7:51 ` Samuli Suominen
2012-10-31 8:56 ` Fabian Groffen
2012-10-31 16:08 ` Samuli Suominen
2012-10-31 16:21 ` Gilles Dartiguelongue
2012-10-31 16:55 ` Samuli Suominen
2012-10-31 15:04 ` Alexis Ballier
2012-10-31 16:19 ` Samuli Suominen
2012-10-30 22:04 ` Ciaran McCreesh
2012-10-30 21:24 ` Michał Górny
2012-10-30 21:28 ` Samuli Suominen
2012-10-31 0:39 ` Ryan Hill
2012-10-31 15:26 ` [gentoo-dev] On the usefulness of eclass changelog Alexis Ballier
2012-10-31 15:35 ` Ian Stakenvicius
2012-10-31 15:39 ` Alexis Ballier
2012-10-31 16:15 ` Samuli Suominen
2012-10-31 16:26 ` Ian Stakenvicius
2012-10-31 16:38 ` Alexis Ballier
2012-10-31 16:45 ` Jeroen Roovers
2012-10-31 18:17 ` Rich Freeman
2012-10-31 18:33 ` Samuli Suominen
2012-10-30 19:56 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: udev.eclass Alexis Ballier
2012-10-30 19:57 ` Samuli Suominen
2012-10-30 20:08 ` Alexis Ballier
2012-10-30 20:18 ` Michał Górny
2012-10-30 20:19 ` Samuli Suominen [this message]
2012-10-31 14:57 ` Alexis Ballier
2012-10-31 15:09 ` Michał Górny
2012-10-31 15:36 ` Samuli Suominen
2012-10-31 19:17 ` Markos Chandras
2012-10-30 20:06 ` Fabian Groffen
2012-10-30 20:06 ` Ian Stakenvicius
2012-10-30 20:08 ` Samuli Suominen
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=5090363C.1090209@gentoo.org \
--to=ssuominen@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