Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] bash-completion-r1: a quick migration guide
Date: Thu, 08 Sep 2011 16:37:56
Message-Id: 20110908183852.364b47a1@pomiocik.lan
1 Hello,
2
3 As new bash-completion-r1 eclass is in the tree now, a quick migration
4 guide follows.
5
6 The new eclass is simpler and more consistent. It doesn't enforce
7 USE=bash-completion or put any bash-completion-specific deps on
8 packages. If any package _really_ needs that, it should put out
9 the necessary IUSE and deps explicitly.
10
11 pkg_postinst() was removed as well. Users are expected to know how to
12 use 'eselect bashcomp list', like packages don't list what they've
13 installed in */bin.
14
15 Usually, migrating packages means replacing:
16
17 1) inherit bash-completion
18 -> inherit bash-completion-r1
19
20 2) bash-completion_pkg_postinst
21 -> :
22
23 3) dobashcompletion foo
24 -> dobashcomp foo || die
25
26 4) dobashcompletion foo bar
27 -> newbashcomp foo bar || die
28
29 5) BASHCOMPLETION_NAME=bar dobashcompletion foo
30 -> newbashcomp foo bar || die
31
32 6) BASHCOMPFILES='foo bar baz' dobashcompletion
33 -> dobashcomp foo bar baz || die
34
35 I'm listing '|| die' explicitly to ensure one doesn't forget about it.
36 It's necessary only in EAPI<4, like for doins/newins.
37
38 --
39 Best regards,
40 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] bash-completion-r1: a quick migration guide Ulrich Mueller <ulm@g.o>