RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/lib/ depends.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Sat 26 Jan 2008 - 23:48:30 CET
Message-Id: <20080126224830.05023348464@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   26-Jan-2008 23:48:30
  Branch: HEAD                             Handle: 2008012622482900

  Modified files:
    rpm/lib                 depends.c

  Log:
    - pedantry: use !strcmp(Name, "*"), not Name[0] == '*', for -Va probe
    check.

  Summary:
    Revision    Changes     Path
    1.381       +2  -2      rpm/lib/depends.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  ============================================================================
  $ cvs diff -u -r1.380 -r1.381 depends.c
  --- rpm/lib/depends.c	26 Jan 2008 22:23:01 -0000	1.380
  +++ rpm/lib/depends.c	26 Jan 2008 22:48:29 -0000	1.381
  @@ -852,14 +852,14 @@
   	qva->qva_flags = VERIFY_ALL & ~(VERIFY_DEPS|VERIFY_SCRIPT);
   	rc = 0;		/* assume success */
   	if (rpmtsGetRdb(ts) != NULL) {
  -	    if (Name[0] == '*')			/* -Va probe */
  +	    if (!strcmp(Name, "*"))			/* -Va probe */
   		mi = rpmtsInitIterator(ts, RPMDBI_PACKAGES, NULL, 0);
   	    else if (Name[0] == '/')		/* -Vf probe */
   		mi = rpmtsInitIterator(ts, RPMTAG_BASENAMES, Name, 0);
   	    else				/* -V probe */
   		mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, Name, 0);
   	    while ((h = rpmdbNextIterator(mi)) != NULL) {
  -		if (!(Name[0] == '/' || Name[0] == '*'))
  +		if (!(Name[0] == '/' || !strcmp(Name, "*")))
   		if (!rpmdsAnyMatchesDep(h, dep, _rpmds_nopromote))
   		    continue;
   		xx = (showVerifyPackage(qva, ts, h) ? 1 : 0);
  @@ .
Received on Sat Jan 26 23:48:30 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.