RPM Community Forums

Mailing List Message of <rpm-cvs>

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

From: Jeff Johnson <jbj@rpm5.org>
Date: Sun 22 Jul 2007 - 07:08:22 CEST
Message-Id: <20070722050822.561323484F4@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:   22-Jul-2007 07:08:22
  Branch: HEAD                             Handle: 2007072206082200

  Modified files:
    rpm/lib                 depends.c

  Log:
    expand once, not every time.

  Summary:
    Revision    Changes     Path
    1.335       +7  -5      rpm/lib/depends.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  ============================================================================
  $ cvs diff -u -r1.334 -r1.335 depends.c
  --- rpm/lib/depends.c	17 Jul 2007 20:07:41 -0000	1.334
  +++ rpm/lib/depends.c	22 Jul 2007 05:08:22 -0000	1.335
  @@ -551,7 +551,7 @@
       int rc;
       int xx;
       int retries = 10;
  -    char *sysinfo_path;
  +    static char *sysinfo_path = NULL;;
   
       if ((Name = rpmdsN(dep)) == NULL)
   	return 0;	/* XXX can't happen */
  @@ -855,10 +855,12 @@
       }
   
       /* Search system configured provides. */
  -    sysinfo_path = rpmExpand("%{?_rpmds_sysinfo_path}", NULL);
  -    if (!(sysinfo_path != NULL && *sysinfo_path == '/')) {
  -        sysinfo_path = _free(sysinfo_path);
  -        sysinfo_path = xstrdup(SYSCONFIGDIR "/sysinfo");
  +    if (sysinfo_path == NULL) {
  +	sysinfo_path = rpmExpand("%{?_rpmds_sysinfo_path}", NULL);
  +	if (!(sysinfo_path != NULL && *sysinfo_path == '/')) {
  +	    sysinfo_path = _free(sysinfo_path);
  +	    sysinfo_path = xstrdup(SYSCONFIGDIR "/sysinfo");
  +	}
       }
       if (!rpmioAccess(sysinfo_path, NULL, R_OK)) {
   #ifdef	NOTYET	/* XXX just sysinfo Provides: for now. */
  @@ .
Received on Sun Jul 22 07:08:22 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.