[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apt-ftparchive bug ?



Hi guys,
I'm using apt-ftparchive to make my personal debian repository.

I think I found a (possibly ?!?!?) bug regard how apt-ftparchive get file size.

On apt-utild package on ftp-archive/cachedb.cc on CacheDB::GetFileStat
function, I see this piece of code:

        if ((CurStat.Flags & FlSize) == FlSize)
        {
                /* Already worked out the file size */
        }

But this report every time wrong package size, so my "Packages" is
incorrect and I got "Size mismatch" error on apt-get.

If I invalidate previous if, this piece of code is executed:


                // Stat the file
                struct stat St;
                if (fstat(Fd->Fd(),&St) != 0)
                {
                        return _error->Errno("fstat",
                                _("Failed to stat %s"),FileName.c_str());
                }
                CurStat.FileSize = St.st_size;

And file size is correct.

Is a know bug ? (I did'nt notice anything on debian bug site).

Regards,
Salvatore

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d- s:+++ a- C++++ UL++ P++ L++++ E--- W+++ N+++ o+ K+++++ w+
O+ M+ V-- PS--- PE+ Y+++ PGP t--- 5 X R++ tv++ b++++ DI+ D++
G+ e++ h+ r++ y++
------END GEEK CODE BLOCK------


Reply to: