Re: Conditional comparision doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 9 Apr 2011 12:52:51 -0500, Bruno wrote:

> > $ rpmdev-vercmp 4.8.10 4.8.3
> > 0:4.8.10-None is newer
> 
> Would it be possible to run something like:
> rpmdev-vercmp 4.8.10 4.8.3 > /dev/null;echo $?
> in the spec file and compare the output to 0, 11 or 12?

Sounds doable.

Be prepared to deal with a little bit of extra burden, however.

When running "rpm" inside the spec file to fill macros with the EVR of
installed packages, expect this to break during src.rpm rebuild outside
of the buildroot (and when the rpms to be queried are not available yet).
It is not uncommon for packagers to test their conditional spec files only
on a system where the queried/grepped files are available.

Plus, running "rpm" inside a spec file is not guaranteed to work.
Because depending on the used build-system, the RPM database found in the
buildroot may be incompatible due to host/guest RPM differences - as a result
of using an external RPM when populating the buildroot.
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging


[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux