RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/build/ pack.c rpm/rpmdb/ rpmtag.h

From: Jeff Johnson <jbj@rpm5.org>
Date: Thu 06 Dec 2007 - 21:49:17 CET
Message-Id: <20071206204917.2AC51348477@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:   06-Dec-2007 21:49:17
  Branch: HEAD                             Handle: 2007120620491601

  Modified files:
    rpm                     CHANGES
    rpm/build               pack.c
    rpm/rpmdb               rpmtag.h

  Log:
    - jbj: populate RPMTAG_BUILDMACROS. implementation took 6+ years ...

  Summary:
    Revision    Changes     Path
    1.1951      +1  -0      rpm/CHANGES
    2.269       +14 -0      rpm/build/pack.c
    1.31        +5  -5      rpm/rpmdb/rpmtag.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1950 -r1.1951 CHANGES
  --- rpm/CHANGES	6 Dec 2007 20:19:09 -0000	1.1950
  +++ rpm/CHANGES	6 Dec 2007 20:49:16 -0000	1.1951
  @@ -1,4 +1,5 @@
   5.0a4 -> 5.0b1:
  +    - jbj: populate RPMTAG_BUILDMACROS. implementation took 6+ years ...
       - jbj: add %sanitycheck scriptlet to packages. more wiring needed todo++.
       - jbj: add %track section/scriptlet. Hmmm, not in *.rpm content yet, todo++.
       - jbj: add RPMTAG_CLASS as one more spec file tag. arbitrary tag next ...
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/pack.c
  ============================================================================
  $ cvs diff -u -r2.268 -r2.269 pack.c
  --- rpm/build/pack.c	6 Dec 2007 20:19:09 -0000	2.268
  +++ rpm/build/pack.c	6 Dec 2007 20:49:16 -0000	2.269
  @@ -1118,6 +1118,7 @@
   /*@-boundswrite@*/
   int packageSources(Spec spec)
   {
  +    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
       struct cpioSourceArchive_s csabuf;
       CSA_t csa = &csabuf;
       int rc;
  @@ -1127,6 +1128,19 @@
   	
       (void) genSourceRpmName(spec);
   
  +    {	const char ** av = NULL;
  +	int xx;
  +	(void)rpmGetMacroEntries(NULL, NULL, 1, &av);
  +	if (av != NULL && av[0] != NULL) {
  +	    he->tag = RPMTAG_BUILDMACROS;
  +	    he->t = RPM_STRING_ARRAY_TYPE;
  +	    he->p.argv = av;
  +	    he->c = argvCount(av);
  +	    xx = headerPut(spec->sourceHeader, he, 0);
  +	}
  +	av = argvFree(av);
  +    }
  +
       spec->cookie = _free(spec->cookie);
       
       /* XXX this should be %_srpmdir */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmtag.h
  ============================================================================
  $ cvs diff -u -r1.30 -r1.31 rpmtag.h
  --- rpm/rpmdb/rpmtag.h	6 Dec 2007 20:19:10 -0000	1.30
  +++ rpm/rpmdb/rpmtag.h	6 Dec 2007 20:49:17 -0000	1.31
  @@ -307,7 +307,7 @@
       RPMTAG_BUILDREQUIRES	= 1109, /* internal */
       RPMTAG_BUILDCONFLICTS	= 1110, /* internal */
   /*@-enummemuse@*/
  -    RPMTAG_BUILDMACROS		= 1111, /* internal - unused */
  +    RPMTAG_BUILDMACROS		= 1111, /* s[] srpms only */
   /*@=enummemuse@*/
       RPMTAG_PROVIDEFLAGS		= 1112,	/* i[] */
       RPMTAG_PROVIDEVERSION	= 1113,	/* s[] */
  @@ -335,10 +335,10 @@
       RPMTAG_PATCHESNAME		= 1133, /* s[] deprecated placeholder (SuSE) */
       RPMTAG_PATCHESFLAGS		= 1134, /* i[] deprecated placeholder (SuSE) */
       RPMTAG_PATCHESVERSION	= 1135, /* s[] deprecated placeholder (SuSE) */
  -    RPMTAG_CACHECTIME		= 1136,	/* i */
  -    RPMTAG_CACHEPKGPATH		= 1137,	/* s */
  -    RPMTAG_CACHEPKGSIZE		= 1138,	/* i */
  -    RPMTAG_CACHEPKGMTIME	= 1139,	/* i */
  +    RPMTAG_CACHECTIME		= 1136,	/* i rpmcache(8) only */
  +    RPMTAG_CACHEPKGPATH		= 1137,	/* s rpmcache(8) only */
  +    RPMTAG_CACHEPKGSIZE		= 1138,	/* i rpmcache(8) only */
  +    RPMTAG_CACHEPKGMTIME	= 1139,	/* i rpmcache(8) only */
       RPMTAG_FILECOLORS		= 1140,	/* i[] */
       RPMTAG_FILECLASS		= 1141,	/* i[] */
       RPMTAG_CLASSDICT		= 1142,	/* s[] */
  @@ .
Received on Thu Dec 6 21:49:17 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.