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

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   13-Oct-2010 20:13:47
  Branch: HEAD                             Handle: 2010101318134600

  Modified files:
    rpm                     CHANGES
    rpm/rpmdb               hdrfmt.c

  Log:
    - spewage: use RPMTAG_SHA1HEADER as the primary retrieval key.

  Summary:
    Revision    Changes     Path
    1.3467      +1  -0      rpm/CHANGES
    1.150       +13 -3      rpm/rpmdb/hdrfmt.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.3466 -r1.3467 CHANGES
  --- rpm/CHANGES       13 Oct 2010 00:58:17 -0000      1.3466
  +++ rpm/CHANGES       13 Oct 2010 18:13:46 -0000      1.3467
  @@ -1,4 +1,5 @@
   5.3.4 -> 5.4a1:
  +    - jbj: spewage: use RPMTAG_SHA1HEADER as the primary retrieval key.
       - jbj: rpmpopt: fix: permit popt aliases to be used w "make check".
       - jbj: pgp: add a 2nd parameter to pgpDigNew to generate a keypair.
       - jbj: rpmbc: refactor rpmbcExport{Pubkey,Signature} out of rpmbuild 
code.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/hdrfmt.c
  ============================================================================
  $ cvs diff -u -r1.149 -r1.150 hdrfmt.c
  --- rpm/rpmdb/hdrfmt.c        11 Oct 2010 18:39:36 -0000      1.149
  +++ rpm/rpmdb/hdrfmt.c        13 Oct 2010 18:13:46 -0000      1.150
  @@ -3495,11 +3495,13 @@
       return val;
   }
   
  +#ifndef      DYING   /* XXX is :json gud enuf? there are side effects ... */
   static /*...@only@*/ char * jsonescapeFormat(HE_t he, /*...@null@*/ const 
char ** av)
        /*...@*/
   {
       return spewescapeFormat(he, av, &_json_spew, 0);
   }
  +#endif
   
   static /*...@only@*/ char * sqlescapeFormat(HE_t he, /*...@null@*/ const 
char ** av)
        /*...@*/
  @@ -5093,8 +5095,10 @@
        { .fmtFunction = iconvFormat } },
       { HEADER_EXT_FORMAT, "json",
        { .fmtFunction = jsonFormat } },
  +#ifndef      DYING   /* XXX is :json gud enuf? there are side effects ... */
       { HEADER_EXT_FORMAT, "jsonescape",
        { .fmtFunction = jsonescapeFormat } },
  +#endif
       { HEADER_EXT_FORMAT, "perms",
        { .fmtFunction = permsFormat } },
       { HEADER_EXT_FORMAT, "permissions",      
  @@ -6422,8 +6426,9 @@
                spew = &_json_spew;
   
            if (spew == &_xml_spew) {
  +assert(tag->tagno != NULL);
                /* XXX display "Tag_0x01234567" for arbitrary tags. */
  -             if (tag->tagno != NULL && tag->tagno[0] & 0x40000000) {
  +             if (tag->tagno[0] & 0x40000000) {
                    tagN = myTagName(hsa->tags, tag->tagno[0], NULL);
                } else
                    tagN = myTagName(hsa->tags, tag->tagno[0], NULL);
  @@ -6433,8 +6438,9 @@
                hsa->vallen += (te - t);
            }
            if (spew == &_yaml_spew) {
  +assert(tag->tagno != NULL);
                /* XXX display "Tag_0x01234567" for arbitrary tags. */
  -             if (tag->tagno != NULL && tag->tagno[0] & 0x40000000) {
  +             if (tag->tagno[0] & 0x40000000) {
                    tagN = myTagName(hsa->tags, tag->tagno[0], NULL);
                    tagT = numElements > 1
                        ?  RPM_ARRAY_RETURN_TYPE : RPM_SCALAR_RETURN_TYPE;
  @@ -6452,12 +6458,16 @@
                hsa->vallen += (te - t);
            }
            if (spew == &_json_spew) {
  +assert(tag->tagno != NULL);
                /* XXX display "Tag_0x01234567" for arbitrary tags. */
  -             if (tag->tagno != NULL && tag->tagno[0] & 0x40000000) {
  +             if (tag->tagno[0] & 0x40000000) {
                    tagN = myTagName(hsa->tags, tag->tagno[0], NULL);
                    tagT = numElements > 1
                        ?  RPM_ARRAY_RETURN_TYPE : RPM_SCALAR_RETURN_TYPE;
                } else
  +             if (tag->tagno[0] == RPMTAG_HDRID) {    /* RPMTAG_SHA1HEADER */
  +                 tagN = "_id";       /* XXX mongo primary key name */
  +             } else
                    tagN = myTagName(hsa->tags, tag->tagno[0], &tagT);
                need = sizeof("  : [\n") + strlen(tagN);
                te = t = hsaReserve(hsa, need);
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to