[Yum-devel] [review request] firmware-tools bootstrap plugin

seth vidal skvidal at fedoraproject.org
Wed Aug 29 04:34:52 UTC 2007


On Tue, 2007-08-28 at 11:07 -0500, Michael E Brown wrote:
> All,
> 
>     I have developed the attached, rather small, yum plugin that I
> intend to distribute as part of firmware-tools. I would like some review
> on this before I start enabling it to ensure that it is completely sane
> and using the yum api's properly.
> 
> Description:
>     Firmware-tools is a package meant to provide infrastructure to do
> firmware upgrades. It needs to have a set of machine and
> hardware-dependent RPMs installed representing the firmware for that
> hardware.
> 
>     I use a 'bootstrap' process currently to figure out the list of
> firmware RPMs to install. This consists of converting the local
> machine's lspci output to a standardized RPM virtual provides name, and
> then searching the yum repos for RPMs with that virtual provides. The
> current way this is done is like: "yum install $(bootstrap_firmware)",
> where bootstrap_firmware is the command that creates the virtual
> provides names.
> 
>     The intent of this yum plugin is to eliminate this bootstrap as a
> separate step. The intent is that whenever the user does a yum upgrade,
> that if there are any new firmware packages in the repository that were
> not previously on their system, they will get automatically
> bootstrapped.
> 
> Questions:
>   -- I currently use exclude_hook as that seems to run about where I
> need. The only other hook that runs about when I want is the
> postreposetup_hook.
> 

Why not use preresolve?
Exclude doesn't mean there will necessarily be a transaction at all.
preresolve does suggest that more to me.

Also you may want to only add these pkgs if the transaction has any pkgs
being installed or updated.


>   -- will this work with yum 2.4 as distributed in Centos 4? I dont have
> a test machine handy and need to support back to yum 2.4.


conduit._base.install(name=pkg.name) isn't support in 2.4 plugins. It's
actually a damn bit harder on 2.4. install() wasn't around until 2.6


>   -- The plugin can be tested with mock input by setting the
> DEBUG_BOOTSTRAP environment variable before running yum, and can provide
> tracing by setting the DEBUG environment variable. Is this acceptable?

the debug doesn't bother me if that's what you mean.


-sv





More information about the Yum-devel mailing list