Hi,
do you think the attached patch will suit your needs? It seems to be
fine for my use in synaptic (I only need it to get the changelogs).
thanks,
Michael
--
The first rule of holes is: when you find yourself in one, stop digging. - PJ
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo
--- orig/apt-pkg/acquire-item.cc
+++ mod/apt-pkg/acquire-item.cc
@@ -625,12 +625,16 @@
// ---------------------------------------------------------------------
/* The file is added to the queue */
pkgAcqFile::pkgAcqFile(pkgAcquire *Owner,string URI,string MD5,
- unsigned long Size,string Dsc,string ShortDesc) :
+ unsigned long Size,string Dsc,string ShortDesc,
+ string DestFileName) :
Item(Owner), Md5Hash(MD5)
{
Retries = _config->FindI("Acquire::Retries",0);
- DestFile = flNotDir(URI);
+ if(!DestFileName.empty())
+ DestFile = DestFileName;
+ else
+ DestFile = flNotDir(URI);
// Create the item
Desc.URI = URI;
--- orig/apt-pkg/acquire-item.h
+++ mod/apt-pkg/acquire-item.h
@@ -171,7 +171,7 @@
virtual string DescURI() {return Desc.URI;};
pkgAcqFile(pkgAcquire *Owner,string URI,string MD5,unsigned long Size,
- string Desc,string ShortDesc);
+ string Desc,string ShortDesc, string DestFileName="");
};
#endif