Gentoo Archives: gentoo-user

From: "Boyd Stephen Smith Jr." <bss03@××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Wrong dependencies to postgresql
Date: Mon, 25 Dec 2006 11:57:18
Message-Id: 200612250553.04718.bss03@volumehost.net
In Reply to: Re: [gentoo-user] Wrong dependencies to postgresql by Enrico Weigelt
1 On Sunday 24 December 2006 19:37, Enrico Weigelt <weigelt@×××××.de> wrote
2 about 'Re: [gentoo-user] Wrong dependencies to postgresql':
3
4 First of all, thanks for responding, I was afraid we had lost another savvy
5 bugzilla user to the lack of (or discontent with) response from the
6 developers.
7
8 > * Boyd Stephen Smith Jr. <bss03@××××××××××.net> wrote:
9 > > Jakub is pretty bugzilla savvy, are you sure you bugs weren't
10 > > closed for valid reasons?
11 > well, after some discussion @ gentoo-dev, it's now a little bit
12 > clearer:
13
14 > The bugs are not completely valid yet (but soon will be), since
15 > libpq (<=8.0.8) is still buggy/incomplete (missing pg_config), so
16 > some packages may still need postgresql for building (not runtime).
17 > I supplied fixed ebuild to the -dev, but they told me they don't
18 > see what I'm fixing ;-o
19
20 Heh, like I mentioned/alluded to in my previous posting, once a package it
21 working, winnowing down the dependencies is sometimes not seen as
22 productive. I sympathizes with your blight and would volunteer my system
23 for chroot building were it not for my lack of time (etc.).
24
25 > Well, this issue is actually fixed in 8.0.9 (IMHO not completely
26 > stabelized yet, but soon), while introducing another, even worse at
27 > the same time: libpq-8.0.9 doesn't wanna play w/ postgresql<=8.0.8,
28 > but postgresql-8.0.9 wants exactly libpq-8.0.9. So there's no clean
29 > way to solve this. Someone @ b.g.o suggested completely removing
30 > postgres+libpq and installing afresh, but that's an absolutely
31 > no-go for production systems (IMHO). Disabling deps for upgrade
32 > should work, but is unclean.
33
34 Perhaps a dependency on '|| (>=category/libpq-8.0.9
35 <category/postgresql-8.0.9)' would be appropriate in this case. I believe
36 that ordering should prefer the library instead of the whole RDBMS.
37
38 In addition, a proper blocker should be added to libpq; I know it doesn't
39 help automated upgrades move forward, but at least is stops them from
40 blocking issues that *could* be problematic.
41
42 > My fixed ebuild should fit into the gap by adding pg_config to
43 > libpq (overwriting the one from postgresql) and changing the
44 > postgresql ebuild to be satisfied w/ this libpq version.
45
46 Hrm, sounds as if you want a single file to be provided by two packages.
47 This is not "the Gentoo way". In Debian, we have the alternatives
48 interface; in gentoo, it's assumed you manage such symlinks with either
49 eselect or manually.
50
51 If the pg_configs are *different*, you should patch both libpq (to install
52 pg_config as pg_config-libpq-$SLOT) and postgresql (to install pg_config
53 as pg_config-postgresql-$SLOT) and provide an eslect module to choose the
54 appropriate pg_config.
55
56 If the pg_configs are *the same*, you should (a) add them to libpq and have
57 postgresql depend on libqg--not installing it's own pg_config. or (b) have
58 pg_config be it's own package, depended on by both libpq and postgresql.
59
60 > > Sometime he does jump the gun though,
61 >
62 > Not only at me ? Some bit salving ;-)
63
64 Oh yes. Particularly when marking bugs as duplicates. There were one or
65 two recent out-of-tree kernel module bugs that he marked as duplicates of
66 the generic "kernel-2.6.18+ breaks sandbox" bug that weren't actuallt
67 duplicates.
68
69 That said, Jakub is responsible for 50%+ of the hits to bugs.gentoo.org; he
70 *is* for all intents and purposes the bugzilla manager.
71
72 Normally, he's correct, but don't worry about respectfully disagreeing with
73 him. He's still human and will make mistakes.
74
75 > But I had to learn filing bugs
76 > and talking @ -dev are just a waste my (rare+expensive) time.
77
78 Perhaps your time is more valuable than mine, but I've never found
79 reporting bugs to be a waste of time. Surely, patching the offending
80 ebuild/source is better, but such patches should be attached to a bugs for
81 the developers/other users to use as well.
82
83 > > > Lots of packages have an wrong/unnecessary dependency to
84 > > > postgresql.
85 > >
86 > > I don't doubt it. It's generally better to depend on too much
87 > > rather than too little, and once things are "working" it's hard
88 > > to get someone to "fix" it and run the risk of breaking it further.
89 >
90 > Wouldn't be such an problem w/ really cleanroom builds + tests
91 > from the first place. Seems, Gentoo isn't made for that.
92
93 Well, there is a catalyst target for smokescreen/tinderbox building. I'm
94 not sure of the quality but it is supposed to start from a clean image for
95 each rebuild, and simply use the binary packages previously built. I'd
96 assume it uses the ebuilds's test suite to verify post-install
97 correctness, (yes, there is support for unit-sytle testing built into
98 emerge) but I'm not sure the quality of those tests on libpq or
99 postgresql.
100
101 > > > a) probably traditionally depended on the whole postgresql, maybe
102 > > > since before libpq was an own package. ie. qt, dovecot, ...
103 > >
104 > > Have you confirmed these actually compile just against libpg?
105 >
106 > I'm still in the process. The lack of automatic cleanroom builds
107 > requires me to install an minimal jail before each build.
108 > (most of my gentoo systems actually have postgresql server running)
109
110 Again, just so you know about the tools available, check out catalyst's
111 smokescreen/tinderbox target.
112
113 But, before you preform such tests, I'd think filing a bug to be premature.
114 Make sure there's a fixable issue before you potentially break packages.
115
116 > > > b) many apps (ie. webapps like bugzilla) have postgresql as dep.,
117 > > > although they do not need it to be installed. (ie. bugzilla does
118 > > > not have to do anything directly w/ postgresql, since it uses
119 > > > perl-DBD for database access). Of course they maybe want to
120 > > > have access to some postgres database, but this obviously does
121 > > > not need an local server.
122 > >
123 > > Are you sure this isn't bringing in postgresql to satisfy some
124 > > virtual?
125 >
126 > Which virtual should it be ? And why ?
127
128 I'm not sure, I didn't do any investigation, but it could be something as
129 simple as virtual/db or virtual/storage. If it's bringing in postgresql
130 as a virtual, then it depends on postgresql OR any package that can
131 provide that virtual, as controlled by (IIRC) <profile>/virtual
132 plus /etc/portage/profile/virutual. In that case, I don't believe the bug
133 would be well-founded, because the dependent package (e.g. bugzilla)
134 definitely needs *somewhere* to store it's data.
135
136 > > In all cases, you've confirmed that the dependency is direct and not
137 > > USE flag controlled?
138 >
139 > Of course, it is controlled by the postgresql useflag. But that doesn't
140 > make it better. Bugzilla does not need an local postgres server.
141 > And I didn't find any sign that it needs pg_config, so this current
142 > libpq bug also shouldn't be an issue.
143
144 USE-flags can bring in non-requisite dependencies, for convenience. If you
145 don't want a package to bring in the USE-flag dependent dependencies,
146 simply disable the flag for that package.
147
148 That said, if a use flags controls both *support for* and a *dependency on*
149 a certain package, it is broken, and I feel you bug could be valid. E.g.
150 package Y without the postgres USE flag can't use a remote postgresql
151 server but package Y with the postgres USE flags forces you to install a
152 local postgresql server.
153
154 --
155 "If there's one thing we've established over the years,
156 it's that the vast majority of our users don't have the slightest
157 clue what's best for them in terms of package stability."
158 -- Gentoo Developer Ciaran McCreesh