diff options
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-cache.cc | 17 | ||||
-rw-r--r-- | cmdline/apt-get.cc | 29 | ||||
-rwxr-xr-x | cmdline/apt-key | 15 | ||||
-rwxr-xr-x | cmdline/apt-report-mirror-failure | 24 | ||||
-rw-r--r-- | cmdline/makefile | 6 |
5 files changed, 74 insertions, 17 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 4431fd4f9..425df6994 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -102,15 +102,13 @@ bool UnMet(CommandLine &CmdL) if (End->Type != pkgCache::Dep::PreDepends && End->Type != pkgCache::Dep::Depends && End->Type != pkgCache::Dep::Suggests && - End->Type != pkgCache::Dep::Recommends && - End->Type != pkgCache::Dep::DpkgBreaks) + End->Type != pkgCache::Dep::Recommends) continue; // Important deps only if (Important == true) if (End->Type != pkgCache::Dep::PreDepends && - End->Type != pkgCache::Dep::Depends && - End->Type != pkgCache::Dep::DpkgBreaks) + End->Type != pkgCache::Dep::Depends) continue; // Verify the or group @@ -557,6 +555,7 @@ bool Depends(CommandLine &CmdL) bool Recurse = _config->FindB("APT::Cache::RecurseDepends",false); bool Installed = _config->FindB("APT::Cache::Installed",false); + bool Important = _config->FindB("APT::Cache::Important",false); bool DidSomething; do { @@ -579,7 +578,12 @@ bool Depends(CommandLine &CmdL) for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) { - + // Important deps only + if (Important == true) + if (D->Type != pkgCache::Dep::PreDepends && + D->Type != pkgCache::Dep::Depends) + continue; + pkgCache::PkgIterator Trg = D.TargetPkg(); if((Installed && Trg->CurrentVer != 0) || !Installed) @@ -1529,7 +1533,8 @@ bool Policy(CommandLine &CmdL) if (SrcList->FindIndex(F,Indx) == false && _system->FindIndex(F,Indx) == false) return _error->Error(_("Cache is out of sync, can't x-ref a package file")); - printf(_("%4i %s\n"), + + printf("%4i %s\n", Plcy.GetPriority(F),Indx->Describe(true).c_str()); // Print the reference information for the package diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 028f371b5..adb1c9214 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1301,7 +1301,6 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, while ((Parse = SrcRecs.Find(Src.c_str(), MatchSrcOnly)) != 0) { string Ver = Parse->Version(); - // show name mismatches if (IsMatch == true && Parse->Package() != Src) ioprintf(c1out, _("No source package '%s' picking '%s' instead\n"), Parse->Package().c_str(), Src.c_str()); @@ -2104,6 +2103,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) @@ -2751,7 +2777,6 @@ int main(int argc,const char *argv[]) {"remove",&DoInstall}, {"purge",&DoInstall}, {"autoremove",&DoInstall}, - {"purge",&DoInstall}, {"dist-upgrade",&DoDistUpgrade}, {"dselect-upgrade",&DoDSelectUpgrade}, {"build-dep",&DoBuildDep}, diff --git a/cmdline/apt-key b/cmdline/apt-key index 7bb30240e..26aa55633 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -10,13 +10,10 @@ GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-k GPG="$GPG_CMD --keyring /etc/apt/trusted.gpg" -MASTER_KEYRING="" -ARCHIVE_KEYRING_URI="" -#MASTER_KEYRING=/usr/share/keyrings/debian-master-keyring.gpg -#ARCHIVE_KEYRING_URI=http://ftp.debian.org/debian/debian-archive-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 +ARCHIVE_KEYRING_URI=http://archive.ubuntu.com/ubuntu/project/ubuntu-archive-keyring.gpg add_keys_with_verify_against_master_keyring() { ADD_KEYRING=$1 @@ -80,14 +77,14 @@ net_update() { 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 # add new keys from the package; # we do not use add_keys_with_verify_against_master_keyring here, - # because "update" is run on regular package updates. A + # because we "update" is run on regular package updates. A # attacker might as well replace the master-archive-keyring file # in the package and add his own keys. so this check wouldn't # add any security. we *need* this check on net-update though diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure new file mode 100755 index 000000000..ef77d4954 --- /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", "") + #"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 3260e375b..5ae6fb0f1 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) |