summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debmetaindex.cc2
-rw-r--r--apt-pkg/deb/debrecords.cc8
-rw-r--r--apt-pkg/deb/debrecords.h1
-rw-r--r--apt-pkg/deb/debsrcrecords.cc2
-rw-r--r--apt-pkg/deb/dpkgpm.cc11
-rw-r--r--apt-pkg/deb/dpkgpm.h11
6 files changed, 21 insertions, 14 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 73b2dda49..94995798f 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -144,7 +144,7 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool GetAll) const
vector <struct IndexTarget *> *targets = ComputeIndexTargets();
for (vector <struct IndexTarget*>::const_iterator Target = targets->begin(); Target != targets->end(); Target++) {
new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description,
- (*Target)->ShortDesc, "");
+ (*Target)->ShortDesc, HashString());
}
}
new pkgAcqMetaSig(Owner, MetaIndexURI("Release.gpg"),
diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc
index 8a5b6e215..3d3d7de0a 100644
--- a/apt-pkg/deb/debrecords.cc
+++ b/apt-pkg/deb/debrecords.cc
@@ -67,6 +67,14 @@ string debRecordParser::SHA1Hash()
return Section.FindS("SHA1");
}
/*}}}*/
+// RecordParser::SHA1Hash - Return the archive hash /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+string debRecordParser::SHA256Hash()
+{
+ return Section.FindS("SHA256");
+}
+ /*}}}*/
// RecordParser::Maintainer - Return the maintainer email /*{{{*/
// ---------------------------------------------------------------------
/* */
diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h
index df21931a8..ab244b6dd 100644
--- a/apt-pkg/deb/debrecords.h
+++ b/apt-pkg/deb/debrecords.h
@@ -35,6 +35,7 @@ class debRecordParser : public pkgRecords::Parser
virtual string FileName();
virtual string MD5Hash();
virtual string SHA1Hash();
+ virtual string SHA256Hash();
virtual string SourcePkg();
virtual string SourceVer();
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
index fcd9bb901..ace4e00b5 100644
--- a/apt-pkg/deb/debsrcrecords.cc
+++ b/apt-pkg/deb/debsrcrecords.cc
@@ -137,7 +137,7 @@ bool debSrcRecordParser::Files(vector<pkgSrcRecords::File> &List)
break;
F.Type = string(F.Path,Tmp+1,Pos-Tmp);
- if (F.Type == "gz" || F.Type == "bz2")
+ if (F.Type == "gz" || F.Type == "bz2" || F.Type == "lzma")
{
Pos = Tmp-1;
continue;
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);