Dmitry V. Levin
e3ad0ef694
- Added librpm-4.0.4 build support. - Built with librpm-4.0.4, updated buildrequires.
96 lines
2.7 KiB
Diff
96 lines
2.7 KiB
Diff
diff -ur apt-0.3.19cnc55/methods/makefile apt-0.3.19cnc53/methods/makefile
|
|
--- apt-0.3.19cnc55/methods/makefile Fri Aug 10 18:03:50 2001
|
|
+++ apt-0.3.19cnc53/methods/makefile Thu Mar 21 19:36:03 2002
|
|
@@ -58,8 +58,8 @@
|
|
include $(PROGRAM_H)
|
|
|
|
# The rsh method
|
|
-#PROGRAM=rsh
|
|
-#SLIBS = -lapt-pkg $(SOCKETLIBS) $(RPMLIBS)
|
|
-#LIB_MAKES = apt-pkg/makefile
|
|
-#SOURCE = rsh.cc
|
|
-#include $(PROGRAM_H)
|
|
+PROGRAM=rsh
|
|
+SLIBS = -lapt-pkg $(SOCKETLIBS) $(RPMLIBS)
|
|
+LIB_MAKES = apt-pkg/makefile
|
|
+SOURCE = rsh.cc
|
|
+include $(PROGRAM_H)
|
|
diff -ur apt-0.3.19cnc55/methods/rsh.cc apt-0.3.19cnc53/methods/rsh.cc
|
|
--- apt-0.3.19cnc55/methods/rsh.cc Fri Nov 30 23:34:13 2001
|
|
+++ apt-0.3.19cnc53/methods/rsh.cc Thu Mar 21 20:05:08 2002
|
|
@@ -271,7 +271,7 @@
|
|
// ---------------------------------------------------------------------
|
|
/* */
|
|
bool RSHConn::Get(const char *Path,FileFd &To,unsigned long Resume,
|
|
- Hashes &Hash,bool &Missing, unsigned long Size)
|
|
+ MD5Summation &MD5,bool &Missing, unsigned long Size)
|
|
{
|
|
Missing = false;
|
|
|
|
@@ -284,7 +284,7 @@
|
|
return false;
|
|
|
|
if (Resume != 0) {
|
|
- if (Hash.AddFD(To.Fd(),Resume) == false) {
|
|
+ if (MD5.AddFD(To.Fd(),Resume) == false) {
|
|
_error->Errno("read","Problem hashing file");
|
|
return false;
|
|
}
|
|
@@ -323,7 +323,7 @@
|
|
}
|
|
MyLen += Res;
|
|
|
|
- Hash.Add(Buffer,Res);
|
|
+ MD5.Add(Buffer,Res);
|
|
if (To.Write(Buffer,Res) == false)
|
|
{
|
|
Close();
|
|
@@ -428,7 +428,7 @@
|
|
}
|
|
|
|
// Open the file
|
|
- Hashes Hash;
|
|
+ MD5Summation MD5;
|
|
{
|
|
FileFd Fd(Itm->DestFile,FileFd::WriteAny);
|
|
if (_error->PendingError() == true)
|
|
@@ -441,7 +441,7 @@
|
|
FailFd = Fd.Fd();
|
|
|
|
bool Missing;
|
|
- if (Server->Get(File,Fd,Res.ResumePoint,Hash,Missing,Res.Size) == false)
|
|
+ if (Server->Get(File,Fd,Res.ResumePoint,MD5,Missing,Res.Size) == false)
|
|
{
|
|
Fd.Close();
|
|
|
|
@@ -462,7 +462,7 @@
|
|
}
|
|
|
|
Res.LastModified = FailTime;
|
|
- Res.TakeHashes(Hash);
|
|
+ Res.MD5Sum = MD5.Result();
|
|
|
|
// Timestamp
|
|
struct utimbuf UBuf;
|
|
diff -ur apt-0.3.19cnc55/methods/rsh.h apt-0.3.19cnc53/methods/rsh.h
|
|
--- apt-0.3.19cnc55/methods/rsh.h Fri Nov 30 23:34:13 2001
|
|
+++ apt-0.3.19cnc53/methods/rsh.h Thu Mar 21 20:05:08 2002
|
|
@@ -12,7 +12,7 @@
|
|
|
|
#include <string>
|
|
#include <apt-pkg/strutl.h>
|
|
-#include <apt-pkg/hashes.h>
|
|
+#include <apt-pkg/md5.h>
|
|
#include <apt-pkg/acquire-method.h>
|
|
#include <apt-pkg/fileutl.h>
|
|
|
|
@@ -44,7 +44,7 @@
|
|
bool Size(const char *Path,unsigned long &Size);
|
|
bool ModTime(const char *Path, time_t &Time);
|
|
bool Get(const char *Path,FileFd &To,unsigned long Resume,
|
|
- Hashes &Hash,bool &Missing, unsigned long Size);
|
|
+ MD5Summation &MD5,bool &Missing, unsigned long Size);
|
|
|
|
RSHConn(URI Srv);
|
|
~RSHConn();
|