diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-01-15 20:28:03 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-01-15 20:28:03 +0100 |
commit | caffd4807f612e931ecca8f7d9b0c0c10de27ce6 (patch) | |
tree | bb6870985661a29d111c81bbf5fa07dc2dd80354 /apt-pkg | |
parent | 149daa16569b1763ab0ed76cc1fd80455980eddc (diff) |
* methods/rred.cc:
- operate optional on gzip compressed pdiffs
* apt-pkg/acquire-item.cc:
- don't uncompress downloaded pdiff files before feeding it to rred
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-item.cc | 19 | ||||
-rw-r--r-- | apt-pkg/acquire-item.h | 2 | ||||
-rw-r--r-- | apt-pkg/contrib/fileutl.h | 1 |
3 files changed, 3 insertions, 19 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 2c4ce91a0..d4e90b552 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -570,24 +570,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, /* FinalFile = _config->FindDir("Dir::State::lists")+URItoFileName(RealURI); // sucess in downloading a diff, enter ApplyDiff state - if(State == StateFetchDiff) - { - - if(Debug) - std::clog << "Sending to gzip method: " << FinalFile << std::endl; - - string FileName = LookupTag(Message,"Filename"); - State = StateUnzipDiff; - Local = true; - Desc.URI = "gzip:" + FileName; - DestFile += ".decomp"; - QueueURI(Desc); - Mode = "gzip"; - return; - } - - // sucess in downloading a diff, enter ApplyDiff state - if(State == StateUnzipDiff) + if(State == StateFetchDiff) { // rred excepts the patch as $FinalFile.ed diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 943c61876..d97a96a0f 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -449,7 +449,7 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item StateFetchDiff, /** \brief The diff is currently being uncompressed. */ - StateUnzipDiff, + StateUnzipDiff, // FIXME: No longer used /** \brief The diff is currently being applied. */ StateApplyDiff diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 146d917d8..cde288ad2 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -72,6 +72,7 @@ class FileFd // Simple manipulators inline int Fd() {return iFd;}; inline void Fd(int fd) {iFd = fd;}; + inline gzFile gzFd() {return gz;}; inline bool IsOpen() {return iFd >= 0;}; inline bool Failed() {return (Flags & Fail) == Fail;}; inline void EraseOnFailure() {Flags |= DelOnFail;}; |