[Fedora-packaging] kmod: $1 in %post and firends broken (was: Kernel Module Packaging Standard Teleconference)

Axel Thimm Axel.Thimm at ATrpms.net
Thu Aug 17 11:40:19 UTC 2006


On Wed, Aug 16, 2006 at 10:30:54PM +0200, Axel Thimm wrote:
> In the kmdl scheme they would both get installed and the old ones
> uninstalled (same for the firmware). %post %postun would also perform
> the proper install/upgrade distinction (another thing kmods fail, you
> cannot know whether this is an upgrade of install in the specfile, but
> that's another story).

The argument is rather obvious, but before people ask:

$1 is the number of packages with the same name existing after this
rpm operation and is used in scriplets to decide whether this package
is a first-time install, an upgrade or a final deletion.

For kmdls this is the number of kmdls for this kernel/kabi, for kmods
it for all kernels, therefore the kmod can never know whether it's a
first time install/upgrade/deletion for the kernel it's being
installed in. E.g. usage of $1 in kmods'scriplets is broken.
-- 
Axel.Thimm at ATrpms.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20060817/dbf7f3cb/attachment.sig>


More information about the Fedora-packaging mailing list