RPM Community Forums

Mailing List Message of <rpm-devel>

Re: size of db_* files in lib/rpm

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 28 Jan 2008 - 00:37:03 CET
Message-Id: <44BF860A-BE33-4F3B-917D-50139288D005@mac.com>

On Jan 27, 2008, at 6:12 PM, Peter Kalbus wrote:

> one of the last steps towards the qnx port, is to get a *.tgz binary  
> package prepared.
>
> PLIST file is created and .tgz filled.
>
> but i wonder the size of the file: about 7.5 mbyte
>
> looking a little inside, i detected, that a lot is coming from db_*  
> files from lib/rpm
>

Yes.

> suprising is, that all are nearly the same size as if they have a  
> common big part and same small add ons
>
> are my ideas right?

Yes, the executables are partially statically linked,
leading to multiple copies of -ldb, one for each utility.

>
> can it be changed to save space?
>

You can do whatever you wish.

> we' will use the system for an embedded system. we're know fighting  
> for every byte, but 7.5 mbyte is at least critical.
>

On embedded, you can likely eliminate all the db_* utilities.

Of course when something breaks, you will be flying blind.

db_stat is useful for diagnosing locking problems.
db_verify is useful if you need to check that the rpmdb is intact.
db_dump/db_load are necessary to convert with possible format changes.

The other db_utilities are less useful.

There is also tools/db*tool.c that uses one copy of
the library and uses argv[0] for selecting the db utility.

73 de Jeff
Received on Mon Jan 28 00:37:08 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.