RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Provideversion empty string index

From: Alexey Tourbin <at@altlinux.ru>
Date: Fri 08 Aug 2008 - 07:28:21 CEST
Message-ID: <20080808052821.GD6814@solemn.turbinal>
On Thu, Aug 07, 2008 at 06:27:37PM -0400, Jeff Johnson wrote:
>  
> On Thursday, August 07, 2008, at 06:21PM, "Alexey Tourbin" <at@altlinux.ru> wrote:
> >If you try something like
> >perl -MDB_File -MData::Dumper -le 'tie %db,"DB_File","/var/lib/rpm/Provideversion",0,0,$DB_BTREE or die; print Dumper(\%db)' |less
> >you can see that the biggest Provideversion entry has "\0" key.
> >Actually It takes about one half of the whole index.
> >
> >Was it really intended?
> 
> Yes intended.
>
> The underlying issue with a data store (like Headers) is
>    What to do with missing/optional values?
> 
> I chose to make NULL == "" == missing.

However, there is a special case for empty file digests.

rpmdb.c (rpmdbAdd):
  3402                  case RPMTAG_FILEDIGESTS:
  3403                      /* Filter out empty MD5 strings. */
  3404                      if (!(he->p.argv[i] && *he->p.argv[i] != '\0'))
  3405                          /*@innercontinue@*/ continue;


  • application/pgp-signature attachment: stored
Received on Fri Aug 8 07:27:50 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.