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

Re: Requires & Provides on -devel packages





[snip]


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



I may have missed something, but did you have some proposal for how to figure this out? I don't have any method for doing so that is even half as robust as the existing methods that work on "normal" or "library" RPMS.

If I look at the contents of a -devel package you can find the following files (perhaps zlib is a bad example, we can take another one later)

$ for i in `rpm -ql zlib1-devel`
> do
> file $i
> done
/usr/include/zconf.h: ASCII C program text
/usr/include/zlib.h: ASCII C program text
/usr/include/zutil.h: ASCII C program text
/usr/lib/libz.a: current ar archive
/usr/lib/libz.so: symbolic link to libz.so.1.1.4
/usr/share/doc/zlib1-devel-1.1.4: directory
/usr/share/doc/zlib1-devel-1.1.4/ChangeLog: ISO-8859 English text
/usr/share/doc/zlib1-devel-1.1.4/README: ASCII English text
/usr/share/doc/zlib1-devel-1.1.4/algorithm.txt: ASCII English text
/usr/share/man/man3/zlib.3.bz2: bzip2 compressed data, block size = 900k

I guess the symbolic link from libz.so to libz.so.1.1.4 can be used for a Requires = libz.so.1.1.4. That will make the link to the zlib package, without the package version information.

Maybe the header files can be usefull. Grep through them for included files. For instance:

$ fgrep include /usr/include/zconf.h
#    include <windows.h>
#      include <windows.h>
#  include <sys/types.h> /* for off_t */
#  include <unistd.h>    /* for SEEK_* and off_t */

$ fgrep include /usr/include/zlib.h
#include "zconf.h"
  is as in fopen ("rb" or "wb") but can also include a compression level

$ fgrep include /usr/include/zutil.h
#include "zlib.h"
#  include <stddef.h>
#  include <string.h>
#  include <stdlib.h>
#   include <errno.h>
#     include <alloc.h>
#    include <malloc.h>
#    include <unix.h> /* for fdopen */
#  include <stdio.h>


perhaps make Provides / Requires out of these included files. This is not foolproof since the header files are scattered with defines...


Stefan

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


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