Question about locking packages

Jeff Johnson n3npq at mac.com
Wed Aug 2 07:30:19 PDT 2006


On Aug 2, 2006, at 10:10 AM, Gustavo Niemeyer wrote:

> Hello Thomas,
>
>> Recently we decided to replace the whole apt-rpm with smart.
>> Now I got a
>
> Interesting. Who are "we" and how's the process going?
>
>> problem with locking packages which actually should only be kept back
>> til I give the signal to install them.
>>
>> I consider something like this:
>>
>> smart upgrade shows all locked packages
>> -> compare locked packages with the output of smart flag --show lock
>> -> give smart an option like smart upgrade --really-all to update  
>> also
>> locked packages or smart upgrade <packagename> to upgrade this locked
>> package.
>>
>> Does anyone has a script to do this. maybe via cron? Or is there a
>> workaround for this problem?
>
> I'm not sure I understand the problem you're trying to solve. When you
> lock a package you're asking Smart not to allow these packages to be
> changed. If you want to change these packages all you have to do is
> unlocking them (that's the equivalent of --really-all).
>
> Perhaps what you're looking for is a "soft lock" that prevents the
> package from being upgraded automatically. But in this case, what
> happens if the package is being required by another package that
> will be upgraded (isn't "soft locked")?
>

The issue of locking or "pinning" is repeatedly a feature request for  
rpm.

Since the goal of rpm (and depsolvers) is primarily upgrading, and  
"pinning"
can reneder a machine non-upgradeable, well, "pinning" and "upgrading"
are at cross purposes. Sure one can attempt best effort, and sure  
upgrades
will succeed for certain classes of "pinned" packages.

Meanwhile, I think I know a way of achieving "pinning" of rpm packages.

rpm-4.4.3 and later has a means to specify Provides: in /etc/rpm/ 
sysinfo.

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.

Per-transaction dependencies, including Requires:/Conflicts:/ 
Obsoletes:, through
a user specified configuration file, is likely to be in rpm-4.4.8.

73 de Jeff
> -- 
> Gustavo Niemeyer
> http://niemeyer.net




More information about the Smart mailing list