Gentoo Archives: gentoo-user

From: Grant Taylor <gtaylor@×××××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Converting a Portage Flat File to a Directory Structure
Date: Tue, 21 Apr 2020 15:18:15
Message-Id: d3cfd666-5822-f80d-91fc-22d3e8bee979@gentoo.tnetconsulting.net
In Reply to: [gentoo-user] Converting a Portage Flat File to a Directory Structure by Ashley Dixon
1 On 4/20/20 7:13 AM, Ashley Dixon wrote:
2 > Hi gentoo-user,
3
4 Hi,
5
6 > Following the recent conversation started by Meino, I have decided to
7 > convert my package.* files to directory structures. For all but
8 > one, this has proven tedious, but relatively painless. My
9 > package.use file is another story: at over three-hundred lines, the
10 > thought of manually converting this to a directory structure
11 > does not attract me.
12 >
13 > Are there any tools in Portage to help with this, or must I resort to
14 > writing a shell script ?
15
16 I'm not aware of a tool to do the conversion. However there may be one
17 that I'm not aware of.
18
19 > For example, considering the following lines in my flat package.use:
20 >
21 > media-video/openshot printsupport
22 > sys-apps/util-linux tty-helpers
23 >
24 > I want to take this file and create a directory structure:
25 >
26 > media-video/openshot, containing "media-video/openshot printsupport"
27 > sys-apps/util-linux, containing "sys-apps/util-linux tty-helpers"
28
29 I wasn't aware that you could put sub-directories in
30 /etc/portage/package.use. I've always had to put the files directly in
31 that directory, not sub-directories. As such, my files have names like
32 sys-apps-util-linux to avoid naming collisions. Perhaps things have
33 changed since I last tried to use a sub-directory or I am misremembering.
34
35 > How can this be done ?
36
37 I think it should be relatively easy to script reading the line,
38 extracting the package name, munging the name, and writing the entire
39 unmodified line to a new file based on the munged name. If directories
40 work, create and populate them without munging names.
41
42
43
44 --
45 Grant. . . .
46 unix || die

Replies

Subject Author
Re: [gentoo-user] Converting a Portage Flat File to a Directory Structure Ashley Dixon <ash@××××××××××.uk>