Gentoo Archives: gentoo-portage-dev

From: Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Configuration files in a package
Date: Tue, 26 Oct 2004 18:16:13
Message-Id: 20041026201602.567fc35e@eusebe
In Reply to: [gentoo-portage-dev] Configuration files in a package by Andrea Carpani
1 On Tue, 26 Oct 2004 19:06:37 +0200
2 Andrea Carpani <ml@×××××××.net> wrote:
3
4 > Is there a way to tag some package files as "configuration
5 > files" (in the custom ebuild with a custom function maybe) so
6 > that once the package is installed I can do something like
7 >
8 > # qpkg --get-cfg-files foo
9 >
10 > and obtain a list like
11 >
12 > /etc/foo.cfg
13
14 Latest version of "equery" (app-portage/gentoolkit-0.2.0_pre10)
15 includes that feature. Not sure the manpage is up-to-date tho, so
16 you may want to have a look on the description on bug #43422:
17 http://bugs.gentoo.org/show_bug.cgi?id=43422
18
19 For config files, it should be something like this:
20 # equery files --filter=conf foo
21 The definition of a config file is "a file that is in your
22 $CONFIG_PROTECT path" (see make.conf or make.globals, it includes
23 "/etc" and a few other dirs).
24
25 > I'd like to have the same thing for library and executable
26 > files.
27
28 For executables, try:
29 # equery files --filter=cmd foo
30 The definition of a command is "a file that is in current $PATH".
31 Thus, a user and the root may have different results if the
32 package has installed some files in /sbin or /usr/sbin.
33
34 There is no option for libraries, but you can try something like
35 that:
36 # equery -C files --filter=obj,sym foo \
37 | sed '/^\//{/.*\.\(so\|a\|la\)[\.0-9]*$/!d}'
38 It will list files & links named "something.{so,a,la}[.version]".
39 A "lib" filter rule could probably be added to equery tho, all
40 that is needed is a correct criteria to recognise this files
41 (like a regexp match on there name similar to the one above,
42 or a`file | grep something` test, or a list of directories where
43 libs are supposed to be installed... well, something like that).
44
45 > Or maybe something that gives me a LIBS or CONFIG file in
46 > /var/db/pkg/<category>/<app> filled with files that the ebuild
47 > tagged in a special way.
48
49 I can't talk for portage devs, but I doubt they are willing to add
50 db entries and modify portage just for that purpose.
51
52 --
53 TGL.
54
55 --
56 gentoo-portage-dev@g.o mailing list