RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Two limitations of triggers in rpm

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 22 Sep 2008 - 13:38:03 CEST
Message-id: <54F76522-8566-43BB-9173-BAA146121B83@mac.com>

On Sep 22, 2008, at 2:44 AM, Alexey Tourbin wrote:

> On Sat, Sep 20, 2008 at 01:37:59PM -0400, Jeff Johnson wrote:
>> 	There's the additional wrinkle of handling
>> 		Provides: /path/to/file
>> 	which muddles the implementation further, because 2 indices need to
>> be searched.
>>
>> 	Personally, I think its way past time to prohibit file paths in the
>> Providename index. A second source
>> 	for paths adds a huge amount of complexity to all application
>> accesses, not just rpm, of an rpmdb for
>> 	very little benefit other than that packagers and vendors get to
>> pretend that file paths in the Providename
>> 	index is some sort of cool and useful feature.
>
> In ALT Linux, "file-level" dependencies are essential.  I.e. when
> a file path is known in advance, we use dependency on that path (e.g.
> "Requires: /bin/sh").  And we have some complicated logic to translate
> file-level dependencies with intermediate symlinks in path components,
> e.g. /etc/init.d/functions -> /etc/rc.d/init.d/functions.
>
> Now, some paths are are "virtual", which is e.g. executable paths  
> under
> update-alternatives(1) control.  Those paths are not packaged (and  
> hence
> cannot be accessed via Basenames index), but rather created in % 
> post script.
> We have find-provides hook which automatically provides virtual paths
> (e.g. "Provides: /usr/bin/xvt" for xterm, rxvt-unicode etc.)
>

So use a probe dependency like
     Requires: executable(/path/to/alternative)
The probe will be evaluated at run-time, and even permits rpm to
interoperate with dpkg alternatives.

73 de Jeff
Received on Mon Sep 22 13:38:28 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.