1 |
On Fri, Sep 01, 2006 at 06:57:22PM +0200, Danny van Dyk wrote: |
2 |
> Am Freitag, 1. September 2006 17:05 schrieb Alec Warner: |
3 |
> > Stefan Schweizer wrote: |
4 |
> > > Hi, |
5 |
> > > |
6 |
> > > Repoman needs to check for deprecated eclasses, see |
7 |
> > > http://bugs.gentoo.org/141677 |
8 |
> > > |
9 |
> > > As a result of the discussion in the bug, we would like to add |
10 |
> > > $PORTDIR/qa-data/eclass.deprecated |
11 |
> > > to allow to deprecate eclasses properly and make repoman fail. |
12 |
> > > |
13 |
> > > This will allow us to avoid problems with new ebuilds for |
14 |
> > > deprecated eclasses which result in bugs like |
15 |
> > > Bug 141629 dev-util/systemtap-20060325.ebuild uses deprecated |
16 |
> > > kernel-mod.eclass |
17 |
> > > I believe the developer has not known anything about that |
18 |
> > > kernel-mod is deprecated when making that ebuild. Now he ignores |
19 |
> > > the bug and we have that old eclass used again :( |
20 |
> > > |
21 |
> > > Best regards, |
22 |
> > > - Stefan |
23 |
> > |
24 |
> > I would prefer to see a patch for this first, and then modify |
25 |
> > gentoo-x86 second; but I agree in principle. What of the |
26 |
> > conversation about 2 files, one for "this eclass is currently being |
27 |
> > deprecated" -> repoman warning; and "this eclass is no longer usable" |
28 |
> > -> repoman failure. |
29 |
> > |
30 |
> > Also the deprecated -> new-eclass mapping. Afaik that didn't go so |
31 |
> > well for me; but I still like it ;) |
32 |
> > |
33 |
> > old new |
34 |
> > ----- ------ |
35 |
> > foo.eclass new-foo.eclass |
36 |
> |
37 |
> We don't need a new file for that IMHO. I'd propose to add something |
38 |
> like |
39 |
> |
40 |
> ECLASS_DEPRECATED="${ECLASS_DEPRECATED} foo" |
41 |
> ECLASS_REPLACEMENTS="${ECLASS_REPLACEMENT} new-foo" |
42 |
> |
43 |
> to foo.eclass. In my eyes this is much less work as repoman merely has |
44 |
> to check for 2 envvars. |
45 |
|
46 |
As much as I'm a fan of embedding the metadata into the object itself, |
47 |
this sucks; reliant on either |
48 |
|
49 |
1) grepping it out of the file (which means there is the potential for |
50 |
rare false positives to occur). |
51 |
|
52 |
2) bastardizing inherit to grab it, thus forcing a sourcing for every |
53 |
single ebuild regardless of staleness |
54 |
|
55 |
Your example above seems to indicate preferring #2, which folks will |
56 |
probably tell you to get stuffed on, forcing a regen of the packages |
57 |
they're examining they won't like (will slow repoman down even |
58 |
further). |
59 |
|
60 |
Also, the new-foo renaming can't be reversed cleanly; consider if the |
61 |
old class was kernel-mod, new class is kernels, how do you know where |
62 |
to split old/new? You can search ECLASS_DEPRECATED, but potential for |
63 |
collision there makes it a crappy option, in the previous example |
64 |
consider if kernel-mode and kernel were two deprecated eclasses, it |
65 |
would falsely label the new class as mod-kernels. |
66 |
|
67 |
Meanwhile; I'd just stick a file up somewhere on gentoo.org, and |
68 |
mangle repoman to pull down a copy every N days as needed and have it |
69 |
use that; code can be reused from metadata.dtd usage. |
70 |
|
71 |
~harring |