RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ depends.c poptALL.c rpmds.c rpmrc.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Fri 22 Aug 2008 - 06:43:09 CEST
Message-Id: <20080822044309.E58BB74DB7@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   22-Aug-2008 06:43:09
  Branch: HEAD                             Handle: 2008082204430900

  Modified files:
    rpm                     CHANGES
    rpm/lib                 depends.c poptALL.c rpmds.c rpmrc.c

  Log:
    - WR: fix: cleanup patch integration thinkos.

  Summary:
    Revision    Changes     Path
    1.2536      +1  -0      rpm/CHANGES
    1.416       +14 -6      rpm/lib/depends.c
    2.98        +6  -2      rpm/lib/poptALL.c
    2.102       +5  -0      rpm/lib/rpmds.c
    2.246       +6  -1      rpm/lib/rpmrc.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2535 -r1.2536 CHANGES
  --- rpm/CHANGES	22 Aug 2008 04:39:01 -0000	1.2535
  +++ rpm/CHANGES	22 Aug 2008 04:43:09 -0000	1.2536
  @@ -1,5 +1,6 @@
   
   5.1.0 -> 5.2a0:
  +    - jbj: WR: fix: cleanup patch integration thinkos.
       - jbj: WR: mark wrs-rpm-enable-macro-validation.patch (but leave disabled).
       - jbj: WR: fix: add rt-reloc-wrapper.sh to EXTRAS_DIST.
       - jbj: rescusitate w make distcheck.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  ============================================================================
  $ cvs diff -u -r1.415 -r1.416 depends.c
  --- rpm/lib/depends.c	17 Aug 2008 16:16:31 -0000	1.415
  +++ rpm/lib/depends.c	22 Aug 2008 04:43:09 -0000	1.416
  @@ -255,17 +255,25 @@
   	 * we do have a special case to allow upgrades of noarch w/ a arch package
   	 */
   	if (tscolor && (!hcolor || !ohcolor)) {
  +	    const char * arch;
  +	    const char * oharch;
  +	    he->tag = RPMTAG_ARCH;
  +	    xx = headerGet(h, he, 0);
  +	    arch = (xx && he->p.str != NULL ? he->p.str : NULL)
   	    he->tag = RPMTAG_ARCH;
   	    xx = headerGet(oh, he, 0);
  -	    if (arch != NULL && he->p.str != NULL) {
  -	        if (strcmp("noarch", arch) || strcmp("noarch", he->p.str)) {
  -		    if (!_isCompatibleArch(arch, he->p.str)) {
  -			he->p.ptr = _free(he->p.ptr);
  +	    oharch = (xx && he->p.str != NULL ? he->p.str : NULL)
  +	    if (arch != NULL && oharch != NULL) {
  +	        if (strcmp("noarch", arch) || strcmp("noarch", oharch)) {
  +		    if (!_isCompatibleArch(arch, oharch)) {
  +			arch = _free(arch);
  +			oharch = _free(oharch);
   			continue;
   		    }
   		}
   	    }
  -	    he->p.ptr = _free(he->p.ptr);
  +	    arch = _free(arch);
  +	    oharch = _free(oharch);
   	}
   #endif
   
  @@ -521,7 +529,7 @@
   	    break;
   	t = strndup(p, (pe - p));
   	p = pe; /* Advance to next chunk */
  -rpmMessage(RPMMESS_DEBUG, _("   Comparing compat archs %s ? %s\n"), arch, t);
  +rpmlog(RPMLOG_DEBUG, D_("   Comparing compat archs %s ? %s\n"), arch, t);
   	if (!strcmp(arch, t))
   	    match = 1;
   	t = _free(t);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/poptALL.c
  ============================================================================
  $ cvs diff -u -r2.97 -r2.98 poptALL.c
  --- rpm/lib/poptALL.c	17 Aug 2008 20:43:58 -0000	2.97
  +++ rpm/lib/poptALL.c	22 Aug 2008 04:43:09 -0000	2.98
  @@ -496,7 +496,9 @@
   
       __usrlibrpm = getenv("RPM_USRLIBRPM");
       __etcrpm = getenv("RPM_ETCRPM");
  +#if defined(ENABLE_NLS) && !defined(__LCLINT__)
       __localedir = getenv("RPM_LOCALEDIR");
  +#endif
   
       if ( __usrlibrpm == NULL ) {
   	__usrlibrpm = USRLIBRPM ;
  @@ -508,10 +510,12 @@
   	setenv("RPM_ETCRPM", SYSCONFIGDIR, 0);
       }
   
  +#if defined(ENABLE_NLS) && !defined(__LCLINT__)
       if ( __localedir == NULL ) {
   	__localedir = LOCALEDIR ;
   	setenv("RPM_LOCALEDIR", LOCALEDIR, 0);
       }
  +#endif
   }
   #endif
   
  @@ -624,7 +628,7 @@
       path_buf = _free(path_buf);
   
   #if defined(RPM_VENDOR_WINDRIVER)
  -    {	char * poptAliasFn = rpmGetPath(__usrlibrpm, "/", VERSION, "/rpmpopt", NULL);
  +    {	const char * poptAliasFn = rpmGetPath(__usrlibrpm, "/", VERSION, "/rpmpopt", NULL);
   	(void) poptReadConfigFile(optCon, poptAliasFn);
   	poptAliasFn = _free(poptAliasFn);
       }
  @@ -634,7 +638,7 @@
       (void) poptReadDefaultConfig(optCon, 1);
   
   #if defined(RPM_VENDOR_WINDRIVER)
  -    {	char * poptExecPath = rpmGetPath(__usrlibrpm, "/", VERSION, NULL);
  +    {	const char * poptExecPath = rpmGetPath(__usrlibrpm, "/", VERSION, NULL);
   	poptSetExecPath(optCon, poptExecPath, 1);
   	poptExecPath = _free(poptExecPath);
       }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmds.c
  ============================================================================
  $ cvs diff -u -r2.101 -r2.102 rpmds.c
  --- rpm/lib/rpmds.c	3 Aug 2008 19:59:09 -0000	2.101
  +++ rpm/lib/rpmds.c	22 Aug 2008 04:43:09 -0000	2.102
  @@ -1594,7 +1594,12 @@
       return rc;
   }
   
  +#if defined(RPM_VENDOR_WINDRIVER)
  +#define	_ETC_RPM_SYSINFO	"%{_etcrpm}/sysinfo"
  +#else
   #define	_ETC_RPM_SYSINFO	SYSCONFIGDIR "/sysinfo"
  +#endif
  +
   /*@unchecked@*/ /*@observer@*/ /*@owned@*/ /*@relnull@*/
   const char *_sysinfo_path = NULL;
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmrc.c
  ============================================================================
  $ cvs diff -u -r2.245 -r2.246 rpmrc.c
  --- rpm/lib/rpmrc.c	19 Aug 2008 14:46:28 -0000	2.245
  +++ rpm/lib/rpmrc.c	22 Aug 2008 04:43:09 -0000	2.246
  @@ -296,6 +296,11 @@
   export RPM_BUILD_ROOT\n}\
   ";
   
  +/*@unchecked@*/
  +extern const char * __usrlibrpm;
  +/*@unchecked@*/
  +extern const char * __etcrpm;
  +
   static void setDefaults(void)
   	/*@globals rpmGlobalMacroContext, internalState @*/
   	/*@modifies rpmGlobalMacroContext, internalState @*/
  @@ -304,7 +309,7 @@
   #if defined(RPM_VENDOR_WINDRIVER)
       addMacro(NULL, "_usrlibrpm", NULL, __usrlibrpm, RMIL_DEFAULT);
       addMacro(NULL, "_etcrpm", NULL, __etcrpm, RMIL_DEFAULT);
  -    addMacro(NULL, "_vendor", NULL, "%{?_host_vendor}%{!?_host_vendor:" RPMCANONVENDOR "}", RMIL_DEFAULT);
  +    addMacro(NULL, "_vendor", NULL, "%{?_host_vendor}%{!?_host_vendor:wrs}", RMIL_DEFAULT);
   #endif
   
       addMacro(NULL, "_usr", NULL, USRPREFIX, RMIL_DEFAULT);
  @@ .
Received on Fri Aug 22 06:43:09 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.