X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-pld-autodep.patch;h=14d2f41b0bcb31438b3a8ece66242f335c66d87d;hb=289cde62c737f0a460fb87c718cef4a5852e4c60;hp=e4a6d72bec128cb23cd9ad4db48c820e2a608c47;hpb=043ea103d85e9e0c1ff2a854752ad94245ad0bf4;p=packages%2Frpm.git diff --git a/rpm-pld-autodep.patch b/rpm-pld-autodep.patch index e4a6d72..14d2f41 100644 --- a/rpm-pld-autodep.patch +++ b/rpm-pld-autodep.patch @@ -1,28 +1,24 @@ ---- 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 @@ - #ifndef _H_RPMFC_ - #define _H_RPMFC_ +diff -ur rpm.org/configure.ac rpm/configure.ac +--- rpm.org/configure.ac 2007-10-02 14:48:58.200734000 +0200 ++++ rpm/configure.ac 2007-10-02 14:49:18.697896240 +0200 +@@ -979,6 +979,14 @@ -+#include - #undef FILE_RCSID - #include "magic.h" - -@@ -44,6 +45,11 @@ - StringBuf sb_python;/*!< concatenated list of python colored files. */ - StringBuf sb_php; /*!< concatenated list of php colored files. */ + AC_MSG_HEADER([INSTALLATION PARAMETERS]) -+ 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 @@ ++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_UNQUOTED([AUTODEP_PKGNAMES], [1], ["Generating autorequires containing packages names."])) ++dnl ++ + dnl # figure out what root's primary group is + AC_MSG_CHECKING([root's primary group]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include +--- rpm.org/lib/rpmfc.c 2007-10-02 14:48:58.244068000 +0200 ++++ rpm/lib/rpmfc.c 2007-10-02 14:52:24.222380740 +0200 +@@ -17,6 +17,8 @@ #define _RPMDS_INTERNAL #include #include @@ -31,7 +27,7 @@ #include "debug.h" -@@ -305,14 +307,83 @@ +@@ -311,14 +313,83 @@ return buf; }; @@ -61,7 +57,7 @@ + r=regcomp(&compiled[j],patterns[i],REG_NOSUB); + if (r==0) j++; + else { -+ rpmMessage(RPMMESS_NORMAL, ++ rpmlog(RPMLOG_NOTICE, + _("Compilation of regular expresion '%s'" + " (expanded from '%s') failed. Skipping it.\n"), + patterns[i],str); @@ -81,10 +77,10 @@ +{ + int j; + for(j = 0; j < count; j++) { -+ rpmMessage(RPMMESS_DEBUG, ++ rpmlog(RPMLOG_DEBUG, + _("Checking %c: '%s' against _noauto expr. #%i\n"), deptype, str, j); + if (!regexec(®exps[j], str, 0, NULL, 0)) { -+ rpmMessage(RPMMESS_NORMAL, ++ rpmlog(RPMLOG_NOTICE, + _("Skipping %c: '%s' as it matches _noauto expr. #%i\n"), deptype, str, j); + return 1; + } @@ -116,7 +112,7 @@ /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/ { -@@ -398,6 +469,8 @@ +@@ -404,6 +475,8 @@ } /*@=branchstate@*/ @@ -125,7 +121,7 @@ /* Add tracking dependency for versioned Provides: */ if (!fc->tracked && deptype == 'P' && *EVR != '\0') { -@@ -710,7 +783,7 @@ +@@ -718,7 +791,7 @@ *se = '\0'; se++; @@ -134,18 +130,19 @@ /* Add to package requires. */ ds = rpmdsSingle(RPMTAG_REQUIRENAME, s, "", RPMSENSE_FIND_REQUIRES); xx = rpmdsMerge(&fc->requires, ds); -@@ -738,43 +811,51 @@ - (void) fclose(fp); +@@ -747,49 +820,61 @@ if (fc->fcolor->vals[fc->ix] & RPMFC_PERL) { -- if (fc->fcolor->vals[fc->ix] & RPMFC_MODULE) -- xx = rpmfcHelper(fc, 'P', "perl"); -- if (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)) -- 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); + if (strncmp(fn, "/usr/share/doc/", sizeof("/usr/share/doc/")-1)) { +- if (fc->fcolor->vals[fc->ix] & RPMFC_MODULE) +- xx = rpmfcHelper(fc, 'P', "perl"); +- if (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)) +- 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"); @@ -155,7 +152,7 @@ if (is_executable) #endif - xx = rpmfcHelper(fc, 'R', "python"); -+ if (fc->findreq) ++ if (fc->findreq) + xx = rpmfcHelper(fc, 'R', "python", fc->noautoreq, fc->noautoreq_c); } else if (fc->fcolor->vals[fc->ix] & RPMFC_LIBTOOL) { @@ -166,7 +163,7 @@ if (is_executable) #endif - xx = rpmfcHelper(fc, 'R', "libtool"); -+ if (fc->findreq) ++ if (fc->findreq) + xx = rpmfcHelper(fc, 'R', "libtool", fc->noautoreq, fc->noautoreq_c); } else if (fc->fcolor->vals[fc->ix] & RPMFC_PKGCONFIG) { @@ -177,16 +174,18 @@ if (is_executable) #endif - xx = rpmfcHelper(fc, 'R', "pkgconfig"); -+ if (fc->findreq) ++ 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"); +- xx = rpmfcHelper(fc, 'P', "executable"); ++ if (fc->findprov) ++ xx = rpmfcHelper(fc, 'P', "executable", fc->noautoprov, fc->noautoprov_c); #endif -- if (is_executable) + if (is_executable) - xx = rpmfcHelper(fc, 'R', "executable"); -+ if (fc->findreq && is_executable) ++ if (fc->findreq) + xx = rpmfcHelper(fc, 'R', "executable", fc->noautoreq, fc->noautoreq_c); } else if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) { @@ -195,12 +194,21 @@ + 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 (fc->findreq) ++ if (fc->findreq) + xx = rpmfcHelper(fc, 'R', "php", fc->noautoreq, fc->noautoreq_c); + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_MONO) { +- xx = rpmfcHelper(fc, 'P', "mono"); ++ if (fc->findprov) ++ xx = rpmfcHelper(fc, 'P', "mono", fc->noautoprov, fc->noautoprov_c); + if (is_executable) +- xx = rpmfcHelper(fc, 'R', "mono"); ++ if (fc->findreq) ++ xx = rpmfcHelper(fc, 'R', "mono", fc->noautoreq, fc->noautoreq_c); } - return 0; -@@ -802,20 +883,26 @@ + } +@@ -816,20 +901,26 @@ default: break; case RPMTAG_PROVIDENAME: @@ -227,10 +235,11 @@ break; } return rc; -@@ -856,6 +943,109 @@ +@@ -870,6 +961,111 @@ { NULL, 0 } }; ++#ifdef AUTODEP_PKGNAMES /* define to use package names in R */ +static int rpmfcFindRequiredPackages(rpmfc fc) +{ + rpmts ts=NULL; @@ -239,7 +248,7 @@ + rpmds ds; + const char * N; + const char * EVR; -+ int_32 Flags; ++ int32_t Flags; + unsigned char deptype; + int nddict; + int previx; @@ -258,7 +267,7 @@ + + ts = rpmtsCreate(); /* XXX ts created in main() should be used */ + -+ rpmMessage(RPMMESS_NORMAL, _("Searching for required packages....\n")); ++ rpmlog(RPMLOG_NOTICE, _("Searching for required packages....\n")); + + nddict = argvCount(fc->ddict); + previx = -1; @@ -282,31 +291,31 @@ + + if (deptype!='R') continue; + -+ rpmMessage(RPMMESS_DEBUG, _("#%i requires: %s,%s,%i\n"),ix,N,EVR,Flags); ++ rpmlog(RPMLOG_DEBUG, _("#%i requires: %s,%s,%i\n"),ix,N,EVR,Flags); + if (EVR && EVR[0]) { -+ rpmMessage(RPMMESS_DEBUG, _("skipping #%i require\n")); ++ rpmlog(RPMLOG_DEBUG, _("skipping #%i require\n")); + continue; + } + for(j=0;j not found\n"),N); ++ rpmlog(RPMLOG_DEBUG, _("%s -> not found\n"),N); + continue; + } -+ rpmMessage(RPMMESS_DEBUG, _("Iterator: %p\n"),it); ++ rpmlog(RPMLOG_DEBUG, _("Iterator: %p\n"),it); + if (rpmdbGetIteratorCount(it)>1) { -+ rpmMessage(RPMMESS_DEBUG, _("%s -> multiple (skipping)\n"),N); ++ rpmlog(RPMLOG_DEBUG, _("%s -> multiple (skipping)\n"),N); + rpmdbFreeIterator(it); + continue; + } @@ -315,12 +324,12 @@ + 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); ++ rpmlog(RPMLOG_DEBUG, _("%s -> %s (skipping)\n"),N,hname); + rpmdbFreeIterator(it); + continue; + } + -+ rpmMessage(RPMMESS_DEBUG, "%s -> %s\n",N,hname); ++ rpmlog(RPMLOG_DEBUG, "%s -> %s\n",N,hname); + + ds = rpmdsSingle(RPMTAG_REQUIRENAME, hname, "", RPMSENSE_FIND_REQUIRES); + xx = rpmdsMerge(&fc->requires, ds); @@ -333,11 +342,12 @@ + ts = rpmtsFree(ts); + return 0; +} ++#endif + - int rpmfcApply(rpmfc fc) + rpmRC rpmfcApply(rpmfc fc) { rpmfcApplyTbl fcat; -@@ -874,6 +1064,26 @@ +@@ -888,6 +1084,26 @@ int i; int xx; int skipping; @@ -359,12 +369,12 @@ + 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); ++ rpmlog(RPMLOG_DEBUG, _("%i _noautoprov patterns.\n"), fc->noautoprov_c); ++ rpmlog(RPMLOG_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++) { -@@ -894,9 +1104,43 @@ + /* Make sure something didn't go wrong previously! */ + assert(fc->fn != NULL); +@@ -911,9 +1127,43 @@ for (fcat = rpmfcApplyTable; fcat->func != NULL; fcat++) { if (!(fc->fcolor->vals[fc->ix] & fcat->colormask)) /*@innercontinue@*/ continue; @@ -374,7 +384,7 @@ + for(j = 0; j < noautoprovfiles_c; j++) { + if (!regexec(&noautoprovfiles[j], + fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) { -+ rpmMessage(RPMMESS_NORMAL, ++ rpmlog(RPMLOG_NOTICE, + _("skipping %s provides detection" + " (matches noautoprovfiles pattern #%i)\n"), + fc->fn[fc->ix], j); @@ -385,7 +395,7 @@ + for(j = 0; j < noautoreqfiles_c; j++) { + if (!regexec(&noautoreqfiles[j], + fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) { -+ rpmMessage(RPMMESS_NORMAL, ++ rpmlog(RPMLOG_NOTICE, + _("skipping %s requires detection" + " (matches noautoreqfiles pattern #%i)\n"), + fc->fn[fc->ix], j); @@ -408,113 +418,33 @@ /*@-boundswrite@*/ /* Generate per-file indices into package dependencies. */ ---- 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,86 @@ - msgid "lookup i18N strings in specfile catalog" - msgstr "wyszukaj wpisy I18N w katalogu pliku spec" +--- rpm.org/lib/rpmfc.h 2007-07-14 05:22:44.000000000 +0200 ++++ rpm/lib/rpmfc.h 2007-10-02 14:49:18.731230377 +0200 +@@ -98,6 +98,11 @@ + StringBuf sb_python;/*!< concatenated list of python colored files. */ + StringBuf sb_php; /*!< concatenated list of php colored files. */ -+#: lib/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" -+ -+#: lib/rpmfc.c:395 -+#, c-format -+msgid "%i _noautoprov patterns.\n" -+msgstr "%i wzorców _noautoprov.\n" -+ -+#: lib/rpmfc.c:405 -+#, c-format -+msgid "%i _noautoreq patterns.\n" -+msgstr "%i wzorców _noautoreq.\n" -+ -+#: lib/rpmfc.c:459 -+#, c-format -+msgid "Checking %c: '%s' against _noauto expr. #%i\n" -+msgstr "Sprawdzanie %c: '%s' z wyra¿eniem _noauto #%i\n" -+ -+#: lib/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 -+#: lib/rpmfc.c:1173 -+msgid "Searching for required packages....\n" -+msgstr "Poszukiwanie wymaganych pakietów...\n" -+ -+#: lib/rpmfc.c:1197 -+#, c-format -+msgid "#%i requires: %s,%s,%i\n" -+msgstr "#%i wymaga: %s,%s,%i\n" -+ -+#: lib/rpmfc.c:1199 -+#, c-format -+msgid "skipping #%i require\n" -+msgstr "pominiêto zale¿no¶æ #%i\n" -+ -+#: lib/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" -+ -+#: lib/rpmfc.c:1211 -+#, c-format -+msgid "skipping #%i require (is file requirement)\n" -+msgstr "pominiêto zale¿no¶æ #%i (zale¿no¶æ od pliku)\n" -+ -+#: lib/rpmfc.c:1216 -+#, c-format -+msgid "%s -> not found\n" -+msgstr "%s -> nie znaleziono\n" -+ -+#: lib/rpmfc.c:1219 -+#, c-format -+msgid "Iterator: %p\n" -+msgstr "Iterator: %p\n" -+ -+#: lib/rpmfc.c:1221 -+#, c-format -+msgid "%s -> multiple (skipping)\n" -+msgstr "%s -> wiele (pominiêto)\n" -+ -+#: lib/rpmfc.c:1230 -+#, c-format -+msgid "%s -> %s (skipping)\n" -+msgstr "%s -> %s (pominiêto)\n" -+ -+#: lib/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" -+ -+#: lib/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/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) ++ int findprov, findreq; ++ regex_t *noautoprov; ++ int noautoprov_c; ++ regex_t *noautoreq; ++ int noautoreq_c; + }; - 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.") -+ -+ ) + /** +--- rpm/lib/rpmfc.h.org 2007-10-02 15:05:48.028299804 +0200 ++++ rpm/lib/rpmfc.h 2007-10-02 15:06:03.052024633 +0200 +@@ -67,6 +67,13 @@ + }; + + #if defined(_RPMFC_INTERNAL) + ++#if defined(WITH_PCRE) && defined(HAVE_PCREPOSIX_H) ++#include ++#else ++#include ++#endif + -+dnl - dnl figure out what root's primary group is - dnl - AC_MSG_CHECKING(root's primary group) + /** + */ + struct rpmfc_s {