--- rpm-5.4.7/lib/rpmds.c.devel_prov~ 2012-03-23 04:36:02.441671158 +0100 +++ rpm-5.4.7/lib/rpmds.c 2012-03-23 04:36:06.210678312 +0100 @@ -3533,7 +3533,7 @@ int rpmdsSymlink(const char * fn, int fl int cnt; int i; char buf[BUFSIZ]; - const char * s; + const char * s, * bn; int is_executable; int is_symlink; const char * soname = NULL; @@ -3558,13 +3558,22 @@ int rpmdsSymlink(const char * fn, int fl ARGV_t deps = NULL; miRE mire; + bn = basename((char*)fn); + mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS); + if (!mireRegcomp(mire, "^lib.*\\.so$")) + xx = mireRegexec(mire, bn, (size_t) 0); + mire = mireFree(mire); + if (xx < 0) + return 0; + mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS); /* Filename must end with ".so" to be devel(...) dependency. */ - if (!mireRegcomp(mire, "^.*/(|usr/)lib(|64)/lib.*\\.so$")) + if (!mireRegcomp(mire, "^.*/(usr/)?lib(64)?/lib.*\\.so$")) xx = mireRegexec(mire, fn, (size_t) 0); mire = mireFree(mire); + /* if outside of standard library dirs, we refuse to generate requires */ if (xx < 0) - return 0; + skipR = 1; /*@-castfcnptr@*/ if (_rpmds_debug < 0)