]>
git.saurik.com Git - apt.git/blob - ftparchive/sources.cc
7 #include <apt-pkg/error.h>
8 #include <apt-pkg/gpgv.h>
12 bool DscExtract::TakeDsc(const void *newData
, unsigned long long newSize
)
16 // adding two newlines 'off record' for pkgTagSection.Scan() calls
22 Data
= std::string((const char*)newData
, newSize
);
23 // adding two newlines 'off record' for pkgTagSection.Scan() calls
30 bool DscExtract::Read(std::string FileName
)
36 if (OpenMaybeClearSignedFile(FileName
, F
) == false)
39 IsClearSigned
= (FileName
!= F
.Name());
41 std::ostringstream data
;
44 unsigned long long actual
= 0;
45 if (F
.Read(buffer
, sizeof(buffer
)-1, &actual
) == false)
46 return _error
->Errno("read", "Failed to read dsc file %s", FileName
.c_str());
50 buffer
[actual
] = '\0';
54 // adding two newlines 'off record' for pkgTagSection.Scan() calls