From b47081521b0df1f835a2111254fa1fcd77240a85 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 23 Jan 2007 18:43:42 +0100 Subject: * cmdline/report-mirror-failure - basic mirror failure script added --- cmdline/report-mirror-failure | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 cmdline/report-mirror-failure (limited to 'cmdline') diff --git a/cmdline/report-mirror-failure b/cmdline/report-mirror-failure new file mode 100755 index 000000000..8301ed079 --- /dev/null +++ b/cmdline/report-mirror-failure @@ -0,0 +1,21 @@ +#!/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) + +data = {} +data['url'] = sys.argv[1] +data['error'] = sys.argv[2] +f = urllib.urlopen(url, urllib.urlencode(data)) +f.read() +f.close() + + -- cgit v1.2.3 From 362d29343e5d25248bcd84300aa1b18effe891e7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 24 Jan 2007 14:42:17 +0100 Subject: make the mirror failures actually produce a error message --- cmdline/makefile | 6 ++++++ cmdline/report-mirror-failure | 21 -------------------- configure.in | 2 +- debian/changelog | 2 +- methods/mirror.cc | 46 ++++++++++++++++++++++++++++++++----------- po/apt-all.pot | 6 +++--- 6 files changed, 46 insertions(+), 37 deletions(-) delete mode 100755 cmdline/report-mirror-failure (limited to 'cmdline') diff --git a/cmdline/makefile b/cmdline/makefile index 882a0e1b5..f07c7da3b 100644 --- a/cmdline/makefile +++ b/cmdline/makefile @@ -52,3 +52,9 @@ SOURCE=apt-key TO=$(BIN) TARGET=program include $(COPY_H) + +# The apt-key program +SOURCE=apt-report-mirror-failure +TO=$(LIB) +TARGET=program +include $(COPY_H) diff --git a/cmdline/report-mirror-failure b/cmdline/report-mirror-failure deleted file mode 100755 index 8301ed079..000000000 --- a/cmdline/report-mirror-failure +++ /dev/null @@ -1,21 +0,0 @@ -#!/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) - -data = {} -data['url'] = sys.argv[1] -data['error'] = sys.argv[2] -f = urllib.urlopen(url, urllib.urlencode(data)) -f.read() -f.close() - - diff --git a/configure.in b/configure.in index 81f327c37..df452ba34 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.6.46.3") +AC_DEFINE_UNQUOTED(VERSION,"0.6.46.4") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 24e10dcd5..6c9ada3a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ apt (0.6.46.4) unstable; urgency=low * add apt-secure.8 to "See also" section - -- + -- Michael Vogt Wed, 24 Jan 2007 14:34:15 +0100 apt (0.6.46.3) unstable; urgency=low diff --git a/methods/mirror.cc b/methods/mirror.cc index 6621d47e2..8f9b8ed34 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -30,13 +30,18 @@ using namespace std; #include "apti18n.h" /*}}}*/ -/* +/* Done: + * - works with http only + * - always picks the first mirror from the list + * - call out to problem reporting script + * - supports "deb mirror://host/path/to/mirror-list/// dist component" + * * TODO: - * - what about gpgv failures? better standard format for errors - to send back to LP - #OR# - * - implement it at the pkgAcquire::Item::Failed() level but then - we need to send back what uri exactly was failing + * what about gpgv failures? this should call-out to the problem reporting + script, but we need to know what mirror was used + * better standard format for errors to send back + * - implement failure reporting at the pkgAcquire::Item::Failed() level + but then we need to send back what uri exactly was failing [mvo: the problem with this approach is ::Failed() is not really called for all failures :/ e.g. md5sum mismatch in a archive is not] @@ -46,6 +51,7 @@ using namespace std; * - magicmarker is (a bit) evil, maybe just use a similar approach as in clean and read the sources.list and use the GetURI() method to find the prefix? + * support more than http * - testing :) */ @@ -243,16 +249,34 @@ void MirrorMethod::URIDone(FetchResult &Res,FetchResult *Alt) void MirrorMethod::ReportMirrorFailure(string FailCode) { // report that Queue->Uri failed +#if 0 std::cerr << "\nReportMirrorFailure: " << Queue->Uri << " FailCode: " << FailCode << std::endl; -#if 0 // FIXME: do not use system, make sure to properly encode - // URI/FailCode, do not hardcode the submit url - system("curl -d url=" + Queue->Uri + - " -d FailureCode=" + FailCode + - " http://localhost:8000/ &"); #endif + const char *Args[40]; + unsigned int i = 0; + string report = _config->Find("Methods::Mirror::ProblemReporting", + "/usr/lib/apt/report-mirror-failure"); + Args[i++] = report.c_str(); + Args[i++] = Queue->Uri.c_str(); + Args[i++] = FailCode.c_str(); + pid_t pid = ExecFork(); + if(pid < 0) + { + _error->Error("ReportMirrorFailure Fork failed"); + return; + } + else if(pid == 0) + { + execvp(report.c_str(), (char**)Args); + } + if(!ExecWait(pid, "report-mirror-failure")) + { + _error->Warning("Couldn't report problem to '%s'", + _config->Find("Acquire::Mirror::ReportFailures").c_str()); + } } int main() diff --git a/po/apt-all.pot b/po/apt-all.pot index aee5c09c8..dd140bd63 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-11-24 16:37+0100\n" +"POT-Creation-Date: 2007-01-24 12:51+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1330,7 +1330,7 @@ msgstr "" #: apt-inst/extract.cc:467 apt-pkg/contrib/configuration.cc:750 #: apt-pkg/contrib/cdromutl.cc:153 apt-pkg/sourcelist.cc:324 -#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:92 +#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:96 #, c-format msgid "Unable to read %s" msgstr "" @@ -1956,7 +1956,7 @@ msgid "Unable to stat the mount point %s" msgstr "" #: apt-pkg/contrib/cdromutl.cc:149 apt-pkg/acquire.cc:427 apt-pkg/clean.cc:44 -#: methods/mirror.cc:98 +#: methods/mirror.cc:102 #, c-format msgid "Unable to change to %s" msgstr "" -- cgit v1.2.3 From 36280399db0ae203d3f1ae4d44b946f31e9a38ce Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 1 Feb 2007 12:32:50 +0100 Subject: * commited the latest mirror failure detection code --- apt-pkg/acquire-item.cc | 51 +++++++++++++++++++++++++++++++-------- apt-pkg/acquire-item.h | 5 +++- apt-pkg/acquire-method.cc | 21 ++++++++++------ apt-pkg/acquire-method.h | 8 +++--- cmdline/apt-report-mirror-failure | 23 ++++++++++++++++++ methods/connect.cc | 17 ++++++------- methods/mirror.cc | 45 +++------------------------------- methods/mirror.h | 1 - po/apt-all.pot | 44 ++++++++++++++++----------------- 9 files changed, 120 insertions(+), 95 deletions(-) create mode 100755 cmdline/apt-report-mirror-failure (limited to 'cmdline') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 7b2a89763..61564c7aa 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -79,6 +79,10 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf) Status = StatError; Dequeue(); } + + // report mirror failure back to LP if we actually use a mirror + if(!UsedMirror.empty()) + ReportMirrorFailure(ErrorText); } /*}}}*/ // Acquire::Item::Start - Item has begun to download /*{{{*/ @@ -100,6 +104,7 @@ void pkgAcquire::Item::Done(string Message,unsigned long Size,string, { // We just downloaded something.. string FileName = LookupTag(Message,"Filename"); + UsedMirror = LookupTag(Message,"UsedMirror"); if (Complete == false && FileName == DestFile) { if (Owner->Log != 0) @@ -108,7 +113,6 @@ void pkgAcquire::Item::Done(string Message,unsigned long Size,string, if (FileSize == 0) FileSize= Size; - Status = StatDone; ErrorText = string(); Owner->Dequeue(this); @@ -131,6 +135,42 @@ void pkgAcquire::Item::Rename(string From,string To) } /*}}}*/ +void pkgAcquire::Item::ReportMirrorFailure(string FailCode) +{ + // report that Queue->Uri failed +#if 0 + std::cerr << "\nReportMirrorFailure: " + << UsedMirror + << " FailCode: " + << FailCode << std::endl; +#endif + const char *Args[40]; + unsigned int i = 0; + string report = _config->Find("Methods::Mirror::ProblemReporting", + "/usr/bin/apt-report-mirror-failure"); + if(!FileExists(report)) + return; + Args[i++] = report.c_str(); + Args[i++] = UsedMirror.c_str(); + Args[i++] = FailCode.c_str(); + pid_t pid = ExecFork(); + if(pid < 0) + { + _error->Error("ReportMirrorFailure Fork failed"); + return; + } + else if(pid == 0) + { + execvp(report.c_str(), (char**)Args); + } + if(!ExecWait(pid, "report-mirror-failure")) + { + _error->Warning("Couldn't report problem to '%s'", + _config->Find("Acquire::Mirror::ReportFailures").c_str()); + } +} + + // AcqIndex::AcqIndex - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The package file is added to the queue and a second class is @@ -176,8 +216,6 @@ string pkgAcqIndex::Custom600Headers() struct stat Buf; if (stat(Final.c_str(),&Buf) != 0) return "\nIndex-File: true"; - if(ExpectedMD5 != "") - return "\nExpectedMD5: " + ExpectedMD5; return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } /*}}}*/ @@ -1016,13 +1054,6 @@ void pkgAcqArchive::Failed(string Message,pkgAcquire::MethodConfig *Cnf) } } /*}}}*/ -// --------------------------------------------------------------------- -string pkgAcqArchive::Custom600Headers() -{ - if(MD5 != "") - return "\nExpectedMD5: " + MD5; - return ""; -} // AcqArchive::IsTrusted - Determine whether this archive comes from a // trusted source /*{{{*/ // --------------------------------------------------------------------- diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index c9cd75321..9949d0044 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -56,6 +56,7 @@ class pkgAcquire::Item unsigned long ID; bool Complete; bool Local; + string UsedMirror; // Number of queues we are inserted into unsigned int QueueCounter; @@ -78,6 +79,9 @@ class pkgAcquire::Item pkgAcquire *GetOwner() {return Owner;}; virtual bool IsTrusted() {return false;}; + // report mirror problems + void ReportMirrorFailure(string FailCode); + Item(pkgAcquire *Owner); virtual ~Item(); }; @@ -205,7 +209,6 @@ class pkgAcqArchive : public pkgAcquire::Item virtual string ShortDesc() {return Desc.ShortDesc;}; virtual void Finished(); virtual bool IsTrusted(); - virtual string Custom600Headers(); pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, pkgRecords *Recs,pkgCache::VerIterator const &Version, diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index 638797657..13201d310 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -99,12 +99,11 @@ void pkgAcqMethod::Fail(string Err,bool Transient) } char S[1024]; + char *End = S; if (Queue != 0) { - snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: %s\n" - "Message: %s %s\n",Queue->Uri.c_str(),Err.c_str(), - FailExtra.c_str()); - + End += snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: %s\n" + "Message: %s %s\n",Queue->Uri.c_str(), Err.c_str(), IP.c_str()); // Dequeue FetchItem *Tmp = Queue; Queue = Queue->Next; @@ -113,10 +112,14 @@ void pkgAcqMethod::Fail(string Err,bool Transient) QueueBack = Queue; } else - snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: \n" - "Message: %s %s\n",Err.c_str(), - FailExtra.c_str()); - + { + End += snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: \n" + "Message: %s\n",Err.c_str()); + } + if(FailReason.empty() == false) + End += snprintf(End,sizeof(S)-50 - (End - S),"FailReason: %s\n",FailReason.c_str()); + if (UsedMirror.empty() == false) + End += snprintf(End,sizeof(S)-50 - (End - S),"UsedMirror: %s\n",UsedMirror.c_str()); // Set the transient flag if (Transient == true) strcat(S,"Transient-Failure: true\n\n"); @@ -182,6 +185,8 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt) End += snprintf(End,sizeof(S)-50 - (End - S),"MD5-Hash: %s\n",Res.MD5Sum.c_str()); if (Res.SHA1Sum.empty() == false) End += snprintf(End,sizeof(S)-50 - (End - S),"SHA1-Hash: %s\n",Res.SHA1Sum.c_str()); + if (UsedMirror.empty() == false) + End += snprintf(End,sizeof(S)-50 - (End - S),"UsedMirror: %s\n",UsedMirror.c_str()); if (Res.GPGVOutput.size() > 0) End += snprintf(End,sizeof(S)-50 - (End - S),"GPGVOutput:\n"); for (vector::iterator I = Res.GPGVOutput.begin(); diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h index 9e908d32c..ee68c75f7 100644 --- a/apt-pkg/acquire-method.h +++ b/apt-pkg/acquire-method.h @@ -55,7 +55,9 @@ class pkgAcqMethod vector Messages; FetchItem *Queue; FetchItem *QueueBack; - string FailExtra; + string FailReason; + string UsedMirror; + string IP; // Handlers for messages virtual bool Configuration(string Message); @@ -72,7 +74,6 @@ class pkgAcqMethod virtual void Exit() {}; public: - enum CnfFlags {SingleInstance = (1<<0), Pipeline = (1<<1), SendConfig = (1<<2), LocalOnly = (1<<3), NeedsCleanup = (1<<4), @@ -82,7 +83,8 @@ class pkgAcqMethod void Status(const char *Format,...); int Run(bool Single = false); - inline void SetFailExtraMsg(string Msg) {FailExtra = Msg;}; + inline void SetFailReason(string Msg) {FailReason = Msg;}; + inline void SetIP(string aIP) {IP = aIP;}; pkgAcqMethod(const char *Ver,unsigned long Flags = 0); virtual ~pkgAcqMethod() {}; diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure new file mode 100755 index 000000000..70b16cf4f --- /dev/null +++ b/cmdline/apt-report-mirror-failure @@ -0,0 +1,23 @@ +#!/usr/bin/python + +import sys +import urllib +import apt_pkg + +print "apt-report-mirror-failure" + +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) + +data = {} +data['url'] = sys.argv[1] +data['error'] = sys.argv[2] +f = urllib.urlopen(url, urllib.urlencode(data)) +f.read() +f.close() + + diff --git a/methods/connect.cc b/methods/connect.cc index 8c2ac6d56..4e227c3fd 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -18,6 +18,7 @@ #include #include #include +#include // Internet stuff #include @@ -67,12 +68,10 @@ static bool DoConnect(struct addrinfo *Addr,string Host, wrong this will get tacked onto the end of the error message */ if (LastHostAddr->ai_next != 0) { - char Name2[NI_MAXHOST + NI_MAXSERV + 10]; - snprintf(Name2,sizeof(Name2),_("[IP: %s %s]"),Name,Service); - Owner->SetFailExtraMsg(string(Name2)); - } - else - Owner->SetFailExtraMsg(""); + std::stringstream ss; + ioprintf(ss, _("[IP: %s %s]"),Name,Service); + Owner->SetIP(ss.str()); + } // Get a socket if ((Fd = socket(Addr->ai_family,Addr->ai_socktype, @@ -89,7 +88,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host, /* This implements a timeout for connect by opening the connection nonblocking */ if (WaitFd(Fd,true,TimeOut) == false) { - Owner->SetFailExtraMsg("\nFailReason: Timeout"); + Owner->SetFailReason("Timeout"); return _error->Error(_("Could not connect to %s:%s (%s), " "connection timed out"),Host.c_str(),Service,Name); } @@ -104,7 +103,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host, { errno = Err; if(errno == ECONNREFUSED) - Owner->SetFailExtraMsg("\nFailReason: ConnectionRefused"); + Owner->SetFailReason("ConnectionRefused"); return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(), Service,Name); } @@ -169,7 +168,7 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd, if (Res == EAI_AGAIN) { - Owner->SetFailExtraMsg("\nFailReason: TmpResolveFailure"); + Owner->SetFailReason("TmpResolveFailure"); return _error->Error(_("Temporary failure resolving '%s'"), Host.c_str()); } diff --git a/methods/mirror.cc b/methods/mirror.cc index 8f9b8ed34..8ccfb8559 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -38,7 +38,7 @@ using namespace std; * * TODO: * what about gpgv failures? this should call-out to the problem reporting - script, but we need to know what mirror was used + script, but we need to know what mirror was used -> just run pkgAcquire::Item::ReportMirrorFailure() * better standard format for errors to send back * - implement failure reporting at the pkgAcquire::Item::Failed() level but then we need to send back what uri exactly was failing @@ -48,7 +48,7 @@ using namespace std; * - deal with runing as non-root because we can't write to the lists dir then -> use the cached mirror file * - better method to download than having a pkgAcquire interface here - * - magicmarker is (a bit) evil, maybe just use a similar approach as in + * - magicmarker is evil, maybe just use a similar approach as in clean and read the sources.list and use the GetURI() method to find the prefix? * support more than http @@ -191,6 +191,8 @@ bool MirrorMethod::SelectMirror() getline(in, Mirror); if(Debug) cerr << "Using mirror: " << Mirror << endl; + + UsedMirror = Mirror; return true; } @@ -220,9 +222,6 @@ bool MirrorMethod::Fetch(FetchItem *Itm) void MirrorMethod::Fail(string Err,bool Transient) { - // FIXME: queue next mirror? - ReportMirrorFailure(Err); - if(Queue->Uri.find("http://") != string::npos) Queue->Uri.replace(0,Mirror.size(), BaseUri); pkgAcqMethod::Fail(Err, Transient); @@ -237,47 +236,11 @@ void MirrorMethod::URIStart(FetchResult &Res) void MirrorMethod::URIDone(FetchResult &Res,FetchResult *Alt) { - // FIXME: queue next mirror? - if(Queue->ExpectedMD5 != "" && Res.MD5Sum != Queue->ExpectedMD5) - ReportMirrorFailure("499 Hash mismatch"); - if(Queue->Uri.find("http://") != string::npos) Queue->Uri.replace(0,Mirror.size(), BaseUri); pkgAcqMethod::URIDone(Res, Alt); } -void MirrorMethod::ReportMirrorFailure(string FailCode) -{ - // report that Queue->Uri failed -#if 0 - std::cerr << "\nReportMirrorFailure: " - << Queue->Uri - << " FailCode: " - << FailCode << std::endl; -#endif - const char *Args[40]; - unsigned int i = 0; - string report = _config->Find("Methods::Mirror::ProblemReporting", - "/usr/lib/apt/report-mirror-failure"); - Args[i++] = report.c_str(); - Args[i++] = Queue->Uri.c_str(); - Args[i++] = FailCode.c_str(); - pid_t pid = ExecFork(); - if(pid < 0) - { - _error->Error("ReportMirrorFailure Fork failed"); - return; - } - else if(pid == 0) - { - execvp(report.c_str(), (char**)Args); - } - if(!ExecWait(pid, "report-mirror-failure")) - { - _error->Warning("Couldn't report problem to '%s'", - _config->Find("Acquire::Mirror::ReportFailures").c_str()); - } -} int main() { diff --git a/methods/mirror.h b/methods/mirror.h index 3ff9e1a96..798f5a9b5 100644 --- a/methods/mirror.h +++ b/methods/mirror.h @@ -35,7 +35,6 @@ class MirrorMethod : public HttpMethod bool GetMirrorFile(string uri); bool SelectMirror(); bool Clean(string dir); - void ReportMirrorFailure(string FailCode); // we need to overwrite those to transform the url back virtual void Fail(string Why, bool Transient = false); diff --git a/po/apt-all.pot b/po/apt-all.pot index dd140bd63..15b650fda 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-01-24 12:51+0100\n" +"POT-Creation-Date: 2007-01-24 17:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -950,7 +950,7 @@ msgstr "" msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1716 methods/ftp.cc:702 methods/connect.cc:101 +#: cmdline/apt-get.cc:1716 methods/ftp.cc:702 methods/connect.cc:100 msgid "Failed" msgstr "" @@ -1330,7 +1330,7 @@ msgstr "" #: apt-inst/extract.cc:467 apt-pkg/contrib/configuration.cc:750 #: apt-pkg/contrib/cdromutl.cc:153 apt-pkg/sourcelist.cc:324 -#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:96 +#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:99 #, c-format msgid "Unable to read %s" msgstr "" @@ -1648,59 +1648,59 @@ msgstr "" msgid "Unable to invoke " msgstr "" -#: methods/connect.cc:64 +#: methods/connect.cc:65 #, c-format msgid "Connecting to %s (%s)" msgstr "" -#: methods/connect.cc:71 +#: methods/connect.cc:72 #, c-format msgid "[IP: %s %s]" msgstr "" -#: methods/connect.cc:80 +#: methods/connect.cc:79 #, c-format msgid "Could not create a socket for %s (f=%u t=%u p=%u)" msgstr "" -#: methods/connect.cc:86 +#: methods/connect.cc:85 #, c-format msgid "Cannot initiate the connection to %s:%s (%s)." msgstr "" -#: methods/connect.cc:93 +#: methods/connect.cc:92 #, c-format msgid "Could not connect to %s:%s (%s), connection timed out" msgstr "" -#: methods/connect.cc:108 +#: methods/connect.cc:107 #, c-format msgid "Could not connect to %s:%s (%s)." msgstr "" #. We say this mainly because the pause here is for the #. ssh connection that is still going -#: methods/connect.cc:136 methods/rsh.cc:425 +#: methods/connect.cc:135 methods/rsh.cc:425 #, c-format msgid "Connecting to %s" msgstr "" -#: methods/connect.cc:167 +#: methods/connect.cc:166 #, c-format msgid "Could not resolve '%s'" msgstr "" -#: methods/connect.cc:173 +#: methods/connect.cc:172 #, c-format msgid "Temporary failure resolving '%s'" msgstr "" -#: methods/connect.cc:176 +#: methods/connect.cc:175 #, c-format msgid "Something wicked happened resolving '%s:%s' (%i)" msgstr "" -#: methods/connect.cc:223 +#: methods/connect.cc:222 #, c-format msgid "Unable to connect to %s %s:" msgstr "" @@ -1956,7 +1956,7 @@ msgid "Unable to stat the mount point %s" msgstr "" #: apt-pkg/contrib/cdromutl.cc:149 apt-pkg/acquire.cc:427 apt-pkg/clean.cc:44 -#: methods/mirror.cc:102 +#: methods/mirror.cc:105 #, c-format msgid "Unable to change to %s" msgstr "" @@ -2357,40 +2357,40 @@ msgstr "" msgid "IO Error saving source cache" msgstr "" -#: apt-pkg/acquire-item.cc:126 +#: apt-pkg/acquire-item.cc:128 #, c-format msgid "rename failed, %s (%s -> %s)." msgstr "" -#: apt-pkg/acquire-item.cc:237 apt-pkg/acquire-item.cc:946 +#: apt-pkg/acquire-item.cc:275 apt-pkg/acquire-item.cc:984 msgid "MD5Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:641 +#: apt-pkg/acquire-item.cc:679 msgid "There is no public key available for the following key IDs:\n" msgstr "" -#: apt-pkg/acquire-item.cc:754 +#: apt-pkg/acquire-item.cc:792 #, c-format msgid "" "I wasn't able to locate a file for the %s package. This might mean you need " "to manually fix this package. (due to missing arch)" msgstr "" -#: apt-pkg/acquire-item.cc:813 +#: apt-pkg/acquire-item.cc:851 #, c-format msgid "" "I wasn't able to locate file for the %s package. This might mean you need to " "manually fix this package." msgstr "" -#: apt-pkg/acquire-item.cc:849 +#: apt-pkg/acquire-item.cc:887 #, c-format msgid "" "The package index files are corrupted. No Filename: field for package %s." msgstr "" -#: apt-pkg/acquire-item.cc:936 +#: apt-pkg/acquire-item.cc:974 msgid "Size mismatch" msgstr "" -- cgit v1.2.3 From 361593e92a44255cc0ef98417e7457911716cab5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 1 Feb 2007 13:02:47 +0100 Subject: * get the mirror failure stuff really working --- apt-pkg/acquire-item.cc | 8 ++++++-- cmdline/apt-report-mirror-failure | 4 ++-- po/apt-all.pot | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 14 deletions(-) (limited to 'cmdline') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 61564c7aa..0d3d6a083 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -63,6 +63,7 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf) { Status = StatIdle; ErrorText = LookupTag(Message,"Message"); + UsedMirror = LookupTag(Message,"UsedMirror"); if (QueueCounter <= 1) { /* This indicates that the file is not available right now but might @@ -153,6 +154,7 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode) Args[i++] = report.c_str(); Args[i++] = UsedMirror.c_str(); Args[i++] = FailCode.c_str(); + Args[i++] = NULL; pid_t pid = ExecFork(); if(pid < 0) { @@ -161,12 +163,14 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode) } else if(pid == 0) { - execvp(report.c_str(), (char**)Args); + execvp(Args[0], (char**)Args); + std::cerr << "Could not exec " << Args[0] << std::endl; + _exit(100); } if(!ExecWait(pid, "report-mirror-failure")) { _error->Warning("Couldn't report problem to '%s'", - _config->Find("Acquire::Mirror::ReportFailures").c_str()); + _config->Find("Methods::Mirror::ProblemReporting").c_str()); } } diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure index 70b16cf4f..277b23e9a 100755 --- a/cmdline/apt-report-mirror-failure +++ b/cmdline/apt-report-mirror-failure @@ -4,8 +4,6 @@ import sys import urllib import apt_pkg -print "apt-report-mirror-failure" - apt_pkg.init() url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", "http://people.ubuntu.com:9000/mirror-failure") @@ -13,6 +11,8 @@ url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", if not url: sys.exit(0) +print "Reporting mirror failure to '%s'" % url + data = {} data['url'] = sys.argv[1] data['error'] = sys.argv[2] diff --git a/po/apt-all.pot b/po/apt-all.pot index 15b650fda..39759f265 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-01-24 17:20+0100\n" +"POT-Creation-Date: 2007-02-01 12:41+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1330,7 +1330,7 @@ msgstr "" #: apt-inst/extract.cc:467 apt-pkg/contrib/configuration.cc:750 #: apt-pkg/contrib/cdromutl.cc:153 apt-pkg/sourcelist.cc:324 -#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:99 +#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:96 #, c-format msgid "Unable to read %s" msgstr "" @@ -1956,7 +1956,7 @@ msgid "Unable to stat the mount point %s" msgstr "" #: apt-pkg/contrib/cdromutl.cc:149 apt-pkg/acquire.cc:427 apt-pkg/clean.cc:44 -#: methods/mirror.cc:105 +#: methods/mirror.cc:102 #, c-format msgid "Unable to change to %s" msgstr "" @@ -2357,40 +2357,40 @@ msgstr "" msgid "IO Error saving source cache" msgstr "" -#: apt-pkg/acquire-item.cc:128 +#: apt-pkg/acquire-item.cc:131 #, c-format msgid "rename failed, %s (%s -> %s)." msgstr "" -#: apt-pkg/acquire-item.cc:275 apt-pkg/acquire-item.cc:984 +#: apt-pkg/acquire-item.cc:279 apt-pkg/acquire-item.cc:988 msgid "MD5Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:679 +#: apt-pkg/acquire-item.cc:683 msgid "There is no public key available for the following key IDs:\n" msgstr "" -#: apt-pkg/acquire-item.cc:792 +#: apt-pkg/acquire-item.cc:796 #, c-format msgid "" "I wasn't able to locate a file for the %s package. This might mean you need " "to manually fix this package. (due to missing arch)" msgstr "" -#: apt-pkg/acquire-item.cc:851 +#: apt-pkg/acquire-item.cc:855 #, c-format msgid "" "I wasn't able to locate file for the %s package. This might mean you need to " "manually fix this package." msgstr "" -#: apt-pkg/acquire-item.cc:887 +#: apt-pkg/acquire-item.cc:891 #, c-format msgid "" "The package index files are corrupted. No Filename: field for package %s." msgstr "" -#: apt-pkg/acquire-item.cc:974 +#: apt-pkg/acquire-item.cc:978 msgid "Size mismatch" msgstr "" -- cgit v1.2.3 From f0b509cdb44cb5e79e9c5ddd7ebec46965138534 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 5 Feb 2007 19:06:42 +0100 Subject: * apt-pkg/acquire-item.cc: - use FailReason in pkgAcquire::Item::Failed when available * methods/mirror.cc: - move some debug output into if(Debug) --- apt-pkg/acquire-item.cc | 7 ++++++- cmdline/apt-report-mirror-failure | 5 +++-- methods/mirror.cc | 9 ++++++--- po/apt-all.pot | 18 +++++++++--------- 4 files changed, 24 insertions(+), 15 deletions(-) (limited to 'cmdline') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 08a029ff4..14610d6e9 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -82,7 +82,11 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf) } // report mirror failure back to LP if we actually use a mirror - ReportMirrorFailure(ErrorText); + string FailReason = LookupTag(Message, "FailReason"); + if(FailReason.size() != 0) + ReportMirrorFailure(FailReason); + else + ReportMirrorFailure(ErrorText); } /*}}}*/ // Acquire::Item::Start - Item has begun to download /*{{{*/ @@ -155,6 +159,7 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode) return; Args[i++] = report.c_str(); Args[i++] = UsedMirror.c_str(); + Args[i++] = DescURI().c_str(); Args[i++] = FailCode.c_str(); Args[i++] = NULL; pid_t pid = ExecFork(); diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure index 277b23e9a..fb43f0e74 100755 --- a/cmdline/apt-report-mirror-failure +++ b/cmdline/apt-report-mirror-failure @@ -14,8 +14,9 @@ if not url: print "Reporting mirror failure to '%s'" % url data = {} -data['url'] = sys.argv[1] -data['error'] = sys.argv[2] +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/methods/mirror.cc b/methods/mirror.cc index ff91130b8..c5c0c7461 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -143,7 +143,8 @@ bool MirrorMethod::GetMirrorFile(string mirror_uri_str) in both cases! So we need to apply some domain knowledge here :( and check for /dists/ or /Release.gpg as suffixes */ - std::cerr << "GetMirrorFile: " << mirror_uri_str << std::endl; + if(Debug) + std::cerr << "GetMirrorFile: " << mirror_uri_str << std::endl; // read sources.list and find match vector::const_iterator I; @@ -152,13 +153,15 @@ bool MirrorMethod::GetMirrorFile(string mirror_uri_str) for(I=list.begin(); I != list.end(); I++) { string uristr = (*I)->GetURI(); - std::cerr << "Checking: " << uristr << std::endl; + if(Debug) + std::cerr << "Checking: " << uristr << std::endl; if(uristr.substr(0,strlen("mirror://")) != string("mirror://")) continue; // find matching uri in sources.list if(mirror_uri_str.substr(0,uristr.size()) == uristr) { - std::cerr << "found BaseURI: " << uristr << std::endl; + if(Debug) + std::cerr << "found BaseURI: " << uristr << std::endl; BaseUri = uristr.substr(0,uristr.size()-1); } } diff --git a/po/apt-all.pot b/po/apt-all.pot index 8fa68d296..2355eee20 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -1330,7 +1330,7 @@ msgstr "" #: apt-inst/extract.cc:467 apt-pkg/contrib/configuration.cc:750 #: apt-pkg/contrib/cdromutl.cc:153 apt-pkg/sourcelist.cc:324 -#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:90 +#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:81 #, c-format msgid "Unable to read %s" msgstr "" @@ -1956,7 +1956,7 @@ msgid "Unable to stat the mount point %s" msgstr "" #: apt-pkg/contrib/cdromutl.cc:149 apt-pkg/acquire.cc:427 apt-pkg/clean.cc:44 -#: methods/mirror.cc:96 +#: methods/mirror.cc:87 #, c-format msgid "Unable to change to %s" msgstr "" @@ -2357,40 +2357,40 @@ msgstr "" msgid "IO Error saving source cache" msgstr "" -#: apt-pkg/acquire-item.cc:130 +#: apt-pkg/acquire-item.cc:134 #, c-format msgid "rename failed, %s (%s -> %s)." msgstr "" -#: apt-pkg/acquire-item.cc:281 apt-pkg/acquire-item.cc:992 +#: apt-pkg/acquire-item.cc:286 apt-pkg/acquire-item.cc:997 msgid "MD5Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:686 +#: apt-pkg/acquire-item.cc:691 msgid "There is no public key available for the following key IDs:\n" msgstr "" -#: apt-pkg/acquire-item.cc:800 +#: apt-pkg/acquire-item.cc:805 #, c-format msgid "" "I wasn't able to locate a file for the %s package. This might mean you need " "to manually fix this package. (due to missing arch)" msgstr "" -#: apt-pkg/acquire-item.cc:859 +#: apt-pkg/acquire-item.cc:864 #, c-format msgid "" "I wasn't able to locate file for the %s package. This might mean you need to " "manually fix this package." msgstr "" -#: apt-pkg/acquire-item.cc:895 +#: apt-pkg/acquire-item.cc:900 #, c-format msgid "" "The package index files are corrupted. No Filename: field for package %s." msgstr "" -#: apt-pkg/acquire-item.cc:982 +#: apt-pkg/acquire-item.cc:987 msgid "Size mismatch" msgstr "" -- cgit v1.2.3 From 3f599bb721c4ac58d8ff18991c9704b5f30eaa2b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 6 Feb 2007 10:49:25 +0100 Subject: * apt-pkg/acquire-item.cc: - default to "/usr/lib/apt/apt-report-mirror-failure" * cmdline/apt-report-mirror-failure: - no default comit url for now * debian/rules: - move apt-report-mirror-failure into /usr/lib/apt * doc/examples/configure-index: - more documentation * methods/mirror.cc: - updated TODO --- apt-pkg/acquire-item.cc | 2 +- cmdline/apt-report-mirror-failure | 4 ++-- cmdline/makefile | 2 +- debian/rules | 4 ++++ doc/examples/configure-index | 4 ++++ methods/mirror.cc | 1 + 6 files changed, 13 insertions(+), 4 deletions(-) (limited to 'cmdline') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 14610d6e9..38530152f 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -154,7 +154,7 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode) const char *Args[40]; unsigned int i = 0; string report = _config->Find("Methods::Mirror::ProblemReporting", - "/usr/bin/apt-report-mirror-failure"); + "/usr/lib/apt/apt-report-mirror-failure"); if(!FileExists(report)) return; Args[i++] = report.c_str(); diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure index fb43f0e74..1567e78e3 100755 --- a/cmdline/apt-report-mirror-failure +++ b/cmdline/apt-report-mirror-failure @@ -5,8 +5,8 @@ import urllib import apt_pkg apt_pkg.init() -url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", - "http://people.ubuntu.com:9000/mirror-failure") +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) diff --git a/cmdline/makefile b/cmdline/makefile index f07c7da3b..8d284c2f3 100644 --- a/cmdline/makefile +++ b/cmdline/makefile @@ -55,6 +55,6 @@ include $(COPY_H) # The apt-key program SOURCE=apt-report-mirror-failure -TO=$(LIB) +TO=$(BIN) TARGET=program include $(COPY_H) diff --git a/debian/rules b/debian/rules index 02ee734bb..9e87b1723 100755 --- a/debian/rules +++ b/debian/rules @@ -214,6 +214,10 @@ apt: build debian/shlibs.local # head -n 500 ChangeLog > debian/ChangeLog + # move the mirror failure script in place + mv debian/$@/usr/bin/apt-report-mirror-failure \ + debian/$@/usr/lib/apt/apt-report-mirror-failure \ + dh_installexamples -p$@ $(BLD)/docs/examples/* dh_installman -p$@ dh_installcron -p$@ diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 81bb6b3b0..81fa4c52f 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -166,6 +166,10 @@ Acquire RefreshInterval "360"; // refresh interval in minutes MaxAge "90"; // max age for a mirror file in days before // it gets deleted + // mirror failure reporting script + ProblemReporting "/usr/lib/apt/apt-report-mirror-failure"; + // mirror failure reporting url + ReportFailures "http://example.com/mirror-failure"; }; }; diff --git a/methods/mirror.cc b/methods/mirror.cc index c5c0c7461..9a86a10c2 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -42,6 +42,7 @@ using namespace std; * - deal with runing as non-root because we can't write to the lists dir then -> use the cached mirror file * - better method to download than having a pkgAcquire interface here + * and better error handling there! * - support more than http * - testing :) */ -- cgit v1.2.3 From ba688e8d8be99334b96f32a861ad23a0abb9b886 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 13 Mar 2007 12:02:38 +0100 Subject: * cmdline/apt-get.cc: - fix version output in autoremove list (LP#68941) --- cmdline/apt-get.cc | 2 +- debian/changelog | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 765591b14..4ffb9414b 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1446,7 +1446,7 @@ bool DoAutomaticRemove(CacheFile &Cache) std::cout << "We could delete %s" << Pkg.Name() << std::endl; autoremovelist += string(Pkg.Name()) + " "; - autoremoveversions += string(Cache[Pkg].CandVersion) + " "; + autoremoveversions += string(Cache[Pkg].CandVersion) + "\n"; if (doAutoRemove) { if(Pkg.CurrentVer() != 0 && diff --git a/debian/changelog b/debian/changelog index 7a09847c8..89bae45c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,10 @@ apt (0.6.46.4ubuntu9) feisty; urgency=low - only unmount if APT::CDROM::NoMount is false * methods/cdrom.cc: - only umount if it was mounted by the method before - - -- Michael Vogt Wed, 7 Mar 2007 12:51:17 +0100 + * cmdline/apt-get.cc: + - fix version output in autoremove list (LP#68941) + + -- apt (0.6.46.4ubuntu8) feisty; urgency=low -- cgit v1.2.3 From 7db98f31498a85da22cc00e446bce8ac8c319554 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 14 Mar 2007 13:10:42 +0100 Subject: * cmdline/apt-get.cc: - "apt-get install foo" on a already installed package foo will clean the automatic installed flag --- cmdline/apt-get.cc | 21 +++++++++++++++++++++ configure.in | 2 +- debian/changelog | 5 ++++- 3 files changed, 26 insertions(+), 2 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 4ffb9414b..430b1bccb 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1556,6 +1556,7 @@ bool DoInstall(CommandLine &CmdL) if (Cache->BrokenCount() != 0) BrokenFix = true; + unsigned int AutoMarkChanged = 0; unsigned int ExpectedInst = 0; unsigned int Packages = 0; pkgProblemResolver Fix(Cache); @@ -1692,6 +1693,18 @@ bool DoInstall(CommandLine &CmdL) return false; if (TryToInstall(Pkg,Cache,Fix,Remove,BrokenFix,ExpectedInst) == false) return false; + + // see if we need to fix the auto-mark flag + // e.g. apt-get install foo + // where foo is marked automatic + if(Cache[Pkg].Install() == false && + (Cache[Pkg].Flags & pkgCache::Flag::Auto)) + { + ioprintf(c1out,_("%s set to manual installed.\n"), + Pkg.Name()); + Cache->MarkAuto(Pkg,false); + AutoMarkChanged++; + } } } @@ -1854,6 +1867,14 @@ bool DoInstall(CommandLine &CmdL) } + // if nothing changed in the cache, but only the automark information + // we write the StateFile here, otherwise it will be written in + // cache.commit() + if (AutoMarkChanged > 0 && + Cache->DelCount() == 0 && Cache->InstCount() == 0 && + Cache->BadCount() == 0) + Cache->writeStateFile(NULL); + // See if we need to prompt if (Cache->InstCount() == ExpectedInst && Cache->DelCount() == 0) return InstallPackages(Cache,false,false); diff --git a/configure.in b/configure.in index 940601e21..ca841df36 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.6.46.4ubuntu9") +AC_DEFINE_UNQUOTED(VERSION,"0.6.46.4ubuntu10") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 3038e49bd..bb134f780 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,11 @@ apt (0.6.46.4ubuntu10) feisty; urgency=low of packages in this section manual * debian/apt.conf.ubuntu: - added APT::Never-MarkAuto-Section "metapackages"; + * cmdline/apt-get.cc: + - "apt-get install foo" on a already installed package foo will + clean the automatic installed flag - -- + -- Michael Vogt Wed, 14 Mar 2007 12:34:46 +0100 apt (0.6.46.4ubuntu9) feisty; urgency=low -- cgit v1.2.3 From 28e454d68b9cc6ba60e19dcbcfe3a97c151ef8f8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 14 Mar 2007 13:47:49 +0100 Subject: - do not show packages already marked for removal as auto-installed --- cmdline/apt-get.cc | 13 +++++++++---- debian/changelog | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 430b1bccb..d1d6ab7b4 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1444,9 +1444,13 @@ bool DoAutomaticRemove(CacheFile &Cache) if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install()) if(Debug) std::cout << "We could delete %s" << Pkg.Name() << std::endl; - - autoremovelist += string(Pkg.Name()) + " "; - autoremoveversions += string(Cache[Pkg].CandVersion) + "\n"; + + // only show stuff in the list that is not yet marked for removal + if(Cache[Pkg].Delete() == false) + { + autoremovelist += string(Pkg.Name()) + " "; + autoremoveversions += string(Cache[Pkg].CandVersion) + "\n"; + } if (doAutoRemove) { if(Pkg.CurrentVer() != 0 && @@ -1697,7 +1701,8 @@ bool DoInstall(CommandLine &CmdL) // see if we need to fix the auto-mark flag // e.g. apt-get install foo // where foo is marked automatic - if(Cache[Pkg].Install() == false && + if(!Remove && + Cache[Pkg].Install() == false && (Cache[Pkg].Flags & pkgCache::Flag::Auto)) { ioprintf(c1out,_("%s set to manual installed.\n"), diff --git a/debian/changelog b/debian/changelog index bb134f780..374331591 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,8 +8,9 @@ apt (0.6.46.4ubuntu10) feisty; urgency=low * cmdline/apt-get.cc: - "apt-get install foo" on a already installed package foo will clean the automatic installed flag + - do not show packages already marked for removal as auto-installed - -- Michael Vogt Wed, 14 Mar 2007 12:34:46 +0100 + -- Michael Vogt Wed, 14 Mar 2007 13:32:32 +0100 apt (0.6.46.4ubuntu9) feisty; urgency=low -- cgit v1.2.3 From 31dc104687b79d3d9dea7d8c0e1a2bde80598ff0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 14 Mar 2007 17:11:25 +0100 Subject: * cmdline/apt-mark: fix chmod()/rename() ordering --- cmdline/apt-mark | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-mark b/cmdline/apt-mark index 728f083dc..dadc01366 100755 --- a/cmdline/apt-mark +++ b/cmdline/apt-mark @@ -60,5 +60,5 @@ if __name__ == "__main__": else: outfile.write(str(tagfile.Section)+"\n") # all done, rename the tmpfile - os.rename(outfile.name, STATE_FILE) os.chmod(outfile.name, 0644) + os.rename(outfile.name, STATE_FILE) -- cgit v1.2.3 From 3238423f4d0bebf02c02fa6e5ca5b6db4fca56c5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 18 Jun 2007 14:06:21 +0200 Subject: * implement warning when Vcs-*: header is found in source record --- cmdline/apt-get.cc | 22 ++ po/apt-all.pot | 646 +++++++++++++++++++++++++++-------------------------- 2 files changed, 352 insertions(+), 316 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 554677f39..51bcfde12 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2114,6 +2114,28 @@ 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-"); + if (pos != string::npos ) + { + pos += strlen("\nVcs-"); + string vcs = srec.substr(pos,srec.find(":",pos)-pos); + pos += vcs.length()+2; + string::size_type epos = srec.find("\n", pos); + string uri = srec.substr(pos,epos-pos).c_str(); + ioprintf(c1out, _("WARNING: '%s' 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: 'bzr get %s'\n" + "to modify the package.\n"), + uri.c_str()); + ioprintf(c1out, "Are you sure you want to continue [yN]? "); + if(!YnPrompt(false)) + return _error->Error(_("Abort.")); + } + // Back track vector Lst; if (Last->Files(Lst) == false) diff --git a/po/apt-all.pot b/po/apt-all.pot index a7185fcf3..95199ab42 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-06-08 23:11+0200\n" +"POT-Creation-Date: 2007-06-18 14:05+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -155,8 +155,8 @@ msgid " %4i %s\n" msgstr "" #: cmdline/apt-cache.cc:1714 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 -#: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:551 -#: cmdline/apt-get.cc:2573 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547 +#: cmdline/apt-get.cc:2605 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s %s compiled on %s %s\n" msgstr "" @@ -251,7 +251,7 @@ msgid "" " -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n" msgstr "" -#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:819 +#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:815 #, c-format msgid "Unable to write to %s" msgstr "" @@ -260,31 +260,31 @@ msgstr "" msgid "Cannot get debconf version. Is debconf installed?" msgstr "" -#: ftparchive/apt-ftparchive.cc:168 ftparchive/apt-ftparchive.cc:342 +#: ftparchive/apt-ftparchive.cc:164 ftparchive/apt-ftparchive.cc:338 msgid "Package extension list is too long" msgstr "" -#: ftparchive/apt-ftparchive.cc:170 ftparchive/apt-ftparchive.cc:184 -#: ftparchive/apt-ftparchive.cc:207 ftparchive/apt-ftparchive.cc:257 -#: ftparchive/apt-ftparchive.cc:271 ftparchive/apt-ftparchive.cc:293 +#: ftparchive/apt-ftparchive.cc:166 ftparchive/apt-ftparchive.cc:180 +#: ftparchive/apt-ftparchive.cc:203 ftparchive/apt-ftparchive.cc:253 +#: ftparchive/apt-ftparchive.cc:267 ftparchive/apt-ftparchive.cc:289 #, c-format msgid "Error processing directory %s" msgstr "" -#: ftparchive/apt-ftparchive.cc:255 +#: ftparchive/apt-ftparchive.cc:251 msgid "Source extension list is too long" msgstr "" -#: ftparchive/apt-ftparchive.cc:372 +#: ftparchive/apt-ftparchive.cc:368 msgid "Error writing header to contents file" msgstr "" -#: ftparchive/apt-ftparchive.cc:402 +#: ftparchive/apt-ftparchive.cc:398 #, c-format msgid "Error processing contents %s" msgstr "" -#: ftparchive/apt-ftparchive.cc:557 +#: ftparchive/apt-ftparchive.cc:553 msgid "" "Usage: apt-ftparchive [options] command\n" "Commands: packages binarypath [overridefile [pathprefix]]\n" @@ -326,131 +326,131 @@ msgid "" " -o=? Set an arbitrary configuration option" msgstr "" -#: ftparchive/apt-ftparchive.cc:763 +#: ftparchive/apt-ftparchive.cc:759 msgid "No selections matched" msgstr "" -#: ftparchive/apt-ftparchive.cc:836 +#: ftparchive/apt-ftparchive.cc:832 #, c-format msgid "Some files are missing in the package file group `%s'" msgstr "" -#: ftparchive/cachedb.cc:47 +#: ftparchive/cachedb.cc:43 #, c-format msgid "DB was corrupted, file renamed to %s.old" msgstr "" -#: ftparchive/cachedb.cc:65 +#: ftparchive/cachedb.cc:61 #, c-format msgid "DB is old, attempting to upgrade %s" msgstr "" -#: ftparchive/cachedb.cc:76 +#: ftparchive/cachedb.cc:72 msgid "" "DB format is invalid. If you upgraded from a older version of apt, please " "remove and re-create the database." msgstr "" -#: ftparchive/cachedb.cc:81 +#: ftparchive/cachedb.cc:77 #, c-format msgid "Unable to open DB file %s: %s" msgstr "" -#: ftparchive/cachedb.cc:127 apt-inst/extract.cc:181 apt-inst/extract.cc:193 -#: apt-inst/extract.cc:210 apt-inst/deb/dpkgdb.cc:121 methods/gpgv.cc:272 +#: ftparchive/cachedb.cc:123 apt-inst/extract.cc:178 apt-inst/extract.cc:190 +#: apt-inst/extract.cc:207 apt-inst/deb/dpkgdb.cc:117 methods/gpgv.cc:272 #, c-format msgid "Failed to stat %s" msgstr "" -#: ftparchive/cachedb.cc:242 +#: ftparchive/cachedb.cc:238 msgid "Archive has no control record" msgstr "" -#: ftparchive/cachedb.cc:448 +#: ftparchive/cachedb.cc:444 msgid "Unable to get a cursor" msgstr "" -#: ftparchive/writer.cc:79 +#: ftparchive/writer.cc:75 #, c-format msgid "W: Unable to read directory %s\n" msgstr "" -#: ftparchive/writer.cc:84 +#: ftparchive/writer.cc:80 #, c-format msgid "W: Unable to stat %s\n" msgstr "" -#: ftparchive/writer.cc:135 +#: ftparchive/writer.cc:131 msgid "E: " msgstr "" -#: ftparchive/writer.cc:137 +#: ftparchive/writer.cc:133 msgid "W: " msgstr "" -#: ftparchive/writer.cc:144 +#: ftparchive/writer.cc:140 msgid "E: Errors apply to file " msgstr "" -#: ftparchive/writer.cc:161 ftparchive/writer.cc:191 +#: ftparchive/writer.cc:157 ftparchive/writer.cc:187 #, c-format msgid "Failed to resolve %s" msgstr "" -#: ftparchive/writer.cc:173 +#: ftparchive/writer.cc:169 msgid "Tree walking failed" msgstr "" -#: ftparchive/writer.cc:198 +#: ftparchive/writer.cc:194 #, c-format msgid "Failed to open %s" msgstr "" -#: ftparchive/writer.cc:257 +#: ftparchive/writer.cc:253 #, c-format msgid " DeLink %s [%s]\n" msgstr "" -#: ftparchive/writer.cc:265 +#: ftparchive/writer.cc:261 #, c-format msgid "Failed to readlink %s" msgstr "" -#: ftparchive/writer.cc:269 +#: ftparchive/writer.cc:265 #, c-format msgid "Failed to unlink %s" msgstr "" -#: ftparchive/writer.cc:276 +#: ftparchive/writer.cc:272 #, c-format msgid "*** Failed to link %s to %s" msgstr "" -#: ftparchive/writer.cc:286 +#: ftparchive/writer.cc:282 #, c-format msgid " DeLink limit of %sB hit.\n" msgstr "" -#: ftparchive/writer.cc:390 +#: ftparchive/writer.cc:386 msgid "Archive had no package field" msgstr "" -#: ftparchive/writer.cc:398 ftparchive/writer.cc:613 +#: ftparchive/writer.cc:394 ftparchive/writer.cc:609 #, c-format msgid " %s has no override entry\n" msgstr "" -#: ftparchive/writer.cc:443 ftparchive/writer.cc:701 +#: ftparchive/writer.cc:439 ftparchive/writer.cc:697 #, c-format msgid " %s maintainer is %s not %s\n" msgstr "" -#: ftparchive/writer.cc:623 +#: ftparchive/writer.cc:619 #, c-format msgid " %s has no source override entry\n" msgstr "" -#: ftparchive/writer.cc:627 +#: ftparchive/writer.cc:623 #, c-format msgid " %s has no binary override entry either\n" msgstr "" @@ -464,88 +464,88 @@ msgstr "" msgid "realloc - Failed to allocate memory" msgstr "" -#: ftparchive/override.cc:38 ftparchive/override.cc:146 +#: ftparchive/override.cc:34 ftparchive/override.cc:142 #, c-format msgid "Unable to open %s" msgstr "" -#: ftparchive/override.cc:64 ftparchive/override.cc:170 +#: ftparchive/override.cc:60 ftparchive/override.cc:166 #, c-format msgid "Malformed override %s line %lu #1" msgstr "" -#: ftparchive/override.cc:78 ftparchive/override.cc:182 +#: ftparchive/override.cc:74 ftparchive/override.cc:178 #, c-format msgid "Malformed override %s line %lu #2" msgstr "" -#: ftparchive/override.cc:92 ftparchive/override.cc:195 +#: ftparchive/override.cc:88 ftparchive/override.cc:191 #, c-format msgid "Malformed override %s line %lu #3" msgstr "" -#: ftparchive/override.cc:131 ftparchive/override.cc:205 +#: ftparchive/override.cc:127 ftparchive/override.cc:201 #, c-format msgid "Failed to read the override file %s" msgstr "" -#: ftparchive/multicompress.cc:75 +#: ftparchive/multicompress.cc:71 #, c-format msgid "Unknown compression algorithm '%s'" msgstr "" -#: ftparchive/multicompress.cc:105 +#: ftparchive/multicompress.cc:101 #, c-format msgid "Compressed output %s needs a compression set" msgstr "" -#: ftparchive/multicompress.cc:172 methods/rsh.cc:91 +#: ftparchive/multicompress.cc:168 methods/rsh.cc:91 msgid "Failed to create IPC pipe to subprocess" msgstr "" -#: ftparchive/multicompress.cc:198 +#: ftparchive/multicompress.cc:194 msgid "Failed to create FILE*" msgstr "" -#: ftparchive/multicompress.cc:201 +#: ftparchive/multicompress.cc:197 msgid "Failed to fork" msgstr "" -#: ftparchive/multicompress.cc:215 +#: ftparchive/multicompress.cc:211 msgid "Compress child" msgstr "" -#: ftparchive/multicompress.cc:238 +#: ftparchive/multicompress.cc:234 #, c-format msgid "Internal error, failed to create %s" msgstr "" -#: ftparchive/multicompress.cc:289 +#: ftparchive/multicompress.cc:285 msgid "Failed to create subprocess IPC" msgstr "" -#: ftparchive/multicompress.cc:324 +#: ftparchive/multicompress.cc:320 msgid "Failed to exec compressor " msgstr "" -#: ftparchive/multicompress.cc:363 +#: ftparchive/multicompress.cc:359 msgid "decompressor" msgstr "" -#: ftparchive/multicompress.cc:406 +#: ftparchive/multicompress.cc:402 msgid "IO to subprocess/file failed" msgstr "" -#: ftparchive/multicompress.cc:458 +#: ftparchive/multicompress.cc:454 msgid "Failed to read while computing MD5" msgstr "" -#: ftparchive/multicompress.cc:475 +#: ftparchive/multicompress.cc:471 #, c-format msgid "Problem unlinking %s" msgstr "" -#: ftparchive/multicompress.cc:490 apt-inst/extract.cc:188 +#: ftparchive/multicompress.cc:486 apt-inst/extract.cc:185 #, c-format msgid "Failed to rename %s to %s" msgstr "" @@ -554,7 +554,7 @@ msgstr "" msgid "Y" msgstr "" -#: cmdline/apt-get.cc:143 cmdline/apt-get.cc:1659 +#: cmdline/apt-get.cc:143 cmdline/apt-get.cc:1671 #, c-format msgid "Regex compilation error - %s" msgstr "" @@ -713,12 +713,12 @@ msgstr "" msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:806 cmdline/apt-get.cc:1999 cmdline/apt-get.cc:2032 +#: cmdline/apt-get.cc:806 cmdline/apt-get.cc:2009 cmdline/apt-get.cc:2042 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:816 cmdline/apt-get.cc:2080 cmdline/apt-get.cc:2321 -#: apt-pkg/cachefile.cc:67 +#: cmdline/apt-get.cc:816 cmdline/apt-get.cc:2090 cmdline/apt-get.cc:2353 +#: apt-pkg/cachefile.cc:63 msgid "The list of sources could not be read." msgstr "" @@ -746,7 +746,7 @@ msgstr "" msgid "After unpacking %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:861 cmdline/apt-get.cc:2175 +#: cmdline/apt-get.cc:861 cmdline/apt-get.cc:2207 #, c-format msgid "Couldn't determine free space in %s" msgstr "" @@ -772,7 +772,7 @@ msgid "" " ?] " msgstr "" -#: cmdline/apt-get.cc:889 cmdline/apt-get.cc:908 +#: cmdline/apt-get.cc:889 cmdline/apt-get.cc:908 cmdline/apt-get.cc:2136 msgid "Abort." msgstr "" @@ -780,7 +780,7 @@ msgstr "" msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:976 cmdline/apt-get.cc:1383 cmdline/apt-get.cc:2218 +#: cmdline/apt-get.cc:976 cmdline/apt-get.cc:1383 cmdline/apt-get.cc:2250 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" @@ -789,7 +789,7 @@ msgstr "" msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:995 cmdline/apt-get.cc:2227 +#: cmdline/apt-get.cc:995 cmdline/apt-get.cc:2259 msgid "Download complete and in download only mode" msgstr "" @@ -915,7 +915,7 @@ msgid "" "shouldn't happen. Please file a bug report against apt." msgstr "" -#: cmdline/apt-get.cc:1475 cmdline/apt-get.cc:1740 +#: cmdline/apt-get.cc:1475 cmdline/apt-get.cc:1752 msgid "The following information may help to resolve the situation:" msgstr "" @@ -932,32 +932,32 @@ msgstr "" msgid "Couldn't find task %s" msgstr "" -#: cmdline/apt-get.cc:1646 cmdline/apt-get.cc:1682 +#: cmdline/apt-get.cc:1658 cmdline/apt-get.cc:1694 #, c-format msgid "Couldn't find package %s" msgstr "" -#: cmdline/apt-get.cc:1669 +#: cmdline/apt-get.cc:1681 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1699 +#: cmdline/apt-get.cc:1711 #, c-format msgid "%s set to manual installed.\n" msgstr "" -#: cmdline/apt-get.cc:1712 +#: cmdline/apt-get.cc:1724 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "" -#: cmdline/apt-get.cc:1715 +#: cmdline/apt-get.cc:1727 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." msgstr "" -#: cmdline/apt-get.cc:1727 +#: cmdline/apt-get.cc:1739 msgid "" "Some packages could not be installed. This may mean that you have\n" "requested an impossible situation or if you are using the unstable\n" @@ -965,159 +965,173 @@ msgid "" "or been moved out of Incoming." msgstr "" -#: cmdline/apt-get.cc:1735 +#: cmdline/apt-get.cc:1747 msgid "" "Since you only requested a single operation it is extremely likely that\n" "the package is simply not installable and a bug report against\n" "that package should be filed." msgstr "" -#: cmdline/apt-get.cc:1743 +#: cmdline/apt-get.cc:1755 msgid "Broken packages" msgstr "" -#: cmdline/apt-get.cc:1774 +#: cmdline/apt-get.cc:1784 msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:1863 +#: cmdline/apt-get.cc:1873 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:1864 +#: cmdline/apt-get.cc:1874 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:1892 +#: cmdline/apt-get.cc:1902 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1895 methods/ftp.cc:702 methods/connect.cc:101 +#: cmdline/apt-get.cc:1905 methods/ftp.cc:702 methods/connect.cc:101 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:1900 +#: cmdline/apt-get.cc:1910 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:1967 cmdline/apt-get.cc:1975 +#: cmdline/apt-get.cc:1977 cmdline/apt-get.cc:1985 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:2075 +#: cmdline/apt-get.cc:2085 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:2105 cmdline/apt-get.cc:2339 +#: cmdline/apt-get.cc:2115 cmdline/apt-get.cc:2371 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:2154 +#: cmdline/apt-get.cc:2126 +#, c-format +msgid "" +"WARNING: '%s' is maintained in the '%s' version control system at:\n" +"'%s'\n" +msgstr "" + +#: cmdline/apt-get.cc:2131 +#, c-format +msgid "" +"Please use: 'bzr get %s'\n" +"to modify the package.\n" +msgstr "" + +#: cmdline/apt-get.cc:2186 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:2178 +#: cmdline/apt-get.cc:2210 #, c-format msgid "You don't have enough free space in %s" msgstr "" -#: cmdline/apt-get.cc:2183 +#: cmdline/apt-get.cc:2215 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2186 +#: cmdline/apt-get.cc:2218 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2192 +#: cmdline/apt-get.cc:2224 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2223 +#: cmdline/apt-get.cc:2255 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2251 +#: cmdline/apt-get.cc:2283 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2263 +#: cmdline/apt-get.cc:2295 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2264 +#: cmdline/apt-get.cc:2296 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2281 +#: cmdline/apt-get.cc:2313 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2300 +#: cmdline/apt-get.cc:2332 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2316 +#: cmdline/apt-get.cc:2348 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2344 +#: cmdline/apt-get.cc:2376 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2364 +#: cmdline/apt-get.cc:2396 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2416 +#: cmdline/apt-get.cc:2448 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2468 +#: cmdline/apt-get.cc:2500 #, c-format msgid "" "%s dependency for %s cannot be satisfied because no available versions of " "package %s can satisfy version requirements" msgstr "" -#: cmdline/apt-get.cc:2503 +#: cmdline/apt-get.cc:2535 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" -#: cmdline/apt-get.cc:2528 +#: cmdline/apt-get.cc:2560 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2542 +#: cmdline/apt-get.cc:2574 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2546 +#: cmdline/apt-get.cc:2578 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:2578 +#: cmdline/apt-get.cc:2610 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:2619 +#: cmdline/apt-get.cc:2651 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -1242,188 +1256,188 @@ msgstr "" msgid "Merging available information" msgstr "" -#: apt-inst/contrib/extracttar.cc:117 +#: apt-inst/contrib/extracttar.cc:114 msgid "Failed to create pipes" msgstr "" -#: apt-inst/contrib/extracttar.cc:144 +#: apt-inst/contrib/extracttar.cc:141 msgid "Failed to exec gzip " msgstr "" -#: apt-inst/contrib/extracttar.cc:181 apt-inst/contrib/extracttar.cc:207 +#: apt-inst/contrib/extracttar.cc:178 apt-inst/contrib/extracttar.cc:204 msgid "Corrupted archive" msgstr "" -#: apt-inst/contrib/extracttar.cc:196 +#: apt-inst/contrib/extracttar.cc:193 msgid "Tar checksum failed, archive corrupted" msgstr "" -#: apt-inst/contrib/extracttar.cc:299 +#: apt-inst/contrib/extracttar.cc:296 #, c-format msgid "Unknown TAR header type %u, member %s" msgstr "" -#: apt-inst/contrib/arfile.cc:73 +#: apt-inst/contrib/arfile.cc:70 msgid "Invalid archive signature" msgstr "" -#: apt-inst/contrib/arfile.cc:81 +#: apt-inst/contrib/arfile.cc:78 msgid "Error reading archive member header" msgstr "" -#: apt-inst/contrib/arfile.cc:93 apt-inst/contrib/arfile.cc:105 +#: apt-inst/contrib/arfile.cc:90 apt-inst/contrib/arfile.cc:102 msgid "Invalid archive member header" msgstr "" -#: apt-inst/contrib/arfile.cc:131 +#: apt-inst/contrib/arfile.cc:128 msgid "Archive is too short" msgstr "" -#: apt-inst/contrib/arfile.cc:135 +#: apt-inst/contrib/arfile.cc:132 msgid "Failed to read the archive headers" msgstr "" -#: apt-inst/filelist.cc:384 +#: apt-inst/filelist.cc:380 msgid "DropNode called on still linked node" msgstr "" -#: apt-inst/filelist.cc:416 +#: apt-inst/filelist.cc:412 msgid "Failed to locate the hash element!" msgstr "" -#: apt-inst/filelist.cc:463 +#: apt-inst/filelist.cc:459 msgid "Failed to allocate diversion" msgstr "" -#: apt-inst/filelist.cc:468 +#: apt-inst/filelist.cc:464 msgid "Internal error in AddDiversion" msgstr "" -#: apt-inst/filelist.cc:481 +#: apt-inst/filelist.cc:477 #, c-format msgid "Trying to overwrite a diversion, %s -> %s and %s/%s" msgstr "" -#: apt-inst/filelist.cc:510 +#: apt-inst/filelist.cc:506 #, c-format msgid "Double add of diversion %s -> %s" msgstr "" -#: apt-inst/filelist.cc:553 +#: apt-inst/filelist.cc:549 #, c-format msgid "Duplicate conf file %s/%s" msgstr "" -#: apt-inst/dirstream.cc:45 apt-inst/dirstream.cc:50 apt-inst/dirstream.cc:53 +#: apt-inst/dirstream.cc:41 apt-inst/dirstream.cc:46 apt-inst/dirstream.cc:49 #, c-format msgid "Failed to write file %s" msgstr "" -#: apt-inst/dirstream.cc:96 apt-inst/dirstream.cc:104 +#: apt-inst/dirstream.cc:92 apt-inst/dirstream.cc:100 #, c-format msgid "Failed to close file %s" msgstr "" -#: apt-inst/extract.cc:96 apt-inst/extract.cc:167 +#: apt-inst/extract.cc:93 apt-inst/extract.cc:164 #, c-format msgid "The path %s is too long" msgstr "" -#: apt-inst/extract.cc:127 +#: apt-inst/extract.cc:124 #, c-format msgid "Unpacking %s more than once" msgstr "" -#: apt-inst/extract.cc:137 +#: apt-inst/extract.cc:134 #, c-format msgid "The directory %s is diverted" msgstr "" -#: apt-inst/extract.cc:147 +#: apt-inst/extract.cc:144 #, c-format msgid "The package is trying to write to the diversion target %s/%s" msgstr "" -#: apt-inst/extract.cc:157 apt-inst/extract.cc:300 +#: apt-inst/extract.cc:154 apt-inst/extract.cc:297 msgid "The diversion path is too long" msgstr "" -#: apt-inst/extract.cc:243 +#: apt-inst/extract.cc:240 #, c-format msgid "The directory %s is being replaced by a non-directory" msgstr "" -#: apt-inst/extract.cc:283 +#: apt-inst/extract.cc:280 msgid "Failed to locate node in its hash bucket" msgstr "" -#: apt-inst/extract.cc:287 +#: apt-inst/extract.cc:284 msgid "The path is too long" msgstr "" -#: apt-inst/extract.cc:417 +#: apt-inst/extract.cc:414 #, c-format msgid "Overwrite package match with no version for %s" msgstr "" -#: apt-inst/extract.cc:434 +#: apt-inst/extract.cc:431 #, c-format msgid "File %s/%s overwrites the one in the package %s" msgstr "" -#: apt-inst/extract.cc:467 apt-pkg/contrib/configuration.cc:750 -#: apt-pkg/contrib/cdromutl.cc:153 apt-pkg/sourcelist.cc:324 -#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 +#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:747 +#: apt-pkg/contrib/cdromutl.cc:150 apt-pkg/sourcelist.cc:320 +#: apt-pkg/acquire.cc:418 apt-pkg/clean.cc:34 #, c-format msgid "Unable to read %s" msgstr "" -#: apt-inst/extract.cc:494 +#: apt-inst/extract.cc:491 #, c-format msgid "Unable to stat %s" msgstr "" -#: apt-inst/deb/dpkgdb.cc:55 apt-inst/deb/dpkgdb.cc:61 +#: apt-inst/deb/dpkgdb.cc:51 apt-inst/deb/dpkgdb.cc:57 #, c-format msgid "Failed to remove %s" msgstr "" -#: apt-inst/deb/dpkgdb.cc:110 apt-inst/deb/dpkgdb.cc:112 +#: apt-inst/deb/dpkgdb.cc:106 apt-inst/deb/dpkgdb.cc:108 #, c-format msgid "Unable to create %s" msgstr "" -#: apt-inst/deb/dpkgdb.cc:118 +#: apt-inst/deb/dpkgdb.cc:114 #, c-format msgid "Failed to stat %sinfo" msgstr "" -#: apt-inst/deb/dpkgdb.cc:123 +#: apt-inst/deb/dpkgdb.cc:119 msgid "The info and temp directories need to be on the same filesystem" msgstr "" #. Build the status cache -#: apt-inst/deb/dpkgdb.cc:139 apt-pkg/pkgcachegen.cc:752 -#: apt-pkg/pkgcachegen.cc:821 apt-pkg/pkgcachegen.cc:826 -#: apt-pkg/pkgcachegen.cc:949 +#: apt-inst/deb/dpkgdb.cc:135 apt-pkg/pkgcachegen.cc:748 +#: apt-pkg/pkgcachegen.cc:817 apt-pkg/pkgcachegen.cc:822 +#: apt-pkg/pkgcachegen.cc:945 msgid "Reading package lists" msgstr "" -#: apt-inst/deb/dpkgdb.cc:180 +#: apt-inst/deb/dpkgdb.cc:176 #, c-format msgid "Failed to change to the admin dir %sinfo" msgstr "" -#: apt-inst/deb/dpkgdb.cc:201 apt-inst/deb/dpkgdb.cc:355 -#: apt-inst/deb/dpkgdb.cc:448 +#: apt-inst/deb/dpkgdb.cc:197 apt-inst/deb/dpkgdb.cc:351 +#: apt-inst/deb/dpkgdb.cc:444 msgid "Internal error getting a package name" msgstr "" -#: apt-inst/deb/dpkgdb.cc:205 apt-inst/deb/dpkgdb.cc:386 +#: apt-inst/deb/dpkgdb.cc:201 apt-inst/deb/dpkgdb.cc:382 msgid "Reading file listing" msgstr "" -#: apt-inst/deb/dpkgdb.cc:216 +#: apt-inst/deb/dpkgdb.cc:212 #, c-format msgid "" "Failed to open the list file '%sinfo/%s'. If you cannot restore this file " @@ -1431,77 +1445,77 @@ msgid "" "package!" msgstr "" -#: apt-inst/deb/dpkgdb.cc:229 apt-inst/deb/dpkgdb.cc:242 +#: apt-inst/deb/dpkgdb.cc:225 apt-inst/deb/dpkgdb.cc:238 #, c-format msgid "Failed reading the list file %sinfo/%s" msgstr "" -#: apt-inst/deb/dpkgdb.cc:266 +#: apt-inst/deb/dpkgdb.cc:262 msgid "Internal error getting a node" msgstr "" -#: apt-inst/deb/dpkgdb.cc:309 +#: apt-inst/deb/dpkgdb.cc:305 #, c-format msgid "Failed to open the diversions file %sdiversions" msgstr "" -#: apt-inst/deb/dpkgdb.cc:324 +#: apt-inst/deb/dpkgdb.cc:320 msgid "The diversion file is corrupted" msgstr "" -#: apt-inst/deb/dpkgdb.cc:331 apt-inst/deb/dpkgdb.cc:336 -#: apt-inst/deb/dpkgdb.cc:341 +#: apt-inst/deb/dpkgdb.cc:327 apt-inst/deb/dpkgdb.cc:332 +#: apt-inst/deb/dpkgdb.cc:337 #, c-format msgid "Invalid line in the diversion file: %s" msgstr "" -#: apt-inst/deb/dpkgdb.cc:362 +#: apt-inst/deb/dpkgdb.cc:358 msgid "Internal error adding a diversion" msgstr "" -#: apt-inst/deb/dpkgdb.cc:383 +#: apt-inst/deb/dpkgdb.cc:379 msgid "The pkg cache must be initialized first" msgstr "" -#: apt-inst/deb/dpkgdb.cc:443 +#: apt-inst/deb/dpkgdb.cc:439 #, c-format msgid "Failed to find a Package: header, offset %lu" msgstr "" -#: apt-inst/deb/dpkgdb.cc:465 +#: apt-inst/deb/dpkgdb.cc:461 #, c-format msgid "Bad ConfFile section in the status file. Offset %lu" msgstr "" -#: apt-inst/deb/dpkgdb.cc:470 +#: apt-inst/deb/dpkgdb.cc:466 #, c-format msgid "Error parsing MD5. Offset %lu" msgstr "" -#: apt-inst/deb/debfile.cc:42 apt-inst/deb/debfile.cc:47 +#: apt-inst/deb/debfile.cc:38 apt-inst/deb/debfile.cc:43 #, c-format msgid "This is not a valid DEB archive, missing '%s' member" msgstr "" -#: apt-inst/deb/debfile.cc:52 +#: apt-inst/deb/debfile.cc:48 #, c-format msgid "This is not a valid DEB archive, it has no '%s' or '%s' member" msgstr "" -#: apt-inst/deb/debfile.cc:112 +#: apt-inst/deb/debfile.cc:108 #, c-format msgid "Couldn't change to %s" msgstr "" -#: apt-inst/deb/debfile.cc:138 +#: apt-inst/deb/debfile.cc:134 msgid "Internal error, could not locate member" msgstr "" -#: apt-inst/deb/debfile.cc:171 +#: apt-inst/deb/debfile.cc:167 msgid "Failed to locate a valid control file" msgstr "" -#: apt-inst/deb/debfile.cc:256 +#: apt-inst/deb/debfile.cc:252 msgid "Unparsable control file" msgstr "" @@ -1599,7 +1613,7 @@ msgstr "" msgid "Server closed the connection" msgstr "" -#: methods/ftp.cc:338 apt-pkg/contrib/fileutl.cc:472 methods/rsh.cc:190 +#: methods/ftp.cc:338 apt-pkg/contrib/fileutl.cc:469 methods/rsh.cc:190 msgid "Read error" msgstr "" @@ -1611,7 +1625,7 @@ msgstr "" msgid "Protocol corruption" msgstr "" -#: methods/ftp.cc:446 apt-pkg/contrib/fileutl.cc:511 methods/rsh.cc:232 +#: methods/ftp.cc:446 apt-pkg/contrib/fileutl.cc:508 methods/rsh.cc:232 msgid "Write error" msgstr "" @@ -1665,7 +1679,7 @@ msgstr "" msgid "Unable to accept connection" msgstr "" -#: methods/ftp.cc:864 methods/http.cc:958 methods/rsh.cc:303 +#: methods/ftp.cc:864 methods/http.cc:959 methods/rsh.cc:303 msgid "Problem hashing file" msgstr "" @@ -1796,282 +1810,282 @@ msgstr "" msgid "Read error from %s process" msgstr "" -#: methods/http.cc:376 +#: methods/http.cc:377 msgid "Waiting for headers" msgstr "" -#: methods/http.cc:522 +#: methods/http.cc:523 #, c-format msgid "Got a single header line over %u chars" msgstr "" -#: methods/http.cc:530 +#: methods/http.cc:531 msgid "Bad header line" msgstr "" -#: methods/http.cc:549 methods/http.cc:556 +#: methods/http.cc:550 methods/http.cc:557 msgid "The HTTP server sent an invalid reply header" msgstr "" -#: methods/http.cc:585 +#: methods/http.cc:586 msgid "The HTTP server sent an invalid Content-Length header" msgstr "" -#: methods/http.cc:600 +#: methods/http.cc:601 msgid "The HTTP server sent an invalid Content-Range header" msgstr "" -#: methods/http.cc:602 +#: methods/http.cc:603 msgid "This HTTP server has broken range support" msgstr "" -#: methods/http.cc:626 +#: methods/http.cc:627 msgid "Unknown date format" msgstr "" -#: methods/http.cc:773 +#: methods/http.cc:774 msgid "Select failed" msgstr "" -#: methods/http.cc:778 +#: methods/http.cc:779 msgid "Connection timed out" msgstr "" -#: methods/http.cc:801 +#: methods/http.cc:802 msgid "Error writing to output file" msgstr "" -#: methods/http.cc:832 +#: methods/http.cc:833 msgid "Error writing to file" msgstr "" -#: methods/http.cc:860 +#: methods/http.cc:861 msgid "Error writing to the file" msgstr "" -#: methods/http.cc:874 +#: methods/http.cc:875 msgid "Error reading from server. Remote end closed connection" msgstr "" -#: methods/http.cc:876 +#: methods/http.cc:877 msgid "Error reading from server" msgstr "" -#: methods/http.cc:1107 +#: methods/http.cc:1108 msgid "Bad header data" msgstr "" -#: methods/http.cc:1124 +#: methods/http.cc:1125 msgid "Connection failed" msgstr "" -#: methods/http.cc:1215 +#: methods/http.cc:1216 msgid "Internal error" msgstr "" -#: apt-pkg/contrib/mmap.cc:82 +#: apt-pkg/contrib/mmap.cc:78 msgid "Can't mmap an empty file" msgstr "" -#: apt-pkg/contrib/mmap.cc:87 +#: apt-pkg/contrib/mmap.cc:83 #, c-format msgid "Couldn't make mmap of %lu bytes" msgstr "" -#: apt-pkg/contrib/strutl.cc:982 +#: apt-pkg/contrib/strutl.cc:978 #, c-format msgid "Selection %s not found" msgstr "" -#: apt-pkg/contrib/configuration.cc:436 +#: apt-pkg/contrib/configuration.cc:433 #, c-format msgid "Unrecognized type abbreviation: '%c'" msgstr "" -#: apt-pkg/contrib/configuration.cc:494 +#: apt-pkg/contrib/configuration.cc:491 #, c-format msgid "Opening configuration file %s" msgstr "" -#: apt-pkg/contrib/configuration.cc:512 +#: apt-pkg/contrib/configuration.cc:509 #, c-format msgid "Line %d too long (max %d)" msgstr "" -#: apt-pkg/contrib/configuration.cc:608 +#: apt-pkg/contrib/configuration.cc:605 #, c-format msgid "Syntax error %s:%u: Block starts with no name." msgstr "" -#: apt-pkg/contrib/configuration.cc:627 +#: apt-pkg/contrib/configuration.cc:624 #, c-format msgid "Syntax error %s:%u: Malformed tag" msgstr "" -#: apt-pkg/contrib/configuration.cc:644 +#: apt-pkg/contrib/configuration.cc:641 #, c-format msgid "Syntax error %s:%u: Extra junk after value" msgstr "" -#: apt-pkg/contrib/configuration.cc:684 +#: apt-pkg/contrib/configuration.cc:681 #, c-format msgid "Syntax error %s:%u: Directives can only be done at the top level" msgstr "" -#: apt-pkg/contrib/configuration.cc:691 +#: apt-pkg/contrib/configuration.cc:688 #, c-format msgid "Syntax error %s:%u: Too many nested includes" msgstr "" -#: apt-pkg/contrib/configuration.cc:695 apt-pkg/contrib/configuration.cc:700 +#: apt-pkg/contrib/configuration.cc:692 apt-pkg/contrib/configuration.cc:697 #, c-format msgid "Syntax error %s:%u: Included from here" msgstr "" -#: apt-pkg/contrib/configuration.cc:704 +#: apt-pkg/contrib/configuration.cc:701 #, c-format msgid "Syntax error %s:%u: Unsupported directive '%s'" msgstr "" -#: apt-pkg/contrib/configuration.cc:738 +#: apt-pkg/contrib/configuration.cc:735 #, c-format msgid "Syntax error %s:%u: Extra junk at end of file" msgstr "" -#: apt-pkg/contrib/progress.cc:155 +#: apt-pkg/contrib/progress.cc:152 #, c-format msgid "%c%s... Error!" msgstr "" -#: apt-pkg/contrib/progress.cc:157 +#: apt-pkg/contrib/progress.cc:154 #, c-format msgid "%c%s... Done" msgstr "" -#: apt-pkg/contrib/cmndline.cc:80 +#: apt-pkg/contrib/cmndline.cc:77 #, c-format msgid "Command line option '%c' [from %s] is not known." msgstr "" -#: apt-pkg/contrib/cmndline.cc:106 apt-pkg/contrib/cmndline.cc:114 -#: apt-pkg/contrib/cmndline.cc:122 +#: apt-pkg/contrib/cmndline.cc:103 apt-pkg/contrib/cmndline.cc:111 +#: apt-pkg/contrib/cmndline.cc:119 #, c-format msgid "Command line option %s is not understood" msgstr "" -#: apt-pkg/contrib/cmndline.cc:127 +#: apt-pkg/contrib/cmndline.cc:124 #, c-format msgid "Command line option %s is not boolean" msgstr "" -#: apt-pkg/contrib/cmndline.cc:166 apt-pkg/contrib/cmndline.cc:187 +#: apt-pkg/contrib/cmndline.cc:163 apt-pkg/contrib/cmndline.cc:184 #, c-format msgid "Option %s requires an argument." msgstr "" -#: apt-pkg/contrib/cmndline.cc:201 apt-pkg/contrib/cmndline.cc:207 +#: apt-pkg/contrib/cmndline.cc:198 apt-pkg/contrib/cmndline.cc:204 #, c-format msgid "Option %s: Configuration item specification must have an =." msgstr "" -#: apt-pkg/contrib/cmndline.cc:237 +#: apt-pkg/contrib/cmndline.cc:234 #, c-format msgid "Option %s requires an integer argument, not '%s'" msgstr "" -#: apt-pkg/contrib/cmndline.cc:268 +#: apt-pkg/contrib/cmndline.cc:265 #, c-format msgid "Option '%s' is too long" msgstr "" -#: apt-pkg/contrib/cmndline.cc:301 +#: apt-pkg/contrib/cmndline.cc:298 #, c-format msgid "Sense %s is not understood, try true or false." msgstr "" -#: apt-pkg/contrib/cmndline.cc:351 +#: apt-pkg/contrib/cmndline.cc:348 #, c-format msgid "Invalid operation %s" msgstr "" -#: apt-pkg/contrib/cdromutl.cc:55 +#: apt-pkg/contrib/cdromutl.cc:52 #, c-format msgid "Unable to stat the mount point %s" msgstr "" -#: apt-pkg/contrib/cdromutl.cc:149 apt-pkg/acquire.cc:427 apt-pkg/clean.cc:44 +#: apt-pkg/contrib/cdromutl.cc:146 apt-pkg/acquire.cc:424 apt-pkg/clean.cc:40 #, c-format msgid "Unable to change to %s" msgstr "" -#: apt-pkg/contrib/cdromutl.cc:190 +#: apt-pkg/contrib/cdromutl.cc:187 msgid "Failed to stat the cdrom" msgstr "" -#: apt-pkg/contrib/fileutl.cc:83 +#: apt-pkg/contrib/fileutl.cc:80 #, c-format msgid "Not using locking for read only lock file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:88 +#: apt-pkg/contrib/fileutl.cc:85 #, c-format msgid "Could not open lock file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:106 +#: apt-pkg/contrib/fileutl.cc:103 #, c-format msgid "Not using locking for nfs mounted lock file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:110 +#: apt-pkg/contrib/fileutl.cc:107 #, c-format msgid "Could not get lock %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:378 +#: apt-pkg/contrib/fileutl.cc:375 #, c-format msgid "Waited for %s but it wasn't there" msgstr "" -#: apt-pkg/contrib/fileutl.cc:388 +#: apt-pkg/contrib/fileutl.cc:385 #, c-format msgid "Sub-process %s received a segmentation fault." msgstr "" -#: apt-pkg/contrib/fileutl.cc:391 +#: apt-pkg/contrib/fileutl.cc:388 #, c-format msgid "Sub-process %s returned an error code (%u)" msgstr "" -#: apt-pkg/contrib/fileutl.cc:393 +#: apt-pkg/contrib/fileutl.cc:390 #, c-format msgid "Sub-process %s exited unexpectedly" msgstr "" -#: apt-pkg/contrib/fileutl.cc:437 +#: apt-pkg/contrib/fileutl.cc:434 #, c-format msgid "Could not open file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:493 +#: apt-pkg/contrib/fileutl.cc:490 #, c-format msgid "read, still have %lu to read but none left" msgstr "" -#: apt-pkg/contrib/fileutl.cc:523 +#: apt-pkg/contrib/fileutl.cc:520 #, c-format msgid "write, still have %lu to write but couldn't" msgstr "" -#: apt-pkg/contrib/fileutl.cc:598 +#: apt-pkg/contrib/fileutl.cc:595 msgid "Problem closing the file" msgstr "" -#: apt-pkg/contrib/fileutl.cc:604 +#: apt-pkg/contrib/fileutl.cc:601 msgid "Problem unlinking the file" msgstr "" -#: apt-pkg/contrib/fileutl.cc:615 +#: apt-pkg/contrib/fileutl.cc:612 msgid "Problem syncing the file" msgstr "" @@ -2148,93 +2162,93 @@ msgstr "" msgid "extra" msgstr "" -#: apt-pkg/depcache.cc:98 apt-pkg/depcache.cc:127 +#: apt-pkg/depcache.cc:100 apt-pkg/depcache.cc:129 msgid "Building dependency tree" msgstr "" -#: apt-pkg/depcache.cc:99 +#: apt-pkg/depcache.cc:101 msgid "Candidate versions" msgstr "" -#: apt-pkg/depcache.cc:128 +#: apt-pkg/depcache.cc:130 msgid "Dependency generation" msgstr "" -#: apt-pkg/depcache.cc:149 apt-pkg/depcache.cc:168 apt-pkg/depcache.cc:172 +#: apt-pkg/depcache.cc:151 apt-pkg/depcache.cc:170 apt-pkg/depcache.cc:174 msgid "Reading state information" msgstr "" -#: apt-pkg/depcache.cc:196 +#: apt-pkg/depcache.cc:198 #, c-format msgid "Failed to open StateFile %s" msgstr "" -#: apt-pkg/depcache.cc:202 +#: apt-pkg/depcache.cc:204 #, c-format msgid "Failed to write temporary StateFile %s" msgstr "" -#: apt-pkg/tagfile.cc:106 +#: apt-pkg/tagfile.cc:102 #, c-format msgid "Unable to parse package file %s (1)" msgstr "" -#: apt-pkg/tagfile.cc:193 +#: apt-pkg/tagfile.cc:189 #, c-format msgid "Unable to parse package file %s (2)" msgstr "" -#: apt-pkg/sourcelist.cc:94 +#: apt-pkg/sourcelist.cc:90 #, c-format msgid "Malformed line %lu in source list %s (URI)" msgstr "" -#: apt-pkg/sourcelist.cc:96 +#: apt-pkg/sourcelist.cc:92 #, c-format msgid "Malformed line %lu in source list %s (dist)" msgstr "" -#: apt-pkg/sourcelist.cc:99 +#: apt-pkg/sourcelist.cc:95 #, c-format msgid "Malformed line %lu in source list %s (URI parse)" msgstr "" -#: apt-pkg/sourcelist.cc:105 +#: apt-pkg/sourcelist.cc:101 #, c-format msgid "Malformed line %lu in source list %s (absolute dist)" msgstr "" -#: apt-pkg/sourcelist.cc:112 +#: apt-pkg/sourcelist.cc:108 #, c-format msgid "Malformed line %lu in source list %s (dist parse)" msgstr "" -#: apt-pkg/sourcelist.cc:203 +#: apt-pkg/sourcelist.cc:199 #, c-format msgid "Opening %s" msgstr "" -#: apt-pkg/sourcelist.cc:220 apt-pkg/cdrom.cc:451 +#: apt-pkg/sourcelist.cc:216 apt-pkg/cdrom.cc:448 #, c-format msgid "Line %u too long in source list %s." msgstr "" -#: apt-pkg/sourcelist.cc:240 +#: apt-pkg/sourcelist.cc:236 #, c-format msgid "Malformed line %u in source list %s (type)" msgstr "" -#: apt-pkg/sourcelist.cc:244 +#: apt-pkg/sourcelist.cc:240 #, c-format msgid "Type '%s' is not known on line %u in source list %s" msgstr "" -#: apt-pkg/sourcelist.cc:252 apt-pkg/sourcelist.cc:255 +#: apt-pkg/sourcelist.cc:248 apt-pkg/sourcelist.cc:251 #, c-format msgid "Malformed line %u in source list %s (vendor id)" msgstr "" -#: apt-pkg/packagemanager.cc:403 +#: apt-pkg/packagemanager.cc:399 #, c-format msgid "" "This installation run will require temporarily removing the essential " @@ -2242,60 +2256,60 @@ msgid "" "you really want to do it, activate the APT::Force-LoopBreak option." msgstr "" -#: apt-pkg/pkgrecords.cc:37 +#: apt-pkg/pkgrecords.cc:34 #, c-format msgid "Index file type '%s' is not supported" msgstr "" -#: apt-pkg/algorithms.cc:254 +#: apt-pkg/algorithms.cc:247 #, c-format msgid "" "The package %s needs to be reinstalled, but I can't find an archive for it." msgstr "" -#: apt-pkg/algorithms.cc:1110 +#: apt-pkg/algorithms.cc:1103 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." msgstr "" -#: apt-pkg/algorithms.cc:1112 +#: apt-pkg/algorithms.cc:1105 msgid "Unable to correct problems, you have held broken packages." msgstr "" -#: apt-pkg/acquire.cc:62 +#: apt-pkg/acquire.cc:59 #, c-format msgid "Lists directory %spartial is missing." msgstr "" -#: apt-pkg/acquire.cc:66 +#: apt-pkg/acquire.cc:63 #, c-format msgid "Archive directory %spartial is missing." msgstr "" #. only show the ETA if it makes sense #. two days -#: apt-pkg/acquire.cc:830 +#: apt-pkg/acquire.cc:827 #, c-format msgid "Retrieving file %li of %li (%s remaining)" msgstr "" -#: apt-pkg/acquire.cc:832 +#: apt-pkg/acquire.cc:829 #, c-format msgid "Retrieving file %li of %li" msgstr "" -#: apt-pkg/acquire-worker.cc:113 +#: apt-pkg/acquire-worker.cc:110 #, c-format msgid "The method driver %s could not be found." msgstr "" -#: apt-pkg/acquire-worker.cc:162 +#: apt-pkg/acquire-worker.cc:159 #, c-format msgid "Method %s did not start correctly" msgstr "" -#: apt-pkg/acquire-worker.cc:384 +#: apt-pkg/acquire-worker.cc:381 #, c-format msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter." msgstr "" @@ -2309,126 +2323,126 @@ msgstr "" msgid "Unable to determine a suitable packaging system type" msgstr "" -#: apt-pkg/clean.cc:61 +#: apt-pkg/clean.cc:57 #, c-format msgid "Unable to stat %s." msgstr "" -#: apt-pkg/srcrecords.cc:48 +#: apt-pkg/srcrecords.cc:44 msgid "You must put some 'source' URIs in your sources.list" msgstr "" -#: apt-pkg/cachefile.cc:73 +#: apt-pkg/cachefile.cc:69 msgid "The package lists or status file could not be parsed or opened." msgstr "" -#: apt-pkg/cachefile.cc:77 +#: apt-pkg/cachefile.cc:73 msgid "You may want to run apt-get update to correct these problems" msgstr "" -#: apt-pkg/policy.cc:270 +#: apt-pkg/policy.cc:267 msgid "Invalid record in the preferences file, no Package header" msgstr "" -#: apt-pkg/policy.cc:292 +#: apt-pkg/policy.cc:289 #, c-format msgid "Did not understand pin type %s" msgstr "" -#: apt-pkg/policy.cc:300 +#: apt-pkg/policy.cc:297 msgid "No priority (or zero) specified for pin" msgstr "" -#: apt-pkg/pkgcachegen.cc:76 +#: apt-pkg/pkgcachegen.cc:72 msgid "Cache has an incompatible versioning system" msgstr "" -#: apt-pkg/pkgcachegen.cc:119 +#: apt-pkg/pkgcachegen.cc:115 #, c-format msgid "Error occurred while processing %s (NewPackage)" msgstr "" -#: apt-pkg/pkgcachegen.cc:134 +#: apt-pkg/pkgcachegen.cc:130 #, c-format msgid "Error occurred while processing %s (UsePackage1)" msgstr "" -#: apt-pkg/pkgcachegen.cc:157 +#: apt-pkg/pkgcachegen.cc:153 #, c-format msgid "Error occured while processing %s (NewFileDesc1)" msgstr "" -#: apt-pkg/pkgcachegen.cc:182 +#: apt-pkg/pkgcachegen.cc:178 #, c-format msgid "Error occurred while processing %s (UsePackage2)" msgstr "" -#: apt-pkg/pkgcachegen.cc:186 +#: apt-pkg/pkgcachegen.cc:182 #, c-format msgid "Error occurred while processing %s (NewFileVer1)" msgstr "" -#: apt-pkg/pkgcachegen.cc:217 +#: apt-pkg/pkgcachegen.cc:213 #, c-format msgid "Error occurred while processing %s (NewVersion1)" msgstr "" -#: apt-pkg/pkgcachegen.cc:221 +#: apt-pkg/pkgcachegen.cc:217 #, c-format msgid "Error occurred while processing %s (UsePackage3)" msgstr "" -#: apt-pkg/pkgcachegen.cc:225 +#: apt-pkg/pkgcachegen.cc:221 #, c-format msgid "Error occurred while processing %s (NewVersion2)" msgstr "" -#: apt-pkg/pkgcachegen.cc:249 +#: apt-pkg/pkgcachegen.cc:245 #, c-format msgid "Error occured while processing %s (NewFileDesc2)" msgstr "" -#: apt-pkg/pkgcachegen.cc:255 +#: apt-pkg/pkgcachegen.cc:251 msgid "Wow, you exceeded the number of package names this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:258 +#: apt-pkg/pkgcachegen.cc:254 msgid "Wow, you exceeded the number of versions this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:261 +#: apt-pkg/pkgcachegen.cc:257 msgid "Wow, you exceeded the number of descriptions this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:264 +#: apt-pkg/pkgcachegen.cc:260 msgid "Wow, you exceeded the number of dependencies this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:292 +#: apt-pkg/pkgcachegen.cc:288 #, c-format msgid "Error occurred while processing %s (FindPkg)" msgstr "" -#: apt-pkg/pkgcachegen.cc:305 +#: apt-pkg/pkgcachegen.cc:301 #, c-format msgid "Error occurred while processing %s (CollectFileProvides)" msgstr "" -#: apt-pkg/pkgcachegen.cc:311 +#: apt-pkg/pkgcachegen.cc:307 #, c-format msgid "Package %s %s was not found while processing file dependencies" msgstr "" -#: apt-pkg/pkgcachegen.cc:682 +#: apt-pkg/pkgcachegen.cc:678 #, c-format msgid "Couldn't stat source package list %s" msgstr "" -#: apt-pkg/pkgcachegen.cc:767 +#: apt-pkg/pkgcachegen.cc:763 msgid "Collecting File Provides" msgstr "" -#: apt-pkg/pkgcachegen.cc:894 apt-pkg/pkgcachegen.cc:901 +#: apt-pkg/pkgcachegen.cc:890 apt-pkg/pkgcachegen.cc:897 msgid "IO Error saving source cache" msgstr "" @@ -2475,80 +2489,80 @@ msgstr "" msgid "Vendor block %s contains no fingerprint" msgstr "" -#: apt-pkg/cdrom.cc:532 +#: apt-pkg/cdrom.cc:529 #, c-format msgid "" "Using CD-ROM mount point %s\n" "Mounting CD-ROM\n" msgstr "" -#: apt-pkg/cdrom.cc:541 apt-pkg/cdrom.cc:623 +#: apt-pkg/cdrom.cc:538 apt-pkg/cdrom.cc:620 msgid "Identifying.. " msgstr "" -#: apt-pkg/cdrom.cc:566 +#: apt-pkg/cdrom.cc:563 #, c-format msgid "Stored label: %s \n" msgstr "" -#: apt-pkg/cdrom.cc:586 +#: apt-pkg/cdrom.cc:583 #, c-format msgid "Using CD-ROM mount point %s\n" msgstr "" -#: apt-pkg/cdrom.cc:604 +#: apt-pkg/cdrom.cc:601 msgid "Unmounting CD-ROM\n" msgstr "" -#: apt-pkg/cdrom.cc:608 +#: apt-pkg/cdrom.cc:605 msgid "Waiting for disc...\n" msgstr "" #. Mount the new CDROM -#: apt-pkg/cdrom.cc:616 +#: apt-pkg/cdrom.cc:613 msgid "Mounting CD-ROM...\n" msgstr "" -#: apt-pkg/cdrom.cc:634 +#: apt-pkg/cdrom.cc:631 msgid "Scanning disc for index files..\n" msgstr "" -#: apt-pkg/cdrom.cc:674 +#: apt-pkg/cdrom.cc:671 #, c-format msgid "" "Found %i package indexes, %i source indexes, %i translation indexes and %i " "signatures\n" msgstr "" -#: apt-pkg/cdrom.cc:711 +#: apt-pkg/cdrom.cc:708 #, c-format msgid "Found label '%s'\n" msgstr "" -#: apt-pkg/cdrom.cc:740 +#: apt-pkg/cdrom.cc:737 msgid "That is not a valid name, try again.\n" msgstr "" -#: apt-pkg/cdrom.cc:756 +#: apt-pkg/cdrom.cc:753 #, c-format msgid "" "This disc is called: \n" "'%s'\n" msgstr "" -#: apt-pkg/cdrom.cc:760 +#: apt-pkg/cdrom.cc:757 msgid "Copying package lists..." msgstr "" -#: apt-pkg/cdrom.cc:786 +#: apt-pkg/cdrom.cc:783 msgid "Writing new source list\n" msgstr "" -#: apt-pkg/cdrom.cc:795 +#: apt-pkg/cdrom.cc:792 msgid "Source list entries for this disc are:\n" msgstr "" -#: apt-pkg/cdrom.cc:837 +#: apt-pkg/cdrom.cc:834 msgid "Unmounting CD-ROM...\n" msgstr "" @@ -2572,52 +2586,52 @@ msgstr "" msgid "Wrote %i records with %i missing files and %i mismatched files\n" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:358 +#: apt-pkg/deb/dpkgpm.cc:355 #, c-format msgid "Preparing %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:359 +#: apt-pkg/deb/dpkgpm.cc:356 #, c-format msgid "Unpacking %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:364 +#: apt-pkg/deb/dpkgpm.cc:361 #, c-format msgid "Preparing to configure %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:365 +#: apt-pkg/deb/dpkgpm.cc:362 #, c-format msgid "Configuring %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:366 +#: apt-pkg/deb/dpkgpm.cc:363 #, c-format msgid "Installed %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:371 +#: apt-pkg/deb/dpkgpm.cc:368 #, c-format msgid "Preparing for removal of %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:372 +#: apt-pkg/deb/dpkgpm.cc:369 #, c-format msgid "Removing %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:373 +#: apt-pkg/deb/dpkgpm.cc:370 #, c-format msgid "Removed %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:378 +#: apt-pkg/deb/dpkgpm.cc:375 #, c-format msgid "Preparing to completely remove %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:379 +#: apt-pkg/deb/dpkgpm.cc:376 #, c-format msgid "Completely removed %s" msgstr "" -- cgit v1.2.3 From 541c83b92a4919ba0aed6150f71e227d07f93a02 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 27 Jun 2007 13:34:34 +0200 Subject: * cmdline/apt-get.cc: - fix InstallTask code when a pkgRecord ends with a single '\n' (thanks to Soren Hansen for reporting) --- cmdline/apt-get.cc | 2 +- debian/changelog | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 51bcfde12..974427f51 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/debian/changelog b/debian/changelog index 50c050dcb..84cf54d75 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.7.2ubuntu3) gutsy; urgency=low + + * cmdline/apt-get.cc: + - fix InstallTask code when a pkgRecord ends + with a single '\n' (thanks to Soren Hansen for reporting) + + -- Michael Vogt Wed, 27 Jun 2007 13:33:38 +0200 + apt (0.7.2ubuntu2) gutsy; urgency=low * fixed compile errors with g++ 7.3 (thanks to -- cgit v1.2.3 From 927677f0ae5f92bb6935c91b08ee6ffe220d4bfa Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 28 Jun 2007 18:19:58 +0200 Subject: * cmdline/apt-get.cc: - make the ouput more friendly for copy and paste (thanks to Matt Zimmerman) --- cmdline/apt-get.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 51bcfde12..930d88d99 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2128,7 +2128,8 @@ bool DoSource(CommandLine &CmdL) "'%s'\n"), Src.c_str(), vcs.c_str(), uri.c_str()); if(vcs == "Bzr") - ioprintf(c1out,_("Please use: 'bzr get %s'\n" + ioprintf(c1out,_("Please use:\n" + "bzr get %s\n" "to modify the package.\n"), uri.c_str()); ioprintf(c1out, "Are you sure you want to continue [yN]? "); -- cgit v1.2.3 From 8756297c0f5987d2320955c21e5c64395ce311cc Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 28 Jun 2007 18:38:55 +0200 Subject: * cmdline/apt-get.cc: - remove '' around xs-vcs-$repo to make pasting easier --- cmdline/apt-get.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 930d88d99..fa7ae32eb 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2125,7 +2125,7 @@ bool DoSource(CommandLine &CmdL) string uri = srec.substr(pos,epos-pos).c_str(); ioprintf(c1out, _("WARNING: '%s' is maintained in " "the '%s' version control system at:\n" - "'%s'\n"), + "%s\n"), Src.c_str(), vcs.c_str(), uri.c_str()); if(vcs == "Bzr") ioprintf(c1out,_("Please use:\n" -- cgit v1.2.3 From 774a66876919712d5b8e12174f01f0337d2f3393 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 29 Jun 2007 13:04:17 +0200 Subject: * cmdline/apt-get.cc: - ignore Vcs-Browser flag (#121770) --- cmdline/apt-get.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index fa7ae32eb..08bb1bc34 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2116,10 +2116,15 @@ bool DoSource(CommandLine &CmdL) string srec = Last->AsStr(); string::size_type pos = srec.find("\nVcs-"); - if (pos != string::npos ) + 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(); @@ -2135,6 +2140,8 @@ bool DoSource(CommandLine &CmdL) ioprintf(c1out, "Are you sure you want to continue [yN]? "); if(!YnPrompt(false)) return _error->Error(_("Abort.")); + else + break; } // Back track -- cgit v1.2.3 From b799e134fc730519cc8f0c0ea4387badffac4092 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 8 Aug 2007 12:52:56 +0200 Subject: * cmdline/apt-get.cc: - remove YnPrompt when a XS-Vcs- tag is found, improve the notice (LP: #129575) --- cmdline/apt-get.cc | 11 ++++------- configure.in | 2 +- debian/changelog | 10 +++++++++- 3 files changed, 14 insertions(+), 9 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index ead053136..e7b7d5204 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2130,20 +2130,17 @@ bool DoSource(CommandLine &CmdL) pos += vcs.length()+2; string::size_type epos = srec.find("\n", pos); string uri = srec.substr(pos,epos-pos).c_str(); - ioprintf(c1out, _("WARNING: '%s' is maintained in " + 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 modify the package.\n"), + "to retrieve the latest (possible unreleased) " + "updates to the package.\n"), uri.c_str()); - ioprintf(c1out, "Are you sure you want to continue [yN]? "); - if(!YnPrompt(false)) - return _error->Error(_("Abort.")); - else - break; + break; } // Back track diff --git a/configure.in b/configure.in index b2f10baed..d1a684eb2 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.7.6ubuntu2") +AC_DEFINE_UNQUOTED(VERSION,"0.7.6ubuntu3") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 6861a1ba8..c4eba136f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.7.6ubuntu4) gutsy; urgency=low + + * cmdline/apt-get.cc: + - remove YnPrompt when a XS-Vcs- tag is found, improve the + notice (LP: #129575) + + -- + apt (0.7.6ubuntu3) gutsy; urgency=low * apt-pkg/deb/dpkgpm.cc: @@ -5,7 +13,7 @@ apt (0.7.6ubuntu3) gutsy; urgency=low * apt-pkg/pkgcachegen.cc: - increase default mmap size (LP: #125640) - -- + -- Michael Vogt Tue, 07 Aug 2007 09:52:00 +0200 apt (0.7.6ubuntu2) gutsy; urgency=low -- cgit v1.2.3 From fd9a8ca2ed30994a7946acbf54f25d27fe2b10cb Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 13 Feb 2008 19:52:12 +0100 Subject: cmdline/apt-key: import net_update key from the project/ directory for now --- cmdline/apt-key | 2 +- configure.in | 2 +- debian/changelog | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-key b/cmdline/apt-key index e0c4b5e48..7d6f9c589 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -12,7 +12,7 @@ GPG="$GPG_CMD --keyring /etc/apt/trusted.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/ubuntu-archive-keyring.gpg +ARCHIVE_KEYRING_URI=http://archive.ubuntu.com/ubuntu/project/ubuntu-archive-keyring.gpg add_keys_with_verify_against_master_keyring() { ADD_KEYRING=$1 diff --git a/configure.in b/configure.in index 890643a3e..2e3fa05e8 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.7.9ubuntu8") +AC_DEFINE_UNQUOTED(VERSION,"0.7.9ubuntu10") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 12b6d6306..1e3a71dd3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,7 @@ apt (0.7.9ubuntu10) hardy; urgency=low * debian/apt.cron.daily: - add apt-key net-update to the nightly cron job - -- + -- Michael Vogt Wed, 13 Feb 2008 15:50:28 +0100 apt (0.7.9ubuntu9) hardy; urgency=low -- cgit v1.2.3 From 6f320e7b0fe9e9f1e1ac4452ba7a4c1eca297842 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 11 Mar 2008 09:54:45 +0100 Subject: * cmdline/apt-get.cc: - fix incorrect help output for -f (LP: #57487) --- cmdline/apt-get.cc | 2 +- debian/changelog | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 8956332a3..c522d4f87 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2662,7 +2662,7 @@ bool ShowHelp(CommandLine &CmdL) " -d Download only - do NOT install or unpack archives\n" " -s No-act. Perform ordering simulation\n" " -y Assume Yes to all queries and do not prompt\n" - " -f Attempt to continue if the integrity check fails\n" + " -f Attempt to correct a system with broken dependencies in place\n" " -m Attempt to continue if archives are unlocatable\n" " -u Show a list of upgraded packages as well\n" " -b Build the source package after fetching it\n" diff --git a/debian/changelog b/debian/changelog index 21d2b4f70..e531be876 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ apt (0.7.9ubuntu13) hardy; urgency=low - fix typo (LP: #150900) * doc/example/sources.list: - updated for hardy (LP: #195879) + * cmdline/apt-get.cc: + - fix incorrect help output for -f (LP: #57487) -- -- cgit v1.2.3 From 95717122196eb888bc81f5c3e8daa74cad8db649 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 11 Mar 2008 17:41:55 +0100 Subject: - run the problemResolver after a task was installed so that it can correct any missing dependencies --- cmdline/apt-get.cc | 5 ++++- debian/changelog | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index c522d4f87..c8671447e 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1506,10 +1506,13 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, buf[end-start] = 0x0; if (regexec(&Pattern,buf,0,0,0) != 0) continue; - res &= TryToInstall(Pkg,Cache,Fix,Remove,false,ExpectedInst); + res &= TryToInstall(Pkg,Cache,Fix,Remove,true,ExpectedInst); found = true; } + // now let the problem resolver deal with any issues + Fix.Resolve(true); + if(!found) _error->Error(_("Couldn't find task %s"),taskname); diff --git a/debian/changelog b/debian/changelog index 6fd1b2746..df23ed1b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ apt (0.7.9ubuntu14) hardy; urgency=low * cmdline/apt-get.cc: - fix incorrect help output for -f (LP: #57487) + - run the problemResolver after a task was installed + so that it can correct any missing dependencies * typo fixes (LP: #107960) -- -- cgit v1.2.3 From c22356d86150dfee4903ff146a64cd5ad63be827 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 13 Mar 2008 23:42:43 +0100 Subject: * cmdline/apt-get.cc: - do two passes when installing tasks, first ignoring dependencies, then resolving them and run the problemResolver at the end so that it can correct any missing dependencies. This should fix livecd building for kubuntu (thanks to Jonathan Riddell for reporting the problem) --- cmdline/apt-get.cc | 29 +++++++++++++++++------------ configure.in | 2 +- debian/changelog | 11 +++++++++++ 3 files changed, 29 insertions(+), 13 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index c8671447e..cabbde5cb 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1495,19 +1495,24 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, bool found = false; bool res = true; - for (Pkg = Cache.PkgBegin(); Pkg.end() == false; Pkg++) + + // two runs, first ignore dependencies, second install any missing + for(int IgnoreBroken=1; IgnoreBroken >= 0; IgnoreBroken--) { - pkgCache::VerIterator ver = Cache[Pkg].CandidateVerIter(Cache); - if(ver.end()) - continue; - pkgRecords::Parser &parser = Recs.Lookup(ver.FileList()); - parser.GetRec(start,end); - strncpy(buf, start, end-start); - buf[end-start] = 0x0; - if (regexec(&Pattern,buf,0,0,0) != 0) - continue; - res &= TryToInstall(Pkg,Cache,Fix,Remove,true,ExpectedInst); - found = true; + for (Pkg = Cache.PkgBegin(); Pkg.end() == false; Pkg++) + { + pkgCache::VerIterator ver = Cache[Pkg].CandidateVerIter(Cache); + if(ver.end()) + continue; + pkgRecords::Parser &parser = Recs.Lookup(ver.FileList()); + parser.GetRec(start,end); + strncpy(buf, start, end-start); + buf[end-start] = 0x0; + if (regexec(&Pattern,buf,0,0,0) != 0) + continue; + res &= TryToInstall(Pkg,Cache,Fix,Remove,IgnoreBroken,ExpectedInst); + found = true; + } } // now let the problem resolver deal with any issues diff --git a/configure.in b/configure.in index 7a0f131db..f89333d42 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.7.9ubuntu14") +AC_DEFINE_UNQUOTED(VERSION,"0.7.9ubuntu15") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 01ad9511f..6bc4d01ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +apt (0.7.9ubuntu15) hardy; urgency=low + + * cmdline/apt-get.cc: + - do two passes when installing tasks, first ignoring dependencies, + then resolving them and run the problemResolver at the end + so that it can correct any missing dependencies. This should + fix livecd building for kubuntu (thanks to Jonathan Riddell + for reporting the problem) + + -- Michael Vogt Thu, 13 Mar 2008 23:25:45 +0100 + apt (0.7.9ubuntu14) hardy; urgency=low * cmdline/apt-get.cc: -- cgit v1.2.3 From 397d56f56b3ffaf38df57571c11f0699e2810902 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 8 Apr 2008 14:20:06 +0200 Subject: * cmdline/apt-key: - only check against master-keys in net-update to not break custom CDs (thanks to Colin Watson) --- cmdline/apt-key | 20 ++++++++++---------- debian/changelog | 8 ++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-key b/cmdline/apt-key index 77a2a4623..de04d16da 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -29,9 +29,8 @@ add_keys_with_verify_against_master_keyring() { # when adding new keys, make sure that the archive-master-keyring # is honored. so: - # all keys that are exported and have the name - # "Ubuntu Archive Automatic Signing Key" must have a valid signature - # from a key in the ubuntu-master-keyring + # all keys that are exported must have a valid signature + # from a key in the $distro-master-keyring add_keys=`$GPG_CMD --keyring $ADD_KEYRING --with-colons --list-keys | grep ^pub | cut -d: -f5` master_keys=`$GPG_CMD --keyring $MASTER --with-colons --list-keys | grep ^pub | cut -d: -f5` for add_key in $add_keys; do @@ -81,13 +80,14 @@ update() { exit 1 fi - # add new keys, if no MASTER_KEYRING is used, use the traditional - # way - if [ -z "$MASTER_KEYRING" ]; then - $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import - else - add_keys_with_verify_against_master_keyring $ARCHIVE_KEYRING $MASTER_KEYRING - fi + # add new keys from the package; + + # we do not use add_keys_with_verify_against_master_keyring here, + # 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 + $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import # remove no-longer supported/used keys keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5` diff --git a/debian/changelog b/debian/changelog index 6bc4d01ae..eaf33bf5f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.7.9ubuntu16) hardy; urgency=low + + * cmdline/apt-key: + - only check against master-keys in net-update to not break + custom CDs (thanks to Colin Watson) + + -- Michael Vogt Tue, 08 Apr 2008 14:17:14 +0200 + apt (0.7.9ubuntu15) hardy; urgency=low * cmdline/apt-get.cc: -- cgit v1.2.3 From 9772f307fdf1f4cc94690b4ba3705a8f891033fe Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 8 Dec 2008 09:37:09 -0800 Subject: * cmdline/apt-get.cc: - fix "apt-get source pkg=ver" if binary name != source name (LP: #202219) * doc/makefile: - add examples/apt-https-method-example.conf --- cmdline/apt-get.cc | 6 +++--- debian/changelog | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index bd95e917b..ea7d45952 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1295,9 +1295,9 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, { string Ver = Parse->Version(); - // Skip name mismatches - if (IsMatch == true && Parse->Package() != Src) - continue; + // show name mismatches + if (IsMatch == true && Parse->Package() != Src) + ioprintf(c1out, _("No source package '%s' picking '%s' instead"), Parse->Package(), Src); if (VerTag.empty() == false) { diff --git a/debian/changelog b/debian/changelog index 384abf64e..8c69f4b34 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ apt (0.7.19ubuntu2) jaunty; urgency=low [ Michael Vogt ] * apt-pkg/deb/dpkgpm.cc: - filter "ENOMEM" errors when creating apport reports + * cmdline/apt-get.cc: + - fix "apt-get source pkg=ver" if binary name != source name + (LP: #202219) [ Ian Weisser ] * /apt-pkg/deb/debsystem.cc: @@ -35,6 +38,8 @@ apt (0.7.19) unstable; urgency=low [ Michael Vogt ] + * doc/makefile: + - add examples/apt-https-method-example.conf - fix SIGHUP handling (closes: #463030) [ Christian Perrier ] -- cgit v1.2.3 From 71da8af4dabe8680802ef291267c2f53d7942d18 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 16 Dec 2008 07:38:42 +0100 Subject: Clarify the --help for 'purge' (LP: #243948) --- cmdline/apt-get.cc | 2 +- debian/changelog | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index ea7d45952..d5869da43 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2659,7 +2659,7 @@ bool ShowHelp(CommandLine &CmdL) " install - Install new packages (pkg is libc6 not libc6.deb)\n" " remove - Remove packages\n" " autoremove - Remove automatically all unused packages\n" - " purge - Remove and purge packages\n" + " purge - Remove packages and config files\n" " source - Download source archives\n" " build-dep - Configure build-dependencies for source packages\n" " dist-upgrade - Distribution upgrade, see apt-get(8)\n" diff --git a/debian/changelog b/debian/changelog index f15652d0b..15d5730f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ apt (0.7.19ubuntu2) jaunty; urgency=low * apt-pkg/dev/debsystem.cc: - add missing apti18n.h header + [ Dereck Wonnacott ] + * Clarify the --help for 'purge' (LP: #243948) + [ Christian Perrier ] * Translations: - French corrected (remove awful use of first person) -- cgit v1.2.3 From 236527f0fffe30fc8988e17d926778c23ac1f902 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 Jan 2009 17:39:37 +0100 Subject: LP: #263089 --- apt-pkg/deb/debsystem.cc | 10 +++++----- cmdline/apt-get.cc | 2 +- debian/changelog | 2 ++ methods/gpgv.cc | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) (limited to 'cmdline') diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index e1aacdbdb..ee2039c75 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -18,7 +18,7 @@ #include #include #include - + #include #include #include @@ -67,11 +67,11 @@ bool debSystem::Lock() if (LockFD == -1) { if (errno == EACCES || errno == EAGAIN) - return _error->Error("Unable to lock the administration directory (%s), " - "is another process using it?",AdminDir.c_str()); + return _error->Error(_("Unable to lock the administration directory (%s), " + "is another process using it?"),AdminDir.c_str()); else - return _error->Error("Unable to lock the administration directory (%s), " - "are you root?",AdminDir.c_str()); + return _error->Error(_("Unable to lock the administration directory (%s), " + "are you root?"),AdminDir.c_str()); } // See if we need to abort with a dirty journal diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index d5869da43..38775f70d 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1297,7 +1297,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, // show name mismatches if (IsMatch == true && Parse->Package() != Src) - ioprintf(c1out, _("No source package '%s' picking '%s' instead"), Parse->Package(), Src); + ioprintf(c1out, _("No source package '%s' picking '%s' instead"), Parse->Package().c_str(), Src.c_str()); if (VerTag.empty() == false) { diff --git a/debian/changelog b/debian/changelog index 2c4802e3b..478638a63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ apt (0.7.19ubuntu3) jaunty; urgency=low * debian/apt.conf.autoremove: - readd "linux-image" (and friends) to the auto-remove blacklist + * fix some i18n issues (thanks to Gabor Kelemen) + LP: #263089 [ Christian Perrier ] * Translations: diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 9f4683e6e..f3277b300 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -264,7 +264,7 @@ bool GPGVMethod::Fetch(FetchItem *Itm) // least one bad signature. good signatures and NoPubKey signatures // happen easily when a file is signed with multiple signatures if(GoodSigners.empty() or !BadSigners.empty()) - return _error->Error(errmsg.c_str()); + return _error->Error("%s", errmsg.c_str()); } // Just pass the raw output up, because passing it as a real data -- cgit v1.2.3 From 4bfb7a7756eed967c1edad63bc16a37b741cafaa Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 9 Feb 2009 14:34:50 +0100 Subject: * cmdline/apt-get.cc: - default to "false" for the "APT::Get::Build-Dep-Automatic" option (follow debian here) --- cmdline/apt-get.cc | 2 +- debian/changelog | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 38775f70d..2117a7f2a 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2542,7 +2542,7 @@ bool DoBuildDep(CommandLine &CmdL) { // We successfully installed something; skip remaining alternatives skipAlternatives = hasAlternatives; - if(_config->FindB("APT::Get::Build-Dep-Automatic", true) == true) + if(_config->FindB("APT::Get::Build-Dep-Automatic", false) == true) Cache->MarkAuto(Pkg, true); continue; } diff --git a/debian/changelog b/debian/changelog index a21c383e5..89848f31c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,9 @@ apt (0.7.20.2ubuntu1) jaunty; urgency=low - add new strprintf() function to make i18n strings easier * apt-pkg/dev/debsystem.cc: - add missing apti18n.h header + * cmdline/apt-get.cc: + - default to "false" for the "APT::Get::Build-Dep-Automatic" + option (follow debian here) [ Dereck Wonnacott ] * Clarify the --help for 'purge' (LP: #243948) -- cgit v1.2.3 From 5ef499349c609f5ef50bd633692faa2665f4f96f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 9 Mar 2009 16:33:39 +0100 Subject: * cmdline/apt-get.cc - fix "apt-get source pkg" if there is a binary package and a source package of the same name but from different packages (LP: #330103) --- cmdline/apt-get.cc | 21 ++++++++++++++------- debian/changelog | 8 ++++++-- 2 files changed, 20 insertions(+), 9 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 2117a7f2a..0339afdf1 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1272,16 +1272,23 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, } } } - - // No source package name.. - if (Src.empty() == true) - Src = TmpSrc; - + // The best hit pkgSrcRecords::Parser *Last = 0; unsigned long Offset = 0; string Version; bool IsMatch = false; + bool MatchSrcOnly = false; + + // No source package name.. + if (Src.empty() == true) + Src = TmpSrc; + else + // if we have a source pkg name, make sure to only search + // for srcpkg names, otherwise apt gets confused if there + // is a binary package "pkg1" and a source package "pkg1" + // with the same name but that comes from different packages + MatchSrcOnly = true; // If we are matching by version then we need exact matches to be happy if (VerTag.empty() == false) @@ -1291,13 +1298,13 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, binary packages in the search */ pkgSrcRecords::Parser *Parse; SrcRecs.Restart(); - while ((Parse = SrcRecs.Find(Src.c_str(),false)) != 0) + 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"), Parse->Package().c_str(), Src.c_str()); + ioprintf(c1out, _("No source package '%s' picking '%s' instead\n"), Parse->Package().c_str(), Src.c_str()); if (VerTag.empty() == false) { diff --git a/debian/changelog b/debian/changelog index b485c36aa..bef5c3cad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,13 @@ -apt (0.7.20.2ubuntu2) UNRELEASED; urgency=low +apt (0.7.20.2ubuntu2) jaunty; urgency=low * apt-pkg/deb/dpkgpm.cc: - revert termios patch (LP: #338514) + * cmdline/apt-get.cc + - fix "apt-get source pkg" if there is a binary package and + a source package of the same name but from different + packages (LP: #330103) - -- Michael Vogt Fri, 06 Mar 2009 10:15:15 +0100 + -- Michael Vogt Mon, 09 Mar 2009 16:33:28 +0100 apt (0.7.20.2ubuntu1) jaunty; urgency=low -- cgit v1.2.3 From 5dad4134da37576de12721f34165c1fe4d138b3c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 19 Mar 2009 15:42:25 +0100 Subject: * methods/mirror.cc: - when download the mirror file and the server is down, return a propper error message (LP: #278635) --- cmdline/apt-report-mirror-failure | 2 +- debian/changelog | 8 ++++++++ methods/mirror.cc | 18 ++++++++++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure index 1567e78e3..ef77d4954 100755 --- a/cmdline/apt-report-mirror-failure +++ b/cmdline/apt-report-mirror-failure @@ -5,7 +5,7 @@ import urllib import apt_pkg apt_pkg.init() -url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", None) +url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", "") #"http://people.ubuntu.com:9000/mirror-failure") #"http://localhost:9000/mirror-failure") if not url: diff --git a/debian/changelog b/debian/changelog index bef5c3cad..5a764383e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.7.20.2ubuntu3) jaunty; urgency=low + + * methods/mirror.cc: + - when download the mirror file and the server is down, + return a propper error message (LP: #278635) + + -- Michael Vogt Thu, 19 Mar 2009 15:42:15 +0100 + apt (0.7.20.2ubuntu2) jaunty; urgency=low * apt-pkg/deb/dpkgpm.cc: diff --git a/methods/mirror.cc b/methods/mirror.cc index bdd783cc7..b3a956b95 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -123,6 +123,8 @@ bool MirrorMethod::Clean(string Dir) bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str) { + if(Debug) + clog << "MirrorMethod::DownloadMirrorFile(): " << endl; // check the file, if it is not older than RefreshInterval just use it // otherwise try to get a new one @@ -251,6 +253,9 @@ string MirrorMethod::GetMirrorFileName(string mirror_uri_str) depth. */ bool MirrorMethod::Fetch(FetchItem *Itm) { + if(Debug) + clog << "MirrorMethod::Fetch()" << endl; + // the http method uses Fetch(0) as a way to update the pipeline, // just let it do its work in this case - Fetch() with a valid // Itm will always run before the first Fetch(0) @@ -269,8 +274,17 @@ bool MirrorMethod::Fetch(FetchItem *Itm) DownloadMirrorFile(Itm->Uri); } - if(Mirror.empty()) - SelectMirror(); + if(Mirror.empty()) { + if(!SelectMirror()) { + // no valid mirror selected, something went wrong downloading + // from the master mirror site most likely and there is + // no old mirror file availalbe + return false; + } + } + if(Debug) + clog << "selected mirror: " << Mirror << endl; + for (FetchItem *I = Queue; I != 0; I = I->Next) { -- cgit v1.2.3 From 6b802e56f55a43e9967cd8d41148646fd95ea8e3 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 26 Mar 2009 23:52:26 +0000 Subject: * cmdline/acqprogress.cc: - Call pkgAcquireStatus::Pulse even if quiet, so that we still get dlstatus messages on the status-fd (LP: #290234). --- cmdline/acqprogress.cc | 4 ++-- debian/changelog | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'cmdline') diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc index a5fee1db5..b3ded4142 100644 --- a/cmdline/acqprogress.cc +++ b/cmdline/acqprogress.cc @@ -145,11 +145,11 @@ void AcqTextStatus::Stop() bandwidth and ETA indicator. */ bool AcqTextStatus::Pulse(pkgAcquire *Owner) { + pkgAcquireStatus::Pulse(Owner); + if (Quiet > 0) return true; - pkgAcquireStatus::Pulse(Owner); - enum {Long = 0,Medium,Short} Mode = Long; char Buffer[sizeof(BlankLine)]; diff --git a/debian/changelog b/debian/changelog index d1f885795..bce1fa462 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.7.20.2ubuntu5) UNRELEASED; urgency=low + + * cmdline/acqprogress.cc: + - Call pkgAcquireStatus::Pulse even if quiet, so that we still get + dlstatus messages on the status-fd (LP: #290234). + + -- Colin Watson Thu, 26 Mar 2009 23:50:56 +0000 + apt (0.7.20.2ubuntu4) jaunty; urgency=low * ftparchive/cachedb.cc: -- cgit v1.2.3 From 28b5ff3f76e63f0b4bbed5980b9c13f4a7c3cecc Mon Sep 17 00:00:00 2001 From: Loïc Minier Date: Sun, 10 May 2009 12:12:29 +0200 Subject: Drop duplicate "purge" in command list. --- cmdline/apt-get.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 0339afdf1..988abe216 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2778,7 +2778,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}, -- cgit v1.2.3 From 3d513bbd0c7cdcfb962403645dd9f05f0a127938 Mon Sep 17 00:00:00 2001 From: Brian Murray Date: Thu, 13 Aug 2009 13:25:21 -0700 Subject: incorporate string-fix patch from Matthew East for LP: #370094 --- cmdline/apt-get.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 04f3944a9..7385c3dd3 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2127,7 +2127,7 @@ bool DoSource(CommandLine &CmdL) if(vcs == "Bzr") ioprintf(c1out,_("Please use:\n" "bzr get %s\n" - "to retrieve the latest (possible unreleased) " + "to retrieve the latest (possibly unreleased) " "updates to the package.\n"), uri.c_str()); break; -- cgit v1.2.3 From a69a3a044be84f72508fb468cdf13d9e5f724dd4 Mon Sep 17 00:00:00 2001 From: Loïc Minier Date: Fri, 28 Aug 2009 12:03:39 +0200 Subject: * cmdline/apt-key: - Emit a warning if removed keys keyring is missing and skip associated checks (LP: #218971) --- cmdline/apt-key | 18 +++++++++++------- debian/changelog | 5 +++++ 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-key b/cmdline/apt-key index 26aa55633..b579e5a53 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -90,13 +90,17 @@ update() { # add any security. we *need* this check on net-update though $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import - # remove no-longer supported/used keys - keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5` - for key in $keys; do - if $GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key; then - $GPG --quiet --batch --delete-key --yes ${key} - fi - done + if [ -r "$REMOVED_KEYS" ]; then + # remove no-longer supported/used keys + keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5` + for key in $keys; do + if $GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key; then + $GPG --quiet --batch --delete-key --yes ${key} + fi + done + else + echo "Warning: removed keys keyring $REMOVED_KEYS missing or not readable" >&2 + fi } diff --git a/debian/changelog b/debian/changelog index dbd8fe5b3..160210dac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,11 @@ apt (0.7.22.3) UNRELEASED; urgency=low * cmdline/apt-get.cc: - typo fix (LP: #370094) + [ Loïc Minier ] + * cmdline/apt-key: + - Emit a warning if removed keys keyring is missing and skip associated + checks (LP: #218971) + -- Michael Vogt Wed, 19 Aug 2009 11:14:15 +0200 apt (0.7.22.2) unstable; urgency=low -- cgit v1.2.3 From 4df70e7528c21f948dfb7032271c499c53a21515 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 3 Feb 2010 09:42:36 -0800 Subject: * cmdline/apt-cdrom.cc: - make Acquire::cdrom::AutoDetect default, this can be turned off with "--no-auto-detect" --- cmdline/apt-cdrom.cc | 2 +- debian/changelog | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 0c9aab28c..8b9eacae6 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -147,7 +147,7 @@ bool DoAdd(CommandLine &) pkgCdrom cdrom; bool res = true; - bool AutoDetect = _config->FindB("Acquire::cdrom::AutoDetect"); + bool AutoDetect = _config->FindB("Acquire::cdrom::AutoDetect", true); unsigned int count = 0; if (AutoDetect && UdevCdroms.Dlopen()) diff --git a/debian/changelog b/debian/changelog index e6417c53c..a290d0389 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.7.25ubuntu4) lucid; urgency=low + + * cmdline/apt-cdrom.cc: + - make Acquire::cdrom::AutoDetect default, this can be + turned off with "--no-auto-detect" + + -- Michael Vogt Tue, 02 Feb 2010 16:58:59 -0800 + apt (0.7.25ubuntu3) lucid; urgency=low * cmdline/apt-get.cc: -- cgit v1.2.3 From 7a511e5d959f59ec6062a84b3a1ae372ff4f8e86 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 26 Mar 2010 17:25:04 +0100 Subject: * cmdline/apt-get.cc, apt-pkg/cdrom.cc: - fix memory leaks in error conditions in DoSource() --- apt-pkg/cdrom.cc | 3 ++- cmdline/apt-get.cc | 6 +++++- debian/changelog | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'cmdline') diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 96d4e9c91..783ffc430 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -289,7 +289,8 @@ bool pkgCdrom::DropRepeats(vector &List,const char *Name) List[J] = string(); } } - + delete[] Inodes; + // Wipe erased entries for (unsigned int I = 0; I < List.size();) { diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index ea236676b..0bc8fc571 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2315,6 +2315,7 @@ bool DoSource(CommandLine &CmdL) { for (unsigned I = 0; I != J; I++) ioprintf(cout,_("Fetch source %s\n"),Dsc[I].Package.c_str()); + delete[] Dsc; return true; } @@ -2325,6 +2326,7 @@ bool DoSource(CommandLine &CmdL) for (; I != Fetcher.UriEnd(); I++) cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl; + delete[] Dsc; return true; } @@ -2350,6 +2352,7 @@ bool DoSource(CommandLine &CmdL) if (_config->FindB("APT::Get::Download-only",false) == true) { c1out << _("Download complete and in download only mode") << endl; + delete[] Dsc; return true; } @@ -2411,7 +2414,8 @@ bool DoSource(CommandLine &CmdL) _exit(0); } - + delete[] Dsc; + // Wait for the subprocess int Status = 0; while (waitpid(Process,&Status,0) != Process) diff --git a/debian/changelog b/debian/changelog index bf07b9f30..5f5a43098 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ apt (0.7.25.3ubuntu4) UNRELEASED; urgency=low * apt-pkg/deb/debversion.cc: - consider absent of debian revision equivalent to 0 (Closes: #573592) LP: #540228 + * cmdline/apt-get.cc, apt-pkg/cdrom.cc: + - fix memory leaks in error conditions in DoSource() -- Michael Vogt Fri, 26 Mar 2010 16:57:49 +0100 -- cgit v1.2.3 From a4787a959bbed2e16f6017c8e3238ae9cf98bc69 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 31 Mar 2010 22:00:36 +0200 Subject: cherry pick -r 1983..1984 lp:~donkult/apt/sid --- cmdline/apt-get.cc | 32 +++++++++++++++++++++----------- debian/changelog | 8 ++++++++ 2 files changed, 29 insertions(+), 11 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 0bc8fc571..5de3fb036 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1270,12 +1270,26 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, { if(VerTag.empty() == false || DefRel.empty() == false) { + bool fuzzy = false; // we have a default release, try to locate the pkg. we do it like // this because GetCandidateVer() will not "downgrade", that means // "apt-get source -t stable apt" won't work on a unstable system - for (pkgCache::VerIterator Ver = Pkg.VersionList(); - Ver.end() == false; Ver++) + for (pkgCache::VerIterator Ver = Pkg.VersionList();; Ver++) { + // try first only exact matches, later fuzzy matches + if (Ver.end() == true) + { + if (fuzzy == true) + break; + fuzzy = true; + Ver = Pkg.VersionList(); + } + // We match against a concrete version (or a part of this version) + if (VerTag.empty() == false && + (fuzzy == true || Cache.VS().CmpVersion(VerTag, Ver.VerStr()) != 0) && // exact match + (fuzzy == false || strncmp(VerTag.c_str(), Ver.VerStr(), VerTag.size()) != 0)) // fuzzy match + continue; + for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; VF++) { @@ -1288,10 +1302,6 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, pkgCache::Flag::NotSource && Pkg.CurrentVer() != Ver) continue; - // We match against a concrete version (or a part of this version) - if (VerTag.empty() == false && strncmp(VerTag.c_str(), Ver.VerStr(), VerTag.size()) != 0) - continue; - // or we match against a release if(VerTag.empty() == false || (VF.File().Archive() != 0 && VF.File().Archive() == DefRel) || @@ -1302,10 +1312,9 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, // no SourcePkg name, so it is the "binary" name if (Src.empty() == true) Src = TmpSrc; - // no Version, so we try the Version of the SourcePkg - - // and after that the version of the binary package - if (VerTag.empty() == true) - VerTag = Parse.SourceVer(); + // the Version we have is possibly fuzzy or includes binUploads, + // so we use the Version of the SourcePkg (empty if same as package) + VerTag = Parse.SourceVer(); if (VerTag.empty() == true) VerTag = Ver.VerStr(); break; @@ -1371,7 +1380,8 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, const string Ver = Parse->Version(); // Ignore all versions which doesn't fit - if (VerTag.empty() == false && strncmp(VerTag.c_str(), Ver.c_str(), VerTag.size()) != 0) + if (VerTag.empty() == false && + Cache.VS().CmpVersion(VerTag, Ver) != 0) // exact match continue; // Newer version or an exact match? Save the hit diff --git a/debian/changelog b/debian/changelog index 1b7a9adc6..375ef6151 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.7.25.3ubuntu5) UNRELEASED; urgency=low + + [ David Kalnischkies ] + * cmdline/apt-get.cc: + - try version match in FindSrc first exact than fuzzy (LP: #551178) + + -- Michael Vogt Wed, 31 Mar 2010 21:59:42 +0200 + apt (0.7.25.3ubuntu4) lucid; urgency=low [ David Kalnischkies ] -- cgit v1.2.3 From b1fd12d41f9be5d5f33e4768761ed28f87953082 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 8 Apr 2010 21:14:03 +0200 Subject: * cmdline/apt-get.cc: - fix crash when pkg.VersionList() is empty (LP: #556056) --- cmdline/apt-get.cc | 4 ++++ debian/changelog | 7 +++++++ 2 files changed, 11 insertions(+) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 5de3fb036..b379dc82f 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1283,6 +1283,10 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, break; fuzzy = true; Ver = Pkg.VersionList(); + // exit right away from the Pkg.VersionList() loop if we + // don't have any versions + if (Ver.end() == true) + break; } // We match against a concrete version (or a part of this version) if (VerTag.empty() == false && diff --git a/debian/changelog b/debian/changelog index c740067e4..13d46cec9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +apt (0.7.25.3ubuntu6) lucid; urgency=low + + * cmdline/apt-get.cc: + - fix crash when pkg.VersionList() is empty (LP: #556056) + + -- Michael Vogt Thu, 08 Apr 2010 21:13:25 +0200 + apt (0.7.25.3ubuntu5) lucid; urgency=low [ David Kalnischkies ] -- cgit v1.2.3 From 164fed49362b28c0264c293a14a06d167e32b76f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 2 Jun 2010 21:43:55 +0200 Subject: cmdline/apt-report-mirror-failure: port to latest python-apt --- cmdline/apt-report-mirror-failure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure index ef77d4954..e8ffdc2c7 100755 --- a/cmdline/apt-report-mirror-failure +++ b/cmdline/apt-report-mirror-failure @@ -5,7 +5,7 @@ import urllib import apt_pkg apt_pkg.init() -url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", "") +url = apt_pkg.Config.find("Acquire::Mirror::ReportFailures", "") #"http://people.ubuntu.com:9000/mirror-failure") #"http://localhost:9000/mirror-failure") if not url: -- cgit v1.2.3