1 --- rpm-4.4.3/build/rpmfc.h.orig 2005-11-18 23:08:14.231293000 +0100
2 +++ rpm-4.4.3/build/rpmfc.h 2005-11-18 23:55:16.694214392 +0100
12 StringBuf sb_python;/*!< concatenated list of python colored files. */
13 StringBuf sb_php; /*!< concatenated list of php colored files. */
15 + int findprov, findreq;
16 + regex_t *noautoprov;
23 --- rpm-4.4.3/build/rpmfc.c.orig 2005-11-19 09:33:23.180067024 +0100
24 +++ rpm-4.4.3/build/rpmfc.c 2005-11-19 09:35:29.167913960 +0100
26 #define _RPMDS_INTERNAL
38 +static regex_t * rpmfcExpandRegexps(const char * str,int *count){
41 + ARGV_t patterns=NULL;
42 + regex_t *compiled=NULL;
44 + s=rpmExpand(str,NULL);
46 + poptParseArgvString(s,count,(const char ***)&patterns);
49 + if (patterns==NULL){
58 + compiled=malloc(sizeof(regex_t)*(*count));
60 + for(i=0;i<*count;i++){
61 + r=regcomp(&compiled[j],patterns[i],REG_NOSUB);
64 + rpmMessage(RPMMESS_NORMAL,
65 + _("Compilation of regular expresion '%s'"
66 + " (expanded from '%s') failed. Skipping it.\n"),
70 + patterns=_free(patterns);
72 + compiled=_free(compiled);
80 +static int rpmfcMatchRegexps(regex_t *regexps, int count, const char *str, char deptype)
83 + for(j = 0; j < count; j++) {
84 + rpmMessage(RPMMESS_DEBUG,
85 + _("Checking %c: '%s' against _noauto expr. #%i\n"), deptype, str, j);
86 + if (!regexec(®exps[j], str, 0, NULL, 0)) {
87 + rpmMessage(RPMMESS_NORMAL,
88 + _("Skipping %c: '%s' as it matches _noauto expr. #%i\n"), deptype, str, j);
95 +static regex_t * rpmfcFreeRegexps(regex_t *regexps,int count){
99 + for(i=0;i<count;i++)
100 + regfree(®exps[i]);
101 + return _free(regexps);
105 * Run per-interpreter dependency helper.
106 * @param fc file classifier
107 * @param deptype 'P' == Provides:, 'R' == Requires:, helper
108 * @param nsdep class name for interpreter (e.g. "perl")
109 + * @param noauto _noauto* regexps
110 + * @param noauto_c # of _noauto* regexps
111 * @return 0 on success
113 -static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep)
114 +static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep,
115 + regex_t * noauto, int noauto_c)
116 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
117 /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
123 + if(rpmfcMatchRegexps(noauto, noauto_c, N, deptype))
126 /* Add tracking dependency for versioned Provides: */
127 if (!fc->tracked && deptype == 'P' && *EVR != '\0') {
132 - if (is_executable) {
133 + if (is_executable && fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, s, 'R')) {
134 /* Add to package requires. */
135 ds = rpmdsSingle(RPMTAG_REQUIRENAME, s, "", RPMSENSE_FIND_REQUIRES);
136 xx = rpmdsMerge(&fc->requires, ds);
137 @@ -731,42 +804,50 @@
140 if (fc->fcolor->vals[fc->ix] & RPMFC_PERL) {
141 - if (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)
142 - xx = rpmfcHelper(fc, 'P', "perl");
143 - if (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE))
144 - xx = rpmfcHelper(fc, 'R', "perl");
145 + if (fc->findprov && (fc->fcolor->vals[fc->ix] & RPMFC_MODULE))
146 + xx = rpmfcHelper(fc, 'P', "perl", fc->noautoprov, fc->noautoprov_c);
147 + if (fc->findreq && (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)))
148 + xx = rpmfcHelper(fc, 'R', "perl", fc->noautoreq, fc->noautoreq_c);
150 if (fc->fcolor->vals[fc->ix] & RPMFC_PYTHON) {
151 - xx = rpmfcHelper(fc, 'P', "python");
153 + xx = rpmfcHelper(fc, 'P', "python", fc->noautoprov, fc->noautoprov_c);
157 - xx = rpmfcHelper(fc, 'R', "python");
159 + xx = rpmfcHelper(fc, 'R', "python", fc->noautoreq, fc->noautoreq_c);
161 if (fc->fcolor->vals[fc->ix] & RPMFC_LIBTOOL) {
162 - xx = rpmfcHelper(fc, 'P', "libtool");
164 + xx = rpmfcHelper(fc, 'P', "libtool", fc->noautoprov, fc->noautoprov_c);
168 - xx = rpmfcHelper(fc, 'R', "libtool");
170 + xx = rpmfcHelper(fc, 'R', "libtool", fc->noautoreq, fc->noautoreq_c);
172 if (fc->fcolor->vals[fc->ix] & RPMFC_PKGCONFIG) {
173 - xx = rpmfcHelper(fc, 'P', "pkgconfig");
175 + xx = rpmfcHelper(fc, 'P', "pkgconfig", fc->noautoprov, fc->noautoprov_c);
179 - xx = rpmfcHelper(fc, 'R', "pkgconfig");
181 + xx = rpmfcHelper(fc, 'R', "pkgconfig", fc->noautoreq, fc->noautoreq_c);
183 if (fc->fcolor->vals[fc->ix] & RPMFC_BOURNE) {
185 xx = rpmfcHelper(fc, 'P', "executable");
188 - xx = rpmfcHelper(fc, 'R', "executable");
189 + if (fc->findreq && is_executable)
190 + xx = rpmfcHelper(fc, 'R', "executable", fc->noautoreq, fc->noautoreq_c);
192 if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) {
193 - xx = rpmfcHelper(fc, 'P', "php");
194 - xx = rpmfcHelper(fc, 'R', "php");
196 + xx = rpmfcHelper(fc, 'P', "php", fc->noautoprov, fc->noautoprov_c);
198 + xx = rpmfcHelper(fc, 'R', "php", fc->noautoreq, fc->noautoreq_c);
202 @@ -794,20 +875,26 @@
205 case RPMTAG_PROVIDENAME:
206 + if (fc->findprov && !rpmfcMatchRegexps(fc->noautoprov, fc->noautoprov_c, ds->N[0], 'P')) {
207 /* Add to package provides. */
208 rc = rpmdsMerge(&fc->provides, ds);
210 /* Add to file dependencies. */
212 rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds));
216 case RPMTAG_REQUIRENAME:
217 + if (fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, ds->N[0], 'R')) {
218 /* Add to package requires. */
219 rc = rpmdsMerge(&fc->requires, ds);
221 /* Add to file dependencies. */
223 rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds));
229 @@ -848,6 +935,109 @@
233 +static int rpmfcFindRequiredPackages(rpmfc fc)
242 + unsigned char deptype;
250 + const char * hname;
251 + rpmdbMatchIterator it;
253 + regex_t *noautoreqdep;
254 + int noautoreqdep_c;
256 + noautoreqdep=rpmfcExpandRegexps("%{__noautoreqdep}", &noautoreqdep_c);
258 + ts = rpmtsCreate(); /* XXX ts created in main() should be used */
260 + rpmMessage(RPMMESS_NORMAL, _("Searching for required packages....\n"));
262 + nddict = argvCount(fc->ddict);
264 + for (i = 0; i < nddict; i++) {
267 + /* Parse out (file#,deptype,N,EVR,Flags) */
268 + ix = strtol(s, &se, 10);
269 + assert(se != NULL);
273 + while (*se && *se != ' ')
277 + while (*se && *se != ' ')
280 + Flags = strtol(se, NULL, 16);
282 + if (deptype!='R') continue;
284 + rpmMessage(RPMMESS_DEBUG, _("#%i requires: %s,%s,%i\n"),ix,N,EVR,Flags);
285 + if (EVR && EVR[0]) {
286 + rpmMessage(RPMMESS_DEBUG, _("skipping #%i require\n"));
289 + for(j=0;j<noautoreqdep_c;j++)
290 + if (!regexec(&noautoreqdep[j],N,0,NULL,0)) {
291 + rpmMessage(RPMMESS_NORMAL,
292 + _("skipping %s requirement processing"
293 + " (matches noautoreqdep pattern #%i)\n"),N,j);
296 + if (j<noautoreqdep_c) continue;
298 + rpmMessage(RPMMESS_DEBUG, _("skipping #%i require (is file requirement)\n"));
301 + it=rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, N, 0);
303 + rpmMessage(RPMMESS_DEBUG, _("%s -> not found\n"),N);
306 + rpmMessage(RPMMESS_DEBUG, _("Iterator: %p\n"),it);
307 + if (rpmdbGetIteratorCount(it)>1) {
308 + rpmMessage(RPMMESS_DEBUG, _("%s -> multiple (skipping)\n"),N);
309 + rpmdbFreeIterator(it);
312 + hdr=rpmdbNextIterator(it);
314 + r=headerGetEntry(hdr,RPMTAG_NAME,NULL,(void **)&hname, NULL);
316 + if (!strcmp(hname,N)) {
317 + rpmMessage(RPMMESS_DEBUG, _("%s -> %s (skipping)\n"),N,hname);
318 + rpmdbFreeIterator(it);
322 + rpmMessage(RPMMESS_DEBUG, "%s -> %s\n",N,hname);
324 + ds = rpmdsSingle(RPMTAG_REQUIRENAME, hname, "", RPMSENSE_FIND_REQUIRES);
325 + xx = rpmdsMerge(&fc->requires, ds);
326 + ds = rpmdsFree(ds);
328 + rpmdbFreeIterator(it);
331 + noautoreqdep = rpmfcFreeRegexps(noautoreqdep, noautoreqdep_c);
332 + ts = rpmtsFree(ts);
336 int rpmfcApply(rpmfc fc)
339 @@ -865,6 +1055,26 @@
344 + regex_t *noautoprovfiles = NULL;
345 + int noautoprovfiles_c;
346 + regex_t *noautoreqfiles = NULL;
347 + int noautoreqfiles_c;
348 + const char *buildroot;
351 + fc->noautoprov = NULL;
352 + fc->noautoreq = NULL;
354 + buildroot = rpmExpand("%{buildroot}",NULL);
355 + buildroot_l = strlen(buildroot);
357 + noautoprovfiles = rpmfcExpandRegexps("%{__noautoprovfiles}", &noautoprovfiles_c);
358 + noautoreqfiles = rpmfcExpandRegexps("%{__noautoreqfiles}", &noautoreqfiles_c);
359 + fc->noautoprov = rpmfcExpandRegexps("%{__noautoprov}", &fc->noautoprov_c);
360 + fc->noautoreq = rpmfcExpandRegexps("%{__noautoreq}", &fc->noautoreq_c);
361 + rpmMessage(RPMMESS_DEBUG, _("%i _noautoprov patterns.\n"), fc->noautoprov_c);
362 + rpmMessage(RPMMESS_DEBUG, _("%i _noautoreq patterns.\n"), fc->noautoreq_c);
364 /* Generate package and per-file dependencies. */
365 for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) {
366 @@ -885,10 +1095,43 @@
367 for (fcat = rpmfcApplyTable; fcat->func != NULL; fcat++) {
368 if (!(fc->fcolor->vals[fc->ix] & fcat->colormask))
369 /*@innercontinue@*/ continue;
372 + if (strncmp(fc->fn[fc->ix],buildroot,buildroot_l)==0) {/* sanity check */
373 + for(j = 0; j < noautoprovfiles_c; j++) {
374 + if (!regexec(&noautoprovfiles[j],
375 + fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) {
376 + rpmMessage(RPMMESS_NORMAL,
377 + _("skipping %s provides detection"
378 + " (matches noautoprovfiles pattern #%i)\n"),
379 + fc->fn[fc->ix], j);
384 + for(j = 0; j < noautoreqfiles_c; j++) {
385 + if (!regexec(&noautoreqfiles[j],
386 + fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) {
387 + rpmMessage(RPMMESS_NORMAL,
388 + _("skipping %s requires detection"
389 + " (matches noautoreqfiles pattern #%i)\n"),
390 + fc->fn[fc->ix], j);
396 xx = (*fcat->func) (fc);
400 + noautoprovfiles = rpmfcFreeRegexps(noautoprovfiles, noautoprovfiles_c);
401 + noautoreqfiles = rpmfcFreeRegexps(noautoreqfiles, noautoreqfiles_c);
402 + fc->noautoprov = rpmfcFreeRegexps(fc->noautoprov, fc->noautoprov_c);
403 + fc->noautoreq = rpmfcFreeRegexps(fc->noautoreq, fc->noautoreq_c);
404 +#ifdef AUTODEP_PKGNAMES /* define to use package names in R */
405 + rpmfcFindRequiredPackages(fc);
408 /* Generate per-file indices into package dependencies. */
409 nddict = argvCount(fc->ddict);
410 --- rpm-4.3/po/POTFILES.in.orig 2004-01-04 03:13:02.000000000 +0100
411 +++ rpm-4.3/po/POTFILES.in 2004-02-01 21:05:50.567248776 +0100
420 --- rpm-4.3/po/pl.po.orig 2004-02-01 20:53:10.000000000 +0100
421 +++ rpm-4.3/po/pl.po 2004-02-01 21:20:36.532561576 +0100
422 @@ -1295,6 +1295,127 @@
423 msgid "lookup i18N strings in specfile catalog"
424 msgstr "wyszukaj wpisy I18N w katalogu pliku spec"
428 +msgid "\texecv(%s) pid %d\n"
429 +msgstr "\texecv(%s) pid %d\n"
431 +#. XXX this error message is probably not seen.
432 +#: build/rpmfc.c:100
434 +msgid "Couldn't exec %s: %s\n"
435 +msgstr "Nie mo¿na uruchomiæ %s: %s\n"
437 +#: build/rpmfc.c:105
439 +msgid "Couldn't fork %s: %s\n"
440 +msgstr "Nie mo¿na wykonaæ fork %s: %s\n"
442 +#: build/rpmfc.c:190
444 +msgid "\twaitpid(%d) rc %d status %x\n"
445 +msgstr "\twaitpid(%d) rc %d status %x\n"
447 +#: build/rpmfc.c:194
450 +msgstr "%s nie powiod³o siê\n"
452 +#: build/rpmfc.c:198
454 +msgid "failed to write all data to %s\n"
455 +msgstr "Nie uda³o siê zapisaæ wszystkich danych do %s\n"
457 +#: build/rpmfc.c:334
459 +msgid "Compilation of regular expresion '%s' (expanded from '%s') failed. Skipping it.\n"
460 +msgstr "Kompilacja wyra¿enia regularnego '%s' (powsta³ego z '%s') nie powiod³a siê; pominiêto.\n"
462 +#: build/rpmfc.c:395
464 +msgid "%i _noautoprov patterns.\n"
465 +msgstr "%i wzorców _noautoprov.\n"
467 +#: build/rpmfc.c:405
469 +msgid "%i _noautoreq patterns.\n"
470 +msgstr "%i wzorców _noautoreq.\n"
472 +#: build/rpmfc.c:459
474 +msgid "Checking %c: '%s' against _noauto expr. #%i\n"
475 +msgstr "Sprawdzanie %c: '%s' z wyra¿eniem _noauto #%i\n"
477 +#: build/rpmfc.c:462
479 +msgid "Skipping %c: '%s' as it matches _noauto expr. #%i\n"
480 +msgstr "Pominiêto %c: '%s' pasuj±ce do wyra¿enia _noauto #%i\n"
482 +#. XXX ts created in main() should be used
483 +#: build/rpmfc.c:1173
484 +msgid "Searching for required packages....\n"
485 +msgstr "Poszukiwanie wymaganych pakietów...\n"
487 +#: build/rpmfc.c:1197
489 +msgid "#%i requires: %s,%s,%i\n"
490 +msgstr "#%i wymaga: %s,%s,%i\n"
492 +#: build/rpmfc.c:1199
494 +msgid "skipping #%i require\n"
495 +msgstr "pominiêto zale¿no¶æ #%i\n"
497 +#: build/rpmfc.c:1205
499 +msgid "skipping %s requirement processing (matches noautoreqdep pattern #%i)\n"
500 +msgstr "pominiêto przetwarzanie zale¿no¶ci %s (pasuje do wzorca noautoreqdep #%i)\n"
502 +#: build/rpmfc.c:1211
504 +msgid "skipping #%i require (is file requirement)\n"
505 +msgstr "pominiêto zale¿no¶æ #%i (zale¿no¶æ od pliku)\n"
507 +#: build/rpmfc.c:1216
509 +msgid "%s -> not found\n"
510 +msgstr "%s -> nie znaleziono\n"
512 +#: build/rpmfc.c:1219
514 +msgid "Iterator: %p\n"
515 +msgstr "Iterator: %p\n"
517 +#: build/rpmfc.c:1221
519 +msgid "%s -> multiple (skipping)\n"
520 +msgstr "%s -> wiele (pominiêto)\n"
522 +#: build/rpmfc.c:1230
524 +msgid "%s -> %s (skipping)\n"
525 +msgstr "%s -> %s (pominiêto)\n"
527 +#: build/rpmfc.c:1295
529 +msgid "skipping %s provides detection (matches noautoprovfiles pattern #%i)\n"
530 +msgstr "pominiêto wykrywanie w³asno¶ci %s (pasuje do wzorca noautoprovfiles #%i)\n"
532 +#: build/rpmfc.c:1306
534 +msgid "skipping %s requires detection (matches noautoreqfiles pattern #%i)\n"
535 +msgstr "pominiêto wykrywanie w³asno¶ci %s (pasuje do wzorca noautoreqfiles #%i)\n"
537 +#: build/rpmfc.c:1642
539 +msgid "Finding %s: %s\n"
540 +msgstr "Poszukiwanie %s: %s\n"
542 +#: build/rpmfc.c:1648 build/rpmfc.c:1657
544 +msgid "Failed to find %s:\n"
545 +msgstr "Nie uda³o siê odnale¼æ %s:\n"
549 msgid "line %d: Bad number: %s\n"
550 --- rpm/configure.ac.orig 2004-08-22 13:02:30.000000000 +0200
551 +++ rpm/configure.ac 2004-08-22 13:25:37.000000000 +0200
553 AC_SUBST(__CHGRP_RHF)
556 +dnl enable generating autorequires containing packages names
558 +AC_ARG_ENABLE([adding-packages-names-in-autogenerated-dependancies],
559 + [ --enable-adding-packages-names-in-autogenerated-dependancies Add packages names for autogenerated dependancies to requires],
561 + AC_MSG_RESULT([Using packages names in autogerated requires is enabled])
562 + AC_DEFINE(AUTODEP_PKGNAMES, 1, "Generating autorequires containing packages names.")
568 dnl figure out what root's primary group is
570 AC_MSG_CHECKING(root's primary group)