0

I want to provide some RPM packages in a virtual RPM package that does not include files.

The case is, I create an embedded system with buildroot then RPM takes the version control responsibility. For this reason buildroot images always have the latest RPM packages content physically but someone should say to RPM that they already exists.

I know the files may be provided in a base virtual package with 'Provides:' keyword in RPM spec file. I want to provide packages with version number instead of individual files in an rpm package.

Ex.

App1.0-1.rpm requires lib3.0-4.rpm and they already exist on my
package server. The buildroot image already includes files that
lib3.0-4.rpm provides. I want to define a package with name
buildrootbase2.0-1.rpm parallel to my root file system image that
prevents reinstallation of lib3.0-4.rpm while App1.0-1.rpm is
installed.
ataman
  • 341
  • 4
  • 18

1 Answers1

1

Provides: is more commonly used with packages than with files and it supports version checking:

Provides:        foo-bar = 2.1.3-2b

The second question is more tricky to answer. You will need to use triggers to accomplish what you are trying to do.

Triggers have some special syntax designed to give you control on when and what to do based on existing packages and the state the rpmdb is before and after the installation/dis-installation of a target package or more

I don know of a good tutorial to use triggers, but you can read this PDF, that uses them for something "unusual", explaining how they work in the process:

http://www.redhat.com/promo/summit/2010/presentations/summit/opensource-for-it-leaders/thurs/pwaterma-2-rpm/RPM-ifying-System-Configurations.pdf

The actulal triggers explanation starts around page 23

Bruno9779
  • 1,551
  • 2
  • 14
  • 31