RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ librpm.vers rpmfi.c rpmfi.h rpmlib.h ...

From: Jeff Johnson <jbj@rpm5.org>
Date: Sat 29 Sep 2007 - 00:26:50 CEST
Message-Id: <20070928222650.71EE1348469@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:   29-Sep-2007 00:26:50
  Branch: HEAD                             Handle: 2007092823264900

  Modified files:
    rpm                     CHANGES
    rpm/lib                 librpm.vers rpmfi.c rpmfi.h rpmlib.h transaction.c

  Log:
    - jbj: move (largely unused) fileTypes into rpmfi.h
    - jbj: remove whatis() from rpmlib, use S_ISFOO() instead.

  Summary:
    Revision    Changes     Path
    1.1641      +2  -0      rpm/CHANGES
    1.17        +0  -1      rpm/lib/librpm.vers
    2.77        +7  -1      rpm/lib/rpmfi.c
    2.39        +17 -8      rpm/lib/rpmfi.h
    2.435       +0  -17     rpm/lib/rpmlib.h
    1.333       +1  -1      rpm/lib/transaction.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1640 -r1.1641 CHANGES
  --- rpm/CHANGES	24 Sep 2007 02:38:56 -0000	1.1640
  +++ rpm/CHANGES	28 Sep 2007 22:26:49 -0000	1.1641
  @@ -1,4 +1,6 @@
   4.5 -> 5.0:
  +    - jbj: move (largely unused) fileTypes into rpmfi.h
  +    - jbj: remove whatis() from rpmlib, use S_ISFOO() instead.
       - jbj: ensure that PLD setup & FHS packages install correctly.
       - jbj: wrapper for open(2).
       - rpm.org: ensure that yum's broken transaction checks "work" (#259961).
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/librpm.vers
  ============================================================================
  $ cvs diff -u -r1.16 -r1.17 librpm.vers
  --- rpm/lib/librpm.vers	9 Sep 2007 17:56:41 -0000	1.16
  +++ rpm/lib/librpm.vers	28 Sep 2007 22:26:49 -0000	1.17
  @@ -421,7 +421,6 @@
       strict_erasures;
       stripTrailingBlanksStringBuf;
       truncStringBuf;
  -    whatis;
       XrpmdsLink;
       XrpmdsUnlink;
       XrpmfiLink;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.c
  ============================================================================
  $ cvs diff -u -r2.76 -r2.77 rpmfi.c
  --- rpm/lib/rpmfi.c	5 Sep 2007 23:08:01 -0000	2.76
  +++ rpm/lib/rpmfi.c	28 Sep 2007 22:26:49 -0000	2.77
  @@ -558,7 +558,13 @@
       /*@notreached@*/
   }
   
  -fileTypes whatis(uint_16 mode)
  +/**
  + * Return file type from mode_t.
  + * @param mode		file mode bits (from header)
  + * @return		file type
  + */
  +static fileTypes whatis(uint_16 mode)
  +	/*@*/
   {
       if (S_ISDIR(mode))	return XDIR;
       if (S_ISCHR(mode))	return CDEV;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.h
  ============================================================================
  $ cvs diff -u -r2.38 -r2.39 rpmfi.h
  --- rpm/lib/rpmfi.h	18 Aug 2007 21:32:29 -0000	2.38
  +++ rpm/lib/rpmfi.h	28 Sep 2007 22:26:49 -0000	2.39
  @@ -11,6 +11,23 @@
   extern int _rpmfi_debug;
   /*@=exportlocal@*/
   
  +/** \rpmfi
  + * File types.
  + * These are the file types used internally by rpm. The file
  + * type is determined by applying stat(2) macros like S_ISDIR to
  + * the file mode tag from a header. The values are arbitrary,
  + * but are identical to the linux stat(2) file types.
  + */
  +typedef enum fileTypes_e {
  +    PIPE	=  1,	/*!< pipe/fifo */
  +    CDEV	=  2,	/*!< character device */
  +    XDIR	=  4,	/*!< directory */
  +    BDEV	=  6,	/*!< block device */
  +    REG		=  8,	/*!< regular file */
  +    LINK	= 10,	/*!< hard link */
  +    SOCK	= 12	/*!< socket */
  +} fileTypes;
  +
   #if defined(_RPMFI_INTERNAL)
   /** \ingroup rpmfi
    * A package filename set.
  @@ -626,14 +643,6 @@
   		rpmGlobalMacroContext, fileSystem, internalState @*/;
   
   /**
  - * Return file type from mode_t.
  - * @param mode		file mode bits (from header)
  - * @return		file type
  - */
  -fileTypes whatis(uint_16 mode)
  -	/*@*/;
  -
  -/**
    * Return file info comparison.
    * @param afi		1st file info
    * @param bfi		2nd file info
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmlib.h
  ============================================================================
  $ cvs diff -u -r2.434 -r2.435 rpmlib.h
  --- rpm/lib/rpmlib.h	9 Sep 2007 20:32:42 -0000	2.434
  +++ rpm/lib/rpmlib.h	28 Sep 2007 22:26:49 -0000	2.435
  @@ -746,23 +746,6 @@
   #define XFA_SKIPPING(_a)	\
       ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
   
  -/**
  - * File types.
  - * These are the file types used internally by rpm. The file
  - * type is determined by applying stat(2) macros like S_ISDIR to
  - * the file mode tag from a header. The values are arbitrary,
  - * but are identical to the linux stat(2) file types.
  - */
  -typedef enum fileTypes_e {
  -    PIPE	=  1,	/*!< pipe/fifo */
  -    CDEV	=  2,	/*!< character device */
  -    XDIR	=  4,	/*!< directory */
  -    BDEV	=  6,	/*!< block device */
  -    REG		=  8,	/*!< regular file */
  -    LINK	= 10,	/*!< hard link */
  -    SOCK	= 12	/*!< socket */
  -} fileTypes;
  -
   /** \ingroup payload
    * Iterator across package file info, forward on install, backward on erase.
    */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/transaction.c
  ============================================================================
  $ cvs diff -u -r1.332 -r1.333 transaction.c
  --- rpm/lib/transaction.c	19 Aug 2007 21:23:54 -0000	1.332
  +++ rpm/lib/transaction.c	28 Sep 2007 22:26:49 -0000	1.333
  @@ -861,7 +861,7 @@
   
   	    fFMode = rpmfiFMode(fi);
   
  -	    if (whatis(fFMode) != XDIR)
  +	    if (!S_ISDIR(fFMode))
   		/*@innercontinue@*/ continue;
   	    fdn = rpmfiDN(fi);
   	    if (strlen(fdn) != dnlen)
  @@ .
Received on Sat Sep 29 00:26:50 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.