diff options
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 27 | ||||
-rwxr-xr-x | cmdline/apt-key | 9 | ||||
-rwxr-xr-x | cmdline/apt-report-mirror-failure | 24 | ||||
-rw-r--r-- | cmdline/makefile | 6 |
4 files changed, 61 insertions, 5 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 258133c19..46172332f 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2086,6 +2086,33 @@ bool DoSource(CommandLine &CmdL) if (Last == 0) return _error->Error(_("Unable to find a source package for %s"),Src.c_str()); + string srec = Last->AsStr(); + string::size_type pos = srec.find("\nVcs-"); + while (pos != string::npos) + { + pos += strlen("\nVcs-"); + string vcs = srec.substr(pos,srec.find(":",pos)-pos); + if(vcs == "Browser") + { + pos = srec.find("\nVcs-", pos); + continue; + } + pos += vcs.length()+2; + string::size_type epos = srec.find("\n", pos); + string uri = srec.substr(pos,epos-pos).c_str(); + ioprintf(c1out, _("NOTICE: '%s' packaging is maintained in " + "the '%s' version control system at:\n" + "%s\n"), + Src.c_str(), vcs.c_str(), uri.c_str()); + if(vcs == "Bzr") + ioprintf(c1out,_("Please use:\n" + "bzr get %s\n" + "to retrieve the latest (possible unreleased) " + "updates to the package.\n"), + uri.c_str()); + break; + } + // Back track vector<pkgSrcRecords::File> Lst; if (Last->Files(Lst) == false) diff --git a/cmdline/apt-key b/cmdline/apt-key index c1dbb0d05..e2dbd8af7 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -9,10 +9,9 @@ GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-k GPG="$GPG_CMD --keyring /etc/apt/trusted.gpg" -MASTER_KEYRING="" -#MASTER_KEYRING=/usr/share/keyrings/debian-master-keyring.gpg -ARCHIVE_KEYRING=/usr/share/keyrings/debian-archive-keyring.gpg -REMOVED_KEYS=/usr/share/keyrings/debian-archive-removed-keys.gpg +MASTER_KEYRING=/usr/share/keyrings/ubuntu-master-keyring.gpg +ARCHIVE_KEYRING=/usr/share/keyrings/ubuntu-archive-keyring.gpg +REMOVED_KEYS=/usr/share/keyrings/ubuntu-archive-removed-keys.gpg add_keys_with_verify_against_master_keyring() { ADD_KEYRING=$1 @@ -51,7 +50,7 @@ add_keys_with_verify_against_master_keyring() { 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 5820c2e0f..c795921c1 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) |