diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-05-02 09:40:26 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-05-02 09:40:26 +0200 |
commit | f4fd0a1c34babf8fbac71bc3471b41b411e414b2 (patch) | |
tree | 505cc791de97dbfd8d1f979c651bb3336f69028a /apt-pkg | |
parent | ecc8d43394155ea99960f66ed35713c701801c3f (diff) | |
parent | a63bbd7e93ec5e231d5d9b0b33cffec5cf6192d0 (diff) |
* merged from the debian-sid bzr branch
* apt-pkg/depcache.cc:
- Really release action groups only once (Closes: #622744)
- Make purge work again for config-files (LP: #244598) (Closes: #150831)
* debian/apt.cron.daily:
- Check power after wait, patch by manuel-soto (LP: #705269)
* debian/control:
- Move ${shlibs:Depends} to Pre-Depends, as we do not want APT
unpacked if a library is too old and thus break upgrades
* doc/apt-key.8.xml:
- Document apt-key net-update (LP: #192810)
* apt-pkg/acquire-item.cc:
- Only try to rename existing Release files (Closes: #622912)
* apt-pkg/indexcopy.cc:
- Use RealFileExists() instead of FileExists(), allows amongst other
things a directory named Sources to exist on a CD-ROM (LP: #750694).
* apt-pkg/acquire-item.cc:
- Use Release files even if they cannot be verified (LP: #704595)
* cmdline/apt-get.cc:
- Do not install recommends for build-dep (Closes: #454479) (LP: #245273)
* apt-pkg/deb/deblistparser.cc:
- Handle no space before "[" in build-dependencies (LP: #72344)
* apt-pkg/policy.cc:
- Allow pinning by glob() expressions, and regular expressions
surrounded by slashes (the "/" character) (LP: #399474)
(Closes: #121132)
* debian/control:
- Set Standards-Version to 3.9.2
* mirror method:
- do not crash if the mirror file fails to download
* apt-pkg/aptconfiguration.cc:
- fix comparing for a empty string
* debian/apt.cron.daily:
- run unattended-upgrades even if there was a error during
the apt-get update (LP: #676295)
* apt-pkg/pkgcache.cc:
- use the native Architecture stored in the cache header instead of
loading it from configuration as suggested by Julian Andres Klode
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-item.cc | 20 | ||||
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 2 | ||||
-rw-r--r-- | apt-pkg/depcache.cc | 4 | ||||
-rw-r--r-- | apt-pkg/policy.cc | 15 |
4 files changed, 38 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 39b9feff2..7b120d3ce 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1502,6 +1502,26 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) ReportMirrorFailure("GPGFailure"); } + /* Always move the meta index, even if gpgv failed. This ensures + * that PackageFile objects are correctly filled in */ + if (FileExists(DestFile)) { + string FinalFile = _config->FindDir("Dir::State::lists"); + FinalFile += URItoFileName(RealURI); + /* InRelease files become Release files, otherwise + * they would be considered as trusted later on */ + if (SigFile == DestFile) { + RealURI = RealURI.replace(RealURI.rfind("InRelease"), 9, + "Release"); + FinalFile = FinalFile.replace(FinalFile.rfind("InRelease"), 9, + "Release"); + SigFile = FinalFile; + } + Rename(DestFile,FinalFile); + chmod(FinalFile.c_str(),0644); + + DestFile = FinalFile; + } + // No Release file was present, or verification failed, so fall // back to queueing Packages files without verification QueueIndexes(false); diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 4be626741..b59ae8896 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -487,7 +487,7 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop, // Parse off the package name const char *I = Start; for (;I != Stop && isspace(*I) == 0 && *I != '(' && *I != ')' && - *I != ',' && *I != '|'; I++); + *I != ',' && *I != '|' && *I != '[' && *I != ']'; I++); // Malformed, no '(' if (I != Stop && *I == ')') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 8cf322464..09a2cac2d 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -70,7 +70,7 @@ void pkgDepCache::ActionGroup::release() cache.MarkAndSweep(); } - released = false; + released = true; } } @@ -550,7 +550,7 @@ void pkgDepCache::AddStates(const PkgIterator &Pkg,int Add) if (Pkg->CurrentVer == 0) { if (State.Mode == ModeDelete && - (State.iFlags | Purge) == Purge && Pkg.Purge() == false) + (State.iFlags & Purge) == Purge && Pkg.Purge() == false) iDelCount += Add; if (State.Mode == ModeInstall) diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 94c7fd4af..3d6ec1cdc 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -216,6 +216,21 @@ void pkgPolicy::CreatePin(pkgVersionMatch::MatchType Type,string Name, P->Data = Data; return; } + + // Allow pinning by wildcards + // TODO: Maybe we should always prefer specific pins over non- + // specific ones. + if (Name.find("*") != string::npos || Name.find("[") != string::npos + || Name.find("?") != string::npos || Name[0] == '/') { + pkgVersionMatch match(Data, Type); + for (pkgCache::PkgIterator P = Cache->PkgBegin(); + P != Cache->PkgEnd(); P++) { + if (match.ExpressionMatches(Name, P.Name())) { + CreatePin(Type, P.Name(), Data, Priority); + } + } + return; + } // Get a spot to put the pin pkgCache::GrpIterator Grp = Cache->FindGrp(Name); |