Gentoo Archives: gentoo-portage-dev

From: Marius Mauch <genone@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] glsa implemented as a special set
Date: Mon, 24 Apr 2006 15:15:08
Message-Id: 20060424171316.28e39d31@sven.genone.homeip.net
In Reply to: Re: [gentoo-portage-dev] glsa implemented as a special set by Brian
1 On Mon, 24 Apr 2006 07:04:13 -0700
2 Brian <dol-sen@×××××.net> wrote:
3
4 > On Mon, 2006-24-04 at 14:20 +0200, Marius Mauch wrote:
5 > > On Sun, 23 Apr 2006 08:55:58 -0700
6 > > Brian <dol-sen@×××××.net> wrote:
7 > >
8 > > > I was thinking that /etc/portage/sets/glsa could be a symlink to
9 > > > set list in the current metadata/glsa directory of the portage
10 > > > tree. That file should be relatively easy to auto-generate from
11 > > > the existing glsa*.xml files there already. Perhaps a
12 > > > FEATURES="GLSA_SET" would generate that file on completion of an
13 > > > "emerge --sync" I could also then put a GLSA field into
14 > > > porthole's package Summary view as well as a GLSA notebook
15 > > > page(s) to display the appropriate glsa?.xml file(s).
16 > >
17 > > Too complicated. First you currently need gentoolkit for glsa.py,
18 > > and portage shouldn't depend on gentoolkit.
19 >
20 > I did not mean portage should and I din't want to depend on gentoolkit
21 > either.
22
23 Not sure I understand your idea then, I was under the impression that
24 `FEATURE=GLSA_SET emerge --sync` would create that file, is that not
25 what you meant?
26
27 > > Also you can't store
28 > > system-specific files in the tree.
29 >
30 > Yeah, that was a bit of a thought evolution while I was typing. I
31 > realized after I hit "send". At first I thought it could be included
32 > in the sync. Then thought it's only a duplication of the data already
33 > there, so why not generate it (save bandwidth), since the data will
34 > only change at sync time, just do it once then.
35
36 Ehm, you couldn't include it in the sync as it's system specific. It
37 would have to be generated locally, or you have to treat it special
38 again (only update packages that are installed, don't install new
39 packages).
40
41 > > And finally using an intermediate
42 > > file creates some additional issues (check for IO/FS problems,
43 > > checking permissions, etc).
44 > > Any reason you need a real file for this instead of just generating
45 > > the list on the fly?
46 >
47 > I thought a smaller stripped down glsa.py module could generate the
48 > file at completion of the sync. Then no special code is needed
49 > internal in porthole beyond checking for set inclusion, atom
50 > matching, just a glsa_flag=True to ignore members that are not
51 > already installed.
52 >
53 > Once portage was able to handle sets, it would almost automatically be
54 > able to handle a glsa set as well. The only difference is not
55 > installing a set member that is not already installed.
56
57 *Shrug*, generating the list dynamically shouldn't take more than 10 or
58 20 lines using glsa.py, basically it's
59
60 pkg_list = []
61 glsa_list = [Glsa(x) for x in get_glsa_list(glsadir, glsaconfig)]
62 for x in glsa_list:
63 if x.isVulnerable():
64 pkg_list.extend(x.getMergelist())
65
66 plus some error handling. Add some dep_getkey() calls if you don't want
67 the glsa resolver logic of minimal intrusion (might be problematic
68 though).
69 If you need a file interface wrap the list in a StringIO instance.
70 It's really better to keep interdependencies to a minimum here, and
71 when portage gets set support it will generate the glsa update list
72 dynamically anyway, so portage wouldn't benefit from a file at all.
73
74 Marius
75
76 --
77 Public Key at http://www.genone.de/info/gpg-key.pub
78
79 In the beginning, there was nothing. And God said, 'Let there be
80 Light.' And there was still nothing, but you could see a bit better.

Attachments

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

Replies