]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- cleaning (obsolete patches - not used in rpm.spec for rpm 4.1)
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 21 Oct 2002 13:02:29 +0000 (13:02 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-am_ac.patch -> 1.3
    rpm-athlon-identify.patch -> 1.2
    rpm-athlon.patch -> 1.2
    rpm-cxx.patch -> 1.2
    rpm-db3.patch -> 1.6
    rpm-exclude.patch -> 1.3
    rpm-hardlink-fixes.patch -> 1.2
    rpm-macros.patch -> 1.23
    rpm-noperldir.patch -> 1.2
    rpm-perlprov.patch -> 1.2
    rpm-popt-cvs20010530.patch -> 1.2
    rpm-progress-nontty.patch -> 1.2
    rpm-rh-lame.patch -> 1.2
    rpm-rpmlog-fix.patch -> 1.2
    rpm-section_test.patch -> 1.2
    rpm-segv.patch -> 1.2
    rpm-short_circuit.patch -> 1.2
    rpm-signverify-fix.patch -> 1.2
    rpm-suggestions.patch -> 1.3
    rpm-test_stage.patch -> 1.2

20 files changed:
rpm-am_ac.patch [deleted file]
rpm-athlon-identify.patch [deleted file]
rpm-athlon.patch [deleted file]
rpm-cxx.patch [deleted file]
rpm-db3.patch [deleted file]
rpm-exclude.patch [deleted file]
rpm-hardlink-fixes.patch [deleted file]
rpm-macros.patch [deleted file]
rpm-noperldir.patch [deleted file]
rpm-perlprov.patch [deleted file]
rpm-popt-cvs20010530.patch [deleted file]
rpm-progress-nontty.patch [deleted file]
rpm-rh-lame.patch [deleted file]
rpm-rpmlog-fix.patch [deleted file]
rpm-section_test.patch [deleted file]
rpm-segv.patch [deleted file]
rpm-short_circuit.patch [deleted file]
rpm-signverify-fix.patch [deleted file]
rpm-suggestions.patch [deleted file]
rpm-test_stage.patch [deleted file]

diff --git a/rpm-am_ac.patch b/rpm-am_ac.patch
deleted file mode 100644 (file)
index 4d89f2c..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -urN rpm-4.0.2.org/acconfig.h rpm-4.0.2/acconfig.h
---- rpm-4.0.2.org/acconfig.h   Fri Oct 12 18:23:02 2001
-+++ rpm-4.0.2/acconfig.h       Fri Oct 12 18:50:55 2001
-@@ -29,6 +29,9 @@
- /* Define as 1 if you have catgets and don't want to use GNU gettext.  */
- #undef HAVE_CATGETS
-+/* */
-+#undef HAVE_GETMNTENT
-+
- /* Define as 1 if you have gettext and don't want to use GNU gettext.  */
- #undef HAVE_GETTEXT
-diff -urN rpm-4.0.2.org/configure.in rpm-4.0.2/configure.in
---- rpm-4.0.2.org/configure.in Fri Oct 12 18:23:08 2001
-+++ rpm-4.0.2/configure.in     Fri Oct 12 18:25:18 2001
-@@ -20,7 +20,6 @@
- LIBOBJS=
- dnl Checks for programs.
--AC_ARG_PROGRAM
- AC_PROG_CC
- if test "$ac_cv_prog_gcc" = yes; then
-     CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts"
diff --git a/rpm-athlon-identify.patch b/rpm-athlon-identify.patch
deleted file mode 100644 (file)
index 99ff1e9..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -ur rpm-4.0.2/lib/rpmrc.c rpm-4.0.2-new/lib/rpmrc.c
---- rpm-4.0.2/lib/rpmrc.c      Tue Mar 13 13:55:25 2001
-+++ rpm-4.0.2-new/lib/rpmrc.c  Fri Jan 25 01:02:59 2002
-@@ -897,7 +897,7 @@
- static inline int RPMClass(void)
- {
-       int cpu;
--      unsigned int tfms, junk, cap;
-+      unsigned int tfms, junk, cap, capamd;
-       
-       signal(SIGILL, model3);
-       
-@@ -906,16 +906,24 @@
-               
-       if(cpuid_eax(0x000000000)==0)
-               return 4;
--      cpuid(0x000000001, &tfms, &junk, &junk, &cap);
-+
-+      cpuid(0x00000001, &tfms, &junk, &junk, &cap);
-+      cpuid(0x80000001, &junk, &junk, &junk, &capamd);
-       
-       cpu = (tfms>>8)&15;
-       
-       if(cpu < 6)
-               return cpu;
-               
--      if(cap & (1<<15))
--              return 6;
--              
-+      if(cap & (1<<15)) {
-+              // it supports CMOV instruction
-+              if (capamd & (1<<30))
-+                      // it supports 3DNOWEXT
-+                      return 7;
-+              else
-+                      return 6;
-+      }
-+      
-       return 5;
- }
-@@ -1112,6 +1116,8 @@
-           if (strchr("3456", un.machine[1]) && un.machine[1] != class)
-               un.machine[1] = class;
-+          if (class == '7')
-+              strcpy(un.machine,"athlon");
-       }
- #     endif
diff --git a/rpm-athlon.patch b/rpm-athlon.patch
deleted file mode 100644 (file)
index b1a0ced..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -ur rpm-4.0.2/installplatform rpm-4.0.2-new/installplatform
---- rpm-4.0.2/installplatform  Thu Jan 24 09:50:29 2002
-+++ rpm-4.0.2-new/installplatform      Thu Jan 24 11:25:42 2002
-@@ -20,7 +20,7 @@
- RPM="./rpm --rcfile $TEMPRC"
--CHARCH='s_i.86_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_'
-+CHARCH='s_i.86_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_'
- arch="`$RPM --eval '%{_arch}' | sed -e $CHARCH`"
- VENDOR="`$RPM --eval '%{_vendor}'`"
- OS="`$RPM --eval '%{_os}'`"
-@@ -34,7 +34,7 @@
- ln -s ${arch}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/noarch-${OS}
- case "$arch" in
--  i[3456]86) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_' ;;
-+  i[3456]86) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_athlon_' ;;
-   alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;;
-   sparc*) SUBSTS='s_sparc\(64\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
-   *) SUBSTS=y___ ;;
-diff -ur rpm-4.0.2/macros.in rpm-4.0.2-new/macros.in
---- rpm-4.0.2/macros.in        Thu Jan 24 09:50:29 2002
-+++ rpm-4.0.2-new/macros.in    Thu Jan 24 11:26:29 2002
-@@ -638,7 +638,7 @@
- #   rpm can use regular expressions against target platforms in macro
- #   conditionals. This change will be introduced after rpm-3.0.4).
- #
--%ix86   i386 i486 i586 i686 i786 i886 i986
-+%ix86   i386 i486 i586 i686 i786 i886 i986 athlon
- #------------------------------------------------------------------------
- # Use in %install to generate locale specific file lists. For example,
diff --git a/rpm-cxx.patch b/rpm-cxx.patch
deleted file mode 100644 (file)
index d283c0f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- rpm-4.0.2/macros.in        Thu Jan 24 11:34:24 2002
-+++ rpm-4.0.2/macros.new.in    Thu Jan 24 11:33:49 2002
-@@ -64,6 +64,7 @@
- %__ar                 @AR@
- %__cc                 @CC@
- %__cpp                        @CPP@
-+%__cxx                        @CXX@
- %__ld                 @__LD@
- %__nm                 @__NM@
- %__objcopy            @__OBJCOPY@
---- rpm-4.0.2/configure.in     Thu Jan 24 11:34:24 2002
-+++ rpm-4.0.2/configure.new.in Thu Jan 24 11:33:49 2002
-@@ -27,6 +27,7 @@
- fi
- AC_PROG_CPP
-+AC_PROG_CXX
- AC_PROG_GCC_TRADITIONAL
- AC_PROG_INSTALL
diff --git a/rpm-db3.patch b/rpm-db3.patch
deleted file mode 100644 (file)
index f239ae7..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- rpm-4.0/lib/db3.c.wiget    Fri Aug  4 21:48:35 2000
-+++ rpm-4.0/lib/db3.c  Wed Nov 15 22:28:52 2000
-@@ -9,7 +9,7 @@
- typedef       int int32_t;
- #endif
--#include <db3/db.h>
-+#include <db.h>
- #include <rpmlib.h>
- #include <rpmmacro.h>
---- rpm-4.0/configure.in.wiget Wed Nov 15 22:32:50 2000
-+++ rpm-4.0/configure.in       Wed Nov 15 22:31:57 2000
-@@ -396,7 +396,7 @@
- AC_HEADER_DIRENT
- AC_HEADER_TIME
--AC_CHECK_HEADERS(db_185.h db1/db.h db3/db.h)
-+AC_CHECK_HEADERS(db_185.h db1/db.h db3/db.h db.h)
- AC_CHECK_HEADERS(fcntl.h getopt.h grp.h memory.h netdb.h pwd.h utime.h)
- AC_CHECK_HEADERS(sys/socket.h sys/select.h)
---- rpm-4.0.2/lib/dbconfig.c.wiget     Wed Feb 21 12:05:37 2001
-+++ rpm-4.0.2/lib/dbconfig.c   Wed Feb 21 12:06:42 2001
-@@ -4,7 +4,7 @@
- #include "system.h"
--#include <db3/db.h>
-+#include <db.h>
- #include <rpmlib.h>
- #include <rpmmacro.h>
diff --git a/rpm-exclude.patch b/rpm-exclude.patch
deleted file mode 100644 (file)
index b39d709..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
---- rpm-4.0.2/lib/rpmlib.h~    Sun May 26 07:47:04 2002
-+++ rpm-4.0.2/lib/rpmlib.h     Sun May 26 07:55:51 2002
-@@ -320,6 +320,7 @@
-     RPMFILE_GHOST     = (1 << 6),     /*!< from %%ghost */
-     RPMFILE_LICENSE   = (1 << 7),     /*!< from %%license */
--    RPMFILE_README    = (1 << 8)      /*!< from %%readme */
-+    RPMFILE_README    = (1 << 8),     /*!< from %%readme */
-+    RPMFILE_EXCLUDE   = (1 << 9)      /*!< from %%exclude */
- } rpmfileAttrs;
- #define       RPMFILE_MULTILIB_SHIFT          9
- #define       RPMFILE_MULTILIB(N)             ((N) << RPMFILE_MULTILIB_SHIFT)
---- rpm-4.0.2/build/files.c~   Sun May 26 07:47:04 2002
-+++ rpm-4.0.2/build/files.c    Sun May 26 08:19:18 2002
-@@ -685,6 +685,7 @@
-       { "%dir",       0 },    /* XXX why not RPMFILE_DIR? */
-       { "%doc",       RPMFILE_DOC },
-       { "%ghost",     RPMFILE_GHOST },
-+      { "%exclude",   RPMFILE_EXCLUDE },
-       { "%readme",    RPMFILE_README },
-       { "%license",   RPMFILE_LICENSE },
-       { "%multilib",  0 },
-@@ -986,12 +987,20 @@
-     clp = *cpioList = xmalloc(sizeof(**cpioList) * fl->fileListRecsUsed);
-     for (flp = fl->fileList, count = fl->fileListRecsUsed; count > 0; flp++, count--) {
--      if ((count > 1) && !strcmp(flp->fileURL, flp[1].fileURL)) {
--          rpmError(RPMERR_BADSPEC, _("File listed twice: %s\n"),
--              flp->fileURL);
--          fl->processingFailed = 1;
--      }
-+      if ((count > 1) && !strcmp(flp->fileURL, flp[1].fileURL)) {
-+          if (!((flp->flags | flp[1].flags) & RPMFILE_EXCLUDE)) {
-+              rpmError(RPMERR_BADSPEC, _("File listed twice: %s\n"),
-+                  flp->fileURL);
-+              fl->processingFailed = 1;
-+          } else {
-+              flp->flags |= RPMFILE_EXCLUDE;
-+              flp[1].flags |= RPMFILE_EXCLUDE;
-+          }
-+      }
-+      /* Skip files that were marked with %exclude. */
-+      if (flp->flags & RPMFILE_EXCLUDE) continue;
-+      
-       if (flp->flags & RPMFILE_MULTILIB_MASK)
-           multiLibMask |=
-               (1 << ((flp->flags & RPMFILE_MULTILIB_MASK))
diff --git a/rpm-hardlink-fixes.patch b/rpm-hardlink-fixes.patch
deleted file mode 100644 (file)
index 3c5433e..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -Nur rpm-4.0.2.orig/build/files.c rpm-4.0.2/build/files.c
---- rpm-4.0.2.orig/build/files.c       Fri Jan 19 02:47:25 2001
-+++ rpm-4.0.2/build/files.c    Tue Dec 25 21:17:42 2001
-@@ -911,6 +911,37 @@
-       ilp = fl->fileList + i;
-       ilp->flags &= ~RPMFILE_SPECFILE;
-     }
-+
-+    /* try to fix lang marks for lang-marked dirs that contain lang-marked
-+     * hardlinks */
-+    for (i = 0; i < fl->fileListRecsUsed; i++) {
-+      char *te;
-+
-+      ilp = fl->fileList + i;
-+      if(!S_ISDIR(ilp->fl_mode) || !ilp->langs[0])
-+          continue;
-+      te = nlangs;
-+      *te = '\0';
-+      for (j = i + 1; j < fl->fileListRecsUsed; j++) {
-+          jlp = fl->fileList + j;
-+          if (!S_ISREG(jlp->fl_mode) || jlp->fl_nlink <= 1)
-+              continue;
-+          if (strncmp(jlp->fileURL, ilp->fileURL, strlen(ilp->fileURL)))
-+              continue;
-+          if (!strcmp(ilp->langs, jlp->langs))
-+              continue;
-+          if (te == nlangs)
-+              te = stpcpy(te, ilp->langs);
-+          *te++ = '|';
-+          te = stpcpy(te, jlp->langs);
-+      }
-+
-+      if (te == nlangs)
-+          continue;
-+
-+      free((void *)ilp->langs);
-+      ilp->langs = xstrdup(nlangs);
-+    }
- }
- /**
-diff -Nur rpm-4.0.2.orig/lib/cpio.c rpm-4.0.2/lib/cpio.c
---- rpm-4.0.2.orig/lib/cpio.c  Wed Jan  3 20:29:11 2001
-+++ rpm-4.0.2/lib/cpio.c       Tue Dec 25 20:52:41 2001
-@@ -670,7 +670,7 @@
- static int createLinks(struct hardLink * li, /*@out@*/ const char ** failedFile)
-       /*@modifies fileSystem, *failedFile, li->files, li->linksLeft @*/
- {
--    int i;
-+    int i,rc;
-     struct stat sb;
-     for (i = 0; i < li->nlink; i++) {
-@@ -685,6 +685,13 @@
-           }
-       }
-+      rc = checkDirectory(li->files[i]);
-+      if (rc) {
-+          if (failedFile)
-+              *failedFile = xstrdup(li->files[i]);
-+          return rc;
-+      }
-+
-       if (link(li->files[li->createdPath], li->files[i])) {
-           if (failedFile)
-               *failedFile = xstrdup(li->files[i]);
diff --git a/rpm-macros.patch b/rpm-macros.patch
deleted file mode 100644 (file)
index be59aa5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- rpm-4.0.2/macros.in.wiget  Mon Dec 11 19:40:56 2000
-+++ rpm-4.0.2/macros.in        Fri Aug 10 12:20:45 2001
-@@ -476,17 +476,14 @@
- #     Macro(s) similar to the tokens used by configure.
- #
- %_build                       %{_host}
--%_build_alias         %{_host_alias}
- %_build_cpu           %{_host_cpu}
- %_build_vendor                %{_host_vendor}
- %_build_os            %{_host_os}
- %_host                        @host@
--%_host_alias          @host_alias@
- %_host_cpu            @host_cpu@
- %_host_vendor         @host_vendor@
- %_host_os             @host_os@
- %_target              %{_host}
--%_target_alias                %{_host_alias}
- %_target_cpu          %{_host_cpu}
- %_target_vendor               %{_host_vendor}
- %_target_os           %{_host_os}
diff --git a/rpm-noperldir.patch b/rpm-noperldir.patch
deleted file mode 100644 (file)
index 8e48751..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-4.0.2/configure.in.wiget       Tue Jun 26 18:56:34 2001
-+++ rpm-4.0.2/configure.in     Tue Jun 26 18:56:48 2001
-@@ -1094,7 +1094,7 @@
-       misc/Makefile po/Makefile.in intl/Makefile
-       doc/Makefile doc/manual/Makefile
-       doc/ja/Makefile doc/pl/Makefile doc/ru/Makefile doc/sk/Makefile
--      python/Makefile perl/Makefile perl/Makefile.PL],
-+      python/Makefile],
-       [echo timestamp > popt/stamp-h.in
-       echo timestamp > stamp-h.in])
- dnl   touch Makefile.in
diff --git a/rpm-perlprov.patch b/rpm-perlprov.patch
deleted file mode 100644 (file)
index 63cd4ec..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -Naur rpm-4.0.2/scripts/perl.prov rpm-4.0.2-p/scripts/perl.prov
---- rpm-4.0.2/scripts/perl.prov        Fri Jun 22 16:03:59 2001
-+++ rpm-4.0.2-p/scripts/perl.prov      Fri Jun 22 16:03:46 2001
-@@ -99,11 +99,11 @@
-     # properly belongs in the over/back section) but people do not
-     # read the perldoc.
--    if ( (m/^=(head1|head2|pod|item)/) .. (m/^=(cut)/) ) {
-+    if ( (m/^=(head1|head2|pod|item)/) .. (m/^=(cut)/ || eof) ) {
-       next;
-     }
-     
--    if ( (m/^=(over)/) .. (m/^=(back)/) ) {
-+    if ( (m/^=(over)/) .. (m/^=(back)/ || eof) ) {
-       next;
-     }
-     
diff --git a/rpm-popt-cvs20010530.patch b/rpm-popt-cvs20010530.patch
deleted file mode 100644 (file)
index f90d0df..0000000
+++ /dev/null
@@ -1,2105 +0,0 @@
---- rpm-4.0.2/popt/Makefile.am.wiget   Tue Apr 25 22:14:21 2000
-+++ rpm-4.0.2/popt/Makefile.am Wed May 30 14:12:30 2001
-@@ -34,6 +34,10 @@
- man_MANS = popt.3
-+.PHONY:       sources
-+sources:
-+      @echo $(libpopt_la_SOURCES:%=popt/%)
-+
- .PHONY: lclint
- lclint:
-       lclint ${DEFS} ${INCLUDES} ${libpopt_la_SOURCES}
---- rpm-4.0.2/popt/findme.c.wiget      Tue Dec 19 23:25:15 2000
-+++ rpm-4.0.2/popt/findme.c    Wed May 30 14:12:30 2001
-@@ -15,14 +15,16 @@
-     char * start, * chptr;
-     char * buf;
-+    if (argv0 == NULL) return NULL;   /* XXX can't happen */
-     /* If there is a / in the argv[0], it has to be an absolute path */
-     if (strchr(argv0, '/'))
-       return xstrdup(argv0);
--    if (!path) return NULL;
-+    if (path == NULL) return NULL;
-     start = pathbuf = alloca(strlen(path) + 1);
-     buf = malloc(strlen(path) + strlen(argv0) + sizeof("/"));
-+    if (buf == NULL) return NULL;     /* XXX can't happen */
-     strcpy(pathbuf, path);
-     chptr = NULL;
---- rpm-4.0.2/popt/findme.h.wiget      Tue Jan  2 18:25:32 2001
-+++ rpm-4.0.2/popt/findme.h    Wed May 30 14:12:30 2001
-@@ -14,6 +14,6 @@
-  * @param argv0               name of executable
-  * @return            (malloc'd) absolute path to executable (or NULL)
-  */
--/*@null@*/ const char * findProgramPath(const char * argv0);
-+/*@null@*/ const char * findProgramPath(/*@null@*/ const char * argv0);
- #endif
---- rpm-4.0.2/popt/missing.wiget       Thu Oct  8 16:23:56 1998
-+++ rpm-4.0.2/popt/missing     Wed May 30 14:12:30 2001
-@@ -1,7 +1,7 @@
- #! /bin/sh
- # Common stub for a few missing GNU programs while installing.
--# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
--# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
-+# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
-+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
-@@ -23,6 +23,19 @@
-   exit 1
- fi
-+run=:
-+
-+case "$1" in
-+--run)
-+  # Try to run requested program, and just exit if it succeeds.
-+  run=
-+  shift
-+  "$@" && exit 0
-+  ;;
-+esac
-+
-+# If it does not exist, or fails to run (possibly an outdated version),
-+# try to emulate it.
- case "$1" in
-   -h|--h|--he|--hel|--help)
-@@ -35,6 +48,7 @@
- Options:
-   -h, --help      display this help and exit
-   -v, --version   output version information and exit
-+  --run           try to run the given command, and emulate it if it fails
- Supported PROGRAM values:
-   aclocal      touch file \`aclocal.m4'
-@@ -43,13 +57,15 @@
-   automake     touch all \`Makefile.in' files
-   bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-   flex         create \`lex.yy.c', if possible, from existing .c
-+  help2man     touch the output file
-   lex          create \`lex.yy.c', if possible, from existing .c
-   makeinfo     touch the output file
-+  tar          try tar, gnutar, gtar, then tar without non-portable flags
-   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
-     ;;
-   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
--    echo "missing - GNU libit 0.0"
-+    echo "missing 0.3 - GNU automake"
-     ;;
-   -*)
-@@ -82,15 +98,17 @@
-          you modified \`acconfig.h' or \`configure.in'.  You might want
-          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-          from any GNU archive site."
--    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
--    if test -z "$files"; then
--      files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
--      test -z "$files" || files="$files.in"
--    else
--      files=`echo "$files" | sed -e 's/:/ /g'`
--    fi
--    test -z "$files" && files="config.h.in"
--    touch $files
-+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
-+    test -z "$files" && files="config.h"
-+    touch_files=
-+    for f in $files; do
-+      case "$f" in
-+      *:*) touch_files="$touch_files "`echo "$f" |
-+                                     sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-+      *) touch_files="$touch_files $f.in";;
-+      esac
-+    done
-+    touch $touch_files
-     ;;
-   automake)
-@@ -99,9 +117,9 @@
-          you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
-          You might want to install the \`Automake' and \`Perl' packages.
-          Grab them from any GNU archive site."
--    find . -type f -name Makefile.am -print \
--      | sed 's/^\(.*\).am$/touch \1.in/' \
--      | sh
-+    find . -type f -name Makefile.am -print |
-+         sed 's/\.am$/.in/' |
-+         while read f; do touch "$f"; done
-     ;;
-   bison|yacc)
-@@ -157,6 +175,26 @@
-     fi
-     ;;
-+  help2man)
-+    echo 1>&2 "\
-+WARNING: \`$1' is missing on your system.  You should only need it if
-+       you modified a dependency of a manual page.  You may need the
-+       \`Help2man' package in order for those modifications to take
-+       effect.  You can get \`Help2man' from any GNU archive site."
-+
-+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-+    if test -z "$file"; then
-+      file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-+    fi
-+    if [ -f "$file" ]; then
-+      touch $file
-+    else
-+      test -z "$file" || exec >$file
-+      echo ".ab help2man is required to generate this page"
-+      exit 1
-+    fi
-+    ;;
-+
-   makeinfo)
-     echo 1>&2 "\
- WARNING: \`$1' is missing on your system.  You should only need it if
-@@ -171,6 +209,45 @@
-       file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
-     fi
-     touch $file
-+    ;;
-+
-+  tar)
-+    shift
-+    if test -n "$run"; then
-+      echo 1>&2 "ERROR: \`tar' requires --run"
-+      exit 1
-+    fi
-+
-+    # We have already tried tar in the generic part.
-+    # Look for gnutar/gtar before invocation to avoid ugly error
-+    # messages.
-+    if (gnutar --version > /dev/null 2>&1); then
-+       gnutar ${1+"$@"} && exit 0
-+    fi
-+    if (gtar --version > /dev/null 2>&1); then
-+       gtar ${1+"$@"} && exit 0
-+    fi
-+    firstarg="$1"
-+    if shift; then
-+      case "$firstarg" in
-+      *o*)
-+          firstarg=`echo "$firstarg" | sed s/o//`
-+          tar "$firstarg" ${1+"$@"} && exit 0
-+          ;;
-+      esac
-+      case "$firstarg" in
-+      *h*)
-+          firstarg=`echo "$firstarg" | sed s/h//`
-+          tar "$firstarg" ${1+"$@"} && exit 0
-+          ;;
-+      esac
-+    fi
-+
-+    echo 1>&2 "\
-+WARNING: I can't seem to be able to run \`tar' with the given arguments.
-+         You may want to install GNU tar or Free paxutils, or check the
-+         command line arguments."
-+    exit 1
-     ;;
-   *)
---- rpm-4.0.2/popt/popt.3.wiget        Wed Feb  7 18:56:53 2001
-+++ rpm-4.0.2/popt/popt.3      Wed May 30 14:12:34 2001
-@@ -757,4 +757,4 @@
- .sp
- .BR popt.ps " is a Postscript version of the above cited book "
- chapter. It can be found in the source archive for popt available at: 
--ftp://ftp.redhat.com/pub/redhat/code/popt
-+ftp://ftp.rpm.org/pub/rpm.
---- rpm-4.0.2/popt/popt.c.wiget        Tue Jan 16 13:53:13 2001
-+++ rpm-4.0.2/popt/popt.c      Wed May 30 14:12:34 2001
-@@ -30,21 +30,41 @@
- }
- #endif
--void poptSetExecPath(poptContext con, const char * path, int allowAbsolute) {
--    if (con->execPath) free((void *)con->execPath);
-+#ifdef MYDEBUG
-+/*@unused@*/ static void prtcon(const char *msg, poptContext con)
-+{
-+    if (msg) fprintf(stderr, "%s", msg);
-+    fprintf(stderr, "\tcon %p os %p nextCharArg \"%s\" nextArg \"%s\" argv[%d] \"%s\"\n",
-+      con, con->os,
-+      (con->os->nextCharArg ? con->os->nextCharArg : ""),
-+      (con->os->nextArg ? con->os->nextArg : ""),
-+      con->os->next,
-+      (con->os->argv && con->os->argv[con->os->next]
-+              ? con->os->argv[con->os->next] : ""));
-+}
-+#endif
-+
-+void poptSetExecPath(poptContext con, const char * path, int allowAbsolute)
-+{
-+    con->execPath = _free(con->execPath);
-     con->execPath = xstrdup(path);
-     con->execAbsolute = allowAbsolute;
- }
- static void invokeCallbacksPRE(poptContext con, const struct poptOption * opt)
-+      /*@modifies internalState@*/
- {
-+    if (opt != NULL)
-     for (; opt->longName || opt->shortName || opt->arg; opt++) {
-+      if (opt->arg == NULL) continue;         /* XXX program error. */
-       if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
-           /* Recurse on included sub-tables. */
-           invokeCallbacksPRE(con, opt->arg);
-       } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK &&
-                  (opt->argInfo & POPT_CBFLAG_PRE))
--      {   poptCallbackType cb = (poptCallbackType)opt->arg;
-+      {   /*@-castfcnptr@*/
-+          poptCallbackType cb = (poptCallbackType)opt->arg;
-+          /*@=castfcnptr@*/
-           /* Perform callback. */
-           cb(con, POPT_CALLBACK_REASON_PRE, NULL, NULL, opt->descrip);
-       }
-@@ -52,14 +72,19 @@
- }
- static void invokeCallbacksPOST(poptContext con, const struct poptOption * opt)
-+      /*@modifies internalState@*/
- {
-+    if (opt != NULL)
-     for (; opt->longName || opt->shortName || opt->arg; opt++) {
-+      if (opt->arg == NULL) continue;         /* XXX program error. */
-       if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
-           /* Recurse on included sub-tables. */
-           invokeCallbacksPOST(con, opt->arg);
-       } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK &&
-                  (opt->argInfo & POPT_CBFLAG_POST))
--      {   poptCallbackType cb = (poptCallbackType)opt->arg;
-+      {   /*@-castfcnptr@*/
-+          poptCallbackType cb = (poptCallbackType)opt->arg;
-+          /*@=castfcnptr@*/
-           /* Perform callback. */
-           cb(con, POPT_CALLBACK_REASON_POST, NULL, NULL, opt->descrip);
-       }
-@@ -69,14 +94,17 @@
- static void invokeCallbacksOPTION(poptContext con,
-                                 const struct poptOption * opt,
-                                 const struct poptOption * myOpt,
--                                const void * myData, int shorty)
-+                                /*@null@*/ const void * myData, int shorty)
-+      /*@modifies internalState@*/
- {
-     const struct poptOption * cbopt = NULL;
-+    if (opt != NULL)
-     for (; opt->longName || opt->shortName || opt->arg; opt++) {
-       if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
-           /* Recurse on included sub-tables. */
--          invokeCallbacksOPTION(con, opt->arg, myOpt, myData, shorty);
-+          if (opt->arg != NULL)       /* XXX program error */
-+              invokeCallbacksOPTION(con, opt->arg, myOpt, myData, shorty);
-       } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK &&
-                 !(opt->argInfo & POPT_CBFLAG_SKIPOPTION)) {
-           /* Save callback info. */
-@@ -85,13 +113,19 @@
-                  ((myOpt->shortName && opt->shortName && shorty &&
-                       myOpt->shortName == opt->shortName) ||
-                   (myOpt->longName && opt->longName &&
-+              /*@-nullpass@*/         /* LCL: opt->longName != NULL */
-                       !strcmp(myOpt->longName, opt->longName)))
-+              /*@=nullpass@*/
-                  )
--      {   poptCallbackType cb = (poptCallbackType)cbopt->arg;
-+      {   /*@-castfcnptr@*/
-+          poptCallbackType cb = (poptCallbackType)cbopt->arg;
-+          /*@=castfcnptr@*/
-           const void * cbData = (cbopt->descrip ? cbopt->descrip : myData);
-           /* Perform callback. */
--          cb(con, POPT_CALLBACK_REASON_OPTION, myOpt,
-+          if (cb != NULL) {   /* XXX program error */
-+              cb(con, POPT_CALLBACK_REASON_OPTION, myOpt,
-                       con->os->nextArg, cbData);
-+          }
-           /* Terminate (unless explcitly continuing). */
-           if (!(cbopt->argInfo & POPT_CBFLAG_CONTINUE))
-               return;
-@@ -104,18 +138,23 @@
- {
-     poptContext con = malloc(sizeof(*con));
-+    if (con == NULL) return NULL;     /* XXX can't happen */
-     memset(con, 0, sizeof(*con));
-     con->os = con->optionStack;
-     con->os->argc = argc;
-+    /*@-dependenttrans@*/     /* FIX: W2DO? */
-     con->os->argv = argv;
-+    /*@=dependenttrans@*/
-     con->os->argb = NULL;
-     if (!(flags & POPT_CONTEXT_KEEP_FIRST))
-       con->os->next = 1;                      /* skip argv[0] */
-     con->leftovers = calloc( (argc + 1), sizeof(char *) );
-+    /*@-dependenttrans@*/     /* FIX: W2DO? */
-     con->options = options;
-+    /*@=dependenttrans@*/
-     con->aliases = NULL;
-     con->numAliases = 0;
-     con->flags = flags;
-@@ -129,40 +168,34 @@
-     if (getenv("POSIXLY_CORRECT") || getenv("POSIX_ME_HARDER"))
-       con->flags |= POPT_CONTEXT_POSIXMEHARDER;
--    if (name)
--      con->appName = strcpy(malloc(strlen(name) + 1), name);
-+    if (name) {
-+      char * t = malloc(strlen(name) + 1);
-+      if (t) con->appName = strcpy(t, name);
-+    }
-     invokeCallbacksPRE(con, con->options);
-     return con;
- }
--static void cleanOSE(struct optionStackEntry *os)
-+static void cleanOSE(/*@special@*/ struct optionStackEntry *os)
-+      /*@uses os @*/
-+      /*@releases os->nextArg, os->argv, os->argb @*/
- {
--    if (os->nextArg) {
--      free((void *)os->nextArg);
--      os->nextArg = NULL;
--    }
--    if (os->argv) {
--      free((void *)os->argv);
--      os->argv = NULL;
--    }
--    if (os->argb) {
--      PBM_FREE(os->argb);
--      os->argb = NULL;
--    }
-+    os->nextArg = _free(os->nextArg);
-+    os->argv = _free(os->argv);
-+    os->argb = PBM_FREE(os->argb);
- }
--void poptResetContext(poptContext con) {
-+void poptResetContext(poptContext con)
-+{
-     int i;
-+    if (con == NULL) return;
-     while (con->os > con->optionStack) {
-       cleanOSE(con->os--);
-     }
--    if (con->os->argb) {
--      PBM_FREE(con->os->argb);
--      con->os->argb = NULL;
--    }
-+    con->os->argb = PBM_FREE(con->os->argb);
-     con->os->currAlias = NULL;
-     con->os->nextCharArg = NULL;
-     con->os->nextArg = NULL;
-@@ -173,25 +206,29 @@
-     con->restLeftover = 0;
-     con->doExec = NULL;
--    for (i = 0; i < con->finalArgvCount; i++) {
--      if (con->finalArgv[i]) {
--          free((void *)con->finalArgv[i]);
--          con->finalArgv[i] = NULL;
--      }
--    }
-+    if (con->finalArgv != NULL)
-+    for (i = 0; i < con->finalArgvCount; i++)
-+      /*@-unqualifiedtrans@*/         /* FIX: typedef double indirection. */
-+      con->finalArgv[i] = _free(con->finalArgv[i]);
-+      /*@=unqualifiedtrans@*/
-     con->finalArgvCount = 0;
--
--    if (con->arg_strip) {
--      PBM_FREE(con->arg_strip);
--      con->arg_strip = NULL;
--    }
-+    con->arg_strip = PBM_FREE(con->arg_strip);
-+    /*@-nullstate@*/  /* FIX: con->finalArgv != NULL */
-+    return;
-+    /*@=nullstate@*/
- }
--/* Only one of longName, shortName may be set at a time */
--static int handleExec(poptContext con, char * longName, char shortName) {
-+/* Only one of longName, shortName should be set, not both. */
-+static int handleExec(/*@special@*/ poptContext con,
-+              /*@null@*/ const char * longName, char shortName)
-+      /*@uses con->execs, con->numExecs, con->flags, con->doExec,
-+              con->finalArgv, con->finalArgvAlloced, con->finalArgvCount @*/
-+{
-     int i;
-+    if (con->execs == NULL || con->numExecs <= 0) /* XXX can't happen */
-+      return 0;
-     i = con->numExecs - 1;
-     if (longName) {
-       while (i >= 0 && (!con->execs[i].longName ||
-@@ -220,29 +257,44 @@
-     }
-     i = con->finalArgvCount++;
-+    if (con->finalArgv != NULL)       /* XXX can't happen */
-     { char *s  = malloc((longName ? strlen(longName) : 0) + 3);
--      if (longName)
--          sprintf(s, "--%s", longName);
--      else
--          sprintf(s, "-%c", shortName);
--      con->finalArgv[i] = s;
-+      if (s != NULL) {        /* XXX can't happen */
-+          if (longName)
-+              sprintf(s, "--%s", longName);
-+          else
-+              sprintf(s, "-%c", shortName);
-+          con->finalArgv[i] = s;
-+      } else
-+          con->finalArgv[i] = NULL;
-     }
-+    /*@-nullstate@*/  /* FIX: con->finalArgv[] == NULL */
-     return 1;
-+    /*@=nullstate@*/
- }
- /* Only one of longName, shortName may be set at a time */
--static int handleAlias(poptContext con, const char * longName, char shortName,
--                     /*@keep@*/ const char * nextCharArg) {
-+static int handleAlias(/*@special@*/ poptContext con,
-+              /*@null@*/ const char * longName, char shortName,
-+              /*@keep@*/ /*@null@*/ const char * nextCharArg)
-+      /*@uses con->aliases, con->numAliases, con->optionStack,
-+              con->os, con->os->currAlias, con->os->currAlias->longName @*/
-+{
-+    int rc;
-     int i;
-     if (con->os->currAlias && con->os->currAlias->longName && longName &&
-+      /*@-nullpass@*/ /* LCL: con->os->currAlias->longName != NULL */
-       !strcmp(con->os->currAlias->longName, longName))
-+      /*@=nullpass@*/
-       return 0;
-     if (con->os->currAlias && shortName &&
-           shortName == con->os->currAlias->shortName)
-       return 0;
-+    if (con->aliases == NULL || con->numAliases <= 0) /* XXX can't happen */
-+      return 0;
-     i = con->numAliases - 1;
-     if (longName) {
-       while (i >= 0 && (!con->aliases[i].longName ||
-@@ -266,27 +318,34 @@
-     con->os->nextArg = NULL;
-     con->os->nextCharArg = NULL;
-     con->os->currAlias = con->aliases + i;
--    poptDupArgv(con->os->currAlias->argc, con->os->currAlias->argv,
-+    rc = poptDupArgv(con->os->currAlias->argc, con->os->currAlias->argv,
-               &con->os->argc, &con->os->argv);
-     con->os->argb = NULL;
--    return 1;
-+    return (rc ? rc : 1);
- }
--static void execCommand(poptContext con) {
-+static int execCommand(poptContext con)
-+    /*@modifies fileSystem @*/
-+{
-     const char ** argv;
-     int argc = 0;
-     const char ** sargv;
-     int sargc = 0;
-+    int rc;
--    poptParseArgvString(con->doExec->script, &sargc, &sargv);
-+    if (con->doExec == NULL || con->doExec->script == NULL) /*XXX can't happen*/
-+      return POPT_ERROR_NOARG;
-+    rc = poptParseArgvString(con->doExec->script, &sargc, &sargv);
-+    if (rc) return rc;
-     if (sargv == NULL || sargc < 1 ||
-       (!con->execAbsolute && strchr(sargv[0], '/')))
--          return;
-+          return POPT_ERROR_NOARG;
-     argv = malloc(sizeof(*argv) *
-                       (6 + sargc + con->numLeftovers + con->finalArgvCount));
-+    if (argv == NULL) return POPT_ERROR_MALLOC;       /* XXX can't happen */
-     if (!strchr(sargv[0], '/') && con->execPath) {
-       char *s = alloca(strlen(con->execPath) + strlen(sargv[0]) + sizeof("/"));
-@@ -295,26 +354,31 @@
-     } else {
-       argv[argc] = findProgramPath(sargv[0]);
-     }
--    if (argv[argc++] == NULL) return;
-+    if (argv[argc++] == NULL) return POPT_ERROR_NOARG;
-     if (sargc > 1) {
-       memcpy(argv + argc, sargv + 1, sizeof(*argv) * (sargc - 1));
-       argc += (sargc - 1);
-     }
--    memcpy(argv + argc, con->finalArgv, sizeof(*argv) * con->finalArgvCount);
--    argc += con->finalArgvCount;
-+    if (con->finalArgv != NULL && con->finalArgvCount > 0) {
-+      memcpy(argv + argc, con->finalArgv,
-+              sizeof(*argv) * con->finalArgvCount);
-+      argc += con->finalArgvCount;
-+    }
--    if (con->numLeftovers) {
-+    if (con->leftovers != NULL && con->numLeftovers > 0) {
-+#if 0
-       argv[argc++] = "--";
-+#endif
-       memcpy(argv + argc, con->leftovers, sizeof(*argv) * con->numLeftovers);
-       argc += con->numLeftovers;
-     }
--    argv[argc++] = NULL;
-+    argv[argc] = NULL;
- #ifdef __hpux
--    setresuid(getuid(), getuid(),-1);
-+    (void) setresuid(getuid(), getuid(),-1);
- #else
- /*
-  * XXX " ... on BSD systems setuid() should be preferred over setreuid()"
-@@ -322,58 +386,68 @@
-  * XXX        from Norbert Warmuth <nwarmuth@privat.circular.de>
-  */
- #if defined(HAVE_SETUID)
--    setuid(getuid());
-+    (void) setuid(getuid());
- #elif defined (HAVE_SETREUID)
--    setreuid(getuid(), getuid()); /*hlauer: not portable to hpux9.01 */
-+    (void) setreuid(getuid(), getuid()); /*hlauer: not portable to hpux9.01 */
- #else
-     ; /* Can't drop privileges */
- #endif
- #endif
-     if (argv[0] == NULL)
--      return;
-+      return POPT_ERROR_NOARG;
- #ifdef MYDEBUG
--    { const char ** arg;
--      fprintf(stderr, "==> execvp(%s):", argv[0]);
--      for (arg = argv; *arg; arg++)
--          fprintf(stderr, " %s", *arg);
-+    { const char ** avp;
-+      fprintf(stderr, "==> execvp(%s) argv[%d]:", argv[0], argc);
-+      for (avp = argv; *avp; avp++)
-+          fprintf(stderr, " '%s'", *avp);
-       fprintf(stderr, "\n");
-     }
- #endif
--    execvp(argv[0], (char *const *)argv);
-+    (void) execvp(argv[0], (char *const *)argv);
-+    return POPT_ERROR_ERRNO;
- }
--/*@observer@*/ static const struct poptOption *
--findOption(const struct poptOption * opt, const char * longName,
--    char shortName,
--    /*@out@*/ poptCallbackType * callback, /*@out@*/ const void ** callbackData,
--    int singleDash)
-+/*@observer@*/ /*@null@*/ static const struct poptOption *
-+findOption(const struct poptOption * opt, /*@null@*/ const char * longName,
-+              char shortName,
-+              /*@null@*/ /*@out@*/ poptCallbackType * callback,
-+              /*@null@*/ /*@out@*/ const void ** callbackData,
-+              int singleDash)
-+      /*@modifies *callback, *callbackData */
- {
-     const struct poptOption * cb = NULL;
-     /* This happens when a single - is given */
--    if (singleDash && !shortName && !*longName)
-+    if (singleDash && !shortName && (longName && *longName == '\0'))
-       shortName = '-';
-     for (; opt->longName || opt->shortName || opt->arg; opt++) {
-       if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
-           const struct poptOption * opt2;
-+
-           /* Recurse on included sub-tables. */
-+          if (opt->arg == NULL) continue;     /* XXX program error */
-           opt2 = findOption(opt->arg, longName, shortName, callback,
-                             callbackData, singleDash);
--          if (opt2) {
--              /* Sub-table data will be inheirited if no data yet. */
--              if (*callback && *callbackData == NULL)
--                  *callbackData = opt->descrip;
--              return opt2;
--          }
-+          if (opt2 == NULL) continue;
-+          /* Sub-table data will be inheirited if no data yet. */
-+          if (!(callback && *callback)) return opt2;
-+          if (!(callbackData && *callbackData == NULL)) return opt2;
-+          /*@-observertrans -dependenttrans @*/
-+          *callbackData = opt->descrip;
-+          /*@=observertrans =dependenttrans @*/
-+          return opt2;
-       } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK) {
-           cb = opt;
-       } else if (longName && opt->longName &&
-                  (!singleDash || (opt->argInfo & POPT_ARGFLAG_ONEDASH)) &&
--                 !strcmp(longName, opt->longName)) {
-+              /*@-nullpass@*/         /* LCL: opt->longName != NULL */
-+                 !strcmp(longName, opt->longName))
-+              /*@=nullpass@*/
-+      {
-           break;
-       } else if (shortName && shortName == opt->shortName) {
-           break;
-@@ -382,18 +456,30 @@
-     if (!opt->longName && !opt->shortName)
-       return NULL;
--    *callbackData = NULL;
--    *callback = NULL;
-+    /*@-modobserver -mods @*/
-+    if (callback) *callback = NULL;
-+    if (callbackData) *callbackData = NULL;
-     if (cb) {
--      *callback = (poptCallbackType)cb->arg;
--      if (!(cb->argInfo & POPT_CBFLAG_INC_DATA))
--          *callbackData = cb->descrip;
-+      if (callback)
-+      /*@-castfcnptr@*/
-+          *callback = (poptCallbackType)cb->arg;
-+      /*@=castfcnptr@*/
-+      if (!(cb->argInfo & POPT_CBFLAG_INC_DATA)) {
-+          if (callbackData)
-+              /*@-observertrans@*/    /* FIX: typedef double indirection. */
-+              *callbackData = cb->descrip;
-+              /*@=observertrans@*/
-+      }
-     }
-+    /*@=modobserver =mods @*/
-     return opt;
- }
--static const char *findNextArg(poptContext con, unsigned argx, int delete)
-+static const char * findNextArg(/*@special@*/ poptContext con,
-+              unsigned argx, int delete)
-+      /*@uses con->optionStack, con->os,
-+              con->os->next, con->os->argb, con->os->argc, con->os->argv @*/
- {
-     struct optionStackEntry * os = con->os;
-     const char * arg;
-@@ -403,6 +489,7 @@
-       arg = NULL;
-       while (os->next == os->argc && os > con->optionStack) os--;
-       if (os->next == os->argc && os == con->optionStack) break;
-+      if (os->argv != NULL)
-       for (i = os->next; i < os->argc; i++) {
-           if (os->argb && PBM_ISSET(i, os->argb)) continue;
-           if (*os->argv[i] == '-') continue;
-@@ -410,6 +497,7 @@
-           arg = os->argv[i];
-           if (delete) {
-               if (os->argb == NULL) os->argb = PBM_ALLOC(os->argc);
-+              if (os->argb != NULL)   /* XXX can't happen */
-               PBM_SET(i, os->argb);
-           }
-           break;
-@@ -419,15 +507,20 @@
-     return arg;
- }
--static /*@only@*/ const char * expandNextArg(poptContext con, const char * s)
-+static /*@only@*/ /*@null@*/ const char *
-+expandNextArg(/*@special@*/ poptContext con, const char * s)
-+      /*@uses con->optionStack, con->os,
-+              con->os->next, con->os->argb, con->os->argc, con->os->argv @*/
-+      /*@modifies con @*/
- {
--    const char *a;
-+    const char * a = NULL;
-     size_t alen;
-     char *t, *te;
-     size_t tn = strlen(s) + 1;
-     char c;
-     te = t = malloc(tn);;
-+    if (t == NULL) return NULL;               /* XXX can't happen */
-     while ((c = *s++) != '\0') {
-       switch (c) {
- #if 0 /* XXX can't do this */
-@@ -438,8 +531,10 @@
-       case '!':
-           if (!(s[0] == '#' && s[1] == ':' && s[2] == '+'))
-               break;
--          if ((a = findNextArg(con, 1, 1)) == NULL)
--              break;
-+          /* XXX Make sure that findNextArg deletes only next arg. */
-+          if (a == NULL) {
-+              if ((a = findNextArg(con, 1, 1)) == NULL) break;
-+          }
-           s += 3;
-           alen = strlen(a);
-@@ -456,18 +551,25 @@
-       *te++ = c;
-     }
-     *te = '\0';
--    t = realloc(t, strlen(t)+1);      /* XXX memory leak, hard to plug */
-+    t = realloc(t, strlen(t) + 1);    /* XXX memory leak, hard to plug */
-     return t;
- }
- static void poptStripArg(poptContext con, int which)
-+      /*@modifies con @*/
- {
-     if (con->arg_strip == NULL)
-       con->arg_strip = PBM_ALLOC(con->optionStack[0].argc);
-+    if (con->arg_strip != NULL)               /* XXX can't happen */
-     PBM_SET(which, con->arg_strip);
- }
--static int poptSaveLong(const struct poptOption * opt, long aLong) {
-+static int poptSaveLong(const struct poptOption * opt, long aLong)
-+      /*@modifies opt->arg @*/
-+{
-+    if (opt->arg == NULL)
-+      return POPT_ERROR_NULLARG;
-+
-     if (opt->argInfo & POPT_ARGFLAG_NOT)
-       aLong = ~aLong;
-     switch (opt->argInfo & POPT_ARGFLAG_LOGICALOPS) {
-@@ -485,12 +587,17 @@
-       break;
-     default:
-       return POPT_ERROR_BADOPERATION;
--      break;
-+      /*@notreached@*/ break;
-     }
-     return 0;
- }
--static int poptSaveInt(const struct poptOption * opt, long aLong) {
-+static int poptSaveInt(const struct poptOption * opt, long aLong)
-+      /*@modifies opt->arg @*/
-+{
-+    if (opt->arg == NULL)
-+      return POPT_ERROR_NULLARG;
-+
-     if (opt->argInfo & POPT_ARGFLAG_NOT)
-       aLong = ~aLong;
-     switch (opt->argInfo & POPT_ARGFLAG_LOGICALOPS) {
-@@ -508,31 +615,19 @@
-       break;
-     default:
-       return POPT_ERROR_BADOPERATION;
--      break;
-+      /*@notreached@*/ break;
-     }
-     return 0;
- }
--#ifdef MYDEBUG
--static void prtcon(const char *msg, poptContext con)
--{
--    if (msg) fprintf(stderr, "%s", msg);
--    fprintf(stderr, "\tcon %p os %p nextCharArg \"%s\" nextArg \"%s\" argv[%d] \"%s\"\n",
--      con, con->os,
--      (con->os->nextCharArg ? con->os->nextCharArg : ""),
--      (con->os->nextArg ? con->os->nextArg : ""),
--      con->os->next,
--      (con->os->argv && con->os->argv[con->os->next]
--              ? con->os->argv[con->os->next] : ""));
--}
--#endif
--
- /* returns 'val' element, -1 on last item, POPT_ERROR_* on error */
- int poptGetNextOpt(poptContext con)
- {
-     const struct poptOption * opt = NULL;
-     int done = 0;
-+    if (con == NULL)
-+      return -1;
-     while (!done) {
-       const char * origOptString = NULL;
-       poptCallbackType cb = NULL;
-@@ -547,7 +642,7 @@
-       }
-       if (!con->os->nextCharArg && con->os->next == con->os->argc) {
-           invokeCallbacksPOST(con, con->options);
--          if (con->doExec) execCommand(con);
-+          if (con->doExec) return execCommand(con);
-           return -1;
-       }
-@@ -561,9 +656,14 @@
-               continue;
-           }
-           thisopt = con->os->next;
-+          if (con->os->argv != NULL)  /* XXX can't happen */
-           origOptString = con->os->argv[con->os->next++];
-+          if (origOptString == NULL)  /* XXX can't happen */
-+              return POPT_ERROR_BADOPT;
-+
-           if (con->restLeftover || *origOptString != '-') {
-+              if (con->leftovers != NULL)     /* XXX can't happen */
-               con->leftovers[con->numLeftovers++] = origOptString;
-               if (con->flags & POPT_CONTEXT_POSIXMEHARDER)
-                   con->restLeftover = 1;
-@@ -572,10 +672,9 @@
-           /* Make a copy we can hack at */
-           localOptString = optString =
--                      strcpy(alloca(strlen(origOptString) + 1),
--                      origOptString);
-+              strcpy(alloca(strlen(origOptString) + 1), origOptString);
--          if (!optString[0])
-+          if (optString[0] == '\0')
-               return POPT_ERROR_BADOPT;
-           if (optString[1] == '-' && !optString[2]) {
-@@ -594,6 +693,7 @@
-               /* XXX aliases with arg substitution need "--alias=arg" */
-               if (handleAlias(con, optString, '\0', NULL))
-                   continue;
-+
-               if (handleExec(con, optString, '\0'))
-                   continue;
-@@ -616,7 +716,8 @@
-               con->os->nextCharArg = origOptString + 1;
-           } else {
-               if (con->os == con->optionStack &&
--                 opt->argInfo & POPT_ARGFLAG_STRIP) {
-+                 opt->argInfo & POPT_ARGFLAG_STRIP)
-+              {
-                   canstrip = 1;
-                   poptStripArg(con, thisopt);
-               }
-@@ -630,14 +731,14 @@
-           con->os->nextCharArg = NULL;
--          if (handleAlias(con, NULL, *origOptString,
--                          origOptString + 1)) {
-+          if (handleAlias(con, NULL, *origOptString, origOptString + 1))
-               continue;
--          }
-+
-           if (handleExec(con, NULL, *origOptString)) {
-               /* Restore rest of short options for further processing */
-               origOptString++;
--              if (*origOptString) con->os->nextCharArg = origOptString;
-+              if (*origOptString != '\0')
-+                  con->os->nextCharArg = origOptString;
-               continue;
-           }
-@@ -648,9 +749,13 @@
-           shorty = 1;
-           origOptString++;
--          if (*origOptString) con->os->nextCharArg = origOptString;
-+          /*@-branchstate@*/          /* FIX: W2DO? */
-+          if (*origOptString != '\0')
-+              con->os->nextCharArg = origOptString;
-+          /*@=branchstate@*/
-       }
-+      if (opt == NULL) return POPT_ERROR_BADOPT;      /* XXX can't happen */
-       if (opt->arg && (opt->argInfo & POPT_ARG_MASK) == POPT_ARG_NONE) {
-           if (poptSaveInt(opt, 1L))
-               return POPT_ERROR_BADOPERATION;
-@@ -660,14 +765,15 @@
-                   return POPT_ERROR_BADOPERATION;
-           }
-       } else if ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE) {
--          if (con->os->nextArg) {
--              free((void *)con->os->nextArg);
--              con->os->nextArg = NULL;
--          }
-+          con->os->nextArg = _free(con->os->nextArg);
-+          /*@-usedef@*/       /* FIX: W2DO? */
-           if (longArg) {
--              con->os->nextArg = expandNextArg(con, longArg);
-+          /*@=usedef@*/
-+              longArg = expandNextArg(con, longArg);
-+              con->os->nextArg = longArg;
-           } else if (con->os->nextCharArg) {
--              con->os->nextArg = expandNextArg(con, con->os->nextCharArg);
-+              longArg = expandNextArg(con, con->os->nextCharArg);
-+              con->os->nextArg = longArg;
-               con->os->nextCharArg = NULL;
-           } else {
-               while (con->os->next == con->os->argc &&
-@@ -681,17 +787,25 @@
-                       return POPT_ERROR_NOARG;
-               } else {
--                  /* make sure this isn't part of a short arg or the
--                      result of an alias expansion */
-+                  /*
-+                   * Make sure this isn't part of a short arg or the
-+                   * result of an alias expansion.
-+                   */
-                   if (con->os == con->optionStack &&
--                      opt->argInfo & POPT_ARGFLAG_STRIP &&
-+                      (opt->argInfo & POPT_ARGFLAG_STRIP) &&
-                       canstrip) {
-                       poptStripArg(con, con->os->next);
-                   }
-               
--                  con->os->nextArg = expandNextArg(con, con->os->argv[con->os->next++]);
-+                  if (con->os->argv != NULL) {        /* XXX can't happen */
-+                      /* XXX watchout: subtle side-effects live here. */
-+                      longArg = con->os->argv[con->os->next++];
-+                      longArg = expandNextArg(con, longArg);
-+                      con->os->nextArg = longArg;
-+                  }
-               }
-           }
-+          longArg = NULL;
-           if (opt->arg) {
-               switch (opt->argInfo & POPT_ARG_MASK) {
-@@ -731,32 +845,31 @@
-                   char *end;
-                   if (con->os->nextArg) {
-+                      int saveerrno = errno;
-+                      errno = 0;
-                       aDouble = strtod(con->os->nextArg, &end);
--                      if (*end)
-+                      if (errno == ERANGE)
-+                          return POPT_ERROR_OVERFLOW;
-+                      errno = saveerrno;
-+                      if (*end != '\0')
-                           return POPT_ERROR_BADNUMBER;
-                   }
--                  if (aDouble == +HUGE_VAL || aDouble == -HUGE_VAL)
--                      return POPT_ERROR_OVERFLOW;
--                  if (aDouble == 0.0 && errno == ERANGE)
--                      return POPT_ERROR_OVERFLOW;
-                   if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_DOUBLE) {
-                       *((double *) opt->arg) = aDouble;
-                   } else {
--#ifdef ABS
--#undef ABS
--#endif
--#define ABS(a) (((a) < 0) ? -(a) : (a))
--                      if (ABS(aDouble) > FLT_MAX)
-+#define _ABS(a)       ((((a) - 0.0) < DBL_EPSILON) ? -(a) : (a))
-+                      if ((_ABS(aDouble) - FLT_MAX) > DBL_EPSILON)
-                           return POPT_ERROR_OVERFLOW;
--                      if (ABS(aDouble) < FLT_MIN)
-+                      if ((FLT_MIN - _ABS(aDouble)) > DBL_EPSILON)
-                           return POPT_ERROR_OVERFLOW;
-                       *((float *) opt->arg) = aDouble;
-                   }
-               }   break;
-               default:
--                  fprintf(stdout, POPT_("option type (%d) not implemented in popt\n"),
--                    opt->argInfo & POPT_ARG_MASK);
-+                  fprintf(stdout,
-+                      POPT_("option type (%d) not implemented in popt\n"),
-+                      (opt->argInfo & POPT_ARG_MASK));
-                   exit(EXIT_FAILURE);
-               }
-           }
-@@ -773,83 +886,107 @@
-                           sizeof(*con->finalArgv) * con->finalArgvAlloced);
-       }
-+      if (con->finalArgv != NULL)
-       {   char *s = malloc((opt->longName ? strlen(opt->longName) : 0) + 3);
--          if (opt->longName)
--              sprintf(s, "%s%s",
--                  ((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "-" : "--"),
--                  opt->longName);
--          else
--              sprintf(s, "-%c", opt->shortName);
--          con->finalArgv[con->finalArgvCount++] = s;
-+          if (s != NULL) {    /* XXX can't happen */
-+              if (opt->longName)
-+                  sprintf(s, "%s%s",
-+                      ((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "-" : "--"),
-+                      opt->longName);
-+              else
-+                  sprintf(s, "-%c", opt->shortName);
-+              con->finalArgv[con->finalArgvCount++] = s;
-+          } else
-+              con->finalArgv[con->finalArgvCount++] = NULL;
-       }
-       if (opt->arg && (opt->argInfo & POPT_ARG_MASK) == POPT_ARG_NONE)
--          /*@-ifempty@*/ ;
-+          /*@-ifempty@*/ ; /*@=ifempty@*/
-       else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_VAL)
--          /*@-ifempty@*/ ;
-+          /*@-ifempty@*/ ; /*@=ifempty@*/
-       else if ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE) {
--          if (con->os->nextArg)
-+          if (con->finalArgv != NULL && con->os->nextArg)
-               con->finalArgv[con->finalArgvCount++] =
-+                      /*@-nullpass@*/ /* LCL: con->os->nextArg != NULL */
-                       xstrdup(con->os->nextArg);
-+                      /*@=nullpass@*/
-       }
-     }
--    return opt->val;
-+    return (opt ? opt->val : -1);     /* XXX can't happen */
- }
--const char * poptGetOptArg(poptContext con) {
--    const char * ret = con->os->nextArg;
--    con->os->nextArg = NULL;
-+const char * poptGetOptArg(poptContext con)
-+{
-+    const char * ret = NULL;
-+    if (con) {
-+      ret = con->os->nextArg;
-+      con->os->nextArg = NULL;
-+    }
-     return ret;
- }
--const char * poptGetArg(poptContext con) {
--    const char * ret = (con->nextLeftover < con->numLeftovers)
--      ? con->leftovers[con->nextLeftover++] : NULL;
-+const char * poptGetArg(poptContext con)
-+{
-+    const char * ret = NULL;
-+    if (con && con->leftovers != NULL && con->nextLeftover < con->numLeftovers)
-+      ret = con->leftovers[con->nextLeftover++];
-     return ret;
- }
--const char * poptPeekArg(poptContext con) {
--    const char * ret = (con->nextLeftover < con->numLeftovers)
--      ? con->leftovers[con->nextLeftover] : NULL;
-+const char * poptPeekArg(poptContext con)
-+{
-+    const char * ret = NULL;
-+    if (con && con->leftovers != NULL && con->nextLeftover < con->numLeftovers)
-+      ret = con->leftovers[con->nextLeftover];
-     return ret;
- }
--const char ** poptGetArgs(poptContext con) {
--    if (con->numLeftovers == con->nextLeftover) return NULL;
-+const char ** poptGetArgs(poptContext con)
-+{
-+    if (con == NULL ||
-+      con->leftovers == NULL || con->numLeftovers == con->nextLeftover)
-+      return NULL;
-     /* some apps like [like RPM ;-) ] need this NULL terminated */
-     con->leftovers[con->numLeftovers] = NULL;
-+    /*@-nullret -nullstate @*/        /* FIX: typedef double indirection. */
-     return (con->leftovers + con->nextLeftover);
-+    /*@=nullret =nullstate @*/
- }
--void poptFreeContext(poptContext con) {
-+poptContext poptFreeContext(poptContext con)
-+{
-     int i;
-+    if (con == NULL) return con;
-     poptResetContext(con);
--    if (con->os->argb) free(con->os->argb);
-+    con->os->argb = _free(con->os->argb);
-+    if (con->aliases != NULL)
-     for (i = 0; i < con->numAliases; i++) {
--      if (con->aliases[i].longName) free((void *)con->aliases[i].longName);
--      free(con->aliases[i].argv);
-+      con->aliases[i].longName = _free(con->aliases[i].longName);
-+      con->aliases[i].argv = _free(con->aliases[i].argv);
-     }
-+    if (con->execs != NULL)
-     for (i = 0; i < con->numExecs; i++) {
--      if (con->execs[i].longName) free((void *)con->execs[i].longName);
--      free((void *)con->execs[i].script);
-+      con->execs[i].longName = _free(con->execs[i].longName);
-+      con->execs[i].script = _free(con->execs[i].script);
-     }
--    if (con->execs) free((void *)con->execs);
-+    con->execs = _free(con->execs);
--    free(con->leftovers);
--    free(con->finalArgv);
--    if (con->appName) free((void *)con->appName);
--    if (con->aliases) free(con->aliases);
--    if (con->otherHelp) free((void *)con->otherHelp);
--    if (con->execPath) free((void *)con->execPath);
--    if (con->arg_strip) PBM_FREE(con->arg_strip);
-+    con->leftovers = _free(con->leftovers);
-+    con->finalArgv = _free(con->finalArgv);
-+    con->appName = _free(con->appName);
-+    con->aliases = _free(con->aliases);
-+    con->otherHelp = _free(con->otherHelp);
-+    con->execPath = _free(con->execPath);
-+    con->arg_strip = PBM_FREE(con->arg_strip);
-     
--    free(con);
-+    con = _free(con);
-+    return con;
- }
- int poptAddAlias(poptContext con, struct poptAlias newAlias,
-@@ -867,7 +1004,9 @@
-     alias = con->aliases + aliasNum;
-     alias->longName = (newAlias.longName)
-+      /*@-nullpass@*/         /* FIX: malloc can return NULL. */
-       ? strcpy(malloc(strlen(newAlias.longName) + 1), newAlias.longName)
-+      /*@=nullpass@*/
-       : NULL;
-     alias->shortName = newAlias.shortName;
-     alias->argc = newAlias.argc;
-@@ -876,18 +1015,20 @@
-     return 0;
- }
--const char * poptBadOption(poptContext con, int flags) {
--    struct optionStackEntry * os;
-+const char * poptBadOption(poptContext con, int flags)
-+{
-+    struct optionStackEntry * os = NULL;
--    if (flags & POPT_BADOPTION_NOALIAS)
--      os = con->optionStack;
--    else
--      os = con->os;
-+    if (con != NULL)
-+      os = (flags & POPT_BADOPTION_NOALIAS) ? con->optionStack : con->os;
--    return os->argv[os->next - 1];
-+    /*@-nullderef@*/  /* LCL: os->argv != NULL */
-+    return (os && os->argv ? os->argv[os->next - 1] : NULL);
-+    /*@=nullderef@*/
- }
--const char *const poptStrerror(const int error) {
-+const char *const poptStrerror(const int error)
-+{
-     switch (error) {
-       case POPT_ERROR_NOARG:
-       return POPT_("missing argument");
-@@ -895,6 +1036,8 @@
-       return POPT_("unknown option");
-       case POPT_ERROR_BADOPERATION:
-       return POPT_("mutually exclusive logical operations requested");
-+      case POPT_ERROR_NULLARG:
-+      return POPT_("opt->arg should not be NULL");
-       case POPT_ERROR_OPTSTOODEEP:
-       return POPT_("aliases nested too deeply");
-       case POPT_ERROR_BADQUOTE:
-@@ -903,6 +1046,8 @@
-       return POPT_("invalid numeric value");
-       case POPT_ERROR_OVERFLOW:
-       return POPT_("number too large or too small");
-+      case POPT_ERROR_MALLOC:
-+      return POPT_("memory allocation failed");
-       case POPT_ERROR_ERRNO:
-       return strerror(errno);
-       default:
-@@ -910,8 +1055,10 @@
-     }
- }
--int poptStuffArgs(poptContext con, const char ** argv) {
-+int poptStuffArgs(poptContext con, const char ** argv)
-+{
-     int argc;
-+    int rc;
-     if ((con->os - con->optionStack) == POPT_OPTION_DEPTH)
-       return POPT_ERROR_OPTSTOODEEP;
-@@ -924,30 +1071,34 @@
-     con->os->nextArg = NULL;
-     con->os->nextCharArg = NULL;
-     con->os->currAlias = NULL;
--    poptDupArgv(argc, argv, &con->os->argc, &con->os->argv);
-+    rc = poptDupArgv(argc, argv, &con->os->argc, &con->os->argv);
-     con->os->argb = NULL;
-     con->os->stuffed = 1;
--    return 0;
-+    return rc;
- }
--const char * poptGetInvocationName(poptContext con) {
--    return con->os->argv[0];
-+const char * poptGetInvocationName(poptContext con)
-+{
-+    return (con->os->argv ? con->os->argv[0] : "");
- }
--int poptStrippedArgv(poptContext con, int argc, char **argv)
-+int poptStrippedArgv(poptContext con, int argc, char ** argv)
- {
--    int i,j=1, numargs=argc;
-+    int numargs = argc;
-+    int j = 1;
-+    int i;
-     
-+    if (con->arg_strip)
-     for (i = 1; i < argc; i++) {
-       if (PBM_ISSET(i, con->arg_strip))
-           numargs--;
-     }
-     
-     for (i = 1; i < argc; i++) {
--      if (PBM_ISSET(i, con->arg_strip))
-+      if (con->arg_strip && PBM_ISSET(i, con->arg_strip))
-           continue;
--      argv[j] = (j < numargs) ? argv[i] : '\0';
-+      argv[j] = (j < numargs) ? argv[i] : NULL;
-       j++;
-     }
-     
---- rpm-4.0.2/popt/popt.h.wiget        Tue Jan  2 18:25:32 2001
-+++ rpm-4.0.2/popt/popt.h      Wed May 30 14:12:34 2001
-@@ -84,6 +84,8 @@
- #define POPT_ERROR_BADNUMBER  -17     /*!< invalid numeric value */
- #define POPT_ERROR_OVERFLOW   -18     /*!< number too large or too small */
- #define       POPT_ERROR_BADOPERATION -19     /*!< mutually exclusive logical operations requested */
-+#define       POPT_ERROR_NULLARG      -20     /*!< opt->arg should not be NULL */
-+#define       POPT_ERROR_MALLOC       -21     /*!< memory allocation failed */
- /*@}*/
- /** \ingroup popt
-@@ -110,8 +112,8 @@
-     int argInfo;
- /*@shared@*/ /*@null@*/ void * arg;   /*!< depends on argInfo */
-     int val;                  /*!< 0 means don't return, just update flag */
--/*@shared@*/ /*@null@*/ const char * descrip; /*!< description for autohelp -- may be NULL */
--/*@shared@*/ /*@null@*/ const char * argDescrip; /*!< argument description for autohelp */
-+/*@observer@*/ /*@null@*/ const char * descrip;       /*!< description for autohelp -- may be NULL */
-+/*@observer@*/ /*@null@*/ const char * argDescrip; /*!< argument description for autohelp */
- };
- /** \ingroup popt
-@@ -135,7 +137,7 @@
- /** \ingroup popt
-  */
--typedef struct poptContext_s * poptContext;
-+typedef /*@abstract@*/ struct poptContext_s * poptContext;
- /** \ingroup popt
-  */
-@@ -156,9 +158,10 @@
-  * @param data                @todo Document.
-  */
- typedef void (*poptCallbackType) (poptContext con, 
--                               enum poptCallbackReason reason,
--                               const struct poptOption * opt,
--                               const char * arg, const void * data);
-+              enum poptCallbackReason reason,
-+              /*@null@*/ const struct poptOption * opt,
-+              /*@null@*/ const char * arg,
-+              /*@null@*/ const void * data);
- /** \ingroup popt
-  * Initialize popt context.
-@@ -169,62 +172,65 @@
-  * @param flags               or'd POPT_CONTEXT_* bits
-  * @return            initialized popt context
-  */
--/*@only@*/ poptContext poptGetContext(/*@keep@*/ const char * name,
--              int argc, /*@keep@*/ const char ** argv,
--              /*@keep@*/ const struct poptOption * options, int flags);
-+/*@only@*/ /*@null@*/ poptContext poptGetContext(
-+              /*@dependent@*/ /*@keep@*/ const char * name,
-+              int argc, /*@dependent@*/ /*@keep@*/ const char ** argv,
-+              /*@dependent@*/ /*@keep@*/ const struct poptOption * options,
-+              int flags);
- /** \ingroup popt
-  * Reinitialize popt context.
-  * @param con         context
-  */
--void poptResetContext(poptContext con);
-+void poptResetContext(/*@null@*/poptContext con);
- /** \ingroup popt
-  * Return value of next option found.
-  * @param con         context
-  * @return            next option val, -1 on last item, POPT_ERROR_* on error
-  */
--int poptGetNextOpt(poptContext con);
-+int poptGetNextOpt(/*@null@*/poptContext con);
- /* returns NULL if no argument is available */
- /** \ingroup popt
-  * @param con         context
-  */
--/*@observer@*/ /*@null@*/ const char * poptGetOptArg(poptContext con);
-+/*@observer@*/ /*@null@*/ const char * poptGetOptArg(/*@null@*/poptContext con);
- /** \ingroup popt
-  * Return current option's argument.
-  * @param con         context
-  * @return            option argument, NULL if no more options are available
-  */
--/*@observer@*/ /*@null@*/ const char * poptGetArg(poptContext con);
-+/*@observer@*/ /*@null@*/ const char * poptGetArg(/*@null@*/poptContext con);
- /** \ingroup popt
-  * Peek at  current option's argument.
-  * @param con         context
-  * @return            option argument
-  */
--/*@observer@*/ /*@null@*/ const char * poptPeekArg(poptContext con);
-+/*@observer@*/ /*@null@*/ const char * poptPeekArg(/*@null@*/poptContext con);
- /** \ingroup popt
-  * Return remaining arguments.
-  * @param con         context
-  * @return            argument array, terminated with NULL
-  */
--/*@observer@*/ /*@null@*/ const char ** poptGetArgs(poptContext con);
-+/*@observer@*/ /*@null@*/ const char ** poptGetArgs(/*@null@*/poptContext con);
- /** \ingroup popt
-  * Return the option which caused the most recent error.
-  * @param con         context
-  * @return            offending option
-  */
--/*@observer@*/ const char * poptBadOption(poptContext con, int flags);
-+/*@observer@*/ const char * poptBadOption(/*@null@*/poptContext con, int flags);
- /** \ingroup popt
-  * Destroy context.
-  * @param con         context
-+ * @return            NULL
-  */
--void poptFreeContext( /*@only@*/ poptContext con);
-+/*@null@*/ poptContext poptFreeContext( /*@only@*/ /*@null@*/ poptContext con);
- /** \ingroup popt
-  * Add arguments to context.
-@@ -250,7 +256,9 @@
-  * @param fn          file name to read
-  * @return            0 on success, POPT_ERROR_ERRNO on failure
-  */
--int poptReadConfigFile(poptContext con, const char * fn);
-+int poptReadConfigFile(poptContext con, const char * fn)
-+      /*@modifies fileSystem,
-+              con->execs, con->numExecs @*/;
- /** \ingroup popt
-  * Read default configuration from /etc/popt and $HOME/.popt.
-@@ -258,7 +266,9 @@
-  * @param useEnv      (unused)
-  * @return            0 on success, POPT_ERROR_ERRNO on failure
-  */
--int poptReadDefaultConfig(poptContext con, /*@unused@*/ int useEnv);
-+int poptReadDefaultConfig(poptContext con, /*@unused@*/ int useEnv)
-+      /*@modifies fileSystem,
-+              con->execs, con->numExecs @*/;
- /** \ingroup popt
-  * Duplicate an argument array.
-@@ -271,8 +281,10 @@
-  * @retval argvPtr    address of returned argument array
-  * @return            0 on success, POPT_ERROR_NOARG on failure
-  */
--int poptDupArgv(int argc, const char **argv,
--              /*@out@*/ int * argcPtr, /*@out@*/ const char *** argvPtr);
-+int poptDupArgv(int argc, /*@null@*/ const char **argv,
-+              /*@null@*/ /*@out@*/ int * argcPtr,
-+              /*@null@*/ /*@out@*/ const char *** argvPtr)
-+      /*@modifies *argcPtr, *argvPtr @*/;
- /** \ingroup popt
-  * Parse a string into an argument array.
-@@ -286,14 +298,16 @@
-  * @retval argvPtr    address of returned argument array
-  */
- int poptParseArgvString(const char * s,
--              /*@out@*/ int * argcPtr, /*@out@*/ const char *** argvPtr);
-+              /*@out@*/ int * argcPtr, /*@out@*/ const char *** argvPtr)
-+      /*@modifies *argcPtr, *argvPtr @*/;
- /** \ingroup popt
-  * Return formatted error string for popt failure.
-  * @param error               popt error
-  * @return            error string
-  */
--/*@observer@*/ const char *const poptStrerror(const int error);
-+/*@observer@*/ const char *const poptStrerror(const int error)
-+      /*@*/;
- /** \ingroup popt
-  * Limit search for executables.
-@@ -337,7 +351,7 @@
-  * @param con         context
-  * @return            new argc
-  */
--int poptStrippedArgv(poptContext con, int argc, char **argv);
-+int poptStrippedArgv(poptContext con, int argc, char ** argv);
- #ifdef  __cplusplus
- }
---- rpm-4.0.2/popt/poptconfig.c.wiget  Tue Dec 19 23:26:02 2000
-+++ rpm-4.0.2/popt/poptconfig.c        Wed May 30 14:12:34 2001
-@@ -9,30 +9,33 @@
- #include "system.h"
- #include "poptint.h"
--static void configLine(poptContext con, char * line) {
-+static void configLine(poptContext con, char * line)
-+      /*@modifies *line,
-+              con->execs, con->numExecs @*/
-+{
-     int nameLength = strlen(con->appName);
--    char * opt;
-+    const char * opt;
-     struct poptAlias alias;
--    char * entryType;
--    char * longName = NULL;
-+    const char * entryType;
-+    const char * longName = NULL;
-     char shortName = '\0';
-     
-     if (strncmp(line, con->appName, nameLength)) return;
-     line += nameLength;
--    if (!*line || !isspace(*line)) return;
--    while (*line && isspace(*line)) line++;
-+    if (*line == '\0' || !isspace(*line)) return;
-+    while (*line != '\0' && isspace(*line)) line++;
-     entryType = line;
--    while (!*line || !isspace(*line)) line++;
-+    while (*line == '\0' || !isspace(*line)) line++;
-     *line++ = '\0';
--    while (*line && isspace(*line)) line++;
--    if (!*line) return;
-+    while (*line != '\0' && isspace(*line)) line++;
-+    if (*line == '\0') return;
-     opt = line;
--    while (!*line || !isspace(*line)) line++;
-+    while (*line == '\0' || !isspace(*line)) line++;
-     *line++ = '\0';
--    while (*line && isspace(*line)) line++;
--    if (!*line) return;
-+    while (*line != '\0' && isspace(*line)) line++;
-+    if (*line == '\0') return;
-     if (opt[0] == '-' && opt[1] == '-')
-       longName = opt + 2;
-@@ -42,10 +45,11 @@
-     if (!strcmp(entryType, "alias")) {
-       if (poptParseArgvString(line, &alias.argc, &alias.argv)) return;
-       alias.longName = longName, alias.shortName = shortName;
--      poptAddAlias(con, alias, 0);
-+      (void) poptAddAlias(con, alias, 0);
-     } else if (!strcmp(entryType, "exec")) {
-       con->execs = realloc(con->execs,
-                               sizeof(*con->execs) * (con->numExecs + 1));
-+      if (con->execs == NULL) return; /* XXX can't happen */
-       if (longName)
-           con->execs[con->numExecs].longName = xstrdup(longName);
-       else
-@@ -54,49 +58,55 @@
-       con->execs[con->numExecs].shortName = shortName;
-       con->execs[con->numExecs].script = xstrdup(line);
-       
-+      /*@-noeffect@*/         /* LCL: broken? */
-       con->numExecs++;
-+      /*@=noeffect@*/
-     }
- }
--int poptReadConfigFile(poptContext con, const char * fn) {
--    char * file, * chptr, * end;
--    char * buf, * dst;
-+int poptReadConfigFile(poptContext con, const char * fn)
-+{
-+    const char * file, * chptr, * end;
-+    char * buf;
-+/*@dependent@*/ char * dst;
-     int fd, rc;
--    int fileLength;
-+    off_t fileLength;
-     fd = open(fn, O_RDONLY);
--    if (fd < 0) {
--      if (errno == ENOENT)
--          return 0;
--      else 
--          return POPT_ERROR_ERRNO;
--    }
-+    if (fd < 0)
-+      return (errno == ENOENT ? 0 : POPT_ERROR_ERRNO);
-     fileLength = lseek(fd, 0, SEEK_END);
--    (void) lseek(fd, 0, 0);
-+    if (fileLength == -1 || lseek(fd, 0, 0) == -1) {
-+      rc = errno;
-+      (void) close(fd);
-+      errno = rc;
-+      return POPT_ERROR_ERRNO;
-+    }
-     file = alloca(fileLength + 1);
--    if (read(fd, file, fileLength) != fileLength) {
-+    if (read(fd, (char *)file, fileLength) != fileLength) {
-       rc = errno;
--      close(fd);
-+      (void) close(fd);
-       errno = rc;
-       return POPT_ERROR_ERRNO;
-     }
--    close(fd);
-+    if (close(fd) == -1)
-+      return POPT_ERROR_ERRNO;
-     dst = buf = alloca(fileLength + 1);
-     chptr = file;
-     end = (file + fileLength);
-+    /*@-infloops@*/   /* LCL: can't detect chptr++ */
-     while (chptr < end) {
-       switch (*chptr) {
-         case '\n':
-           *dst = '\0';
-           dst = buf;
-           while (*dst && isspace(*dst)) dst++;
--          if (*dst && *dst != '#') {
-+          if (*dst && *dst != '#')
-               configLine(con, dst);
--          }
-           chptr++;
-           break;
-         case '\\':
-@@ -114,6 +124,7 @@
-           break;
-       }
-     }
-+    /*@=infloops@*/
-     return 0;
- }
-@@ -138,4 +149,3 @@
-     return 0;
- }
--
---- rpm-4.0.2/popt/popthelp.c.wiget    Thu Feb 22 21:36:56 2001
-+++ rpm-4.0.2/popt/popthelp.c  Wed May 30 14:12:34 2001
-@@ -23,31 +23,33 @@
-     exit(0);
- }
-+/*@-castfcnptr@*/
- struct poptOption poptHelpOptions[] = {
-     { NULL, '\0', POPT_ARG_CALLBACK, (void *)&displayArgs, '\0', NULL, NULL },
-     { "help", '?', 0, NULL, '?', N_("Show this help message"), NULL },
-     { "usage", '\0', 0, NULL, 'u', N_("Display brief usage message"), NULL },
-     POPT_TABLEEND
- } ;
--
-+/*@=castfcnptr@*/
- /*@observer@*/ /*@null@*/ static const char *const
--getTableTranslationDomain(const struct poptOption *table)
-+getTableTranslationDomain(/*@null@*/ const struct poptOption *table)
- {
--  const struct poptOption *opt;
--
--  for(opt = table;
--      opt->longName || opt->shortName || opt->arg;
--      opt++) {
--    if(opt->argInfo == POPT_ARG_INTL_DOMAIN)
--      return opt->arg;
--  }
-+    const struct poptOption *opt;
--  return NULL;
-+    if (table != NULL)
-+    for (opt = table; opt->longName || opt->shortName || opt->arg; opt++) {
-+      if (opt->argInfo == POPT_ARG_INTL_DOMAIN)
-+          return opt->arg;
-+    }
-+    return NULL;
- }
- /*@observer@*/ /*@null@*/ static const char *const
--getArgDescrip(const struct poptOption * opt, const char *translation_domain)
-+getArgDescrip(const struct poptOption * opt,
-+              /*@-paramuse@*/         /* FIX: wazzup? */
-+              /*@null@*/ const char * translation_domain)
-+              /*@=paramuse@*/
- {
-     if (!(opt->argInfo & POPT_ARG_MASK)) return NULL;
-@@ -69,8 +71,8 @@
- }
- static void singleOptionHelp(FILE * f, int maxLeftCol, 
--                           const struct poptOption * opt,
--                           const char *translation_domain)
-+              const struct poptOption * opt,
-+              /*@null@*/ const char *translation_domain)
- {
-     int indentLength = maxLeftCol + 5;
-     int lineLength = 79 - indentLength;
-@@ -173,20 +175,22 @@
- }
- static int maxArgWidth(const struct poptOption * opt,
--                     const char * translation_domain)
-+                     /*@null@*/ const char * translation_domain)
- {
-     int max = 0;
--    int this;
-+    int this = 0;
-     const char * s;
-     
-+    if (opt != NULL)
-     while (opt->longName || opt->shortName || opt->arg) {
-       if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
-+          if (opt->arg)       /* XXX program error */
-           this = maxArgWidth(opt->arg, translation_domain);
-           if (this > max) max = this;
-       } else if (!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
-           this = sizeof("  ")-1;
--          if (opt->shortName) this += sizeof("-X")-1;
--          if (opt->shortName && opt->longName) this += sizeof(", ")-1;
-+          if (opt->shortName != '\0') this += sizeof("-X")-1;
-+          if (opt->shortName != '\0' && opt->longName) this += sizeof(", ")-1;
-           if (opt->longName) {
-               this += ((opt->argInfo & POPT_ARGFLAG_ONEDASH)
-                       ? sizeof("-")-1 : sizeof("--")-1);
-@@ -206,23 +210,25 @@
-     return max;
- }
--static void singleTableHelp(FILE * f, const struct poptOption * table, 
--                          int left,
--                          const char *translation_domain)
-+static void singleTableHelp(FILE * f,
-+              /*@null@*/ const struct poptOption * table, int left,
-+              /*@null@*/ const char * translation_domain)
- {
-     const struct poptOption * opt;
-     const char *sub_transdom;
-+    if (table != NULL)
-     for (opt = table; (opt->longName || opt->shortName || opt->arg); opt++) {
-       if ((opt->longName || opt->shortName) && 
-           !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
-           singleOptionHelp(f, left, opt, translation_domain);
-     }
-+    if (table != NULL)
-     for (opt = table; (opt->longName || opt->shortName || opt->arg); opt++) {
-       if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
-           sub_transdom = getTableTranslationDomain(opt->arg);
--          if(!sub_transdom)
-+          if (sub_transdom == NULL)
-               sub_transdom = translation_domain;
-           
-           if (opt->descrip)
-@@ -240,7 +246,10 @@
-     fprintf(f, POPT_("Usage:"));
-     if (!(con->flags & POPT_CONTEXT_KEEP_FIRST)) {
-+      /*@-nullderef@*/        /* LCL: wazzup? */
-       fn = con->optionStack->argv[0];
-+      /*@=nullderef@*/
-+      if (fn == NULL) return len;
-       if (strchr(fn, '/')) fn = strrchr(fn, '/') + 1;
-       fprintf(f, " %s", fn);
-       len += strlen(fn) + 1;
-@@ -253,7 +262,7 @@
- {
-     int leftColWidth;
--    showHelpIntro(con, f);
-+    (void) showHelpIntro(con, f);
-     if (con->otherHelp)
-       fprintf(f, " %s\n", con->otherHelp);
-     else
-@@ -264,15 +273,15 @@
- }
- static int singleOptionUsage(FILE * f, int cursor, 
--                           const struct poptOption * opt,
--                           const char *translation_domain)
-+              const struct poptOption * opt,
-+              /*@null@*/ const char *translation_domain)
- {
-     int len = 3;
-     char shortStr[2] = { '\0', '\0' };
-     const char * item = shortStr;
-     const char * argDescrip = getArgDescrip(opt, translation_domain);
--    if (opt->shortName) {
-+    if (opt->shortName!= '\0' ) {
-       if (!(opt->argInfo & POPT_ARG_MASK)) 
-           return cursor;      /* we did these already */
-       len++;
-@@ -296,47 +305,57 @@
-     fprintf(f, " [-%s%s%s%s]",
-       ((opt->shortName || (opt->argInfo & POPT_ARGFLAG_ONEDASH)) ? "" : "-"),
-       item,
--      (argDescrip ? (opt->shortName ? " " : "=") : ""),
-+      (argDescrip ? (opt->shortName != '\0' ? " " : "=") : ""),
-       (argDescrip ? argDescrip : ""));
-     return cursor + len + 1;
- }
--static int singleTableUsage(FILE * f, int cursor,
--      const struct poptOption * opt, const char * translation_domain)
-+static int singleTableUsage(FILE * f,
-+              int cursor, const struct poptOption * opt,
-+              /*@null@*/ const char * translation_domain)
- {
-+    /*@-branchstate@*/                /* FIX: W2DO? */
-+    if (opt != NULL)
-     for (; (opt->longName || opt->shortName || opt->arg) ; opt++) {
--        if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN)
-+        if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN) {
-           translation_domain = (const char *)opt->arg;
--      else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) 
-+      } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
-+          if (opt->arg)       /* XXX program error */
-           cursor = singleTableUsage(f, cursor, opt->arg, translation_domain);
--      else if ((opt->longName || opt->shortName) && 
--               !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
-+      } else if ((opt->longName || opt->shortName) &&
-+               !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
-           cursor = singleOptionUsage(f, cursor, opt, translation_domain);
-+      }
-     }
-+    /*@=branchstate@*/
-     return cursor;
- }
--static int showShortOptions(const struct poptOption * opt, FILE * f, char * str)
-+static int showShortOptions(const struct poptOption * opt, FILE * f,
-+              /*@null@*/ char * str)
- {
--    char s[300];              /* this is larger then the ascii set, so
--                                 it should do just fine */
-+    char * s = alloca(300);   /* larger then the ascii set */
-     s[0] = '\0';
-+    /*@-branchstate@*/                /* FIX: W2DO? */
-     if (str == NULL) {
-       memset(s, 0, sizeof(s));
-       str = s;
-     }
-+    /*@=branchstate@*/
-+    if (opt != NULL)
-     for (; (opt->longName || opt->shortName || opt->arg); opt++) {
-       if (opt->shortName && !(opt->argInfo & POPT_ARG_MASK))
-           str[strlen(str)] = opt->shortName;
-       else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE)
--          showShortOptions(opt->arg, f, str);
-+          if (opt->arg)       /* XXX program error */
-+              (void) showShortOptions(opt->arg, f, str);
-     } 
--    if (s != str || !*s)
-+    if (s != str || *s != '\0')
-       return 0;
-     fprintf(f, " [-%s]", s);
-@@ -349,7 +368,7 @@
-     cursor = showHelpIntro(con, f);
-     cursor += showShortOptions(con->options, f, NULL);
--    singleTableUsage(f, cursor, con->options, NULL);
-+    (void) singleTableUsage(f, cursor, con->options, NULL);
-     if (con->otherHelp) {
-       cursor += strlen(con->otherHelp) + 1;
---- rpm-4.0.2/popt/poptint.h.wiget     Tue Jan  2 00:23:45 2001
-+++ rpm-4.0.2/popt/poptint.h   Wed May 30 14:12:34 2001
-@@ -9,6 +9,16 @@
- #ifndef H_POPTINT
- #define H_POPTINT
-+/**
-+ * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
-+ * @param this                memory to free
-+ * @retval            NULL always
-+ */
-+/*@unused@*/ static inline /*@null@*/ void * _free(/*@only@*/ /*@null@*/ const void * this) {
-+    if (this != NULL) free((void *)this);
-+    return NULL;
-+}
-+
- /* Bit mask macros. */
- typedef       unsigned int __pbm_bits;
- #define       __PBM_NBITS             (8 * sizeof (__pbm_bits))
-@@ -20,50 +30,50 @@
- #define       __PBM_BITS(set) ((set)->bits)
- #define       PBM_ALLOC(d)    calloc(__PBM_IX (d) + 1, sizeof(__pbm_bits))
--#define       PBM_FREE(s)     free(s);
-+#define       PBM_FREE(s)     _free(s);
- #define PBM_SET(d, s)   (__PBM_BITS (s)[__PBM_IX (d)] |= __PBM_MASK (d))
- #define PBM_CLR(d, s)   (__PBM_BITS (s)[__PBM_IX (d)] &= ~__PBM_MASK (d))
- #define PBM_ISSET(d, s) ((__PBM_BITS (s)[__PBM_IX (d)] & __PBM_MASK (d)) != 0)
- struct optionStackEntry {
-     int argc;
--/*@only@*/ const char ** argv;
--/*@only@*/ pbm_set * argb;
-+/*@only@*/ /*@null@*/ const char ** argv;
-+/*@only@*/ /*@null@*/ pbm_set * argb;
-     int next;
--/*@only@*/ const char * nextArg;
--/*@keep@*/ const char * nextCharArg;
--/*@dependent@*/ struct poptAlias * currAlias;
-+/*@only@*/ /*@null@*/ const char * nextArg;
-+/*@keep@*/ /*@null@*/ const char * nextCharArg;
-+/*@dependent@*/ /*@null@*/ struct poptAlias * currAlias;
-     int stuffed;
- };
- struct execEntry {
--    const char * longName;
-+/*@owned@*/ /*@null@*/ const char * longName;
-     char shortName;
--    const char * script;
-+/*@only@*/ /*@null@*/ const char * script;
- };
- struct poptContext_s {
-     struct optionStackEntry optionStack[POPT_OPTION_DEPTH];
- /*@dependent@*/ struct optionStackEntry * os;
--/*@owned@*/ const char ** leftovers;
-+/*@owned@*/ /*@null@*/ const char ** leftovers;
-     int numLeftovers;
-     int nextLeftover;
- /*@keep@*/ const struct poptOption * options;
-     int restLeftover;
--/*@only@*/ const char * appName;
--/*@only@*/ struct poptAlias * aliases;
-+/*@only@*/ /*@null@*/ const char * appName;
-+/*@only@*/ /*@null@*/ struct poptAlias * aliases;
-     int numAliases;
-     int flags;
--    struct execEntry * execs;
-+/*@owned@*/ /*@null@*/ struct execEntry * execs;
-     int numExecs;
--/*@only@*/ const char ** finalArgv;
-+/*@only@*/ /*@null@*/ const char ** finalArgv;
-     int finalArgvCount;
-     int finalArgvAlloced;
--/*@dependent@*/ struct execEntry * doExec;
-+/*@dependent@*/ /*@null@*/ struct execEntry * doExec;
- /*@only@*/ const char * execPath;
-     int execAbsolute;
- /*@only@*/ const char * otherHelp;
--    pbm_set * arg_strip;
-+/*@null@*/ pbm_set * arg_strip;
- };
- #ifdef HAVE_LIBINTL_H
---- rpm-4.0.2/popt/poptparse.c.wiget   Tue Dec 19 23:26:19 2000
-+++ rpm-4.0.2/popt/poptparse.c Wed May 30 14:12:34 2001
-@@ -18,6 +18,8 @@
-     char * dst;
-     int i;
-+    if (argc <= 0 || argv == NULL)    /* XXX can't happen */
-+      return POPT_ERROR_NOARG;
-     for (i = 0; i < argc; i++) {
-       if (argv[i] == NULL)
-           return POPT_ERROR_NOARG;
-@@ -25,6 +27,8 @@
-     }
-       
-     dst = malloc(nb);
-+    if (dst == NULL)                  /* XXX can't happen */
-+      return POPT_ERROR_MALLOC;
-     argv2 = (void *) dst;
-     dst += (argc + 1) * sizeof(*argv);
-@@ -34,8 +38,14 @@
-     }
-     argv2[argc] = NULL;
--    *argvPtr = argv2;
--    *argcPtr = argc;
-+    if (argvPtr) {
-+      *argvPtr = argv2;
-+    } else {
-+      free(argv2);
-+      argv2 = NULL;
-+    }
-+    if (argcPtr)
-+      *argcPtr = argc;
-     return 0;
- }
-@@ -48,28 +58,31 @@
-     int argc = 0;
-     int buflen = strlen(s) + 1;
-     char * buf = memset(alloca(buflen), 0, buflen);
-+    int rc = POPT_ERROR_MALLOC;
-+    if (argv == NULL) return rc;
-     argv[argc] = buf;
--    for (src = s; *src; src++) {
-+    for (src = s; *src != '\0'; src++) {
-       if (quote == *src) {
-           quote = '\0';
--      } else if (quote) {
-+      } else if (quote != '\0') {
-           if (*src == '\\') {
-               src++;
-               if (!*src) {
--                  free(argv);
--                  return POPT_ERROR_BADQUOTE;
-+                  rc = POPT_ERROR_BADQUOTE;
-+                  goto exit;
-               }
-               if (*src != quote) *buf++ = '\\';
-           }
-           *buf++ = *src;
-       } else if (isspace(*src)) {
--          if (*argv[argc]) {
-+          if (*argv[argc] != '\0') {
-               buf++, argc++;
-               if (argc == argvAlloced) {
-                   argvAlloced += POPT_ARGV_ARRAY_GROW_DELTA;
-                   argv = realloc(argv, sizeof(*argv) * argvAlloced);
-+                  if (argv == NULL) goto exit;
-               }
-               argv[argc] = buf;
-           }
-@@ -81,8 +94,8 @@
-         case '\\':
-           src++;
-           if (!*src) {
--              free(argv);
--              return POPT_ERROR_BADQUOTE;
-+              rc = POPT_ERROR_BADQUOTE;
-+              goto exit;
-           }
-           /*@fallthrough@*/
-         default:
-@@ -95,9 +108,9 @@
-       argc++, buf++;
-     }
--    (void) poptDupArgv(argc, argv, argcPtr, argvPtr);
--
--    free(argv);
-+    rc = poptDupArgv(argc, argv, argcPtr, argvPtr);
--    return 0;
-+exit:
-+    if (argv) free(argv);
-+    return rc;
- }
---- rpm-4.0.2/popt/system.h.wiget      Mon Oct 25 20:22:20 1999
-+++ rpm-4.0.2/popt/system.h    Wed May 30 14:12:34 2001
-@@ -44,12 +44,14 @@
- /*@only@*/ char * xstrdup (const char *str);
-+#if !defined(__LCLINT__)
- #if HAVE_MCHECK_H && defined(__GNUC__)
- #define       vmefail()       (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL)
- #define xstrdup(_str)   (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str)))
- #else
- #define       xstrdup(_str)   strdup(_str)
- #endif  /* HAVE_MCHECK_H && defined(__GNUC__) */
-+#endif /* !__LCLINT__ */
- #include "popt.h"
---- rpm-4.0.2/popt/test1.c.wiget       Sun Dec 31 20:49:44 2000
-+++ rpm-4.0.2/popt/test1.c     Wed May 30 14:12:34 2001
-@@ -149,7 +149,7 @@
-     fprintf(stdout, "\n");
- exit:
--    poptFreeContext(optCon);
-+    optCon = poptFreeContext(optCon);
- #if HAVE_MCHECK_H && HAVE_MTRACE
-     muntrace();   /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */
- #endif
---- rpm-4.0.2/popt/test2.c.wiget       Wed Feb 23 18:20:20 2000
-+++ rpm-4.0.2/popt/test2.c     Wed May 30 14:12:34 2001
-@@ -133,7 +133,7 @@
-     /* although there are no options to be parsed, check for --help */
-     poptGetNextOpt(optCon);
--    poptFreeContext(optCon);
-+    optCon = poptFreeContext(optCon);
-     printf( "dbusername %s\tdbpassword %s\n"
-             "txhost %s\ttxsslport %d\ttxstoreid %d\tpathofkeyfile %s\n"
---- rpm-4.0.2/popt/testit.sh.wiget     Fri Jan 12 17:34:29 2001
-+++ rpm-4.0.2/popt/testit.sh   Wed May 30 14:12:34 2001
-@@ -47,7 +47,7 @@
- run test1 "test1 - 19" "" --echo-args
- run test1 "test1 - 20" "--arg1" --echo-args --arg1
- run test1 "test1 - 21" "--arg2 something" -T something -e
--run test1 "test1 - 22" "--arg2 something -- more args" -T something -a more args
-+run test1 "test1 - 22" "--arg2 something more args" -T something -a more args
- run test1 "test1 - 23" "--echo-args -a" --echo-args -e -a
- run test1 "test1 - 24" "arg1: 0 arg2: (none) short: 1" -shortoption
- run test1 "test1 - 25" "arg1: 0 arg2: (none) short: 1" --shortoption
---- rpm/popt/acconfig.h.wiget  Wed May 30 15:31:40 2001
-+++ rpm/popt/acconfig.h        Wed May 30 15:32:19 2001
-@@ -16,7 +16,6 @@
-    a given entry is in the file.
-    Leave the following blank line there!!  Autoheader needs it.  */
--^L
- /* Define to the name of the distribution.  */
- #undef PACKAGE
-@@ -45,7 +44,6 @@
- /* Absolute path to popt top_sourcedir. */
- #undef POPT_SOURCE_PATH
--^L
- /* Leave that blank line there!!  Autoheader needs it.
-    If you're adding to this file, keep in mind:
-    The entries are in sort -df order: alphabetical, case insensitive,
diff --git a/rpm-progress-nontty.patch b/rpm-progress-nontty.patch
deleted file mode 100644 (file)
index fa0f1ae..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -Nur rpm-4.0.2.mis/lib/rpminstall.c rpm-4.0.2/lib/rpminstall.c
---- rpm-4.0.2.mis/lib/rpminstall.c     Wed Oct 10 18:38:55 2001
-+++ rpm-4.0.2/lib/rpminstall.c Wed Oct 10 18:39:43 2001
-@@ -61,7 +61,8 @@
- #ifdef FANCY_HASH
-            int i;
-            progressCurrent++;
--           for (i = 1; i < hashesPrinted; i++) putchar ('#');
-+           if (isatty(STDOUT_FILENO))
-+               for (i = 1; i < hashesPrinted; i++) putchar ('#');
-            printf (" [%3d%%]\n", (int)(100 * (progressTotal ?
-                (((float) progressCurrent) / progressTotal) : 1)));
- #else
-@@ -113,7 +114,8 @@
- #ifdef FANCY_HASH
-                if (isatty (STDOUT_FILENO))
-                    fprintf(stdout, "%4d:%-23.23s", progressCurrent + 1, s);
--              else
-+               else
-+                   fprintf(stdout, "%-28s", s);
- #else
-                    fprintf(stdout, "%-28s", s);
- #endif
diff --git a/rpm-rh-lame.patch b/rpm-rh-lame.patch
deleted file mode 100644 (file)
index f9ecddc..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./lib/depends.c.old        Tue Mar 20 11:46:01 2001
-+++ ./lib/depends.c    Tue Mar 20 11:46:10 2001
-@@ -1475,7 +1475,7 @@
-  * XXX Hack to remove known Red Hat dependency loops, will be removed
-  * as soon as rpm's legacy permits.
-  */
--#define       DEPENDENCY_WHITEOUT
-+#undef        DEPENDENCY_WHITEOUT
- #if defined(DEPENDENCY_WHITEOUT)
- static struct badDeps_s {
diff --git a/rpm-rpmlog-fix.patch b/rpm-rpmlog-fix.patch
deleted file mode 100644 (file)
index 82ff41e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---- rpm-4.0.2/rpmio/rpmlog.c.orig      Thu Jul 25 15:53:07 2002
-+++ rpm-4.0.2/rpmio/rpmlog.c   Thu Jul 25 16:02:25 2002
-@@ -7,6 +7,18 @@
- #include "rpmlog.h"
- #include "debug.h"
-+#ifndef va_copy
-+# ifdef __va_copy
-+#  define va_copy(DEST,SRC) __va_copy((DEST),(SRC))
-+# else
-+#  ifdef HAVE_VA_LIST_AS_ARRAY
-+#   define va_copy(DEST,SRC) (*(DEST) = *(SRC))
-+#  else
-+#   define va_copy(DEST,SRC) ((DEST) = (SRC))
-+#  endif
-+# endif
-+#endif
-+
- /*@access rpmlogRec @*/
- static int nrecs = 0;
-@@ -116,9 +116,9 @@
-     /* Allocate a sufficently large buffer for output. */
-     while (1) {
--      /*@-unrecog@*/
--      nb = vsnprintf(msgbuf, msgnb, fmt, ap);
--      /*@=unrecog@*/
-+      va_list apc;
-+      /*@-sysunrecog -usedef@*/ va_copy(apc, ap); /*@=sysunrecog =usedef@*/
-+      nb = vsnprintf(msgbuf, msgnb, fmt, apc);
-       if (nb > -1 && nb < msgnb)
-           break;
-       if (nb > -1)            /* glibc 2.1 */
diff --git a/rpm-section_test.patch b/rpm-section_test.patch
deleted file mode 100644 (file)
index e3e7373..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-diff -ur rpm-4.0.2/build/build.c rpm-4.0.2-test/build/build.c
---- rpm-4.0.2/build/build.c    Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2-test/build/build.c       Fri May 24 20:46:26 2002
-@@ -81,6 +81,12 @@
-       mTemplate = "%{__spec_build_template}";
-       mPost = "%{__spec_build_post}";
-       break;
-+      case RPMBUILD_TEST:
-+      name = "%test";
-+      sb = spec->test;
-+      mTemplate = "%{__spec_build_template}";
-+      mPost = "%{__spec_build_post}";
-+      break;
-       case RPMBUILD_INSTALL:
-       name = "%install";
-       sb = spec->install;
-@@ -266,6 +272,10 @@
-           (rc = doScript(spec, RPMBUILD_BUILD, NULL, NULL, test)))
-               goto exit;
-+      if ((what & RPMBUILD_TEST) &&
-+          (rc = doScript(spec, RPMBUILD_TEST, NULL, NULL, test)))
-+              goto exit;
-+      
-       if ((what & RPMBUILD_INSTALL) &&
-           (rc = doScript(spec, RPMBUILD_INSTALL, NULL, NULL, test)))
-               goto exit;
-diff -ur rpm-4.0.2/build/parseBuildInstallClean.c rpm-4.0.2-test/build/parseBuildInstallClean.c
---- rpm-4.0.2/build/parseBuildInstallClean.c   Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2-test/build/parseBuildInstallClean.c      Fri May 24 20:46:26 2002
-@@ -22,6 +22,9 @@
-     } else if (parsePart == PART_CLEAN) {
-       sbp = &(spec->clean);
-       name = "%clean";
-+    } else if (parsePart == PART_TEST) {
-+      sbp = &(spec->test);
-+      name = "%test";
-     }
-     
-     if (*sbp != NULL) {
-diff -ur rpm-4.0.2/build/parsePreamble.c rpm-4.0.2-test/build/parsePreamble.c
---- rpm-4.0.2/build/parsePreamble.c    Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2-test/build/parsePreamble.c       Fri May 24 20:46:26 2002
-@@ -122,6 +122,7 @@
-     { "prep",         RPMSENSE_SCRIPT_PREP },
-     { "build",                RPMSENSE_SCRIPT_BUILD },
-     { "install",      RPMSENSE_SCRIPT_INSTALL },
-+    { "test",         RPMSENSE_SCRIPT_TEST },
-     { "clean",                RPMSENSE_SCRIPT_CLEAN },
-     { NULL, 0 }
- };
-diff -ur rpm-4.0.2/build/parseSpec.c rpm-4.0.2-test/build/parseSpec.c
---- rpm-4.0.2/build/parseSpec.c        Fri May 24 20:47:45 2002
-+++ rpm-4.0.2-test/build/parseSpec.c   Fri May 24 20:46:26 2002
-@@ -22,6 +22,7 @@
-     { PART_PREP,          0, "%prep"},
-     { PART_BUILD,         0, "%build"},
-     { PART_INSTALL,       0, "%install"},
-+    { PART_TEST,          0, "%test"},
-     { PART_CLEAN,         0, "%clean"},
-     { PART_PREUN,         0, "%preun"},
-     { PART_POSTUN,        0, "%postun"},
-@@ -427,6 +428,7 @@
-           break;
-         case PART_BUILD:
-         case PART_INSTALL:
-+        case PART_TEST:
-         case PART_CLEAN:
-           parsePart = parseBuildInstallClean(spec, parsePart);
-           break;
-diff -ur rpm-4.0.2/build/rpmbuild.h rpm-4.0.2-test/build/rpmbuild.h
---- rpm-4.0.2/build/rpmbuild.h Fri May 24 20:47:45 2002
-+++ rpm-4.0.2-test/build/rpmbuild.h    Fri May 24 20:46:26 2002
-@@ -21,15 +21,16 @@
- typedef enum rpmBuildFlags_e {
-     RPMBUILD_PREP     = (1 << 0),     /*!< Execute %%prep. */
-     RPMBUILD_BUILD    = (1 << 1),     /*!< Execute %%build. */
--    RPMBUILD_INSTALL  = (1 << 2),     /*!< Execute %%install. */
--    RPMBUILD_CLEAN    = (1 << 3),     /*!< Execute %%clean. */
--    RPMBUILD_FILECHECK        = (1 << 4),     /*!< Check %%files manifest. */
--    RPMBUILD_PACKAGESOURCE = (1 << 5),        /*!< Create source package. */
--    RPMBUILD_PACKAGEBINARY = (1 << 6),        /*!< Create binary package(s). */
--    RPMBUILD_RMSOURCE = (1 << 7),     /*!< Remove source(s) and patch(s). */
--    RPMBUILD_RMBUILD  = (1 << 8),     /*!< Remove build sub-tree. */
--    RPMBUILD_STRINGBUF        = (1 << 9),     /*!< only for doScript() */
--    RPMBUILD_RMSPEC   = (1 << 10)     /*!< Remove spec file. */
-+    RPMBUILD_TEST     = (1 << 2),     /*!< Execute %%test. */
-+    RPMBUILD_INSTALL  = (1 << 3),     /*!< Execute %%install. */
-+    RPMBUILD_CLEAN    = (1 << 4),     /*!< Execute %%clean. */
-+    RPMBUILD_FILECHECK        = (1 << 5),     /*!< Check %%files manifest. */
-+    RPMBUILD_PACKAGESOURCE = (1 << 6),        /*!< Create source package. */
-+    RPMBUILD_PACKAGEBINARY = (1 << 7),        /*!< Create binary package(s). */
-+    RPMBUILD_RMSOURCE = (1 << 8),     /*!< Remove source(s) and patch(s). */
-+    RPMBUILD_RMBUILD  = (1 << 9),     /*!< Remove build sub-tree. */
-+    RPMBUILD_STRINGBUF        = (1 << 10),    /*!< only for doScript() */
-+    RPMBUILD_RMSPEC   = (1 << 11)     /*!< Remove spec file. */
- } rpmBuildFlags;
- #include <ctype.h>
-@@ -49,21 +50,22 @@
-     PART_PREAMBLE     = 1,    /*!< */
-     PART_PREP         = 2,    /*!< */
-     PART_BUILD                = 3,    /*!< */
--    PART_INSTALL      = 4,    /*!< */
--    PART_CLEAN                = 5,    /*!< */
--    PART_FILES                = 6,    /*!< */
--    PART_PRE          = 7,    /*!< */
--    PART_POST         = 8,    /*!< */
--    PART_PREUN                = 9,    /*!< */
--    PART_POSTUN               = 10,   /*!< */
--    PART_DESCRIPTION  = 11,   /*!< */
--    PART_CHANGELOG    = 12,   /*!< */
--    PART_TRIGGERIN    = 13,   /*!< */
--    PART_TRIGGERUN    = 14,   /*!< */
--    PART_VERIFYSCRIPT = 15,   /*!< */
--    PART_BUILDARCHITECTURES= 16,/*!< */
--    PART_TRIGGERPOSTUN        = 17,   /*!< */
--    PART_LAST         = 18    /*!< */
-+    PART_TEST         = 4,    /*!< */
-+    PART_INSTALL      = 5,    /*!< */
-+    PART_CLEAN                = 6,    /*!< */
-+    PART_FILES                = 7,    /*!< */
-+    PART_PRE          = 8,    /*!< */
-+    PART_POST         = 9,    /*!< */
-+    PART_PREUN                = 10,   /*!< */
-+    PART_POSTUN       = 11,   /*!< */
-+    PART_DESCRIPTION  = 12,   /*!< */
-+    PART_CHANGELOG    = 13,   /*!< */
-+    PART_TRIGGERIN    = 14,   /*!< */
-+    PART_TRIGGERUN    = 15,   /*!< */
-+    PART_VERIFYSCRIPT = 16,   /*!< */
-+    PART_BUILDARCHITECTURES= 17,/*!< */
-+    PART_TRIGGERPOSTUN        = 18,   /*!< */
-+    PART_LAST         = 19    /*!< */
- } rpmParseState;
- #define STRIP_NOTHING             0
-diff -ur rpm-4.0.2/build/rpmspec.h rpm-4.0.2-test/build/rpmspec.h
---- rpm-4.0.2/build/rpmspec.h  Thu Jan 11 15:15:15 2001
-+++ rpm-4.0.2-test/build/rpmspec.h     Fri May 24 20:46:26 2002
-@@ -131,6 +131,7 @@
- /*@dependent@*/ struct MacroContext *macros;
- /*@only@*/ StringBuf prep;            /*!< %prep scriptlet. */
-+/*@only@*/ StringBuf test;            /*!< %test scriptlet. */
- /*@only@*/ StringBuf build;           /*!< %build scriptlet. */
- /*@only@*/ StringBuf install;         /*!< %install scriptlet. */
- /*@only@*/ StringBuf clean;           /*!< %clean scriptlet. */
-diff -ur rpm-4.0.2/lib/poptBT.c rpm-4.0.2-test/lib/poptBT.c
---- rpm-4.0.2/lib/poptBT.c     Wed Jan  3 20:29:11 2001
-+++ rpm-4.0.2-test/lib/poptBT.c        Fri May 24 20:46:26 2002
-@@ -35,6 +35,7 @@
- #define       POPT_BL                 0x626c
- #define       POPT_BP                 0x6270
- #define       POPT_BS                 0x6273
-+#define       POPT_BT                 0x6274
- #define       POPT_TA                 0x7461
- #define       POPT_TB                 0x7462
- #define       POPT_TC                 0x7463
-@@ -42,6 +43,7 @@
- #define       POPT_TL                 0x746c
- #define       POPT_TP                 0x7470
- #define       POPT_TS                 0x7473
-+#define       POPT_TT                 0x7474
- extern int _noDirTokens;
- static int force = 0;
-@@ -67,12 +69,14 @@
-     case POPT_BL:
-     case POPT_BP:
-     case POPT_BS:
-+    case POPT_BT:
-     case POPT_TA:
-     case POPT_TB:
-     case POPT_TC:
-     case POPT_TI:
-     case POPT_TL:
-     case POPT_TP:
-+    case POPT_TT:
-     case POPT_TS:
-       if (rba->buildMode == ' ') {
-           rba->buildMode = (opt->val >> 8) & 0xff;
-@@ -121,6 +125,9 @@
-  { "bc", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BC,
-       N_("build through %build (%prep, then compile) from <specfile>"),
-       N_("<specfile>") },
-+ { "bt", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BT,
-+      N_("build through %test (%prep, %build then test) from <specfile>"),
-+      N_("<specfile>") },
-  { "bi", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BI,
-       N_("build through %install (%prep, %build, then install) from <specfile>"),
-       N_("<specfile>") },
-@@ -143,6 +150,9 @@
-  { "tc", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_TC,
-       N_("build through %build (%prep, then compile) from <tarball>"),
-       N_("<tarball>") },
-+ { "tt", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BT,
-+      N_("build through %test (%prep, %build then test) from <tarball>"),
-+      N_("<tarball>") },
-  { "ti", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_TI,
-       N_("build through %install (%prep, %build, then install) from <tarball>"),
-       N_("<tarball>") },
-diff -ur rpm-4.0.2/lib/rpmlib.h rpm-4.0.2-test/lib/rpmlib.h
---- rpm-4.0.2/lib/rpmlib.h     Fri May 24 20:47:45 2002
-+++ rpm-4.0.2-test/lib/rpmlib.h        Fri May 24 20:46:26 2002
-@@ -356,10 +356,11 @@
-     RPMSENSE_MULTILIB = (1 << 19),
-     RPMSENSE_SCRIPT_PREP = (1 << 20), /*!< %prep build dependency. */
-     RPMSENSE_SCRIPT_BUILD = (1 << 21),        /*!< %build build dependency. */
--    RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */
--    RPMSENSE_SCRIPT_CLEAN = (1 << 23),        /*!< %clean build dependency. */
--    RPMSENSE_RPMLIB   = ((1 << 24) | RPMSENSE_PREREQ), /*!< rpmlib(feature) dependency. */
--    RPMSENSE_TRIGGERPREIN = (1 << 25) /*!< @todo Implement %triggerprein. */
-+    RPMSENSE_SCRIPT_TEST = (1 << 22), /*!< %test build dependency. */
-+    RPMSENSE_SCRIPT_INSTALL = (1 << 23),/*!< %install build dependency. */
-+    RPMSENSE_SCRIPT_CLEAN = (1 << 24),        /*!< %clean build dependency. */
-+    RPMSENSE_RPMLIB   = ((1 << 25) | RPMSENSE_PREREQ), /*!< rpmlib(feature) dependency. */
-+    RPMSENSE_TRIGGERPREIN = (1 << 26) /*!< @todo Implement %triggerprein. */
- } rpmsenseFlags;
-@@ -381,6 +382,7 @@
-     RPMSENSE_FIND_REQUIRES | \
-     RPMSENSE_SCRIPT_PREP | \
-     RPMSENSE_SCRIPT_BUILD | \
-+    RPMSENSE_SCRIPT_TEST | \
-     RPMSENSE_SCRIPT_INSTALL | \
-     RPMSENSE_SCRIPT_CLEAN | \
-     RPMSENSE_RPMLIB )
-diff -ur rpm-4.0.2/rpmqv.c rpm-4.0.2-test/rpmqv.c
---- rpm-4.0.2/rpmqv.c  Mon Mar 12 19:20:29 2001
-+++ rpm-4.0.2-test/rpmqv.c     Fri May 24 20:46:26 2002
-@@ -1316,7 +1316,7 @@
-       if (!poptPeekArg(optCon))
-           argerror(_("no packages files given for rebuild"));
--      ba->buildAmount = RPMBUILD_PREP | RPMBUILD_BUILD | RPMBUILD_INSTALL;
-+      ba->buildAmount = RPMBUILD_PREP | RPMBUILD_BUILD | RPMBUILD_TEST | RPMBUILD_INSTALL;
-       if (bigMode == MODE_REBUILD) {
-           ba->buildAmount |= RPMBUILD_PACKAGEBINARY;
-           ba->buildAmount |= RPMBUILD_RMSOURCE;
-@@ -1358,6 +1358,11 @@
-           if ((ba->buildChar == 'i') && ba->shortCircuit)
-               break;
-           /*@fallthrough@*/
-+        case 't':
-+          ba->buildAmount |= RPMBUILD_TEST;
-+          if ((ba->buildChar == 't') && ba->shortCircuit)
-+              break;
-+          /*@fallthrough@*/
-         case 'c':
-           ba->buildAmount |= RPMBUILD_BUILD;
-           if ((ba->buildChar == 'c') && ba->shortCircuit)
---- rpm-4.0.2.new/build/spec.c~        Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2.new/build/spec.c Fri May 24 22:07:42 2002
-@@ -415,6 +415,7 @@
-     spec->rootURL = NULL;
-     spec->prep = NULL;
-     spec->build = NULL;
-+    spec->test = NULL;
-     spec->install = NULL;
-     spec->clean = NULL;
-@@ -460,6 +461,7 @@
-     freeStringBuf(spec->prep);        spec->prep = NULL;
-     freeStringBuf(spec->build);       spec->build = NULL;
-+    freeStringBuf(spec->test);        spec->test = NULL;
-     freeStringBuf(spec->install); spec->install = NULL;
-     freeStringBuf(spec->clean);       spec->clean = NULL;
---- rpm-4.0.2.new/macros.in~   Fri May 24 21:10:35 2002
-+++ rpm-4.0.2.new/macros.in    Fri May 24 22:11:11 2002
-@@ -408,6 +408,16 @@
- #%{__spec_autodep_post}\
- #%{nil}
-+%__spec_test_shell    %{___build_shell}
-+%__spec_test_args     %{___build_args}
-+%__spec_test_cmd      %{___build_cmd}
-+%__spec_test_pre      %{___build_pre}
-+%__spec_test_body     %{___build_body}
-+%__spec_test_post     %{___build_post}
-+%__spec_test_template #!%{__spec_test_shell}\
-+%{__spec_test_pre}\
-+%{nil}
-+
- %__spec_clean_shell   %{___build_shell}
- %__spec_clean_args    %{___build_args}
- %__spec_clean_cmd     %{___build_cmd}
---- rpm-4.0.2.new/build.c~     Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2.new/build.c      Fri May 24 22:02:03 2002
-@@ -235,7 +235,7 @@
-     
-     /* Parse the spec file */
- #define       _anyarch(_f)    \
--(((_f)&(RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)) == 0)
-+(((_f)&(RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_TEST|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)) == 0)
-     if (parseSpec(&spec, specURL, ba->rootdir, buildRootURL, 0, passPhrase,
-               cookie, _anyarch(buildAmount), ba->force)) {
-       rc = 1;
---- rpm-4.0.2/rpmpopt.in~      Fri May 24 21:16:31 2002
-+++ rpm-4.0.2/rpmpopt.in       Fri May 24 22:19:33 2002
-@@ -133,6 +133,7 @@
- rpm   exec --bl               rpmb -bl
- rpm   exec --ba               rpmb -ba
- rpm   exec --bb               rpmb -bb
-+rpm   exec --bt               rpmb -bt
- rpm   exec --bs               rpmb -bs
- rpm   exec --tp               rpmb -tp
- rpm   exec --tc               rpmb -tc
-@@ -140,6 +141,7 @@
- rpm   exec --tl               rpmb -tl
- rpm   exec --ta               rpmb -ta
- rpm   exec --tb               rpmb -tb
-+rpm   exec --tt               rpmb -tt
- rpm   exec --ts               rpmb -ts
- rpm   exec --rebuild          rpmb --rebuild
- rpm   exec --recompile        rpmb --recompile
diff --git a/rpm-segv.patch b/rpm-segv.patch
deleted file mode 100644 (file)
index 5b696c8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur rpm-4.0.1.orig/rpmio/macro.c rpm-4.0.1/rpmio/macro.c
---- rpm-4.0.1.orig/rpmio/macro.c       Fri Jan 19 02:47:25 2001
-+++ rpm-4.0.1/rpmio/macro.c    Tue Feb 13 13:11:08 2001
-@@ -801,7 +801,7 @@
-     /* Build argv array */
-     argv = (const char **) alloca((argc + 1) * sizeof(char *));
-     be[-1] = ' ';     /*  be - 1 == b + strlen(b) == buf + strlen(buf)  */
--    buf[0] = '\0';
-+    be[0] = '\0';
-     b = buf;
-     for (c = 0; c < argc; c++) {
-       argv[c] = b;
diff --git a/rpm-short_circuit.patch b/rpm-short_circuit.patch
deleted file mode 100644 (file)
index 5e5d729..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur rpm-4.0.2/rpmqv.c rpm-4.0.2-test/rpmqv.c
---- rpm-4.0.2/rpmqv.c  Mon Mar 12 19:20:29 2001
-+++ rpm-4.0.2-test/rpmqv.c     Fri May 24 20:46:26 2002
-@@ -1358,6 +1358,8 @@
-         case 'b':
-           ba->buildAmount |= RPMBUILD_PACKAGEBINARY;
-           ba->buildAmount |= RPMBUILD_CLEAN;
-+          if ((ba->buildChar == 'b') && ba->shortCircuit)
-+              break;
-           /*@fallthrough@*/
-         case 'i':
-           ba->buildAmount |= RPMBUILD_INSTALL;
diff --git a/rpm-signverify-fix.patch b/rpm-signverify-fix.patch
deleted file mode 100644 (file)
index ddbf63d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
---- rpm-4.0.2/lib/rpmchecksig.c        Wed Apr  3 15:13:56 2002
-+++ rpm-4.0.2/lib/rpmchecksig.c.mis    Wed Apr  3 15:21:54 2002
-@@ -330,7 +330,6 @@ int rpmCheckSig(rpmCheckSigFlags flags, 
-                     case RPMSIGTAG_PGP5:      /* XXX legacy */
-                     case RPMSIGTAG_PGP:
-                       switch (res3) {
--                      /* Do not consider these a failure */
-                       case RPMSIG_NOKEY:
-                       case RPMSIG_NOTTRUSTED:
-                       {   int offset = 7;
-@@ -349,6 +348,7 @@ int rpmCheckSig(rpmCheckSigFlags flags, 
-                               strncat(untrustedKeys, tempKey + offset, 8);
-                             }
-                           }
-+                            res2 = 1;
-                       }   break;
-                       default:
-                           strcat(buffer, "PGP ");
-@@ -365,6 +365,7 @@ int rpmCheckSig(rpmCheckSigFlags flags, 
-                           tempKey = strstr(result, "key ID");
-                           if (tempKey)
-                               strncat(missingKeys, tempKey+7, 8);
-+                            res2 = 1;                            
-                           break;
-                       default:
-                           strcat(buffer, "GPG ");
diff --git a/rpm-suggestions.patch b/rpm-suggestions.patch
deleted file mode 100644 (file)
index 2c2612a..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
---- ./lib/depends.c.org        Sun Mar 25 12:55:25 2001
-+++ ./lib/depends.c    Sun Mar 25 12:57:15 2001
-@@ -894,27 +894,22 @@
-       free((void *)conflicts[i].byRelease);
-       free((void *)conflicts[i].needsName);
-       free((void *)conflicts[i].needsVersion);
-+      if(conflicts[i].suggestedPackages) free(conflicts[i].suggestedPackages);
-     }
-     free(conflicts);
- }
--/**
-- * Check added package file lists for a file.
-- * @param al          available list
-- * @param keyType     type of dependency
-- * @param fileName    file name to search for
-- * @return            available package pointer
-- */
--/*@dependent@*/ /*@null@*/ static struct availablePackage *
--alFileSatisfiesDepend(struct availableList * al,
-+/*@dependent@*/ /*@null@*/ static struct availablePackage **
-+alAllFileSatisfiesDepend(struct availableList * al,
-       const char * keyType, const char * fileName)
- {
--    int i;
-+    int i, found;
-     const char * dirName;
-     const char * baseName;
-     struct dirInfo dirNeedle;
-     struct dirInfo * dirMatch;
-+    struct availablePackage **ret;
-     if (al->numDirs == 0)     /* Solaris 2.6 bsearch sucks down on this. */
-       return NULL;
-@@ -930,52 +925,80 @@
-     dirNeedle.dirNameLen = strlen(dirName);
-     dirMatch = bsearch(&dirNeedle, al->dirs, al->numDirs,
-                      sizeof(dirNeedle), dirInfoCompare);
--    free((void *)dirName);
--    if (!dirMatch) return NULL;
-+    if (!dirMatch){
-+          free((void *)dirName);
-+          return NULL;
-+    }
-+   
-+    /* rewind to the first match */
-+    while(dirMatch > al->dirs && dirInfoCompare(dirMatch-1,&dirNeedle)==0)
-+          dirMatch--;
-     baseName = strrchr(fileName, '/') + 1;
-+    for(found=0, ret=NULL; dirMatch <= al->dirs + al->numDirs && 
-+                  dirInfoCompare(dirMatch,&dirNeedle)==0;dirMatch++){
-     /* XXX FIXME: these file lists should be sorted and bsearched */
--    for (i = 0; i < dirMatch->numFiles; i++) {
--      if (!strcmp(dirMatch->files[i].baseName, baseName)) {
--
--          /* If a file dependency would be satisfied by a file
--             we are not going to install, skip it. */
--          if (al->list[dirMatch->files[i].pkgNum].multiLib &&
--              !isFileMULTILIB(dirMatch->files[i].fileFlags))
--              continue;
-+      for (i = 0; i < dirMatch->numFiles; i++) {
-+          if (!strcmp(dirMatch->files[i].baseName, baseName)) {
--          if (keyType)
--              rpmMessage(RPMMESS_DEBUG, _("%s: %-45s YES (added files)\n"),
--                          keyType, fileName);
--          return al->list + dirMatch->files[i].pkgNum;
--      }
-+              /* If a file dependency would be satisfied by a file
-+                 we are not going to install, skip it. */
-+              if (al->list[dirMatch->files[i].pkgNum].multiLib &&
-+                      !isFileMULTILIB(dirMatch->files[i].fileFlags))
-+                  continue;
-+
-+              if (keyType)
-+                 rpmMessage(RPMMESS_DEBUG, _("%s: %-45s YES (added files)\n"),
-+                      keyType, fileName);
-+              ret=realloc(ret,sizeof(struct aviablePackage* )*(found+2));
-+              ret[found++] = al->list + dirMatch->files[i].pkgNum;
-+              break ; /* next iteration of for(found=0....) loop */
-+              
-+          }
-+      }
-     }
--
--    return NULL;
-+    
-+    free((void *)dirName);
-+    if(ret)
-+          ret[found]=NULL;
-+    return ret;
- }
- /**
-- * Check added package file lists for a provide.
-+ * Check added package file lists for a file.
-  * @param al          available list
-  * @param keyType     type of dependency
-- * @param keyDepend   dependency string representation
-- * @param keyName     dependency name string
-- * @param keyEVR      dependency [epoch:]version[-release] string
-- * @param keyFlags    dependency logical range qualifiers
-+ * @param fileName    file name to search for
-  * @return            available package pointer
-  */
--/*@dependent@*/ /*@null@*/ static struct availablePackage * alSatisfiesDepend(
-+/*@dependent@*/ /*@null@*/ static struct availablePackage *
-+alFileSatisfiesDepend(struct availableList * al,
-+      const char * keyType, const char * fileName)
-+{
-+      struct availablePackage *ret, **tmp;
-+
-+      tmp = alAllFileSatisfiesDepend(al, keyType, fileName);
-+      if(tmp){
-+              ret = tmp[0];
-+              free( tmp);
-+              return ret;
-+      }
-+      return NULL;
-+}
-+
-+static struct availablePackage ** alAllSatisfiesDepend(
-       struct availableList * al,
-       const char * keyType, const char * keyDepend,
-       const char * keyName, const char * keyEVR, int keyFlags)
- {
-+
-     struct availableIndexEntry needle, * match;
--    struct availablePackage * p;
--    int i, rc;
-+    struct availablePackage * p, **ret=NULL;
-+    int i, rc, found;
-     if (*keyName == '/')
--      return alFileSatisfiesDepend(al, keyType, keyName);
-+      return alAllFileSatisfiesDepend(al, keyType, keyName);
-     if (!al->index.size) return NULL;
-@@ -985,37 +1008,76 @@
-                   sizeof(*al->index.index), indexcmp);
-     if (match == NULL) return NULL;
--
-+    
-+    /* rewind to the first match */
-+    while( match > al->index.index && indexcmp(match-1,&needle) == 0 )
-+          match--;
-+
-+    for(ret=NULL, found=0; match <= al->index.index + al->index.size &&
-+                  indexcmp(match,&needle) == 0;
-+                  match++){
-     p = match->package;
-     rc = 0;
-     switch (match->type) {
--    case IET_PROVIDES:
--      for (i = 0; i < p->providesCount; i++) {
--          const char *proEVR;
--          int proFlags;
--
--          /* Filter out provides that came along for the ride. */
--          if (strcmp(p->provides[i], keyName))
--              continue;
--
--          proEVR = (p->providesEVR ? p->providesEVR[i] : NULL);
--          proFlags = (p->provideFlags ? p->provideFlags[i] : 0);
--          rc = rpmRangesOverlap(p->provides[i], proEVR, proFlags,
--                      keyName, keyEVR, keyFlags);
--          if (rc) break;
-+      case IET_PROVIDES:
-+          for (i = 0; i < p->providesCount; i++) {
-+              const char *proEVR;
-+              int proFlags;
-+
-+              /* Filter out provides that came along for the ride. */
-+              if (strcmp(p->provides[i], keyName))
-+                  continue;
-+
-+              proEVR = (p->providesEVR ? p->providesEVR[i] : NULL);
-+              proFlags = (p->provideFlags ? p->provideFlags[i] : 0);
-+              rc = rpmRangesOverlap(p->provides[i], proEVR, proFlags,
-+                              keyName, keyEVR, keyFlags);
-+              if (rc) break;
-+              }
-+              if (keyType && keyDepend && rc)
-+              rpmMessage(RPMMESS_DEBUG, _("%s: %-45s YES (added provide)\n"),
-+                              keyType, keyDepend+2);
-+              break;
-+      }
-+
-+      if (rc){
-+              ret=realloc(ret,sizeof(struct aviablePackage *)*(found+2));
-+              ret[found++]=p;
-       }
--      if (keyType && keyDepend && rc)
--          rpmMessage(RPMMESS_DEBUG, _("%s: %-45s YES (added provide)\n"),
--                      keyType, keyDepend+2);
--      break;
-     }
-+    if(ret)
-+      ret[found]=NULL;
--    if (rc)
--      return p;
-+    return ret;
-+}
--    return NULL;
-+/**
-+ * Check added package file lists for a provide.
-+ * @param al          available list
-+ * @param keyType     type of dependency
-+ * @param keyDepend   dependency string representation
-+ * @param keyName     dependency name string
-+ * @param keyEVR      dependency [epoch:]version[-release] string
-+ * @param keyFlags    dependency logical range qualifiers
-+ * @return            available package pointer
-+ */
-+/*@dependent@*/ /*@null@*/ static struct availablePackage * alSatisfiesDepend(
-+      struct availableList * al,
-+      const char * keyType, const char * keyDepend,
-+      const char * keyName, const char * keyEVR, int keyFlags)
-+{
-+      struct availablePackage *ret, **tmp ;
-+      tmp=alAllSatisfiesDepend(al, keyType, keyDepend, keyName, keyEVR,
-+                      keyFlags);
-+      if(tmp){
-+              ret=tmp[0];
-+              free(tmp);
-+              return ret;
-+      }
-+      return NULL;
- }
-+
- /**
-  * Check key for an unsatisfied dependency.
-  * @param al          available list
-@@ -1024,13 +1086,13 @@
-  * @param keyName     dependency name string
-  * @param keyEVR      dependency [epoch:]version[-release] string
-  * @param keyFlags    dependency logical range qualifiers
-- * @retval suggestion possible package to resolve dependency
-+ * @retval suggestion possible packages to resolve dependency
-  * @return            0 if satisfied, 1 if not satisfied, 2 if error
-  */
- static int unsatisfiedDepend(rpmTransactionSet ts,
-       const char * keyType, const char * keyDepend,
-       const char * keyName, const char * keyEVR, int keyFlags,
--      /*@out@*/ struct availablePackage ** suggestion)
-+      /*@out@*/ struct availablePackage *** suggestion)
- {
-     static int _cacheDependsRC = 1;
-     rpmdbMatchIterator mi;
-@@ -1156,7 +1218,7 @@
-     }
-     if (suggestion)
--      *suggestion = alSatisfiesDepend(&ts->availablePackages, NULL, NULL,
-+      *suggestion = alAllSatisfiesDepend(&ts->availablePackages, NULL, NULL,
-                               keyName, keyEVR, keyFlags);
- unsatisfied:
-@@ -1204,7 +1266,7 @@
-     int type;
-     int i, rc;
-     int ourrc = 0;
--    struct availablePackage * suggestion;
-+    struct availablePackage ** suggestion;
-     headerNVR(h, &name, &version, &release);
-@@ -1256,10 +1318,23 @@
-           psp->problems[psp->num].needsFlags = requireFlags[i];
-           psp->problems[psp->num].sense = RPMDEP_SENSE_REQUIRES;
--          if (suggestion)
--              psp->problems[psp->num].suggestedPackage = suggestion->key;
--          else
--              psp->problems[psp->num].suggestedPackage = NULL;
-+          if (suggestion){
-+              int i;
-+              for(i=0;suggestion[i];i++)
-+                      ;
-+              psp->problems[psp->num].suggestedPackages =
-+                      malloc( sizeof(void *) * (i+1));
-+              for(i=0;suggestion[i];i++)
-+                  psp->problems[psp->num].suggestedPackages[i]
-+                                  = suggestion[i]->key;
-+              psp->problems[psp->num].suggestedPackages[i]=NULL;
-+                  
-+              psp->problems[psp->num].suggestedPackage  = suggestion[0]->key;
-+          }
-+          else{
-+              psp->problems[psp->num].suggestedPackages = NULL;
-+              psp->problems[psp->num].suggestedPackage  = NULL;
-+          }
-           psp->num++;
-           break;
-@@ -1322,7 +1397,9 @@
-           psp->problems[psp->num].needsVersion = xstrdup(conflictsEVR[i]);
-           psp->problems[psp->num].needsFlags = conflictFlags[i];
-           psp->problems[psp->num].sense = RPMDEP_SENSE_CONFLICTS;
--          psp->problems[psp->num].suggestedPackage = NULL;
-+          psp->problems[psp->num].suggestedPackages = NULL;
-+          psp->problems[psp->num].suggestedPackage  = NULL;
-+          
-           psp->num++;
-           break;
---- ./lib/rpmlib.h.org Sun Mar 25 12:55:35 2001
-+++ ./lib/rpmlib.h     Sun Mar 25 12:55:38 2001
-@@ -771,6 +771,8 @@
-     const char * needsVersion;
-     int needsFlags;
- /*@observer@*/ /*@null@*/ const void * suggestedPackage; /* NULL if none */
-+/*@observer@*/ /*@null@*/ const void ** suggestedPackages; /* terminated by
-+                                                              NULL */
-     enum {
-       RPMDEP_SENSE_REQUIRES,          /*!< requirement not satisfied. */
-       RPMDEP_SENSE_CONFLICTS          /*!< conflict was found. */
diff --git a/rpm-test_stage.patch b/rpm-test_stage.patch
deleted file mode 100644 (file)
index e3e7373..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-diff -ur rpm-4.0.2/build/build.c rpm-4.0.2-test/build/build.c
---- rpm-4.0.2/build/build.c    Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2-test/build/build.c       Fri May 24 20:46:26 2002
-@@ -81,6 +81,12 @@
-       mTemplate = "%{__spec_build_template}";
-       mPost = "%{__spec_build_post}";
-       break;
-+      case RPMBUILD_TEST:
-+      name = "%test";
-+      sb = spec->test;
-+      mTemplate = "%{__spec_build_template}";
-+      mPost = "%{__spec_build_post}";
-+      break;
-       case RPMBUILD_INSTALL:
-       name = "%install";
-       sb = spec->install;
-@@ -266,6 +272,10 @@
-           (rc = doScript(spec, RPMBUILD_BUILD, NULL, NULL, test)))
-               goto exit;
-+      if ((what & RPMBUILD_TEST) &&
-+          (rc = doScript(spec, RPMBUILD_TEST, NULL, NULL, test)))
-+              goto exit;
-+      
-       if ((what & RPMBUILD_INSTALL) &&
-           (rc = doScript(spec, RPMBUILD_INSTALL, NULL, NULL, test)))
-               goto exit;
-diff -ur rpm-4.0.2/build/parseBuildInstallClean.c rpm-4.0.2-test/build/parseBuildInstallClean.c
---- rpm-4.0.2/build/parseBuildInstallClean.c   Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2-test/build/parseBuildInstallClean.c      Fri May 24 20:46:26 2002
-@@ -22,6 +22,9 @@
-     } else if (parsePart == PART_CLEAN) {
-       sbp = &(spec->clean);
-       name = "%clean";
-+    } else if (parsePart == PART_TEST) {
-+      sbp = &(spec->test);
-+      name = "%test";
-     }
-     
-     if (*sbp != NULL) {
-diff -ur rpm-4.0.2/build/parsePreamble.c rpm-4.0.2-test/build/parsePreamble.c
---- rpm-4.0.2/build/parsePreamble.c    Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2-test/build/parsePreamble.c       Fri May 24 20:46:26 2002
-@@ -122,6 +122,7 @@
-     { "prep",         RPMSENSE_SCRIPT_PREP },
-     { "build",                RPMSENSE_SCRIPT_BUILD },
-     { "install",      RPMSENSE_SCRIPT_INSTALL },
-+    { "test",         RPMSENSE_SCRIPT_TEST },
-     { "clean",                RPMSENSE_SCRIPT_CLEAN },
-     { NULL, 0 }
- };
-diff -ur rpm-4.0.2/build/parseSpec.c rpm-4.0.2-test/build/parseSpec.c
---- rpm-4.0.2/build/parseSpec.c        Fri May 24 20:47:45 2002
-+++ rpm-4.0.2-test/build/parseSpec.c   Fri May 24 20:46:26 2002
-@@ -22,6 +22,7 @@
-     { PART_PREP,          0, "%prep"},
-     { PART_BUILD,         0, "%build"},
-     { PART_INSTALL,       0, "%install"},
-+    { PART_TEST,          0, "%test"},
-     { PART_CLEAN,         0, "%clean"},
-     { PART_PREUN,         0, "%preun"},
-     { PART_POSTUN,        0, "%postun"},
-@@ -427,6 +428,7 @@
-           break;
-         case PART_BUILD:
-         case PART_INSTALL:
-+        case PART_TEST:
-         case PART_CLEAN:
-           parsePart = parseBuildInstallClean(spec, parsePart);
-           break;
-diff -ur rpm-4.0.2/build/rpmbuild.h rpm-4.0.2-test/build/rpmbuild.h
---- rpm-4.0.2/build/rpmbuild.h Fri May 24 20:47:45 2002
-+++ rpm-4.0.2-test/build/rpmbuild.h    Fri May 24 20:46:26 2002
-@@ -21,15 +21,16 @@
- typedef enum rpmBuildFlags_e {
-     RPMBUILD_PREP     = (1 << 0),     /*!< Execute %%prep. */
-     RPMBUILD_BUILD    = (1 << 1),     /*!< Execute %%build. */
--    RPMBUILD_INSTALL  = (1 << 2),     /*!< Execute %%install. */
--    RPMBUILD_CLEAN    = (1 << 3),     /*!< Execute %%clean. */
--    RPMBUILD_FILECHECK        = (1 << 4),     /*!< Check %%files manifest. */
--    RPMBUILD_PACKAGESOURCE = (1 << 5),        /*!< Create source package. */
--    RPMBUILD_PACKAGEBINARY = (1 << 6),        /*!< Create binary package(s). */
--    RPMBUILD_RMSOURCE = (1 << 7),     /*!< Remove source(s) and patch(s). */
--    RPMBUILD_RMBUILD  = (1 << 8),     /*!< Remove build sub-tree. */
--    RPMBUILD_STRINGBUF        = (1 << 9),     /*!< only for doScript() */
--    RPMBUILD_RMSPEC   = (1 << 10)     /*!< Remove spec file. */
-+    RPMBUILD_TEST     = (1 << 2),     /*!< Execute %%test. */
-+    RPMBUILD_INSTALL  = (1 << 3),     /*!< Execute %%install. */
-+    RPMBUILD_CLEAN    = (1 << 4),     /*!< Execute %%clean. */
-+    RPMBUILD_FILECHECK        = (1 << 5),     /*!< Check %%files manifest. */
-+    RPMBUILD_PACKAGESOURCE = (1 << 6),        /*!< Create source package. */
-+    RPMBUILD_PACKAGEBINARY = (1 << 7),        /*!< Create binary package(s). */
-+    RPMBUILD_RMSOURCE = (1 << 8),     /*!< Remove source(s) and patch(s). */
-+    RPMBUILD_RMBUILD  = (1 << 9),     /*!< Remove build sub-tree. */
-+    RPMBUILD_STRINGBUF        = (1 << 10),    /*!< only for doScript() */
-+    RPMBUILD_RMSPEC   = (1 << 11)     /*!< Remove spec file. */
- } rpmBuildFlags;
- #include <ctype.h>
-@@ -49,21 +50,22 @@
-     PART_PREAMBLE     = 1,    /*!< */
-     PART_PREP         = 2,    /*!< */
-     PART_BUILD                = 3,    /*!< */
--    PART_INSTALL      = 4,    /*!< */
--    PART_CLEAN                = 5,    /*!< */
--    PART_FILES                = 6,    /*!< */
--    PART_PRE          = 7,    /*!< */
--    PART_POST         = 8,    /*!< */
--    PART_PREUN                = 9,    /*!< */
--    PART_POSTUN               = 10,   /*!< */
--    PART_DESCRIPTION  = 11,   /*!< */
--    PART_CHANGELOG    = 12,   /*!< */
--    PART_TRIGGERIN    = 13,   /*!< */
--    PART_TRIGGERUN    = 14,   /*!< */
--    PART_VERIFYSCRIPT = 15,   /*!< */
--    PART_BUILDARCHITECTURES= 16,/*!< */
--    PART_TRIGGERPOSTUN        = 17,   /*!< */
--    PART_LAST         = 18    /*!< */
-+    PART_TEST         = 4,    /*!< */
-+    PART_INSTALL      = 5,    /*!< */
-+    PART_CLEAN                = 6,    /*!< */
-+    PART_FILES                = 7,    /*!< */
-+    PART_PRE          = 8,    /*!< */
-+    PART_POST         = 9,    /*!< */
-+    PART_PREUN                = 10,   /*!< */
-+    PART_POSTUN       = 11,   /*!< */
-+    PART_DESCRIPTION  = 12,   /*!< */
-+    PART_CHANGELOG    = 13,   /*!< */
-+    PART_TRIGGERIN    = 14,   /*!< */
-+    PART_TRIGGERUN    = 15,   /*!< */
-+    PART_VERIFYSCRIPT = 16,   /*!< */
-+    PART_BUILDARCHITECTURES= 17,/*!< */
-+    PART_TRIGGERPOSTUN        = 18,   /*!< */
-+    PART_LAST         = 19    /*!< */
- } rpmParseState;
- #define STRIP_NOTHING             0
-diff -ur rpm-4.0.2/build/rpmspec.h rpm-4.0.2-test/build/rpmspec.h
---- rpm-4.0.2/build/rpmspec.h  Thu Jan 11 15:15:15 2001
-+++ rpm-4.0.2-test/build/rpmspec.h     Fri May 24 20:46:26 2002
-@@ -131,6 +131,7 @@
- /*@dependent@*/ struct MacroContext *macros;
- /*@only@*/ StringBuf prep;            /*!< %prep scriptlet. */
-+/*@only@*/ StringBuf test;            /*!< %test scriptlet. */
- /*@only@*/ StringBuf build;           /*!< %build scriptlet. */
- /*@only@*/ StringBuf install;         /*!< %install scriptlet. */
- /*@only@*/ StringBuf clean;           /*!< %clean scriptlet. */
-diff -ur rpm-4.0.2/lib/poptBT.c rpm-4.0.2-test/lib/poptBT.c
---- rpm-4.0.2/lib/poptBT.c     Wed Jan  3 20:29:11 2001
-+++ rpm-4.0.2-test/lib/poptBT.c        Fri May 24 20:46:26 2002
-@@ -35,6 +35,7 @@
- #define       POPT_BL                 0x626c
- #define       POPT_BP                 0x6270
- #define       POPT_BS                 0x6273
-+#define       POPT_BT                 0x6274
- #define       POPT_TA                 0x7461
- #define       POPT_TB                 0x7462
- #define       POPT_TC                 0x7463
-@@ -42,6 +43,7 @@
- #define       POPT_TL                 0x746c
- #define       POPT_TP                 0x7470
- #define       POPT_TS                 0x7473
-+#define       POPT_TT                 0x7474
- extern int _noDirTokens;
- static int force = 0;
-@@ -67,12 +69,14 @@
-     case POPT_BL:
-     case POPT_BP:
-     case POPT_BS:
-+    case POPT_BT:
-     case POPT_TA:
-     case POPT_TB:
-     case POPT_TC:
-     case POPT_TI:
-     case POPT_TL:
-     case POPT_TP:
-+    case POPT_TT:
-     case POPT_TS:
-       if (rba->buildMode == ' ') {
-           rba->buildMode = (opt->val >> 8) & 0xff;
-@@ -121,6 +125,9 @@
-  { "bc", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BC,
-       N_("build through %build (%prep, then compile) from <specfile>"),
-       N_("<specfile>") },
-+ { "bt", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BT,
-+      N_("build through %test (%prep, %build then test) from <specfile>"),
-+      N_("<specfile>") },
-  { "bi", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BI,
-       N_("build through %install (%prep, %build, then install) from <specfile>"),
-       N_("<specfile>") },
-@@ -143,6 +150,9 @@
-  { "tc", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_TC,
-       N_("build through %build (%prep, then compile) from <tarball>"),
-       N_("<tarball>") },
-+ { "tt", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BT,
-+      N_("build through %test (%prep, %build then test) from <tarball>"),
-+      N_("<tarball>") },
-  { "ti", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_TI,
-       N_("build through %install (%prep, %build, then install) from <tarball>"),
-       N_("<tarball>") },
-diff -ur rpm-4.0.2/lib/rpmlib.h rpm-4.0.2-test/lib/rpmlib.h
---- rpm-4.0.2/lib/rpmlib.h     Fri May 24 20:47:45 2002
-+++ rpm-4.0.2-test/lib/rpmlib.h        Fri May 24 20:46:26 2002
-@@ -356,10 +356,11 @@
-     RPMSENSE_MULTILIB = (1 << 19),
-     RPMSENSE_SCRIPT_PREP = (1 << 20), /*!< %prep build dependency. */
-     RPMSENSE_SCRIPT_BUILD = (1 << 21),        /*!< %build build dependency. */
--    RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */
--    RPMSENSE_SCRIPT_CLEAN = (1 << 23),        /*!< %clean build dependency. */
--    RPMSENSE_RPMLIB   = ((1 << 24) | RPMSENSE_PREREQ), /*!< rpmlib(feature) dependency. */
--    RPMSENSE_TRIGGERPREIN = (1 << 25) /*!< @todo Implement %triggerprein. */
-+    RPMSENSE_SCRIPT_TEST = (1 << 22), /*!< %test build dependency. */
-+    RPMSENSE_SCRIPT_INSTALL = (1 << 23),/*!< %install build dependency. */
-+    RPMSENSE_SCRIPT_CLEAN = (1 << 24),        /*!< %clean build dependency. */
-+    RPMSENSE_RPMLIB   = ((1 << 25) | RPMSENSE_PREREQ), /*!< rpmlib(feature) dependency. */
-+    RPMSENSE_TRIGGERPREIN = (1 << 26) /*!< @todo Implement %triggerprein. */
- } rpmsenseFlags;
-@@ -381,6 +382,7 @@
-     RPMSENSE_FIND_REQUIRES | \
-     RPMSENSE_SCRIPT_PREP | \
-     RPMSENSE_SCRIPT_BUILD | \
-+    RPMSENSE_SCRIPT_TEST | \
-     RPMSENSE_SCRIPT_INSTALL | \
-     RPMSENSE_SCRIPT_CLEAN | \
-     RPMSENSE_RPMLIB )
-diff -ur rpm-4.0.2/rpmqv.c rpm-4.0.2-test/rpmqv.c
---- rpm-4.0.2/rpmqv.c  Mon Mar 12 19:20:29 2001
-+++ rpm-4.0.2-test/rpmqv.c     Fri May 24 20:46:26 2002
-@@ -1316,7 +1316,7 @@
-       if (!poptPeekArg(optCon))
-           argerror(_("no packages files given for rebuild"));
--      ba->buildAmount = RPMBUILD_PREP | RPMBUILD_BUILD | RPMBUILD_INSTALL;
-+      ba->buildAmount = RPMBUILD_PREP | RPMBUILD_BUILD | RPMBUILD_TEST | RPMBUILD_INSTALL;
-       if (bigMode == MODE_REBUILD) {
-           ba->buildAmount |= RPMBUILD_PACKAGEBINARY;
-           ba->buildAmount |= RPMBUILD_RMSOURCE;
-@@ -1358,6 +1358,11 @@
-           if ((ba->buildChar == 'i') && ba->shortCircuit)
-               break;
-           /*@fallthrough@*/
-+        case 't':
-+          ba->buildAmount |= RPMBUILD_TEST;
-+          if ((ba->buildChar == 't') && ba->shortCircuit)
-+              break;
-+          /*@fallthrough@*/
-         case 'c':
-           ba->buildAmount |= RPMBUILD_BUILD;
-           if ((ba->buildChar == 'c') && ba->shortCircuit)
---- rpm-4.0.2.new/build/spec.c~        Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2.new/build/spec.c Fri May 24 22:07:42 2002
-@@ -415,6 +415,7 @@
-     spec->rootURL = NULL;
-     spec->prep = NULL;
-     spec->build = NULL;
-+    spec->test = NULL;
-     spec->install = NULL;
-     spec->clean = NULL;
-@@ -460,6 +461,7 @@
-     freeStringBuf(spec->prep);        spec->prep = NULL;
-     freeStringBuf(spec->build);       spec->build = NULL;
-+    freeStringBuf(spec->test);        spec->test = NULL;
-     freeStringBuf(spec->install); spec->install = NULL;
-     freeStringBuf(spec->clean);       spec->clean = NULL;
---- rpm-4.0.2.new/macros.in~   Fri May 24 21:10:35 2002
-+++ rpm-4.0.2.new/macros.in    Fri May 24 22:11:11 2002
-@@ -408,6 +408,16 @@
- #%{__spec_autodep_post}\
- #%{nil}
-+%__spec_test_shell    %{___build_shell}
-+%__spec_test_args     %{___build_args}
-+%__spec_test_cmd      %{___build_cmd}
-+%__spec_test_pre      %{___build_pre}
-+%__spec_test_body     %{___build_body}
-+%__spec_test_post     %{___build_post}
-+%__spec_test_template #!%{__spec_test_shell}\
-+%{__spec_test_pre}\
-+%{nil}
-+
- %__spec_clean_shell   %{___build_shell}
- %__spec_clean_args    %{___build_args}
- %__spec_clean_cmd     %{___build_cmd}
---- rpm-4.0.2.new/build.c~     Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2.new/build.c      Fri May 24 22:02:03 2002
-@@ -235,7 +235,7 @@
-     
-     /* Parse the spec file */
- #define       _anyarch(_f)    \
--(((_f)&(RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)) == 0)
-+(((_f)&(RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_TEST|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)) == 0)
-     if (parseSpec(&spec, specURL, ba->rootdir, buildRootURL, 0, passPhrase,
-               cookie, _anyarch(buildAmount), ba->force)) {
-       rc = 1;
---- rpm-4.0.2/rpmpopt.in~      Fri May 24 21:16:31 2002
-+++ rpm-4.0.2/rpmpopt.in       Fri May 24 22:19:33 2002
-@@ -133,6 +133,7 @@
- rpm   exec --bl               rpmb -bl
- rpm   exec --ba               rpmb -ba
- rpm   exec --bb               rpmb -bb
-+rpm   exec --bt               rpmb -bt
- rpm   exec --bs               rpmb -bs
- rpm   exec --tp               rpmb -tp
- rpm   exec --tc               rpmb -tc
-@@ -140,6 +141,7 @@
- rpm   exec --tl               rpmb -tl
- rpm   exec --ta               rpmb -ta
- rpm   exec --tb               rpmb -tb
-+rpm   exec --tt               rpmb -tt
- rpm   exec --ts               rpmb -ts
- rpm   exec --rebuild          rpmb --rebuild
- rpm   exec --recompile        rpmb --recompile
This page took 0.315541 seconds and 4 git commands to generate.