RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs                       Email:  pkarl...@rpm5.org
  Module: rpm                              Date:   10-Apr-2011 01:02:05
  Branch: rpm-5_3                          Handle: 2011040923020400

  Modified files:           (Branch: rpm-5_3)
    rpm/lib                 psm.c

  Log:
    fix file trigger hack for firing way too many times on mandriva

  Summary:
    Revision    Changes     Path
    2.394.2.10  +5  -15     rpm/lib/psm.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/lib/psm.c
  ============================================================================
  $ cvs diff -u -r2.394.2.9 -r2.394.2.10 psm.c
  --- rpm/lib/psm.c     25 Mar 2011 15:13:34 -0000      2.394.2.9
  +++ rpm/lib/psm.c     9 Apr 2011 23:02:04 -0000       2.394.2.10
  @@ -1476,22 +1476,8 @@
                /*@innercontinue@*/ continue;
            rc |= handleOneTrigger(psm, fi->h, triggeredH, arg2);
            prev = instance;
  -
  -#if !defined(RPM_VENDOR_MANDRIVA)
  -         /*
  -          * FIXME: 'instances' is never really used for anything later,
  -          * and seems to have some bug making it eat it all memory
  -          */
            xx = argiAdd(&instances, -1, instance);
            xx = argiSort(instances, NULL);
  -#else
  -         /* As no filenames or anything is passed to the trigger script,
  -          * there doesn't seem to be any reason to fire the same trigger
  -          * over and over..
  -          */
  -         if(tagno == RPMTAG_BASENAMES || tagno == RPMTAG_DIRNAMES)
  -             break;
  -#endif
        }
   
        mi = rpmmiFree(mi);
  @@ -1634,8 +1620,12 @@
        if (tagno != RPMTAG_NAME) {
            /* XXX if trigger name ends with '/', use dirnames instead. */
            if (N[0] == '/') 
  -             tagno = (N[strlen(N)-1] == '/')
  +#if defined(RPM_VENDOR_MANDRIVA)
  +             continue;
  +#else
  +         tagno = (N[strlen(N)-1] == '/')
                        ? RPMTAG_DIRNAMES : RPMTAG_FILEPATHS;
  +#endif
        }
        /* XXX For now, permit globs only in unversioned triggers. */
        if ((EVR == NULL || *EVR == '\0') && Glob_pattern_p(N, 0))
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to