diff options
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 2 | ||||
-rwxr-xr-x | cmdline/apt-key | 6 | ||||
-rwxr-xr-x | cmdline/apt-report-mirror-failure | 24 | ||||
-rw-r--r-- | cmdline/makefile | 6 |
4 files changed, 34 insertions, 4 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index fa7ae32eb..6aafe9704 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1519,7 +1519,7 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, // build regexp for the task char S[300]; - snprintf(S, sizeof(S), "^Task:.*[^a-z]%s[^a-z].*\n", taskname); + snprintf(S, sizeof(S), "^Task:.*[^a-z]%s[^a-z].*$", taskname); regcomp(&Pattern,S, REG_EXTENDED | REG_NOSUB | REG_NEWLINE); bool found = false; diff --git a/cmdline/apt-key b/cmdline/apt-key index 90ecae2cf..7c1aad0cf 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -9,14 +9,14 @@ GPG_CMD="gpg --no-options --no-default-keyring --secret-keyring /etc/apt/secring GPG="$GPG_CMD --keyring /etc/apt/trusted.gpg" -ARCHIVE_KEYRING=/usr/share/keyrings/debian-archive-keyring.gpg -REMOVED_KEYS=/usr/share/keyrings/debian-archive-removed-keys.gpg +ARCHIVE_KEYRING=/usr/share/keyrings/ubuntu-archive-keyring.gpg +REMOVED_KEYS=/usr/share/keyrings/ubuntu-archive-removed-keys.gpg update() { if [ ! -f $ARCHIVE_KEYRING ]; then echo >&2 "ERROR: Can't find the archive-keyring" - echo >&2 "Is the debian-archive-keyring package installed?" + echo >&2 "Is the ubuntu-keyring package installed?" exit 1 fi diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure new file mode 100755 index 000000000..1567e78e3 --- /dev/null +++ b/cmdline/apt-report-mirror-failure @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import sys +import urllib +import apt_pkg + +apt_pkg.init() +url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", None) + #"http://people.ubuntu.com:9000/mirror-failure") + #"http://localhost:9000/mirror-failure") +if not url: + sys.exit(0) + +print "Reporting mirror failure to '%s'" % url + +data = {} +data['mirror'] = sys.argv[1] +data['failurl'] = sys.argv[2] +data['error'] = sys.argv[3] +f = urllib.urlopen(url, urllib.urlencode(data)) +f.read() +f.close() + + diff --git a/cmdline/makefile b/cmdline/makefile index 49035be44..2a5bdfbea 100644 --- a/cmdline/makefile +++ b/cmdline/makefile @@ -58,3 +58,9 @@ SOURCE=apt-mark TO=$(BIN) TARGET=program include $(COPY_H) + +# The apt-key program +SOURCE=apt-report-mirror-failure +TO=$(BIN) +TARGET=program +include $(COPY_H) |