projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add a way to add packages to generate a dists style environment without
[apt.git]
/
apt-pkg
/
acquire-item.cc
diff --git
a/apt-pkg/acquire-item.cc
b/apt-pkg/acquire-item.cc
index a289fb7ba3bb23fe0655769b05cba78b3567c801..2c4ce91a01496bde3cd24e66982995ffd8d71d3a 100644
(file)
--- a/
apt-pkg/acquire-item.cc
+++ b/
apt-pkg/acquire-item.cc
@@
-280,7
+280,7
@@
bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
ss >> ServerSha1 >> size;
unsigned long const ServerSize = atol(size.c_str());
ss >> ServerSha1 >> size;
unsigned long const ServerSize = atol(size.c_str());
- FileFd fd(CurrentPackagesFile, FileFd::ReadOnly
Gzip
);
+ FileFd fd(CurrentPackagesFile, FileFd::ReadOnly);
SHA1Summation SHA1;
SHA1.AddFD(fd.Fd(), fd.Size());
string const local_sha1 = SHA1.Result();
SHA1Summation SHA1;
SHA1.AddFD(fd.Fd(), fd.Size());
string const local_sha1 = SHA1.Result();
@@
-297,7
+297,7
@@
bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
else
{
if(Debug)
else
{
if(Debug)
- std::clog << "SHA1-Current: " << ServerSha1 << std::endl;
+ std::clog << "SHA1-Current: " << ServerSha1 <<
" and we start at "<< fd.Name() << " " << fd.Size() << " " << local_sha1 <<
std::endl;
// check the historie and see what patches we need
string const history = Tags.FindS("SHA1-History");
// check the historie and see what patches we need
string const history = Tags.FindS("SHA1-History");
@@
-511,7
+511,7
@@
bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/
string FinalFile = _config->FindDir("Dir::State::lists");
FinalFile += URItoFileName(RealURI);
string FinalFile = _config->FindDir("Dir::State::lists");
FinalFile += URItoFileName(RealURI);
- FileFd fd(FinalFile, FileFd::ReadOnly
Gzip
);
+ FileFd fd(FinalFile, FileFd::ReadOnly);
SHA1Summation SHA1;
SHA1.AddFD(fd.Fd(), fd.Size());
string local_sha1 = string(SHA1.Result());
SHA1Summation SHA1;
SHA1.AddFD(fd.Fd(), fd.Size());
string local_sha1 = string(SHA1.Result());
@@
-1060,12
+1060,6
@@
void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, /*{{{*
// all cool, move Release file into place
Complete = true;
// all cool, move Release file into place
Complete = true;
-
- string FinalFile = _config->FindDir("Dir::State::lists");
- FinalFile += URItoFileName(RealURI);
- Rename(DestFile,FinalFile);
- chmod(FinalFile.c_str(),0644);
- DestFile = FinalFile;
}
else
{
}
else
{
@@
-1092,8
+1086,18
@@
void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, /*{{{*
Desc.URI = "gpgv:" + SigFile;
QueueURI(Desc);
Mode = "gpgv";
Desc.URI = "gpgv:" + SigFile;
QueueURI(Desc);
Mode = "gpgv";
+ return;
}
}
}
}
+
+ if (Complete == true)
+ {
+ string FinalFile = _config->FindDir("Dir::State::lists");
+ FinalFile += URItoFileName(RealURI);
+ Rename(DestFile,FinalFile);
+ chmod(FinalFile.c_str(),0644);
+ DestFile = FinalFile;
+ }
}
/*}}}*/
void pkgAcqMetaIndex::RetrievalDone(string Message) /*{{{*/
}
/*}}}*/
void pkgAcqMetaIndex::RetrievalDone(string Message) /*{{{*/
@@
-1323,7
+1327,7
@@
void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
Status = StatTransientNetworkError;
_error->Warning(_("A error occurred during the signature "
"verification. The repository is not updated "
Status = StatTransientNetworkError;
_error->Warning(_("A error occurred during the signature "
"verification. The repository is not updated "
- "and the previous index files will be used."
+ "and the previous index files will be used.
"
"GPG error: %s: %s\n"),
Desc.Description.c_str(),
LookupTag(Message,"Message").c_str());
"GPG error: %s: %s\n"),
Desc.Description.c_str(),
LookupTag(Message,"Message").c_str());