Gentoo Archives: gentoo-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: udev-rules.eclass
Date: Fri, 13 Jul 2012 05:46:14
Message-Id: 1342158291.14617.23.camel@big_daddy.dol-sen.ca
In Reply to: Re: [gentoo-dev] rfc: udev-rules.eclass by Alexis Ballier
1 On Thu, 2012-07-12 at 12:30 -0400, Alexis Ballier wrote:
2 > On Wed, 11 Jul 2012 20:41:04 -0700
3 > Brian Dolbec <dolsen@g.o> wrote:
4 >
5 > > On Wed, 2012-07-11 at 18:48 -0500, William Hubbs wrote:
6 > > > On Wed, Jul 11, 2012 at 04:59:11PM -0400, Alexis Ballier wrote:
7 > > > > How do you plan to handle the following:
8 > > > > - foo installs an udev rule
9 > > > > - install foo with old udev
10 > > > > - upgrade udev
11 > > > >
12 > > > > are rules installed by foo used by new udev ?
13 > > >
14 > > > No, they wouldn't be; that is a good reason to question the value
15 > > > of the eclass itself. Maybe the correct way to do this is to forget
16 > > > the eclass and just file bugs against packages that break having
17 > > > them move their rules to the new location and set a dependency on
18 > > > the newer udev.
19 > > >
20 > > > This would have to be a rev bump for the broken packages.
21 > > >
22 > > > William
23 > > >
24 > > > >
25 > > > > A.
26 > > > >
27 > >
28 > > So, does that mean the rule itself changes or just the location change
29 > > is needed?
30 > >
31 > > If it is just a location change, a fairly simple udev-updater script
32 > > would do it.
33 > [...]
34 >
35 > how do you handle the package manager database containing the location
36 > of the file ?
37 >
38 > A.
39 >
40
41 Personally, since I'm not a bash programmer, I'd use python. And since
42 this is the package managers db, I'd use the pkg manager to do it.
43 Specifically I'd create an emaint module to do it in the fully
44 modular/plug-in-able emaint rewrite I did (waiting for Zac's review,
45 merge). It can make it's modules fully available for direct or managed
46 import by other portage code, or other scripts. In fact in that branch I
47 moved some clean-logs code from emerge into an emaint module, extended
48 it a bit so you can change the time setting, run pretend runs (-c,
49 --check)... and had the emerge FEATURE run it instead. So you could run
50 it independently of emerge if you choose.
51
52 There is an outdated vdbkeys emaint module that did changes and updates
53 to several files in a pkg's vdb directory. Creating one to do this
54 should be quite simple.
55
56 That said, I don't profess to know what other possible ramifications
57 there would be to changing a few entries in a pkg's CONTENTS file. I'll
58 leave that up to Zac and the others. But I haven't heard any screaming
59 of breakage that would occur for doing so.
60 --
61 Brian Dolbec <dolsen@g.o>

Attachments

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