[Rpm-maint] RPM 4.9.0 alpha available
Phil Knirsch
pknirsch at redhat.com
Tue Dec 21 13:52:54 UTC 2010
On 12/20/2010 06:07 PM, Michael Schroeder wrote:
> On Mon, Nov 29, 2010 at 07:13:38PM +0100, Michael Schroeder wrote:
>> On Fri, Nov 19, 2010 at 11:44:53AM +0100, Michael Schroeder wrote:
>>> - tilde support in version comparison
>>> - triggers on provides instead of package names
>>> - weak dependencies (basically just parsing them and storing them
>>> in the rpm header)
>>> - defining some tag where yum/zypp/smart can store the reason
>>> why the package was installed (user selected/dragged in via
>>> dependencies), so that we can implement a "show me all unneeded
>>> packages" function
>>
>> Here's another one to discuss:
>>
>> - allow self-conflicts, like debian does. The use case is to
>> be able to say "only one of this may be installed". Example:
>
> And here's another nice-to-have feature (christmas is near ;-) ):
>
> - implement a way so that a directory may be replaced by
> a symlink to another directory.
>
> This is something packagers seem to do often, it happens when
> a directory gets moved for some reason and a compatibility symlink
> is added. Currently you'll get an ugly "cpio error" message when
> you try to install the rpm.
>
> There is probably no sane way to solve the general "replace
> directory with something else" problem, but the special case
> "directory with symlink to directory" may be possible. Maybe
> even "directory with symlink to *new* directory" is enough.
>
Long time reader, first time poster (i think! ;)).
Years ago i've had several cases of this and as you mentioned, a general
solution isn't possible simply for the fact that rpm is lacking
essential information and can do only "syntax" but not "semantics" of
what you're trying to do.
I've seen many many very very ugly hacks trying to circumvent the
problem in packages (hint: %pre scripts with %ghost files *shudder*) to
deal with really tricky changes.
In general though it boils down to just a few cases actually:
Post deinstall/pre install:
1) Directory is empty and not owned by any other package
2) Directory is empty and owned by other package[s]
3) Directory is not empty and neither it nor any of it's files are owned
by other package[s]
4) Directory is not empty and it or any of it's files are owned by other
package[s]
I personally think 1) and 2) can be fairly sanely handled syntactically
by rpm by simply removing the directory and adding that symlink.
Case 3) and 4) though are imho not automagically solvable by rpm itself
as there is no way rpm can determine what to do with the files in the
directory. The only remotely sane handling would be to rename the
directory to a dir.rpmsave and then let the admin handle the files
within it, but that would be very optional and definitely not enabled by
default. Default in such cases would still be to bomb out. The only
thing that could really be improved there is if we could detect whether
we'd end up with such a case during a transaction and basically abort it
before we actually perform it. Otherwise we'll be stuck half performed
transaction later on which is always kind of icky.
Just my $0.02
Thanks & regards, Phil
--
Philipp Knirsch | Tel.: +49-711-96437-470
Supervisor Core Services | Fax.: +49-711-96437-111
Red Hat GmbH | Email: Phil Knirsch <pknirsch at redhat.com>
Hauptstaetterstr. 58 | Web: http://www.redhat.com/
D-70178 Stuttgart, Germany
Motd: You're only jealous cos the little penguins are talking to me.
More information about the Rpm-maint
mailing list