http://qa.mandrakesoft.com/show_bug.cgi?id=6313


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1




------- Additional Comments From [EMAIL PROTECTED]  2003-11-09 18:21 -------
I don't think this can be solved in rpm without massive changes. The
buildrequirements of a source package are stored in the rpm header,
just like the runtime requirements of the binary packages. That's why
the --with switches have no effect, there's no evaluation of the spec
file when you do a 'rpm -qpR package.src.rpm' command.

Here's a suggestion on how to work around this in your slbd: You
should already have a list of the packages that have a specific --with
switch, e.g. --with plf. You can create intermediate src.rpm packages
from them and store them in the SRPMS input dir of your plf build
robot. You still have to use the --with plf switch for the rpm
--rebuild command, but you can add this for all plf src.rpms, as
rpmbuild will ignore unknown --with switches.

This example should illustrate this:
[EMAIL PROTECTED] SRPMS]$ rpm -qp --requires xine-lib-1-0.rc2.1mdk.src.rpm
aalib-devel
esound-devel
libvorbis-devel
libspeex-devel
libarts-devel
libSDL-devel
libmng-devel
libflac-devel
libgnome-vfs2-devel
libvcd-devel >= 0.7.19
autoconf2.5
automake1.7
rpmlib(CompressedFileNames) <= 3.0.4-1
[EMAIL PROTECTED] SRPMS]$ rpm -ihv xine-lib-1-0.rc2.1mdk.src.rpm
   1:xine-lib               ########################################### [100%]
[EMAIL PROTECTED] SPECS]$ rpm -bs --with plf --nodeps xine-lib.spec
Wrote: /home/goetz/RPM/SRPMS/xine-lib-1-0.rc2.1plf.src.rpm
[EMAIL PROTECTED] SRPMS]$ rpm -qp --requires xine-lib-1-0.rc2.1plf.src.rpm
aalib-devel
esound-devel
libvorbis-devel
libspeex-devel
libarts-devel
libSDL-devel
libmng-devel
libflac-devel
libgnome-vfs2-devel
libvcd-devel >= 0.7.19
autoconf2.5
automake1.7
libfame0.8-devel
librte0.4-devel
rpmlib(CompressedFileNames) <= 3.0.4-1


As you can see, the plf.src.rpm has the additional buildrequires. Now
you can rebuild this with:
rpm --rebuild --with plf xine-lib-1-0.rc2.1plf.src.rpm

-- 
Configure bugmail: http://qa.mandrakesoft.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


------- Reminder: -------
assigned_to: [EMAIL PROTECTED]
status: NEW
creation_date: 
description: 
When a package has conditional BuildRequires (like ImageMagick) these are not
picked up when querying the package:

Normal:
[EMAIL PROTECTED] i586]$ rpm -qpR
/mirrors/cooker/SRPMS/ImageMagick-5.5.7.12-1mdk.src.rpm | wc -l
     15

--with plf:

[EMAIL PROTECTED] i586]$ rpm -qpR
/mirrors/cooker/SRPMS/ImageMagick-5.5.7.12-1mdk.src.rpm --with plf | wc -l
     15
[EMAIL PROTECTED] i586]$ rpm --with plf -qpR
/mirrors/cooker/SRPMS/ImageMagick-5.5.7.12-1mdk.src.rpm | wc -l
     15
[EMAIL PROTECTED] i586]$ rpm -qpR --with plf
/mirrors/cooker/SRPMS/ImageMagick-5.5.7.12-1mdk.src.rpm | wc -l
     15

>From the ImageMagick.spec file:
%if %build_plf
%define enablelzw       1
%define enablejasper    1
%define enablefpx       1
%endif

%if %{enablefpx}
BuildRequires:  libfpx1-devel
%endif
%if %{enablejasper}
BuildRequires:  libjasper-devel
%endif

So, one would expect to see a number larger than 15 when queried with the --with
plf option.

Reply via email to