Mailinglist Archive: zypp-devel (84 mails)
| < Previous | Next > |
Re: [zypp-devel] repodata.c - clarification
- From: Michael Matz <matz@xxxxxxx>
- Date: Wed, 20 Aug 2008 16:18:11 +0200 (CEST)
- Message-id: <Pine.LNX.4.64.0808201610220.6093@xxxxxxxxxxxxx>
Hi,
On Wed, 20 Aug 2008, Roberto Mannai wrote:
That's simply searching if this attribute (the one with keyname) exists
for the solvable in question. If it returns here it means for that
solvable this attribute doesn't exist.
You should look at the metadata (use dumpsolv on the solv file in
/var/cache/zypp/solv/$REPO/solv for the repository in question). For
diskusage it needs to have the "solvable:diskusage" attributes (that's per
directory, if you need that per mount-point you need to call some helper
functions, e.g. pool_calc_duchanges) or simply "solvable:installsize"
(that's the overall installed size of the package), for that no
post-processing is required.
Ciao,
Michael.
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
On Wed, 20 Aug 2008, Roberto Mannai wrote:
However I saw that for some packages, the variable
zypp::DiskUsageCounter::MountPoint.pkg_size returns 0. Going deeper I
saw that "repodata_search" method in "repodata.c" returns in this
instruction:
for (kp = keyp; (k = *kp++) != 0; )
if (data->keys[k].name == keyname) break;
if (k == 0) return;
That's simply searching if this attribute (the one with keyname) exists
for the solvable in question. If it returns here it means for that
solvable this attribute doesn't exist.
So, for packages like "kernel-rt", "miro" and "kernel-source", I have
k == 0, going on no disk usage is computed (no call to pool.c -
solver_fill_DU_cb). I'm using the revision 10814 on svn.
You should look at the metadata (use dumpsolv on the solv file in
/var/cache/zypp/solv/$REPO/solv for the repository in question). For
diskusage it needs to have the "solvable:diskusage" attributes (that's per
directory, if you need that per mount-point you need to call some helper
functions, e.g. pool_calc_duchanges) or simply "solvable:installsize"
(that's the overall installed size of the package), for that no
post-processing is required.
Ciao,
Michael.
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |