X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=blobdiff_plain;f=rpm-pld-autodep.patch;h=d39cad1d301d43db51aefa9ee0ab2d543fc16578;hp=a6301ee74838999b3da909ad73999d51f786bba5;hb=52128679b21d60c6394d757d7a9578d274e9f487;hpb=5f8c53f093e2a3c369890771bf3e3912247e09f4 diff --git a/rpm-pld-autodep.patch b/rpm-pld-autodep.patch index a6301ee..d39cad1 100644 --- a/rpm-pld-autodep.patch +++ b/rpm-pld-autodep.patch @@ -1,28 +1,41 @@ -diff -dur rpm-4.3.orig/build/rpmfc.c rpm-4.3/build/rpmfc.c ---- rpm-4.3.orig/build/rpmfc.c 2004-01-16 14:21:42.283166337 +0100 -+++ rpm-4.3/build/rpmfc.c 2004-01-16 14:38:10.000000000 +0100 +--- rpm-4.4.8/lib/rpmfc.h.orig 2005-11-18 23:08:14.231293000 +0100 ++++ rpm-4.4.8/lib/rpmfc.h 2005-11-18 23:55:16.694214392 +0100 @@ -1,6 +1,7 @@ - #include "system.h" + #ifndef _H_RPMFC_ + #define _H_RPMFC_ - #include /* getOutputFrom() */ +#include + #undef FILE_RCSID + #include "magic.h" - #include - #include -@@ -9,6 +10,8 @@ +@@ -44,6 +45,11 @@ + StringBuf sb_python;/*!< concatenated list of python colored files. */ + StringBuf sb_php; /*!< concatenated list of php colored files. */ + ++ int findprov, findreq; ++ regex_t *noautoprov; ++ int noautoprov_c; ++ regex_t *noautoreq; ++ int noautoreq_c; + }; + + /** +--- rpm-4.4.8/lib/rpmfc.c.orig 2007-04-08 18:54:35.134367044 +0200 ++++ rpm-4.4.8/lib/rpmfc.c 2007-04-08 19:10:18.196109070 +0200 +@@ -11,6 +11,8 @@ #define _RPMDS_INTERNAL #include #include +#include +#include - #if HAVE_GELF_H - #include -@@ -301,6 +304,57 @@ + #include "debug.h" + +@@ -305,14 +307,83 @@ return buf; }; -+regex_t * rpmfcExpandRegexps(const char * str,int *count){ ++static regex_t * rpmfcExpandRegexps(const char * str,int *count){ + int i,j,r; + const char *s; + ARGV_t patterns=NULL; @@ -49,8 +62,8 @@ diff -dur rpm-4.3.orig/build/rpmfc.c rpm-4.3/build/rpmfc.c + if (r==0) j++; + else { + rpmMessage(RPMMESS_NORMAL, -+ "Compilation of regular expresion '%s'" -+ " (expanded from '%s') failed. Skipping it.\n", ++ _("Compilation of regular expresion '%s'" ++ " (expanded from '%s') failed. Skipping it.\n"), + patterns[i],str); + } + } @@ -64,7 +77,22 @@ diff -dur rpm-4.3.orig/build/rpmfc.c rpm-4.3/build/rpmfc.c + return compiled; +} + -+regex_t * rpmfcFreeRegexps(regex_t *regexps,int count){ ++static int rpmfcMatchRegexps(regex_t *regexps, int count, const char *str, char deptype) ++{ ++ int j; ++ for(j = 0; j < count; j++) { ++ rpmMessage(RPMMESS_DEBUG, ++ _("Checking %c: '%s' against _noauto expr. #%i\n"), deptype, str, j); ++ if (!regexec(®exps[j], str, 0, NULL, 0)) { ++ rpmMessage(RPMMESS_NORMAL, ++ _("Skipping %c: '%s' as it matches _noauto expr. #%i\n"), deptype, str, j); ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++static regex_t * rpmfcFreeRegexps(regex_t *regexps,int count){ + int i; + + if (regexps) @@ -76,216 +104,134 @@ diff -dur rpm-4.3.orig/build/rpmfc.c rpm-4.3/build/rpmfc.c /** * Run per-interpreter dependency helper. * @param fc file classifier -@@ -326,6 +380,9 @@ - int pac; - int xx; - int i; -+ int noauto_c=0; -+ regex_t *noauto=NULL; -+ int j; - - switch (deptype) { - default: -@@ -334,6 +391,8 @@ - case 'P': - if (fc->skipProv) - return 0; -+ noauto=rpmfcExpandRegexps("%{_noautoprov}",&noauto_c); -+ rpmMessage(RPMMESS_DEBUG, "%i _noautoprov patterns.\n",noauto_c); - xx = snprintf(buf, sizeof(buf), "%%{?__%s_provides}", nsdep); - depsp = &fc->provides; - dsContext = RPMSENSE_FIND_PROVIDES; -@@ -342,6 +401,8 @@ - case 'R': - if (fc->skipReq) - return 0; -+ noauto=rpmfcExpandRegexps("%{_noautoreq}",&noauto_c); -+ rpmMessage(RPMMESS_DEBUG, "%i _noautoreq patterns.\n",noauto_c); - xx = snprintf(buf, sizeof(buf), "%%{?__%s_requires}", nsdep); - depsp = &fc->requires; - dsContext = RPMSENSE_FIND_REQUIRES; -@@ -394,6 +455,16 @@ + * @param deptype 'P' == Provides:, 'R' == Requires:, helper + * @param nsdep class name for interpreter (e.g. "perl") ++ * @param noauto _noauto* regexps ++ * @param noauto_c # of _noauto* regexps + * @return 0 on success + */ +-static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep) ++static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep, ++ regex_t * noauto, int noauto_c) + /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ + /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/ + { +@@ -398,6 +469,8 @@ } /*@=branchstate@*/ -+ for(j=0;jtracked && deptype == 'P' && *EVR != '\0') { -@@ -422,6 +493,7 @@ - } - sb_stdout = freeStringBuf(sb_stdout); - -+ noauto=rpmfcFreeRegexps(noauto,noauto_c); - return 0; - } - -@@ -637,9 +709,11 @@ - /** - * Extract script dependencies. - * @param fc file classifier -+ * @param findprov 1 to enable provides -+ * @param findreq 1 to enable requires - * @return 0 on success - */ --static int rpmfcSCRIPT(rpmfc fc) -+static int rpmfcSCRIPT(rpmfc fc,int findprov,int findreq) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/ - { -@@ -691,7 +765,7 @@ +@@ -710,7 +783,7 @@ *se = '\0'; se++; - if (is_executable) { -+ if (is_executable && findreq) { ++ if (is_executable && fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, s, 'R')) { /* Add to package requires. */ ds = rpmdsSingle(RPMTAG_REQUIRENAME, s, "", RPMSENSE_FIND_REQUIRES); xx = rpmdsMerge(&fc->requires, ds); -@@ -718,19 +792,22 @@ +@@ -738,43 +811,51 @@ (void) fclose(fp); if (fc->fcolor->vals[fc->ix] & RPMFC_PERL) { - if (fc->fcolor->vals[fc->ix] & RPMFC_MODULE) -+ if (findprov && fc->fcolor->vals[fc->ix] & RPMFC_MODULE) - xx = rpmfcHelper(fc, 'P', "perl"); +- xx = rpmfcHelper(fc, 'P', "perl"); - if (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)) -+ if (findreq && (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE))) - xx = rpmfcHelper(fc, 'R', "perl"); - } +- xx = rpmfcHelper(fc, 'R', "perl"); ++ if (fc->findprov && (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)) ++ xx = rpmfcHelper(fc, 'P', "perl", fc->noautoprov, fc->noautoprov_c); ++ if (fc->findreq && (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE))) ++ xx = rpmfcHelper(fc, 'R', "perl", fc->noautoreq, fc->noautoreq_c); + } else if (fc->fcolor->vals[fc->ix] & RPMFC_PYTHON) { - xx = rpmfcHelper(fc, 'P', "python"); ++ if (fc->findprov) ++ xx = rpmfcHelper(fc, 'P', "python", fc->noautoprov, fc->noautoprov_c); + #ifdef NOTYET + if (is_executable) + #endif +- xx = rpmfcHelper(fc, 'R', "python"); ++ if (fc->findreq) ++ xx = rpmfcHelper(fc, 'R', "python", fc->noautoreq, fc->noautoreq_c); + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_LIBTOOL) { +- xx = rpmfcHelper(fc, 'P', "libtool"); ++ if (fc->findprov) ++ xx = rpmfcHelper(fc, 'P', "libtool", fc->noautoprov, fc->noautoprov_c); + #ifdef NOTYET + if (is_executable) + #endif +- xx = rpmfcHelper(fc, 'R', "libtool"); ++ if (fc->findreq) ++ xx = rpmfcHelper(fc, 'R', "libtool", fc->noautoreq, fc->noautoreq_c); + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_PKGCONFIG) { +- xx = rpmfcHelper(fc, 'P', "pkgconfig"); ++ if (fc->findprov) ++ xx = rpmfcHelper(fc, 'P', "pkgconfig", fc->noautoprov, fc->noautoprov_c); + #ifdef NOTYET + if (is_executable) + #endif +- xx = rpmfcHelper(fc, 'R', "pkgconfig"); ++ if (fc->findreq) ++ xx = rpmfcHelper(fc, 'R', "pkgconfig", fc->noautoreq, fc->noautoreq_c); + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_BOURNE) { + #ifdef NOTYET + xx = rpmfcHelper(fc, 'P', "executable"); + #endif - if (is_executable) -+ if (findprov) -+ xx = rpmfcHelper(fc, 'P', "python"); -+ if (findreq && is_executable) - xx = rpmfcHelper(fc, 'R', "python"); - } +- xx = rpmfcHelper(fc, 'R', "executable"); ++ if (fc->findreq && is_executable) ++ xx = rpmfcHelper(fc, 'R', "executable", fc->noautoreq, fc->noautoreq_c); + } else if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) { -+ if (findprov) - xx = rpmfcHelper(fc, 'P', "php"); +- xx = rpmfcHelper(fc, 'P', "php"); ++ if (fc->findprov) ++ xx = rpmfcHelper(fc, 'P', "php", fc->noautoprov, fc->noautoprov_c); + /* not only executable, files run by httpd usually are not */ - xx = rpmfcHelper(fc, 'R', "php"); -+ if (findreq) -+ xx = rpmfcHelper(fc, 'R', "php"); - } ++ if (fc->findreq) ++ xx = rpmfcHelper(fc, 'R', "php", fc->noautoreq, fc->noautoreq_c); + } return 0; -@@ -739,9 +816,11 @@ - /** - * Extract Elf dependencies. - * @param fc file classifier -+ * @param findprov 1 to enable provides -+ * @param findreq 1 to enable requires - * @return 0 on success - */ --static int rpmfcELF(rpmfc fc) -+static int rpmfcELF(rpmfc fc,int findprov,int findreq) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/ - { -@@ -853,17 +932,19 @@ - t = stpcpy(t, "(64bit)"); - #endif - t++; -+ -+ if (findprov) { -+ /* Add to package provides. */ -+ ds = rpmdsSingle(RPMTAG_PROVIDES, -+ buf, "", RPMSENSE_FIND_PROVIDES); -+ xx = rpmdsMerge(&fc->provides, ds); - -- /* Add to package provides. */ -- ds = rpmdsSingle(RPMTAG_PROVIDES, -- buf, "", RPMSENSE_FIND_PROVIDES); -- xx = rpmdsMerge(&fc->provides, ds); -- -- /* Add to file dependencies. */ -- xx = rpmfcSaveArg(&fc->ddict, -- rpmfcFileDep(t, fc->ix, ds)); -+ /* Add to file dependencies. */ -+ xx = rpmfcSaveArg(&fc->ddict, -+ rpmfcFileDep(t, fc->ix, ds)); - -- ds = rpmdsFree(ds); -+ ds = rpmdsFree(ds); -+ } - } - auxoffset += aux->vda_next; - } -@@ -914,15 +995,17 @@ - #endif - t++; - -- /* Add to package dependencies. */ -- ds = rpmdsSingle(RPMTAG_REQUIRENAME, -- buf, "", RPMSENSE_FIND_REQUIRES); -- xx = rpmdsMerge(&fc->requires, ds); -+ if (findreq) { -+ /* Add to package dependencies. */ -+ ds = rpmdsSingle(RPMTAG_REQUIRENAME, -+ buf, "", RPMSENSE_FIND_REQUIRES); -+ xx = rpmdsMerge(&fc->requires, ds); - -- /* Add to file dependencies. */ -- xx = rpmfcSaveArg(&fc->ddict, -- rpmfcFileDep(t, fc->ix, ds)); -- ds = rpmdsFree(ds); -+ /* Add to file dependencies. */ -+ xx = rpmfcSaveArg(&fc->ddict, -+ rpmfcFileDep(t, fc->ix, ds)); -+ ds = rpmdsFree(ds); -+ } - } - auxoffset += aux->vna_next; - } -@@ -947,6 +1030,7 @@ - /* Files with executable bit set only. */ - if (fc->skipReq || !(st->st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) - /*@innercontinue@*/ continue; -+ if (!findreq) continue; - /* Add to package requires. */ - depsp = &fc->requires; - tagN = RPMTAG_REQUIRENAME; -@@ -959,6 +1043,7 @@ - /* Add to package provides. */ - if (fc->skipProv) - /*@innercontinue@*/ continue; -+ if (!findprov) continue; - depsp = &fc->provides; - tagN = RPMTAG_PROVIDENAME; - dsContext = RPMSENSE_FIND_PROVIDES; -@@ -997,7 +1082,7 @@ - /*@=branchstate =uniondef @*/ - - /* For DSO's, provide the basename of the file if DT_SONAME not found. */ -- if (!fc->skipProv && isDSO && !gotSONAME) { -+ if (findprov && !fc->skipProv && isDSO && !gotSONAME) { - depsp = &fc->provides; - tagN = RPMTAG_PROVIDENAME; - dsContext = RPMSENSE_FIND_PROVIDES; -@@ -1045,7 +1130,7 @@ - } +@@ -802,20 +883,26 @@ + default: + break; + case RPMTAG_PROVIDENAME: ++ if (fc->findprov && !rpmfcMatchRegexps(fc->noautoprov, fc->noautoprov_c, ds->N[0], 'P')) { + /* Add to package provides. */ + rc = rpmdsMerge(&fc->provides, ds); - typedef struct rpmfcApplyTbl_s { -- int (*func) (rpmfc fc); -+ int (*func) (rpmfc fc,int findprov,int findreq); - int colormask; - } * rpmfcApplyTbl; + /* Add to file dependencies. */ + buf[0] = '\0'; + rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds)); ++ } else ++ rc = 0; + break; + case RPMTAG_REQUIRENAME: ++ if (fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, ds->N[0], 'R')) { + /* Add to package requires. */ + rc = rpmdsMerge(&fc->requires, ds); -@@ -1058,6 +1143,109 @@ + /* Add to file dependencies. */ + buf[0] = '\0'; + rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds)); ++ } else ++ rc = 0; + break; + } + return rc; +@@ -856,6 +943,109 @@ { NULL, 0 } }; -+int rpmfcFindRequiredPackages(rpmfc fc) ++static int rpmfcFindRequiredPackages(rpmfc fc) +{ + rpmts ts=NULL; + const char * s; @@ -308,11 +254,11 @@ diff -dur rpm-4.3.orig/build/rpmfc.c rpm-4.3/build/rpmfc.c + regex_t *noautoreqdep; + int noautoreqdep_c; + -+ noautoreqdep=rpmfcExpandRegexps("%{_noautoreqdep}",&noautoreqdep_c); ++ noautoreqdep=rpmfcExpandRegexps("%{__noautoreqdep}", &noautoreqdep_c); + + ts = rpmtsCreate(); /* XXX ts created in main() should be used */ + -+ rpmMessage(RPMMESS_NORMAL, "Searching for required packages....\n"); ++ rpmMessage(RPMMESS_NORMAL, _("Searching for required packages....\n")); + + nddict = argvCount(fc->ddict); + previx = -1; @@ -336,40 +282,40 @@ diff -dur rpm-4.3.orig/build/rpmfc.c rpm-4.3/build/rpmfc.c + + if (deptype!='R') continue; + -+ rpmMessage(RPMMESS_DEBUG, "#%i requires: %s,%s,%i\n",ix,N,EVR,Flags); ++ rpmMessage(RPMMESS_DEBUG, _("#%i requires: %s,%s,%i\n"),ix,N,EVR,Flags); + if (EVR && EVR[0]) { -+ rpmMessage(RPMMESS_DEBUG, "skipping #%i require\n"); ++ rpmMessage(RPMMESS_DEBUG, _("skipping #%i require\n")); + continue; + } + for(j=0;j not found\n",N); ++ rpmMessage(RPMMESS_DEBUG, _("%s -> not found\n"),N); + continue; + } -+ rpmMessage(RPMMESS_DEBUG, "Iterator: %p\n",it); ++ rpmMessage(RPMMESS_DEBUG, _("Iterator: %p\n"),it); + if (rpmdbGetIteratorCount(it)>1) { -+ rpmMessage(RPMMESS_DEBUG, "%s -> multiple (skipping)\n",N); ++ rpmMessage(RPMMESS_DEBUG, _("%s -> multiple (skipping)\n"),N); + rpmdbFreeIterator(it); + continue; + } + hdr=rpmdbNextIterator(it); + assert(hdr!=NULL); -+ r=rpmHeaderGetEntry(hdr,RPMTAG_NAME,NULL,(void **)&hname, NULL); ++ r=headerGetEntry(hdr,RPMTAG_NAME,NULL,(void **)&hname, NULL); + assert(r<2); + if (!strcmp(hname,N)) { -+ rpmMessage(RPMMESS_DEBUG, "%s -> %s (skipping)\n",N,hname); ++ rpmMessage(RPMMESS_DEBUG, _("%s -> %s (skipping)\n"),N,hname); + rpmdbFreeIterator(it); + continue; + } @@ -383,7 +329,7 @@ diff -dur rpm-4.3.orig/build/rpmfc.c rpm-4.3/build/rpmfc.c + rpmdbFreeIterator(it); + } + -+ noautoreqdep=rpmfcFreeRegexps(noautoreqdep,noautoreqdep_c); ++ noautoreqdep = rpmfcFreeRegexps(noautoreqdep, noautoreqdep_c); + ts = rpmtsFree(ts); + return 0; +} @@ -391,68 +337,235 @@ diff -dur rpm-4.3.orig/build/rpmfc.c rpm-4.3/build/rpmfc.c int rpmfcApply(rpmfc fc) { rpmfcApplyTbl fcat; -@@ -1075,6 +1263,21 @@ - int ix; +@@ -874,6 +1064,26 @@ int i; int xx; + int skipping; + int j; -+ int findprov; -+ int findreq; -+ regex_t *noautoreqfiles=NULL; -+ int noautoreqfiles_c; -+ regex_t *noautoprovfiles=NULL; ++ regex_t *noautoprovfiles = NULL; + int noautoprovfiles_c; ++ regex_t *noautoreqfiles = NULL; ++ int noautoreqfiles_c; + const char *buildroot; + int buildroot_l; + -+ buildroot=rpmExpand("%{buildroot}",NULL); -+ buildroot_l=strlen(buildroot); ++ fc->noautoprov = NULL; ++ fc->noautoreq = NULL; ++ ++ buildroot = rpmExpand("%{buildroot}",NULL); ++ buildroot_l = strlen(buildroot); + -+ noautoreqfiles=rpmfcExpandRegexps("%{_noautoreqfiles}",&noautoreqfiles_c); -+ noautoprovfiles=rpmfcExpandRegexps("%{_noautoprovfiles}",&noautoprovfiles_c); ++ noautoprovfiles = rpmfcExpandRegexps("%{__noautoprovfiles}", &noautoprovfiles_c); ++ noautoreqfiles = rpmfcExpandRegexps("%{__noautoreqfiles}", &noautoreqfiles_c); ++ fc->noautoprov = rpmfcExpandRegexps("%{__noautoprov}", &fc->noautoprov_c); ++ fc->noautoreq = rpmfcExpandRegexps("%{__noautoreq}", &fc->noautoreq_c); ++ rpmMessage(RPMMESS_DEBUG, _("%i _noautoprov patterns.\n"), fc->noautoprov_c); ++ rpmMessage(RPMMESS_DEBUG, _("%i _noautoreq patterns.\n"), fc->noautoreq_c); /* Generate package and per-file dependencies. */ for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) { -@@ -1082,10 +1285,41 @@ +@@ -894,9 +1104,43 @@ for (fcat = rpmfcApplyTable; fcat->func != NULL; fcat++) { if (!(fc->fcolor->vals[fc->ix] & fcat->colormask)) /*@innercontinue@*/ continue; -- xx = (*fcat->func) (fc); -+ findprov=1; -+ findreq=1; ++ fc->findprov = 1; ++ fc->findreq = 1; + if (strncmp(fc->fn[fc->ix],buildroot,buildroot_l)==0) {/* sanity check */ -+ for(j=0;jfn[fc->ix]+buildroot_l,0,NULL,0)) { -+ rpmMessage(RPMMESS_NORMAL, -+ "skipping %s provides detection" -+ " (matches noautoprovfiles pattern #%i)\n", -+ fc->fn[fc->ix],j); -+ findprov=0; -+ break; ++ for(j = 0; j < noautoprovfiles_c; j++) { ++ if (!regexec(&noautoprovfiles[j], ++ fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) { ++ rpmMessage(RPMMESS_NORMAL, ++ _("skipping %s provides detection" ++ " (matches noautoprovfiles pattern #%i)\n"), ++ fc->fn[fc->ix], j); ++ fc->findprov = 0; ++ break; ++ } + } -+ } -+ for(j=0;jfn[fc->ix]+buildroot_l,0,NULL,0)) { -+ rpmMessage(RPMMESS_NORMAL, -+ "skipping %s requires detection" -+ " (matches noautoreqfiles pattern #%i)\n", -+ fc->fn[fc->ix],j); -+ findreq=0; -+ break; ++ for(j = 0; j < noautoreqfiles_c; j++) { ++ if (!regexec(&noautoreqfiles[j], ++ fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) { ++ rpmMessage(RPMMESS_NORMAL, ++ _("skipping %s requires detection" ++ " (matches noautoreqfiles pattern #%i)\n"), ++ fc->fn[fc->ix], j); ++ fc->findreq = 0; ++ break; ++ } + } -+ } + } -+ xx = (*fcat->func) (fc,findprov,findreq); ++ + xx = (*fcat->func) (fc); } } - -+ noautoreqfiles=rpmfcFreeRegexps(noautoreqfiles,noautoreqfiles_c); -+ noautoprovfiles=rpmfcFreeRegexps(noautoprovfiles,noautoprovfiles_c); -+ ++ noautoprovfiles = rpmfcFreeRegexps(noautoprovfiles, noautoprovfiles_c); ++ noautoreqfiles = rpmfcFreeRegexps(noautoreqfiles, noautoreqfiles_c); ++ fc->noautoprov = rpmfcFreeRegexps(fc->noautoprov, fc->noautoprov_c); ++ fc->noautoreq = rpmfcFreeRegexps(fc->noautoreq, fc->noautoreq_c); ++#ifdef AUTODEP_PKGNAMES /* define to use package names in R */ + rpmfcFindRequiredPackages(fc); -+ ++#endif + /*@-boundswrite@*/ /* Generate per-file indices into package dependencies. */ - nddict = argvCount(fc->ddict); +--- rpm-4.3/po/POTFILES.in.orig 2004-01-04 03:13:02.000000000 +0100 ++++ rpm-4.3/po/POTFILES.in 2004-02-01 21:05:50.567248776 +0100 +@@ -22,6 +22,7 @@ + build/parseSpec.c + build/poptBT.c + build/reqprov.c ++lib/rpmfc.c + build/spec.c + lib/cpio.c + lib/depends.c +--- rpm-4.3/po/pl.po.orig 2004-02-01 20:53:10.000000000 +0100 ++++ rpm-4.3/po/pl.po 2004-02-01 21:20:36.532561576 +0100 +@@ -1295,6 +1295,127 @@ + msgid "lookup i18N strings in specfile catalog" + msgstr "wyszukaj wpisy I18N w katalogu pliku spec" + ++#: build/rpmfc.c:94 ++#, c-format ++msgid "\texecv(%s) pid %d\n" ++msgstr "\texecv(%s) pid %d\n" ++ ++#. XXX this error message is probably not seen. ++#: build/rpmfc.c:100 ++#, c-format ++msgid "Couldn't exec %s: %s\n" ++msgstr "Nie mo¿na uruchomiæ %s: %s\n" ++ ++#: build/rpmfc.c:105 ++#, c-format ++msgid "Couldn't fork %s: %s\n" ++msgstr "Nie mo¿na wykonaæ fork %s: %s\n" ++ ++#: build/rpmfc.c:190 ++#, c-format ++msgid "\twaitpid(%d) rc %d status %x\n" ++msgstr "\twaitpid(%d) rc %d status %x\n" ++ ++#: build/rpmfc.c:194 ++#, c-format ++msgid "%s failed\n" ++msgstr "%s nie powiod³o siê\n" ++ ++#: build/rpmfc.c:198 ++#, c-format ++msgid "failed to write all data to %s\n" ++msgstr "Nie uda³o siê zapisaæ wszystkich danych do %s\n" ++ ++#: build/rpmfc.c:334 ++#, c-format ++msgid "Compilation of regular expresion '%s' (expanded from '%s') failed. Skipping it.\n" ++msgstr "Kompilacja wyra¿enia regularnego '%s' (powsta³ego z '%s') nie powiod³a siê; pominiêto.\n" ++ ++#: build/rpmfc.c:395 ++#, c-format ++msgid "%i _noautoprov patterns.\n" ++msgstr "%i wzorców _noautoprov.\n" ++ ++#: build/rpmfc.c:405 ++#, c-format ++msgid "%i _noautoreq patterns.\n" ++msgstr "%i wzorców _noautoreq.\n" ++ ++#: build/rpmfc.c:459 ++#, c-format ++msgid "Checking %c: '%s' against _noauto expr. #%i\n" ++msgstr "Sprawdzanie %c: '%s' z wyra¿eniem _noauto #%i\n" ++ ++#: build/rpmfc.c:462 ++#, c-format ++msgid "Skipping %c: '%s' as it matches _noauto expr. #%i\n" ++msgstr "Pominiêto %c: '%s' pasuj±ce do wyra¿enia _noauto #%i\n" ++ ++#. XXX ts created in main() should be used ++#: build/rpmfc.c:1173 ++msgid "Searching for required packages....\n" ++msgstr "Poszukiwanie wymaganych pakietów...\n" ++ ++#: build/rpmfc.c:1197 ++#, c-format ++msgid "#%i requires: %s,%s,%i\n" ++msgstr "#%i wymaga: %s,%s,%i\n" ++ ++#: build/rpmfc.c:1199 ++#, c-format ++msgid "skipping #%i require\n" ++msgstr "pominiêto zale¿no¶æ #%i\n" ++ ++#: build/rpmfc.c:1205 ++#, c-format ++msgid "skipping %s requirement processing (matches noautoreqdep pattern #%i)\n" ++msgstr "pominiêto przetwarzanie zale¿no¶ci %s (pasuje do wzorca noautoreqdep #%i)\n" ++ ++#: build/rpmfc.c:1211 ++#, c-format ++msgid "skipping #%i require (is file requirement)\n" ++msgstr "pominiêto zale¿no¶æ #%i (zale¿no¶æ od pliku)\n" ++ ++#: build/rpmfc.c:1216 ++#, c-format ++msgid "%s -> not found\n" ++msgstr "%s -> nie znaleziono\n" ++ ++#: build/rpmfc.c:1219 ++#, c-format ++msgid "Iterator: %p\n" ++msgstr "Iterator: %p\n" ++ ++#: build/rpmfc.c:1221 ++#, c-format ++msgid "%s -> multiple (skipping)\n" ++msgstr "%s -> wiele (pominiêto)\n" ++ ++#: build/rpmfc.c:1230 ++#, c-format ++msgid "%s -> %s (skipping)\n" ++msgstr "%s -> %s (pominiêto)\n" ++ ++#: build/rpmfc.c:1295 ++#, c-format ++msgid "skipping %s provides detection (matches noautoprovfiles pattern #%i)\n" ++msgstr "pominiêto wykrywanie w³asno¶ci %s (pasuje do wzorca noautoprovfiles #%i)\n" ++ ++#: build/rpmfc.c:1306 ++#, c-format ++msgid "skipping %s requires detection (matches noautoreqfiles pattern #%i)\n" ++msgstr "pominiêto wykrywanie w³asno¶ci %s (pasuje do wzorca noautoreqfiles #%i)\n" ++ ++#: build/rpmfc.c:1642 ++#, c-format ++msgid "Finding %s: %s\n" ++msgstr "Poszukiwanie %s: %s\n" ++ ++#: build/rpmfc.c:1648 build/rpmfc.c:1657 ++#, c-format ++msgid "Failed to find %s:\n" ++msgstr "Nie uda³o siê odnale¼æ %s:\n" ++ + #: build/spec.c:237 + #, c-format + msgid "line %d: Bad number: %s\n" +--- rpm/configure.ac.orig 2004-08-22 13:02:30.000000000 +0200 ++++ rpm/configure.ac 2004-08-22 13:25:37.000000000 +0200 +@@ -971,6 +971,18 @@ + AC_SUBST(__CHGRP_RHF) + + dnl ++dnl enable generating autorequires containing packages names ++dnl ++AC_ARG_ENABLE([adding-packages-names-in-autogenerated-dependancies], ++ [ --enable-adding-packages-names-in-autogenerated-dependancies Add packages names for autogenerated dependancies to requires], ++ ++ AC_MSG_RESULT([Using packages names in autogerated requires is enabled]) ++ AC_DEFINE(AUTODEP_PKGNAMES, 1, "Generating autorequires containing packages names.") ++ ++ ) ++ ++ ++dnl + dnl figure out what root's primary group is + dnl + AC_MSG_CHECKING(root's primary group)