Author: mlandres Date: Wed Sep 12 17:17:53 2007 New Revision: 7214 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7214&view=rev Log: Fix du entries. Need to store all parent entries as well. Modified: trunk/libzypp/zypp/repo/cached/PackageImpl.cc trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc Modified: trunk/libzypp/zypp/repo/cached/PackageImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/PackageImpl.cc?rev=7214&r1=7213&r2=7214&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/cached/PackageImpl.cc (original) +++ trunk/libzypp/zypp/repo/cached/PackageImpl.cc Wed Sep 12 17:17:53 2007 @@ -201,13 +201,15 @@ { // No info: Creating a faked entry distributing the // total package size in assumed 200 files to "/ZYPP_NO_DU_INFO" - // The reported size is in kB. + // The reported size are 1K blocks. // // Note: Less likely that some system has a mountpoint named // ZYPP_NO_DU_INFO, so the size will be accounted to '/'. // but adding a faked mountpoint entry an application is able // to spot and handle these faked data in a different manner. - _diskusage->add( "/ZYPP_NO_DU_INFO", size() / 1024, 200 ); + unsigned dusize = size().blocks( ByteCount::K ); + _diskusage->add( "/", dusize, 200 ); + _diskusage->add( "/ZYPP_NO_DU_INFO/", dusize, 200 ); } } return *_diskusage; Modified: trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc?rev=7214&r1=7213&r2=7214&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc (original) +++ trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc Wed Sep 12 17:17:53 2007 @@ -122,8 +122,12 @@ { // No info: Creating a faked entry distributing the // total source package size in assumed 20 files to "/usr/src/packages" - // The reported size is in kB - _diskusage->add( "/usr/src/packages", size() / 1024, 20 ); + // The reported size are 1K blocks. + unsigned dusize = size().blocks( ByteCount::K ); + _diskusage->add( "/", dusize, 20 ); + _diskusage->add( "/usr/", dusize, 20 ); + _diskusage->add( "/usr/src/", dusize, 20 ); + _diskusage->add( "/usr/src/packages/", dusize, 20 ); } } return *_diskusage; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org