summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/acquire-item.cc20
-rw-r--r--apt-pkg/deb/deblistparser.cc2
-rw-r--r--apt-pkg/depcache.cc4
-rw-r--r--apt-pkg/policy.cc15
-rw-r--r--cmdline/apt-get.cc3
-rw-r--r--debian/apt.cron.daily38
-rw-r--r--debian/changelog61
-rw-r--r--debian/control6
-rw-r--r--doc/apt-key.8.xml16
-rw-r--r--doc/apt_preferences.5.xml43
10 files changed, 186 insertions, 22 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);
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index cd96b8201..3821b5d4c 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -2638,6 +2638,9 @@ bool DoSource(CommandLine &CmdL)
bool DoBuildDep(CommandLine &CmdL)
{
CacheFile Cache;
+
+ _config->Set("APT::Install-Recommends", false);
+
if (Cache.Open(true) == false)
return false;
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index 9048ca7fe..1dfaa04a3 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -305,6 +305,26 @@ debug_echo()
fi
}
+check_power(){
+ # laptop check, on_ac_power returns:
+ # 0 (true) System is on main power
+ # 1 (false) System is not on main power
+ # 255 (false) Power status could not be determined
+ # Desktop systems always return 255 it seems
+ if which on_ac_power >/dev/null; then
+ on_ac_power
+ POWER=$?
+ if [ $POWER -eq 1 ]; then
+ debug_echo "exit: system NOT on main power"
+ return 1
+ elif [ $POWER -ne 0 ]; then
+ debug_echo "power status ($POWER) undetermined, continuing"
+ fi
+ debug_echo "system is on main power."
+ fi
+ return 0
+}
+
# ------------------------ main ----------------------------
# Backup the 7 last versions of APT's extended_states file
@@ -350,22 +370,7 @@ if [ "$VERBOSE" -ge 3 ]; then
set -x
fi
-# laptop check, on_ac_power returns:
-# 0 (true) System is on main power
-# 1 (false) System is not on main power
-# 255 (false) Power status could not be determined
-# Desktop systems always return 255 it seems
-if which on_ac_power >/dev/null; then
- on_ac_power
- POWER=$?
- if [ $POWER -eq 1 ]; then
- debug_echo "exit: system NOT on main power"
- exit 0
- elif [ $POWER -ne 0 ]; then
- debug_echo "power status ($POWER) undetermined, continuing"
- fi
- debug_echo "system is on main power."
-fi
+check_power || exit 0
# check if we can lock the cache and if the cache is clean
if which apt-get >/dev/null && ! eval apt-get check -f $XAPTOPT $XSTDERR ; then
@@ -416,6 +421,7 @@ do_cache_backup $BackupArchiveInterval
# sleep random amount of time to avoid hitting the
# mirrors at the same time
random_sleep
+check_power || exit 0
# include default system language so that "apt-get update" will
# fetch the right translated package descriptions
diff --git a/debian/changelog b/debian/changelog
index 7d50f4f37..54eb90bc0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,64 @@
+apt (0.8.14.1ubuntu1) oneiric; urgency=low
+
+ [ Michael Vogt ]
+ * merged from the debian-sid bzr branch
+
+ [ Julian Andres Klode ]
+ * 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)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 29 Apr 2011 17:55:20 +0200
+
+apt (0.8.14.1) unstable; urgency=low
+
+ * apt-pkg/acquire-item.cc:
+ - Only try to rename existing Release files (Closes: #622912)
+
+ -- Julian Andres Klode <jak@debian.org> Sat, 16 Apr 2011 14:36:10 +0200
+
+apt (0.8.14) unstable; urgency=low
+
+ [ Julian Andres Klode ]
+ * 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
+
+ [ Michael Vogt ]
+ * 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)
+
+ [ David Kalnischkies ]
+ * 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
+
+ -- Julian Andres Klode <jak@debian.org> Fri, 15 Apr 2011 14:28:15 +0200
+
apt (0.8.13.2ubuntu3) natty-proposed; urgency=low
* apt-pkg/deb/dpkgpm.cc:
diff --git a/debian/control b/debian/control
index 36573da4b..e966c1e34 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ XSBC-Original-Maintainer: APT Development Team <deity@lists.debian.org>
Uploaders: Michael Vogt <mvo@debian.org>, Otavio Salvador <otavio@debian.org>,
Christian Perrier <bubulle@debian.org>, Daniel Burrows <dburrows@debian.org>,
Julian Andres Klode <jak@debian.org>
-Standards-Version: 3.9.0
+Standards-Version: 3.9.2
Build-Depends: dpkg-dev (>= 1.15.8), debhelper (>= 7.2.3~), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.0), zlib1g-dev | libz-dev, debiandoc-sgml, xsltproc, docbook-xsl, docbook-xml, po4a (>= 0.34-2), autotools-dev, autoconf, automake, doxygen
Build-Conflicts: autoconf2.13, automake1.4
Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/
@@ -14,10 +14,10 @@ Vcs-Browser: http://bzr.debian.org/loggerhead/apt/debian-sid/
Package: apt
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, gnupg
Replaces: manpages-pl (<< 20060617-3~)
Provides: ${libapt-pkg:provides}
-Recommends: ubuntu-keyring, gpg
+Recommends: ubuntu-keyring
Conflicts: python-apt (<< 0.7.93.2~)
Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt
Description: Advanced front-end for dpkg
diff --git a/doc/apt-key.8.xml b/doc/apt-key.8.xml
index f1cc3ac02..9bfab84b6 100644
--- a/doc/apt-key.8.xml
+++ b/doc/apt-key.8.xml
@@ -136,6 +136,22 @@
</listitem>
</varlistentry>
+
+ <varlistentry><term>net-update</term>
+ <listitem>
+ <para>
+
+ Update the local keyring with the keys of a key server
+ and removes from the keyring the archive keys which are no
+ longer valid. This requires an installed wget and an APT
+ build configured to have a server to fetch from. APT in
+ Debian does not support this command, but Ubuntu's APT
+ does.
+
+ </para>
+
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml
index 219da7cd1..55504f3e5 100644
--- a/doc/apt_preferences.5.xml
+++ b/doc/apt_preferences.5.xml
@@ -259,6 +259,49 @@ Pin-Priority: 500
</refsect2>
+<refsect2><title>Regular expressions and glob() syntax</title>
+<para>
+APT also supports pinning by glob() expressions and regular
+expressions surrounded by /. For example, the following
+example assigns the priority 500 to all packages from
+experimental where the name starts with gnome (as a glob()-like
+expression or contains the word kde (as a POSIX extended regular
+expression surrounded by slashes).
+</para>
+
+<programlisting>
+Package: gnome* /kde/
+Pin: release n=experimental
+Pin-Priority: 500
+</programlisting>
+
+<para>
+The rule for those expressions is that they can occur anywhere
+where a string can occur. Those, the following pin assigns the
+priority 990 to all packages from a release starting with karmic.
+</para>
+
+<programlisting>
+Package: *
+Pin: release n=karmic*
+Pin-Priority: 990
+</programlisting>
+
+If a regular expression occurs in a <literal>Package</literal> field,
+the behavior is the same as if this regular expression were replaced
+with a list of all package names it matches. It is undecided whether
+this will change in the future, thus you should always list wild-card
+pins first, so later specific pins override it.
+
+The pattern "<literal>*</literal>" in a Package field is not considered
+a glob() expression in itself.
+
+</refsect2>
+
+
+
+
+
<refsect2>
<title>How APT Interprets Priorities</title>