Question about locking packages
Jeff Johnson
n3npq at mac.com
Wed Aug 2 08:55:52 PDT 2006
On Aug 2, 2006, at 11:36 AM, Gustavo Niemeyer wrote:
>> If I generalize Requires: through the same mechanism (i.e. a
>> configuration file), and attach/check those Requires: with every
>> transactilon, then its possible to specify a persistent dependency
>> which should have the same effect as locking or pinning.
>
> Indeed. This would have the same effect of Smart locks.
>
> Is there an API to query these "soft" requirements in RPM?
>
Yes:
/**
* Load sysinfo provides into a dependency set.
* @retval *dsp (loaded) depedency set
* @param fn path to file (NULL uses /etc/rpm/sysinfo)
* @return 0 on success
*/
int rpmdsSysinfo(rpmds * dsp, /*@null@*/ const char * fn)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem,
internalState @*/
/*@modifies *dsp, rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/;
There's no-brainer python bindings as well. You end up with a
dependency set
containing the contents of /etc/rpm/sysinfo (or any file) parsed into
a dependency set.
You can display what is in /etc/rpm/sysinfo using
rpm -v --showrc
(Note: -v before --showrc, not after. --showrc as currently
implemented is
immediate process and exit.)
>> Per-transaction dependencies, including Requires:/Conflicts:/
>> Obsoletes:, through a user specified configuration file, is likely to
>> be in rpm-4.4.8.
>
> Interesting. Any usage case in mind?
>
Persistent Obsoletes: can be achieved through, say, /etc/rpm/sysinfo/
Obsoletes
configuration. No known usage case for per-transaction Conflicts:, but
Conflicts have very little use these days because they cause full-
stop failure
to upgrade when what users expect of depsolvers is figuring what
needs to be added
or removed to continue.
73 de Jeff
More information about the Smart
mailing list