summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc15
-rw-r--r--apt-pkg/acquire-item.h5
-rw-r--r--apt-pkg/algorithms.h3
-rw-r--r--apt-pkg/cacheiterators.h4
-rw-r--r--apt-pkg/cdrom.cc3
-rw-r--r--apt-pkg/deb/debmetaindex.cc4
-rw-r--r--apt-pkg/deb/debsystem.cc7
7 files changed, 16 insertions, 25 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index dea68f3ee..ef107444f 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -142,21 +142,20 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
{
Decompression = false;
Erase = false;
-
+
DestFile = _config->FindDir("Dir::State::lists") + "partial/";
DestFile += URItoFileName(URI);
if(comprExt.empty())
{
- // autoselect the compression method
- if(FileExists("/usr/bin/bzip2"))
- CompressionExtension = ".bz2";
- else
- CompressionExtension = ".gz";
+ // autoselect
+ if(FileExists("/usr/bin/bzip2"))
+ Desc.URI = URI + ".bz2";
+ else
+ Desc.URI = URI + ".gz";
} else {
- CompressionExtension = comprExt;
+ Desc.URI = URI + comprExt;
}
- Desc.URI = URI + CompressionExtension;
Desc.Description = URIDesc;
Desc.Owner = this;
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 90f80368b..ea71153d5 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -92,8 +92,7 @@ class pkgAcqIndex : public pkgAcquire::Item
pkgAcquire::ItemDesc Desc;
string RealURI;
string ExpectedMD5;
- string CompressionExtension;
-
+
public:
// Specialized action members
@@ -101,7 +100,7 @@ class pkgAcqIndex : public pkgAcquire::Item
virtual void Done(string Message,unsigned long Size,string Md5Hash,
pkgAcquire::MethodConfig *Cnf);
virtual string Custom600Headers();
- virtual string DescURI() {return RealURI + CompressionExtension;};
+ virtual string DescURI() {return RealURI + ".gz";};
pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
string ShortDesct, string ExpectedMD5, string compressExt="");
diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h
index b95218061..174a7f58d 100644
--- a/apt-pkg/algorithms.h
+++ b/apt-pkg/algorithms.h
@@ -118,8 +118,7 @@ class pkgProblemResolver
// Try to resolve problems only by using keep
bool ResolveByKeep();
-
- // Install all protected packages
+
void InstallProtect();
pkgProblemResolver(pkgDepCache *Cache);
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index c3a0d0a5a..62d2695dd 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -222,7 +222,7 @@ class pkgCache::PrvIterator
void operator ++(int) {if (Prv != Owner->ProvideP) Prv = Owner->ProvideP +
(Type == PrvVer?Prv->NextPkgProv:Prv->NextProvides);};
inline void operator ++() {operator ++(0);};
- inline bool end() const {return Owner == 0 || Prv == Owner->ProvideP?true:false;};
+ inline bool end() const {return Prv == Owner->ProvideP?true:false;};
// Comparison
inline bool operator ==(const PrvIterator &B) const {return Prv == B.Prv;};
@@ -244,8 +244,6 @@ class pkgCache::PrvIterator
inline PkgIterator OwnerPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[Prv->Version].ParentPkg);};
inline unsigned long Index() const {return Prv - Owner->ProvideP;};
- inline PrvIterator() : Prv(0), Type(PrvVer), Owner(0) {};
-
inline PrvIterator(pkgCache &Owner,Provides *Trg,Version *) :
Prv(Trg), Type(PrvVer), Owner(&Owner)
{
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index ce1beb39b..d7ef844a2 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -422,9 +422,6 @@ bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source)
{
F.getline(Buffer,sizeof(Buffer));
CurLine++;
- if (F.fail() && !F.eof())
- return _error->Error(_("Line %u too long in source list %s."),
- CurLine,File.c_str());
_strtabexpand(Buffer,sizeof(Buffer));
_strstrip(Buffer);
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 526c8c0b2..85e5b16b3 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -165,6 +165,10 @@ bool debReleaseIndex::IsTrusted() const
string VerifiedSigFile = _config->FindDir("Dir::State::lists") +
URItoFileName(MetaIndexURI("Release")) + ".gpg";
+ if(_config->FindB("APT::Authentication::TrustCDROM", false))
+ if(URI.substr(0,strlen("cdrom:")) == "cdrom:")
+ return true;
+
if (FileExists(VerifiedSigFile))
return true;
return false;
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index 2d805ea6f..0b3a4f742 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -164,12 +164,7 @@ bool debSystem::Initialize(Configuration &Cnf)
Cnf.CndSet("Dir::State::userstatus","status.user"); // Defunct
Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status");
Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg");
-
- if (StatusFile) {
- delete StatusFile;
- StatusFile = 0;
- }
-
+
return true;
}
/*}}}*/