Browse Source

Alfredo's vendor stuff

Author: jgg
Date: 2001-03-13 06:51:46 GMT
Alfredo's vendor stuff
debian/1.8.y
Arch Librarian 18 years ago
parent
commit
a7c835af20
  1. 20
      apt-pkg/acquire-method.cc
  2. 8
      apt-pkg/acquire-method.h
  3. 4
      apt-pkg/cachefile.cc
  4. 10
      apt-pkg/deb/debindexfile.cc
  5. 12
      apt-pkg/deb/debrecords.cc
  6. 3
      apt-pkg/deb/debrecords.h
  7. 6
      apt-pkg/init.cc
  8. 3
      apt-pkg/pkgrecords.h
  9. 93
      apt-pkg/sourcelist.cc
  10. 42
      apt-pkg/sourcelist.h
  11. 3
      apt-pkg/tagfile.cc
  12. 3
      debian/changelog
  13. 4
      doc/apt.ent
  14. 2
      doc/makefile
  15. 104
      doc/vendors.list.5.sgml
  16. 4
      methods/ftp.cc
  17. 4
      methods/gzip.cc
  18. 4
      methods/http.cc
  19. 4
      methods/rsh.cc

20
apt-pkg/acquire-method.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: acquire-method.cc,v 1.25 2001/02/20 07:03:17 jgg Exp $
// $Id: acquire-method.cc,v 1.26 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
Acquire Method
@ -23,7 +23,8 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
@ -175,6 +176,8 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt)
if (Res.MD5Sum.empty() == false)
End += snprintf(End,sizeof(S)-50 - (End - S),"MD5-Hash: %s\n",Res.MD5Sum.c_str());
if (Res.SHA1Sum.empty() == false)
End += snprintf(End,sizeof(S)-50 - (End - S),"SHA1-Hash: %s\n",Res.SHA1Sum.c_str());
if (Res.ResumePoint != 0)
End += snprintf(End,sizeof(S)-50 - (End - S),"Resume-Point: %lu\n",
@ -199,6 +202,9 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt)
if (Alt->MD5Sum.empty() == false)
End += snprintf(End,sizeof(S)-50 - (End - S),"Alt-MD5-Hash: %s\n",
Alt->MD5Sum.c_str());
if (Alt->SHA1Sum.empty() == false)
End += snprintf(End,sizeof(S)-50 - (End - S),"Alt-SHA1-Hash: %s\n",
Alt->SHA1Sum.c_str());
if (Alt->IMSHit == true)
strcat(End,"Alt-IMS-Hit: true\n");
@ -434,3 +440,13 @@ pkgAcqMethod::FetchResult::FetchResult() : LastModified(0),
{
}
/*}}}*/
// AcqMethod::FetchResult::TakeHashes - Load hashes /*{{{*/
// ---------------------------------------------------------------------
/* This hides the number of hashes we are supporting from the caller.
It just deals with the hash class. */
void pkgAcqMethod::FetchResult::TakeHashes(Hashes &Hash)
{
MD5Sum = Hash.MD5.Result();
SHA1Sum = Hash.SHA1.Result();
}
/*}}}*/

8
apt-pkg/acquire-method.h

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: acquire-method.h,v 1.14 2001/02/20 07:03:17 jgg Exp $
// $Id: acquire-method.h,v 1.15 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
Acquire Method - Method helper class + functions
@ -20,6 +20,7 @@
#pragma interface "apt-pkg/acquire-method.h"
#endif
class Hashes;
class pkgAcqMethod
{
protected:
@ -37,11 +38,14 @@ class pkgAcqMethod
struct FetchResult
{
string MD5Sum;
string SHA1Sum;
time_t LastModified;
bool IMSHit;
string Filename;
unsigned long Size;
unsigned long ResumePoint;
unsigned long ResumePoint;
void TakeHashes(Hashes &Hash);
FetchResult();
};

4
apt-pkg/cachefile.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: cachefile.cc,v 1.5 2001/02/20 07:03:17 jgg Exp $
// $Id: cachefile.cc,v 1.6 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
CacheFile - Simple wrapper class for opening, generating and whatnot
@ -71,7 +71,7 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock)
/* This sux, remove it someday */
if (_error->empty() == false)
_error->Warning(_("You may want to run apt-get update to correct these missing files"));
_error->Warning(_("You may want to run apt-get update to correct these problems"));
Cache = new pkgCache(Map);
if (_error->PendingError() == true)

10
apt-pkg/deb/debindexfile.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: debindexfile.cc,v 1.3 2001/02/23 06:41:55 jgg Exp $
// $Id: debindexfile.cc,v 1.4 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
Debian Specific sources.list types and the three sorts of Debian
@ -417,7 +417,8 @@ class debSLTypeDeb : public pkgSourceList::Type
public:
bool CreateItem(vector<pkgIndexFile *> &List,string URI,
string Dist,string Section) const
string Dist,string Section,
pkgSourceList::Vendor const *Vendor) const
{
List.push_back(new debPackagesIndex(URI,Dist,Section));
return true;
@ -435,8 +436,9 @@ class debSLTypeDebSrc : public pkgSourceList::Type
public:
bool CreateItem(vector<pkgIndexFile *> &List,string URI,
string Dist,string Section) const
{
string Dist,string Section,
pkgSourceList::Vendor const *Vendor) const
{
List.push_back(new debSourcesIndex(URI,Dist,Section));
return true;
};

12
apt-pkg/deb/debrecords.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: debrecords.cc,v 1.9 2001/02/20 07:03:17 jgg Exp $
// $Id: debrecords.cc,v 1.10 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
Debian Package Records - Parser for debian package records
@ -53,7 +53,15 @@ string debRecordParser::Name()
/* */
string debRecordParser::MD5Hash()
{
return Section.FindS("MD5sum");
return Section.FindS("MD5Sum");
}
/*}}}*/
// RecordParser::SHA1Hash - Return the archive hash /*{{{*/
// ---------------------------------------------------------------------
/* */
string debRecordParser::SHA1Hash()
{
return Section.FindS("SHA1Sum");
}
/*}}}*/
// RecordParser::Maintainer - Return the maintainer email /*{{{*/

3
apt-pkg/deb/debrecords.h

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: debrecords.h,v 1.7 2001/02/20 07:03:17 jgg Exp $
// $Id: debrecords.h,v 1.8 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
Debian Package Records - Parser for debian package records
@ -36,6 +36,7 @@ class debRecordParser : public pkgRecords::Parser
// These refer to the archive file for the Version
virtual string FileName();
virtual string MD5Hash();
virtual string SHA1Hash();
virtual string SourcePkg();
// These are some general stats about the package

6
apt-pkg/init.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: init.cc,v 1.15 2001/02/20 07:03:17 jgg Exp $
// $Id: init.cc,v 1.16 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
Init - Initialize the package library
@ -63,11 +63,13 @@ bool pkgInitConfig(Configuration &Cnf)
// Configuration
Cnf.Set("Dir::Etc","etc/apt/");
Cnf.Set("Dir::Etc::sourcelist","sources.list");
Cnf.Set("Dir::Etc::vendorlist","vendors.list");
Cnf.Set("Dir::Etc::vendorparts","vendors.list.d");
Cnf.Set("Dir::Etc::main","apt.conf");
Cnf.Set("Dir::Etc::parts","apt.conf.d");
Cnf.Set("Dir::Etc::preferences","preferences");
Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods");
bool Res = true;
// Read an alternate config file

3
apt-pkg/pkgrecords.h

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: pkgrecords.h,v 1.5 2001/02/20 07:03:17 jgg Exp $
// $Id: pkgrecords.h,v 1.6 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
Package Records - Allows access to complete package description records
@ -56,6 +56,7 @@ class pkgRecords::Parser
// These refer to the archive file for the Version
virtual string FileName() {return string();};
virtual string MD5Hash() {return string();};
virtual string SHA1Hash() {return string();};
virtual string SourcePkg() {return string();};
// These are some general stats about the package

93
apt-pkg/sourcelist.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: sourcelist.cc,v 1.18 2001/02/20 07:03:17 jgg Exp $
// $Id: sourcelist.cc,v 1.19 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
List of Sources
@ -61,7 +61,7 @@ bool pkgSourceList::Type::FixupURI(string &URI) const
URI = SubstVar(URI,"$(ARCH)",_config->Find("APT::Architecture"));
// Make sure that the URN is / postfixed
// Make sure that the URI is / postfixed
if (URI[URI.size() - 1] != '/')
URI += '/';
@ -73,6 +73,7 @@ bool pkgSourceList::Type::FixupURI(string &URI) const
/* This is a generic one that is the 'usual' format for sources.list
Weird types may override this. */
bool pkgSourceList::Type::ParseLine(vector<pkgIndexFile *> &List,
Vendor const *Vendor,
const char *Buffer,
unsigned long CurLine,
string File) const
@ -95,7 +96,7 @@ bool pkgSourceList::Type::ParseLine(vector<pkgIndexFile *> &List,
if (ParseQuoteWord(Buffer,Section) == true)
return _error->Error(_("Malformed line %lu in source list %s (Absolute dist)"),CurLine,File.c_str());
Dist = SubstVar(Dist,"$(ARCH)",_config->Find("APT::Architecture"));
return CreateItem(List,URI,Dist,Section);
return CreateItem(List,URI,Dist,Section,Vendor);
}
// Grab the rest of the dists
@ -104,7 +105,7 @@ bool pkgSourceList::Type::ParseLine(vector<pkgIndexFile *> &List,
do
{
if (CreateItem(List,URI,Dist,Section) == false)
if (CreateItem(List,URI,Dist,Section,Vendor) == false)
return false;
}
while (ParseQuoteWord(Buffer,Section) == true);
@ -125,12 +126,58 @@ pkgSourceList::pkgSourceList(string File)
Read(File);
}
/*}}}*/
// SourceList::ReadVendors - Read list of known package vendors /*{{{*/
// ---------------------------------------------------------------------
/* This also scans a directory of vendor files similar to apt.conf.d
which can contain the usual suspects of distribution provided data.
The APT config mechanism allows the user to override these in their
configuration file. */
bool pkgSourceList::ReadVendors()
{
Configuration Cnf;
string CnfFile = _config->FindDir("Dir::Etc::vendorparts");
if (FileExists(CnfFile) == true)
if (ReadConfigDir(Cnf,CnfFile,true) == false)
return false;
CnfFile = _config->FindFile("Dir::Etc::vendorlist");
if (FileExists(CnfFile) == true)
if (ReadConfigFile(Cnf,CnfFile,true) == false)
return false;
// Process 'simple-key' type sections
const Configuration::Item *Top = Cnf.Tree("simple-key");
for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next)
{
Configuration Block(Top);
Vendor *Vendor;
Vendor = new pkgSourceList::Vendor;
Vendor->VendorID = Top->Tag;
Vendor->FingerPrint = Block.Find("Fingerprint");
Vendor->Description = Block.Find("Name");
if (Vendor->FingerPrint.empty() == true ||
Vendor->Description.empty() == true)
{
_error->Error(_("Vendor block %s is invalid"), Vendor->VendorID.c_str());
delete Vendor;
continue;
}
VendorList.push_back(Vendor);
}
return !_error->PendingError();
}
/*}}}*/
// SourceList::ReadMainList - Read the main source list from etc /*{{{*/
// ---------------------------------------------------------------------
/* */
bool pkgSourceList::ReadMainList()
{
return Read(_config->FindFile("Dir::Etc::sourcelist"));
return ReadVendors() && Read(_config->FindFile("Dir::Etc::sourcelist"));
}
/*}}}*/
// SourceList::Read - Parse the sourcelist file /*{{{*/
@ -143,7 +190,7 @@ bool pkgSourceList::Read(string File)
if (!F != 0)
return _error->Errno("ifstream::ifstream",_("Opening %s"),File.c_str());
List.erase(List.begin(),List.end());
SrcList.erase(SrcList.begin(),SrcList.end());
char Buffer[300];
int CurLine = 0;
@ -173,7 +220,35 @@ bool pkgSourceList::Read(string File)
if (Parse == 0)
return _error->Error(_("Type '%s' is not known in on line %u in source list %s"),LineType.c_str(),CurLine,File.c_str());
if (Parse->ParseLine(List,C,CurLine,File) == false)
// Authenticated repository
Vendor const *Vndr = 0;
if (C[0] == '[')
{
string VendorID;
if (ParseQuoteWord(C,VendorID) == false)
return _error->Error(_("Malformed line %u in source list %s (vendor id)"),CurLine,File.c_str());
if (VendorID.length() < 2 || VendorID.end()[-1] != ']')
return _error->Error(_("Malformed line %u in source list %s (vendor id)"),CurLine,File.c_str());
VendorID = string(VendorID,1,VendorID.size()-2);
for (vector<Vendor const *>::const_iterator iter = VendorList.begin();
iter != VendorList.end(); iter++)
{
if ((*iter)->VendorID == VendorID)
{
Vndr = *iter;
break;
}
}
if (Vndr == 0)
return _error->Error(_("Unknown vendor ID '%s' in line %u of source list %s"),
VendorID.c_str(),CurLine,File.c_str());
}
if (Parse->ParseLine(SrcList,Vndr,C,CurLine,File) == false)
return false;
}
return true;
@ -185,7 +260,7 @@ bool pkgSourceList::Read(string File)
bool pkgSourceList::FindIndex(pkgCache::PkgFileIterator File,
pkgIndexFile *&Found) const
{
for (const_iterator I = List.begin(); I != List.end(); I++)
for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++)
{
if ((*I)->FindInCache(*File.Cache()) == File)
{
@ -202,7 +277,7 @@ bool pkgSourceList::FindIndex(pkgCache::PkgFileIterator File,
/* */
bool pkgSourceList::GetIndexes(pkgAcquire *Owner) const
{
for (const_iterator I = List.begin(); I != List.end(); I++)
for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++)
if ((*I)->GetIndexes(Owner) == false)
return false;
return true;

42
apt-pkg/sourcelist.h

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: sourcelist.h,v 1.9 2001/02/20 07:03:17 jgg Exp $
// $Id: sourcelist.h,v 1.10 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
SourceList - Manage a list of sources
@ -14,10 +14,14 @@
files.sgml.
The types are mapped through a list of type definitions which handle
the actual construction of the type. After loading a source list all
you have is a list of package index files that have the ability
the actual construction of the back end type. After loading a source
list all you have is a list of package index files that have the ability
to be Acquired.
The vendor machanism is similar, except the vendor types are hard
wired. Before loading the source list the vendor list is loaded.
This doesn't load key data, just the checks to preform.
##################################################################### */
/*}}}*/
#ifndef PKGLIB_SOURCELIST_H
@ -37,6 +41,18 @@ class pkgSourceList
{
public:
// An available vendor
struct Vendor
{
string VendorID;
string FingerPrint;
string Description;
/* Lets revisit these..
bool MatchFingerPrint(string FingerPrint);
string FingerPrintDescr();*/
};
// List of supported source list types
class Type
{
@ -52,11 +68,13 @@ class pkgSourceList
bool FixupURI(string &URI) const;
virtual bool ParseLine(vector<pkgIndexFile *> &List,
Vendor const *Vendor,
const char *Buffer,
unsigned long CurLine,string File) const;
virtual bool CreateItem(vector<pkgIndexFile *> &List,string URI,
string Dist,string Section) const = 0;
string Dist,string Section,
Vendor const *Vendor) const = 0;
Type();
virtual ~Type() {};
};
@ -64,19 +82,21 @@ class pkgSourceList
typedef vector<pkgIndexFile *>::const_iterator const_iterator;
protected:
vector<pkgIndexFile *> List;
vector<pkgIndexFile *> SrcList;
vector<Vendor const *> VendorList;
public:
bool ReadMainList();
bool Read(string File);
bool ReadVendors();
// List accessors
inline const_iterator begin() const {return List.begin();};
inline const_iterator end() const {return List.end();};
inline unsigned int size() const {return List.size();};
inline bool empty() const {return List.empty();};
inline const_iterator begin() const {return SrcList.begin();};
inline const_iterator end() const {return SrcList.end();};
inline unsigned int size() const {return SrcList.size();};
inline bool empty() const {return SrcList.empty();};
bool FindIndex(pkgCache::PkgFileIterator File,
pkgIndexFile *&Found) const;

3
apt-pkg/tagfile.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: tagfile.cc,v 1.27 2001/02/23 06:41:55 jgg Exp $
// $Id: tagfile.cc,v 1.28 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
Fast scanner for RFC-822 type header information
@ -396,6 +396,7 @@ static const char *iTFRewritePackageOrder[] = {
"Filename",
"Size",
"MD5Sum",
"SHA1Sum",
"MSDOS-Filename", // Obsolete
"Description",
0};

3
debian/changelog

@ -6,7 +6,8 @@ apt (0.5.4) unstable; urgency=low
* Various cosmetic code updates. Closes: #89066, #89066, #89152
* Add "pre-auto" as an option for DSelect::Clean (run autoclean after
update).
* More patches from Alfredo for Vendors and more SHA-1 stuff
-- Jason Gunthorpe <jgg@debian.org> Thu, 8 Mar 2001 22:48:06 -0700
apt (0.5.3) unstable; urgency=low

4
doc/apt.ent

@ -78,8 +78,8 @@
<docinfo>
<address><email>apt@packages.debian.org</></address>
<author><firstname>Jason</> <surname>Gunthorpe</></>
<copyright><year>1998-2000</> <holder>Jason Gunthorpe</></>
<date>20 September 2000</>
<copyright><year>1998-2001</> <holder>Jason Gunthorpe</></>
<date>12 March 2001</>
</docinfo>
">

2
doc/makefile

@ -13,7 +13,7 @@ include $(DEBIANDOC_H)
# Man pages
SOURCE = apt-cache.8 apt-get.8 apt-cdrom.8 apt.conf.5 sources.list.5 \
apt-config.8 apt-sortpkgs.1 apt-ftparchive.1 apt_preferences.5 \
apt-extracttemplates.1
apt-extracttemplates.1 vendors.list.5
INCLUDES = apt.ent
include $(SGML_MANPAGE_H)

104
doc/vendors.list.5.sgml

@ -0,0 +1,104 @@
<!-- -*- mode: sgml; mode: fold -*- -->
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
<!ENTITY % aptent SYSTEM "apt.ent">
%aptent;
]>
<refentry>
&apt-docinfo;
<refmeta>
<refentrytitle>vendors.list</>
<manvolnum>5</>
</refmeta>
<!-- Man page title -->
<refnamediv>
<refname>vendors.list</>
<refpurpose>Security key configuration for APT</>
</refnamediv>
<RefSect1><Title>Description</>
<para>
The package vendor list contains a list of all vendors
from whom you wish to authenticate downloaded packages.
For each vendor listed, it must contain the corresponding
PGP key fingerprint, so that APT can perform signature
verification of the release file and subsequent checking
of the checksums of each downloaded package.
To have authentication enabled, you must add the
vendor identification string (see below) enclosed in
square braces to the sources.list line for all sites that mirror
the repository provided by that vendor.
<para>
The format of this file is similar to the one used by
apt.conf. It consists of an arbitrary number of blocks of
vendors, where each block starts with a string telling the
<replaceable/key_type/ and the <replaceable/vendor_id/.
<para>
Some vendors may have multiple blocks that define different
security policies for their distributions. Debian for instance
uses a different signing methodology for stable and unstable releases.
<para>
<replaceable/key_type/ is the type of the check required.
Currently, there is only one type available which is
<literal/simple-key/.
<para>
<replaceable/vendor_id/ is the vendor identification string. It is an
arbitrary string you must supply to uniquely identifify a
vendor that's listed in this file.
Example:
<informalexample><programlisting>
single_key "joe"
{
Fingerprint "0987AB4378FSD872343298787ACC";
Name "Joe Shmoe &lt;joe@shmoe.com&gt;";
}
</programlisting></informalexample>
</RefSect1>
<RefSect1><Title>The simple-key type</>
<para>
This type of verification is used when the vendor has a single
secured key that must be used to sign the Release file. The
following items should be present
<VariableList>
<VarListEntry><Term>Fingerprint</Term>
<ListItem><Para>
The PGP fingerprint for the key. The fingerprint should be
expressed in the standard notion with or without spaces.
The <option/--fingerprint/ option for
<CiteRefEntry><RefEntryTitle><command/gpg/</RefEntryTitle><ManVolNum/1/</CiteRefEntry>
will show the fingerprint for the selected keys(s).
</VarListEntry>
<VarListEntry><Term>Name</Term>
<ListItem><Para>
A string containing a description of the owner of
the key or vendor. You may put the vendor name and it's
email. The string must be quoted with ".
</VarListEntry>
</VariableList>
</RefSect1>
<RefSect1><Title>Files</>
<para>
<filename>/etc/apt/vendors.list</>
</RefSect1>
<RefSect1><Title>See Also</>
<para>
&sources-list;
</RefSect1>
&manbugs;
&manauthor;
</refentry>

4
methods/ftp.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: ftp.cc,v 1.24 2001/03/06 07:15:29 jgg Exp $
// $Id: ftp.cc,v 1.25 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
FTP Aquire Method - This is the FTP aquire method for APT.
@ -1056,7 +1056,7 @@ bool FtpMethod::Fetch(FetchItem *Itm)
}
Res.LastModified = FailTime;
Res.MD5Sum = Hash.MD5.Result();
Res.TakeHashes(Hash);
// Timestamp
struct utimbuf UBuf;

4
methods/gzip.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: gzip.cc,v 1.14 2001/03/11 22:37:35 jgg Exp $
// $Id: gzip.cc,v 1.15 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
GZip method - Take a file URI in and decompress it into the target
@ -142,7 +142,7 @@ bool GzipMethod::Fetch(FetchItem *Itm)
// Return a Done response
Res.LastModified = Buf.st_mtime;
Res.Size = Buf.st_size;
Res.MD5Sum = Hash.MD5.Result();
Res.TakeHashes(Hash);
URIDone(Res);

4
methods/http.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: http.cc,v 1.50 2001/03/06 07:15:29 jgg Exp $
// $Id: http.cc,v 1.51 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
@ -1109,7 +1109,7 @@ int HttpMethod::Loop()
// Send status to APT
if (Result == true)
{
Res.MD5Sum = Server->In.Hash->MD5.Result();
Res.TakeHashes(*Server->In.Hash);
URIDone(Res);
}
else

4
methods/rsh.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: rsh.cc,v 1.3 2001/03/06 07:15:29 jgg Exp $
// $Id: rsh.cc,v 1.4 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
RSH method - Transfer files via rsh compatible program
@ -462,7 +462,7 @@ bool RSHMethod::Fetch(FetchItem *Itm)
}
Res.LastModified = FailTime;
Res.MD5Sum = Hash.MD5.Result();
Res.TakeHashes(Hash);
// Timestamp
struct utimbuf UBuf;

Loading…
Cancel
Save