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

Requires & Provides on -devel packages



A bit of history... when a peice of software was packaged the result used to be one package, which included everything (libraries, binaries, etc). The dependancies for this model worked quite fine, because it was an all or nothing aproach. As distributions evolved things changed. When I look at the current mandrake distribution, what used to be one package is now split up into multiple packages.

   * package containing binaries
   * package containing libraries ( %{_libdir}/*.so.* )
   * package containing -devel files ( %{_libdir}/*.a %{_libdir}/*.so
     %{_includedir}/* )

I understand the rationale behind splitting up the packages. With the "libpolicy" ( lib%{name}%{major} ) stuff it enables you to have multiple versions of the library (often nice for compatability reasons) on the system. Having separate -devel packages allows you to have them installed or not (save up some diskspace) or compile for a certain version of a lib.

Now what is missing is that the dependancy system has not evolved with these changes. The dependancy system (automatically finding dependancies on packages --> find-provides & find-requires) works fine for the binaries and library packages, but has no effect on the -devel packages.

The work-around that has been to put the dependancy information for the -devel packages in the .spec file.

Take as an example zlib and zlib-devel:

Requires for zlib:

$ rpm -qpR /mirrors/cooker/i586/Mandrake/RPMS/zlib1-1.1.4-4mdk.i586.rpm
/sbin/ldconfig
/sbin/ldconfig
* ld-linux.so.2 found automatically
libc.so.6** found automatically*
* libc.so.6(GLIBC_2.0)** found automatically*
* libc.so.6(GLIBC_2.1)** found automatically*
* libc.so.6(GLIBC_2.1.3)** found automatically*
rpmlib(VersionedDependencies) <= 3.0.3-1 standard for all rpm packages
rpmlib(PayloadFilesHavePrefix) <= 4.0-1 standard for all rpm packages
rpmlib(CompressedFileNames) <= 3.0.4-1 standard for all rpm packages
*
*$ rpm -qp --provides /mirrors/cooker/i586/Mandrake/RPMS/zlib1-1.1.4-4mdk.i586.rpm
libz = 1.1.4-4mdk in .spec file
libz1 = 1.1.4-4mdk in .spec file
zlib = 1.1.4-4mdk in .spec file
* libz.so.1** found automatically*
zlib1 = 1.1.4-4mdk in .spec file


%package -n %{lib_name}
Summary: The zlib compression and decompression library
Group: System/Libraries
Obsoletes: libz, libz1, %{name}
Provides: libz = %{version}-%{release} libz1 = %{version}-%{release} %{name} = %{version}-%{release}


$ rpm -qpR /mirrors/cooker/i586/Mandrake/RPMS/zlib1-devel-1.1.4-4mdk.i586.rpm
* * zlib1 = 1.1.4-4mdk in .spec file
rpmlib(VersionedDependencies) <= 3.0.3-1 standard for all rpm packages
rpmlib(PayloadFilesHavePrefix) <= 4.0-1 standard for all rpm packages
rpmlib(CompressedFileNames) <= 3.0.4-1 standard for all rpm packages


$ rpm -qp --provides /mirrors/cooker/i586/Mandrake/RPMS/zlib1-devel-1.1.4-4mdk.i586.rpm
libz-devel = 1.1.4-4mdk in .spec file
libz1-devel = 1.1.4-4mdk in .spec file
zlib-devel = 1.1.4-4mdk in .spec file
zlib1-devel = 1.1.4-4mdk in .spec file


%package -n %{lib_name}-devel
Summary: Header files and libraries for developing apps which will use zlib
Group: Development/C
Requires: %{lib_name} = %{version}-%{release}
Obsoletes: libz1-devel, libz-devel, zlib-devel
Provides: libz-devel = %{version}-%{release} libz1-devel = %{version}-%{release} %{name}-devel = %{version}-%{release}


All the dependancy information contained in the zlib-devel package originates from the .spec file. IMHO this is a hack, intended to solve the more simple issue --> make sure that zlib is installed when zlib-devel is needed. Zlib is a small, simple package, with more complex packages this was of providing dependancy information does not scale. and for the following reason:


   * relationships between the files in the -devel package and other
     -devel packages are not automatically found.


It should be possible to find an automatic way to uncover the relationships between the -devel packages?


with kind regards,

Stefan van der Eijk

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


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