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

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   20-Sep-2008 16:37:56
  Branch: HEAD                             Handle: 2008092014375600

  Modified files:
    rpm                     CHANGES
    rpm/lib                 depends.c

  Log:
    - jbj: fix: check added file names against installed conflicts.

  Summary:
    Revision    Changes     Path
    1.2552      +1  -0      rpm/CHANGES
    1.418       +15 -1      rpm/lib/depends.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2551 -r1.2552 CHANGES
  --- rpm/CHANGES       18 Sep 2008 18:37:47 -0000      1.2551
  +++ rpm/CHANGES       20 Sep 2008 14:37:56 -0000      1.2552
  @@ -1,5 +1,6 @@
   
   5.1.0 -> 5.2a0:
  +    - jbj: fix: check added file names against installed conflicts.
       - jbj: update nl.po (Translation Project).
       - rpm.org: permit hardlinks only with regular files.
       - jbj: fix: tagType() with multiple aliases returned the wrong type.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  ============================================================================
  $ cvs diff -u -r1.417 -r1.418 depends.c
  --- rpm/lib/depends.c 22 Aug 2008 06:09:57 -0000      1.417
  +++ rpm/lib/depends.c 20 Sep 2008 14:37:56 -0000      1.418
  @@ -1529,7 +1529,8 @@
                /[EMAIL PROTECTED]@*/ rpmds conflicts,
                /[EMAIL PROTECTED]@*/ rpmds dirnames,
                /[EMAIL PROTECTED]@*/ rpmds linktos,
  -             /[EMAIL PROTECTED]@*/ const char * depName, rpmuint32_t 
tscolor, int adding)
  +             /[EMAIL PROTECTED]@*/ const char * depName,
  +             rpmuint32_t tscolor, int adding)
        /[EMAIL PROTECTED] rpmGlobalMacroContext, h_errno,
                fileSystem, internalState @*/
        /[EMAIL PROTECTED] ts, requires, conflicts, dirnames, linktos,
  @@ -2754,6 +2755,7 @@
       pi = rpmtsiInit(ts);
       while (ourrc < terminate && (p = rpmtsiNext(pi, TR_ADDED)) != NULL) {
        rpmds provides, requires, conflicts, dirnames, linktos;
  +     rpmfi fi;
   
   /[EMAIL PROTECTED]@*/        /* FIX: rpmts{A,O} can return null. */
        rpmlog(RPMLOG_DEBUG, "========== +++ %s %s/%s 0x%x\n",
  @@ -2803,6 +2805,18 @@
        }
        if (rc && (ourrc = rc) >= terminate)
            break;
  +
  +     fi = rpmteFI(p, RPMTAG_BASENAMES);
  +     fi = rpmfiInit(fi, 0);
  +     while (ourrc < terminate && rpmfiNext(fi) >= 0) {
  +         depName = _free(depName);
  +         depName = xstrdup(rpmfiFN(fi));
  +         /* Adding: check filename against conflicts matches. */
  +         if (checkDependentConflicts(ts, depName))
  +             rc = 1;
  +     }
  +     if (rc && (ourrc = rc) >= terminate)
  +         break;
       }
       pi = rpmtsiFree(pi);
       if (rc && (ourrc = rc) >= terminate)
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to