Browse Source

Merge remote-tracking branch 'mvo/debian/sid' into debian/sid

tags/debian/1.0.4
Michael Vogt 7 years ago
parent
commit
7adaab0430
10 changed files with 42 additions and 13 deletions
  1. +2
    -1
      apt-pkg/contrib/fileutl.cc
  2. +2
    -1
      apt-pkg/deb/debsrcrecords.cc
  3. +2
    -1
      apt-pkg/deb/dpkgpm.cc
  4. +1
    -1
      apt-pkg/depcache.cc
  5. +13
    -0
      ftparchive/cachedb.cc
  6. +3
    -3
      ftparchive/cachedb.h
  7. +12
    -1
      ftparchive/contents.cc
  8. +2
    -2
      ftparchive/contents.h
  9. +4
    -2
      ftparchive/writer.h
  10. +1
    -1
      test/libapt/cdrom_test.cc

+ 2
- 1
apt-pkg/contrib/fileutl.cc View File

@@ -1241,7 +1241,8 @@ bool FileFd::OpenInternDescriptor(unsigned int const Mode, APT::Configuration::C
if (d->lzma == NULL)
d->lzma = new FileFdPrivate::LZMAFILE;
d->lzma->file = (FILE*) compress_struct;
d->lzma->stream = LZMA_STREAM_INIT;
lzma_stream tmp_stream = LZMA_STREAM_INIT;
d->lzma->stream = tmp_stream;

if ((Mode & ReadWrite) == ReadWrite)
return FileFdError("ReadWrite mode is not supported for file %s", FileName.c_str());


+ 2
- 1
apt-pkg/deb/debsrcrecords.cc View File

@@ -186,6 +186,7 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
/* */
debSrcRecordParser::~debSrcRecordParser()
{
delete[] Buffer;
// was allocated via strndup()
free(Buffer);
}
/*}}}*/

+ 2
- 1
apt-pkg/deb/dpkgpm.cc View File

@@ -1438,7 +1438,8 @@ bool pkgDPkgPM::GoNoABIBreak(APT::Progress::PackageManager *progress)

if (_config->FindB("DPkg::FlushSTDIN",true) == true && isatty(STDIN_FILENO))
{
int Flags,dummy;
int Flags;
int dummy = 0;
if ((Flags = fcntl(STDIN_FILENO,F_GETFL,dummy)) < 0)
_exit(100);


+ 1
- 1
apt-pkg/depcache.cc View File

@@ -1678,7 +1678,7 @@ pkgCache::VerIterator pkgDepCache::Policy::GetCandidateVer(PkgIterator const &Pk
{
/* Not source/not automatic versions cannot be a candidate version
unless they are already installed */
VerIterator Last(*(pkgCache *)this,0);
VerIterator Last;
for (VerIterator I = Pkg.VersionList(); I.end() == false; ++I)
{


+ 13
- 0
ftparchive/cachedb.cc View File

@@ -32,6 +32,19 @@
#include <apti18n.h>
/*}}}*/

CacheDB::CacheDB(std::string const &DB)
: Dbp(0), Fd(NULL), DebFile(0)
{
TmpKey[0]='\0';
ReadyDB(DB);
};

CacheDB::~CacheDB()
{
ReadyDB();
delete DebFile;
};

// CacheDB::ReadyDB - Ready the DB2 /*{{{*/
// ---------------------------------------------------------------------
/* This opens the DB2 file for caching package information */


+ 3
- 3
ftparchive/cachedb.h View File

@@ -156,7 +156,7 @@ class CacheDB
SHA512Bytes(0),Packages(0), Misses(0), DeLinkBytes(0) {};
} Stats;
bool ReadyDB(std::string const &DB);
bool ReadyDB(std::string const &DB = "");
inline bool DBFailed() {return Dbp != 0 && DBLoaded == false;};
inline bool Loaded() {return DBLoaded == true;};
@@ -180,8 +180,8 @@ class CacheDB
bool Clean();
CacheDB(std::string const &DB) : Dbp(0), Fd(NULL), DebFile(0) {TmpKey[0]='\0'; ReadyDB(DB);};
~CacheDB() {ReadyDB(std::string()); delete DebFile;};
CacheDB(std::string const &DB);
~CacheDB();
};
#endif

+ 12
- 1
ftparchive/contents.cc View File

@@ -302,7 +302,18 @@ void GenContents::DoPrint(FILE *Out,GenContents::Node *Top, char *Buf)
DoPrint(Out,Top->BTreeRight,Buf);
}
/*}}}*/

// ContentsExtract Constructor /*{{{*/
ContentsExtract::ContentsExtract()
: Data(0), MaxSize(0), CurSize(0)
{
};
/*}}}*/
// ContentsExtract Destructor /*{{{*/
ContentsExtract::~ContentsExtract()
{
free(Data);
};
/*}}}*/
// ContentsExtract::Read - Read the archive /*{{{*/
// ---------------------------------------------------------------------
/* */


+ 2
- 2
ftparchive/contents.h View File

@@ -85,8 +85,8 @@ class ContentsExtract : public pkgDirStream
bool TakeContents(const void *Data,unsigned long long Length);
void Add(GenContents &Contents,std::string const &Package);
ContentsExtract() : Data(0), MaxSize(0), CurSize(0) {};
virtual ~ContentsExtract() {delete [] Data;};
ContentsExtract();
virtual ~ContentsExtract();
};

#endif

+ 4
- 2
ftparchive/writer.h View File

@@ -127,8 +127,10 @@ class PackagesWriter : public FTWScanner
{return Over.ReadExtraOverride(File);};
virtual bool DoPackage(string FileName);

PackagesWriter(string const &DB,string const &Overrides,string const &ExtOverrides=string(),
string const &Arch=string());
PackagesWriter(string const &DB,
string const &Overrides,
string const &ExtOverrides = "",
string const &Arch = "");
virtual ~PackagesWriter() {};
};



+ 1
- 1
test/libapt/cdrom_test.cc View File

@@ -91,7 +91,7 @@ TEST(CDROMTest,ReduceSourcelist)
}
TEST(CDROMTest, FindMountPointForDevice)
{
char * tempfile;
char * tempfile = NULL;
FileFd fd;
createTemporaryFile("mountpoints", fd, &tempfile,
"rootfs / rootfs rw 0 0\n"


Loading…
Cancel
Save