acquire-item.cc: added support for xz-compressed pkglists
This commit is contained in:
parent
62198fabdc
commit
3d0bd9350a
4
apt.spec
4
apt.spec
@ -80,7 +80,8 @@ Patch101: apt-0.5.4cnc9-alt-getsrc-debug.patch
|
||||
Requires: libapt = %version-%release
|
||||
Requires: rpm >= 4.0.4-alt28, /etc/apt/pkgpriorities, apt-conf
|
||||
# for methods.
|
||||
Requires: bzip2, gzip, gnupg, alt-gpgkeys
|
||||
Requires: gzip, bzip2, xz
|
||||
Requires: gnupg, alt-gpgkeys
|
||||
|
||||
# for autopoint.
|
||||
BuildPreReq: cvs
|
||||
@ -321,6 +322,7 @@ install -pm644 %SOURCE1 %buildroot%_sysconfdir/%name/
|
||||
# This is still needed.
|
||||
ln -sf rsh %buildroot%_libdir/%name/methods/ssh
|
||||
ln -sf gzip %buildroot%_libdir/%name/methods/bzip2
|
||||
ln -sf gzip %buildroot%_libdir/%name/methods/xz
|
||||
|
||||
# Cleanup
|
||||
find %buildroot%_includedir -type f -name rpmshowprogress.h -delete -print
|
||||
|
@ -191,7 +191,7 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,pkgRepository *Repository,
|
||||
|
||||
// Create the item
|
||||
// CNC:2002-07-03
|
||||
Desc.URI = URI + _config->Find("Acquire::ComprExtension", ".bz2");
|
||||
Desc.URI = URI + ".bz2";
|
||||
Desc.Description = URIDesc;
|
||||
Desc.Owner = this;
|
||||
Desc.ShortDesc = ShortDesc;
|
||||
@ -227,6 +227,9 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,pkgRepository *Repository,
|
||||
unlink(FinalFile.c_str());
|
||||
unlink(DestFile.c_str());
|
||||
}
|
||||
|
||||
if (Repository->FindChecksums(RealURI + ".xz", Size, MD5Hash) == true)
|
||||
Desc.URI = URI + ".xz";
|
||||
}
|
||||
else if (Repository->IsAuthenticated() == true)
|
||||
{
|
||||
@ -360,11 +363,15 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string MD5,
|
||||
|
||||
Decompression = true;
|
||||
DestFile += ".decomp";
|
||||
|
||||
// CNC:2002-07-03
|
||||
Desc.URI = "bzip2:" + FileName;
|
||||
const char *prog = "bzip2";
|
||||
if (flExtension(Desc.URI) == "xz")
|
||||
prog = "xz";
|
||||
Desc.URI = string(prog) + ":" + FileName;
|
||||
QueueURI(Desc);
|
||||
// CNC:2002-07-03
|
||||
Mode = "bzip2";
|
||||
Mode = prog;
|
||||
}
|
||||
/*}}}*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user