summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc3
-rw-r--r--apt-pkg/cdrom.cc4
-rw-r--r--apt-pkg/deb/dpkgpm.cc11
-rw-r--r--apt-pkg/deb/dpkgpm.h11
-rw-r--r--apt-pkg/pkgcachegen.cc4
5 files changed, 14 insertions, 19 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index f3784a58b..32798335c 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -674,10 +674,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
{
// The files timestamp matches
if (StringToBool(LookupTag(Message,"Alt-IMS-Hit"),false) == true)
- {
- unlink(FileName.c_str());
return;
- }
Decompression = true;
Local = true;
DestFile += ".decomp";
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 4a688a5e1..96106c7a9 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -668,8 +668,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
DropRepeats(TransList,"");
if(log) {
msg.str("");
- ioprintf(msg, _("Found %i package indexes, %i source indexes, "
- "%i translation indexes and %i signatures\n"),
+ ioprintf(msg, _("Found %lu package indexes, %lu source indexes, "
+ "%lu translation indexes and %lu signatures\n"),
List.size(), SourceList.size(), TransList.size(),
SigList.size());
log->Update(msg.str(), STEP_SCAN);
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 343e3d82f..bb7e4b40a 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -44,7 +44,8 @@ using namespace std;
// ---------------------------------------------------------------------
/* */
pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache)
- : pkgPackageManager(Cache), dpkgbuf_pos(0), PackagesTotal(0), PackagesDone(0)
+ : pkgPackageManager(Cache), dpkgbuf_pos(0), PackagesDone(0),
+ PackagesTotal(0), term_out(NULL)
{
}
/*}}}*/
@@ -351,7 +352,7 @@ void pkgDPkgPM::DoStdin(int master)
/*
* read the terminal pty and write log
*/
-void pkgDPkgPM::DoTerminalPty(int master, FILE *term_out)
+void pkgDPkgPM::DoTerminalPty(int master)
{
char term_buf[1024] = {0,};
@@ -567,7 +568,6 @@ bool pkgDPkgPM::Go(int OutStatusFd)
return _error->Error(_("Directory '%s' missing"), logdir.c_str());
string logfile_name = flCombine(logdir,
_config->Find("Dir::Log::Terminal"));
- FILE *term_out = NULL;
if (!logfile_name.empty())
{
term_out = fopen(logfile_name.c_str(),"a");
@@ -778,9 +778,6 @@ bool pkgDPkgPM::Go(int OutStatusFd)
int _dpkgin = fd[0];
close(fd[1]); // close the write end of the pipe
- // the read buffers for the communication with dpkg
- char buf[2] = {0,0};
-
// the result of the waitpid call
int res;
if(slave > 0)
@@ -820,7 +817,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
continue;
if(master >= 0 && FD_ISSET(master, &rfds))
- DoTerminalPty(master, term_out);
+ DoTerminalPty(master);
if(master >= 0 && FD_ISSET(0, &rfds))
DoStdin(master);
if(FD_ISSET(_dpkgin, &rfds))
diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h
index c552b20c9..448091626 100644
--- a/apt-pkg/deb/dpkgpm.h
+++ b/apt-pkg/deb/dpkgpm.h
@@ -26,7 +26,8 @@ class pkgDPkgPM : public pkgPackageManager
// the buffer we use for the dpkg status-fd reading
char dpkgbuf[1024];
int dpkgbuf_pos;
-
+ FILE *term_out;
+
protected:
// progress reporting
@@ -43,10 +44,10 @@ class pkgDPkgPM : public pkgPackageManager
// the dpkg states that are already done; the string is the package
// the int is the state that is already done (e.g. a package that is
// going to be install is already in state "half-installed")
- map<string,int> PackageOpsDone;
+ map<string,unsigned int> PackageOpsDone;
// progress reporting
- int PackagesDone;
- int PackagesTotal;
+ unsigned int PackagesDone;
+ unsigned int PackagesTotal;
struct Item
{
@@ -67,7 +68,7 @@ class pkgDPkgPM : public pkgPackageManager
// input processing
void DoStdin(int master);
- void DoTerminalPty(int master, FILE *out);
+ void DoTerminalPty(int master);
void DoDpkgStatusFd(int statusfd, int OutStatusFd);
void ProcessDpkgStatusLine(int OutStatusFd, char *line);
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 4e186f466..d00cd4e64 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -781,7 +781,7 @@ static bool BuildCache(pkgCacheGenerator &Gen,
bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
MMap **OutMap,bool AllowMem)
{
- unsigned long MapSize = _config->FindI("APT::Cache-Limit",16*1024*1024);
+ unsigned long MapSize = _config->FindI("APT::Cache-Limit",24*1024*1024);
vector<pkgIndexFile *> Files;
for (vector<metaIndex *>::const_iterator i = List.begin();
@@ -928,7 +928,7 @@ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
/* */
bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap)
{
- unsigned long MapSize = _config->FindI("APT::Cache-Limit",12*1024*1024);
+ unsigned long MapSize = _config->FindI("APT::Cache-Limit",20*1024*1024);
vector<pkgIndexFile *> Files;
unsigned long EndOfSource = Files.size();
if (_system->AddStatusFiles(Files) == false)