RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ rpminstall.c rpm/rpmio/ tfts.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Fri 08 Feb 2008 - 03:08:40 CET
Message-Id: <20080208020840.7B673348479@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:   08-Feb-2008 03:08:40
  Branch: HEAD                             Handle: 2008020802083901

  Modified files:
    rpm                     CHANGES
    rpm/lib                 rpminstall.c
    rpm/rpmio               tfts.c

  Log:
    - jbj: "+bing": glob'd directory roots need trailing '/' for DAV
    URI's.

  Summary:
    Revision    Changes     Path
    1.2148      +1  -0      rpm/CHANGES
    1.199       +12 -3      rpm/lib/rpminstall.c
    2.14        +3  -1      rpm/rpmio/tfts.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2147 -r1.2148 CHANGES
  --- rpm/CHANGES	8 Feb 2008 01:18:38 -0000	1.2147
  +++ rpm/CHANGES	8 Feb 2008 02:08:39 -0000	1.2148
  @@ -1,4 +1,5 @@
   5.0.0 -> 5.1a1:
  +    - jbj: "+bing": glob'd directory roots need trailing '/' for DAV URI's.
       - jbj: "+bing": fix: check for glob'd directory roots before traversing.
       - jbj: rpmio: rescuscitate tglob.c.
       - jbj: rpmio: rescuscitate tdir.c.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpminstall.c
  ============================================================================
  $ cvs diff -u -r1.198 -r1.199 rpminstall.c
  --- rpm/lib/rpminstall.c	8 Feb 2008 01:18:38 -0000	1.198
  +++ rpm/lib/rpminstall.c	8 Feb 2008 02:08:40 -0000	1.199
  @@ -116,7 +116,7 @@
       case RPMCALLBACK_INST_OPEN_FILE:
   	if (filename == NULL || filename[0] == '\0')
   	    return NULL;
  -	fd = Fopen(filename, "r.fdio");
  +	fd = Fopen(filename, "r%{?_rpmgio}");
   	/*@-type@*/ /* FIX: still necessary? */
   	if (fd == NULL || Ferror(fd)) {
   	    rpmlog(RPMLOG_ERR, _("open of %s failed: %s\n"), filename,
  @@ -336,7 +336,8 @@
   {
       /* XXX use global ftsOpts? */
       /* XXX changing FTS_LOGICAL to FTS_PHYSICAL prevents symlink follow. */
  -    int _ftsOpts = (FTS_COMFOLLOW | FTS_LOGICAL | FTS_NOSTAT | FTS_NOCHDIR);
  +    /* XXX FTS_NOCHDIR is automatically assumed for URI's */
  +    int _ftsOpts = (FTS_COMFOLLOW | FTS_LOGICAL | FTS_NOSTAT);
       FTS * ftsp = NULL;
       FTSENT * fts;
       const char * fn = NULL;
  @@ -424,6 +425,14 @@
   	fn = rpmGetPath(dav[i], "/", NULL);
   	xx = rpmGlob(fn, &nac, &nav);
   
  +	/* Insure that final directory paths have trailing '/' */
  +	if (nav != NULL)
  +	for (i = 0; i < nac; i++) {
  +	    char * t = rpmExpand(nav[i], "/", NULL);
  +	    nav[i] = _free(nav[i]);
  +	    nav[i] = t;
  +	}
  +
   	/* Append matches to list of repository directories. */
   	if (nac > 0 && nav != NULL)
   	    xx = argvAppend(&av, nav);
  @@ -800,7 +809,7 @@
       FD_t fd;
       int rc;
   
  -    fd = Fopen(arg, "r.fdio");
  +    fd = Fopen(arg, "r%{?_rpmgio}");
       if (fd == NULL || Ferror(fd)) {
   	rpmlog(RPMLOG_ERR, _("cannot open %s: %s\n"), arg, Fstrerror(fd));
   	if (fd != NULL) (void) Fclose(fd);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/tfts.c
  ============================================================================
  $ cvs diff -u -r2.13 -r2.14 tfts.c
  --- rpm/rpmio/tfts.c	2 Feb 2008 14:50:33 -0000	2.13
  +++ rpm/rpmio/tfts.c	8 Feb 2008 02:08:40 -0000	2.14
  @@ -226,7 +226,9 @@
   	    goto exit;;
       }
   
  -    mg = rpmmgNew(mgFile, mgFlags);
  +    if (mgFile) {
  +	mg = rpmmgNew(mgFile, mgFlags);
  +    }
   
       ftsWalk(av);
   
  @@ .
Received on Fri Feb 8 03:08:40 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.