RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Ralf S. Engelschall
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   24-Jul-2007 16:36:47
  Branch: HEAD                             Handle: 2007072415364601

  Modified files:
    rpm                     CHANGES build.c rpmpopt.in
    rpm/build               poptBT.c spec.c
    rpm/lib                 poptALL.c poptI.c poptQV.c rpmcli.h

  Log:
    re-implement --force option (on installation) with a simple POPT alias
    instead of twisted and spreaded code.

  Summary:
    Revision    Changes     Path
    1.1517      +1  -0      rpm/CHANGES
    2.106       +1  -1      rpm/build.c
    2.15        +0  -4      rpm/build/poptBT.c
    2.151       +1  -2      rpm/build/spec.c
    2.38        +0  -2      rpm/lib/poptALL.c
    2.36        +0  -8      rpm/lib/poptI.c
    2.42        +0  -10     rpm/lib/poptQV.c
    2.69        +1  -3      rpm/lib/rpmcli.h
    2.45        +5  -1      rpm/rpmpopt.in
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1516 -r1.1517 CHANGES
  --- rpm/CHANGES       24 Jul 2007 08:53:00 -0000      1.1516
  +++ rpm/CHANGES       24 Jul 2007 14:36:46 -0000      1.1517
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - rse: re-implement --force option (on installation) with a simple POPT 
alias instead of twisted and spreaded code
       - rse: for libraries prefer "pkg-config foo" before "foo-config" as 
pkg-config(1) provides more precise CPPFLAGS/CFLAGS
       - rse: unbreak rpm(1) short-hand option "--force" on package installation
       - rse: use implicit internal library dependencies by default, but allow 
disabling via --disable-build-intlibdep
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build.c
  ============================================================================
  $ cvs diff -u -r2.105 -r2.106 build.c
  --- rpm/build.c       16 Jul 2007 01:32:25 -0000      2.105
  +++ rpm/build.c       24 Jul 2007 14:36:46 -0000      2.106
  @@ -255,7 +255,7 @@
   #define      _anyarch(_f)    \
   
(((_f)&(RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)) 
== 0)
       if (parseSpec(ts, specURL, ba->rootdir, 0, passPhrase,
  -             cookie, _anyarch(buildAmount), ba->force, verify))
  +             cookie, _anyarch(buildAmount), 0, verify))
       {
        rc = 1;
        goto exit;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/poptBT.c
  ============================================================================
  $ cvs diff -u -r2.14 -r2.15 poptBT.c
  --- rpm/build/poptBT.c        24 Jul 2007 10:40:50 -0000      2.14
  +++ rpm/build/poptBT.c        24 Jul 2007 14:36:47 -0000      2.15
  @@ -118,10 +118,6 @@
        rba->noDeps = 1;
        break;
   
  -    case RPMCLI_POPT_FORCE:
  -     rba->force = 1;
  -     break;
  -
       }
   }
   /[EMAIL PROTECTED]@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/spec.c
  ============================================================================
  $ cvs diff -u -r2.150 -r2.151 spec.c
  --- rpm/build/spec.c  16 Jul 2007 21:40:34 -0000      2.150
  +++ rpm/build/spec.c  24 Jul 2007 14:36:47 -0000      2.151
  @@ -754,14 +754,13 @@
       char * passPhrase = "";
       int recursing = 0;
       char *cookie = NULL;
  -    int force = 1;
       int verify = 0;
       int xx;
   
   /[EMAIL PROTECTED]@*/
       /[EMAIL PROTECTED]@*/ /* FIX: make spec abstract */
       if (parseSpec(ts, specName, "/", recursing, passPhrase,
  -             cookie, anyarch, force, verify)
  +             cookie, anyarch, 1, verify)
         || (spec = rpmtsSetSpec(ts, NULL)) == NULL)
       {
        rpmError(RPMERR_QUERY,
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/poptALL.c
  ============================================================================
  $ cvs diff -u -r2.37 -r2.38 poptALL.c
  --- rpm/lib/poptALL.c 23 Jul 2007 18:54:53 -0000      2.37
  +++ rpm/lib/poptALL.c 24 Jul 2007 14:36:47 -0000      2.38
  @@ -345,8 +345,6 @@
   
    { "debug", 'd', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_debug, -1,
           NULL, NULL },
  - { "force", '\0', 0, NULL, RPMCLI_POPT_FORCE,
  -     N_("force operation (short hand for --replacepkgs --replacefiles on 
installation and ignores ExcludeArch: directives on building"), NULL},
   
   #if defined(POPT_ARGFLAG_RANDOM)
    { "rsegfault", '\0', 
POPT_ARG_INT|POPT_ARGFLAG_RANDOM|POPT_ARGFLAG_DOC_HIDDEN,
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/poptI.c
  ============================================================================
  $ cvs diff -u -r2.35 -r2.36 poptI.c
  --- rpm/lib/poptI.c   23 Jul 2007 18:54:53 -0000      2.35
  +++ rpm/lib/poptI.c   24 Jul 2007 14:36:47 -0000      2.36
  @@ -190,14 +190,6 @@
        ia->transFlags |= RPMTRANS_FLAG_NOCONTEXTS;
        break;
   
  -    case RPMCLI_POPT_FORCE:
  -     ia->probFilter |=
  -             ( RPMPROB_FILTER_REPLACEPKG
  -             | RPMPROB_FILTER_REPLACEOLDFILES
  -             | RPMPROB_FILTER_REPLACENEWFILES
  -             | RPMPROB_FILTER_OLDPACKAGE );
  -     break;
  -
       case RPMCLI_POPT_NOSCRIPTS:
        ia->transFlags |= (_noTransScripts | _noTransTriggers);
        break;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/poptQV.c
  ============================================================================
  $ cvs diff -u -r2.41 -r2.42 poptQV.c
  --- rpm/lib/poptQV.c  23 Jul 2007 18:54:53 -0000      2.41
  +++ rpm/lib/poptQV.c  24 Jul 2007 14:36:47 -0000      2.42
  @@ -245,16 +245,6 @@
        qva->qva_flags |= VERIFY_CONTEXTS;
        break;
   
  -#ifdef       NOTYET
  -    case RPMCLI_POPT_FORCE:
  -     ia->probFilter |=
  -             ( RPMPROB_FILTER_REPLACEPKG
  -             | RPMPROB_FILTER_REPLACEOLDFILES
  -             | RPMPROB_FILTER_REPLACENEWFILES
  -             | RPMPROB_FILTER_OLDPACKAGE );
  -     break;
  -#endif
  -
       case RPMCLI_POPT_NOSCRIPTS:
        qva->qva_flags |= VERIFY_SCRIPT;
        break;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmcli.h
  ============================================================================
  $ cvs diff -u -r2.68 -r2.69 rpmcli.h
  --- rpm/lib/rpmcli.h  6 Jul 2007 18:45:53 -0000       2.68
  +++ rpm/lib/rpmcli.h  24 Jul 2007 14:36:47 -0000      2.69
  @@ -92,8 +92,7 @@
   /**
    * Common/global popt tokens used for command line option tables.
    */
  -#define      RPMCLI_POPT_NODEPS              -1025
  -#define      RPMCLI_POPT_FORCE               -1026
  +#define      RPMCLI_POPT_NODEPS              -1026
   #define      RPMCLI_POPT_NOFDIGESTS          -1027
   #define      RPMCLI_POPT_NOSCRIPTS           -1028
   #define      RPMCLI_POPT_NOSIGNATURE         -1029
  @@ -812,7 +811,6 @@
       const char * passPhrase; /*!< Pass phrase. */
   /[EMAIL PROTECTED]@*/ /[EMAIL PROTECTED]@*/
       const char * cookie;     /*!< NULL for binary, ??? for source, rpm's */
  -    int force;                       /*!< from --force */
       int noBuild;             /*!< from --nobuild */
       int noDeps;                      /*!< from --nodeps */
       int noLang;                      /*!< from --nolang */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmpopt.in
  ============================================================================
  $ cvs diff -u -r2.44 -r2.45 rpmpopt.in
  --- rpm/rpmpopt.in    2 Jul 2007 17:15:02 -0000       2.44
  +++ rpm/rpmpopt.in    24 Jul 2007 14:36:46 -0000      2.45
  @@ -2,7 +2,7 @@
   # \verbatim
   #
   # @USRLIBRPM@/@configure_input@
  -# $Id: rpmpopt.in,v 2.44 2007/07/02 17:15:02 fray Exp $
  +# $Id: rpmpopt.in,v 2.45 2007/07/24 14:36:46 rse Exp $
   #
   # This file *should not be modified*. Local customizations
   # belong in /etc/popt, not here. This file will be replaced
  @@ -168,6 +168,10 @@
        --POPTdesc=$"set buildroot <policy> (e.g. compress man pages)" \
        --POPTargs=$"<policy>"
   
  +# Short-hand option
  +rpm alias --force --replacepkgs --replacefiles --oldpackage \
  +     --POPTdesc=$"force operation (short hand for --replacepkgs 
--replacefiles --oldpackage on installation)"
  +
   # Choose db interface:
   #    0       same as 1
   #    1       native db1 interface (e.g. linux glibc libdb1 routines).
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to