From d2de5a7619a77343e1dd1fc255a84dfcca2807be Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 13 Dec 2006 19:19:11 +0100 Subject: * apt-pkg/algorithms.cc: - use clog instead of cout in debug --- apt-pkg/algorithms.cc | 2 +- debian/changelog | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 479927d65..8d1e4e8e8 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -784,7 +784,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) continue; if (Debug == true) - cout << "Investigating " << I.Name() << endl; + clog << "Investigating " << I.Name() << endl; // Isolate the problem dependency PackageKill KillList[100]; diff --git a/debian/changelog b/debian/changelog index 89654fe03..127c5fd83 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +apt (0.6.46.5) unstable; urgency=low + + * apt-pkg/algorithm.cc: + - use clog for all debugging + + -- + apt (0.6.46.4) unstable; urgency=high * ack NMU (closes: #401017) -- cgit v1.2.3 From 4172c78468a04078c97146dbc2e2979e63906f5b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 18 Dec 2006 19:39:42 +0100 Subject: * apt-pkg/algorithms.cc: - only increase the score of installed applications if they are not obsolte (still downloadable) --- apt-pkg/algorithms.cc | 6 ++++-- debian/changelog | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 8d1e4e8e8..0d486d102 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -494,8 +494,10 @@ void pkgProblemResolver::MakeScores() Score += PrioMap[Cache[I].InstVerIter(Cache)->Priority]; /* This helps to fix oddball problems with conflicting packages - on the same level. We enhance the score of installed packages */ - if (I->CurrentVer != 0) + on the same level. We enhance the score of installed packages + if those are not obsolete + */ + if (I->CurrentVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable()) Score += 1; } diff --git a/debian/changelog b/debian/changelog index 127c5fd83..06cede531 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,11 @@ -apt (0.6.46.5) unstable; urgency=low +apt (0.6.46.5) UNRELEASED; urgency=low * apt-pkg/algorithm.cc: - use clog for all debugging + - only increase the score of installed applications if they + are not obsolete - -- + -- Michael Vogt Mon, 18 Dec 2006 19:39:05 +0100 apt (0.6.46.4) unstable; urgency=high -- cgit v1.2.3 From 59b46c414d5a5cebd26bdafac6b08fa4d1ba0963 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 19 Dec 2006 11:44:52 +0100 Subject: * apt-pkg/deb/debrecords.cc: - return the correct SHA1Hash() * methods/http.cc: - send VERSION of apt in the User-Agent string --- apt-pkg/deb/debrecords.cc | 2 +- configure.in | 2 +- debian/changelog | 4 ++++ methods/http.cc | 3 ++- po/apt-all.pot | 48 +++++++++++++++++++++++------------------------ 5 files changed, 32 insertions(+), 27 deletions(-) diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index 6652a6ad9..c3e579ad1 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -61,7 +61,7 @@ string debRecordParser::MD5Hash() /* */ string debRecordParser::SHA1Hash() { - return Section.FindS("SHA1Sum"); + return Section.FindS("SHA1"); } /*}}}*/ // RecordParser::Maintainer - Return the maintainer email /*{{{*/ diff --git a/configure.in b/configure.in index ad81a8228..fe7c0e3e1 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-0.1") +AC_DEFINE_UNQUOTED(VERSION,"0.6.46.5") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 06cede531..bbeecdeec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,10 @@ apt (0.6.46.5) UNRELEASED; urgency=low - use clog for all debugging - only increase the score of installed applications if they are not obsolete + * methods/http.cc: + - send apt version in User-Agent + * apt-pkg/deb/debrecords.cc: + - fix SHA1Hash() return value -- Michael Vogt Mon, 18 Dec 2006 19:39:05 +0100 diff --git a/methods/http.cc b/methods/http.cc index c6623c46f..06b91686c 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -44,6 +44,7 @@ // Internet stuff #include +#include "config.h" #include "connect.h" #include "rfc2553emu.h" #include "http.h" @@ -714,7 +715,7 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out) Req += string("Authorization: Basic ") + Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n"; - Req += "User-Agent: Debian APT-HTTP/1.3\r\n\r\n"; + Req += "User-Agent: Debian APT-HTTP/1.3 ("VERSION")\r\n\r\n"; if (Debug == true) cerr << Req << endl; diff --git a/po/apt-all.pot b/po/apt-all.pot index 6f84389e4..0ac6df6c1 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-10-11 20:34+0200\n" +"POT-Creation-Date: 2006-12-19 11:37+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1621,7 +1621,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 "" @@ -1752,76 +1752,76 @@ 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 "" @@ -1894,12 +1894,12 @@ msgstr "" msgid "Syntax error %s:%u: Extra junk at end of file" msgstr "" -#: apt-pkg/contrib/progress.cc:154 +#: apt-pkg/contrib/progress.cc:155 #, c-format msgid "%c%s... Error!" msgstr "" -#: apt-pkg/contrib/progress.cc:156 +#: apt-pkg/contrib/progress.cc:157 #, c-format msgid "%c%s... Done" msgstr "" @@ -2191,13 +2191,13 @@ msgid "" "The package %s needs to be reinstalled, but I can't find an archive for it." msgstr "" -#: apt-pkg/algorithms.cc:1059 +#: apt-pkg/algorithms.cc:1061 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." msgstr "" -#: apt-pkg/algorithms.cc:1061 +#: apt-pkg/algorithms.cc:1063 msgid "Unable to correct problems, you have held broken packages." msgstr "" -- cgit v1.2.3 From 4cc152f93acf2eaf3ae66424cd4aaf47cad14a7b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 19 Dec 2006 20:44:54 +0100 Subject: * apt-pkg/algorithms.cc: - when encountering a or-group in pkgProblemResolver::Resolver(), check if it IsCritical(), otherwise we may do checking on weak-depends and confuse the system badly --- apt-pkg/algorithms.cc | 5 +++++ debian/changelog | 2 ++ 2 files changed, 7 insertions(+) diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 0d486d102..e1b9406e2 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -841,7 +841,12 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) OldEnd = LEnd; } else + { Start++; + // We only worry about critical deps. + if (Start.IsCritical() != true) + continue; + } // Dep is ok if ((Cache[End] & pkgDepCache::DepGInstall) == pkgDepCache::DepGInstall) diff --git a/debian/changelog b/debian/changelog index bbeecdeec..7893f2599 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ apt (0.6.46.5) UNRELEASED; urgency=low - use clog for all debugging - only increase the score of installed applications if they are not obsolete + - fix resolver bug on removal triggered by weak-dependencies + with or-groups * methods/http.cc: - send apt version in User-Agent * apt-pkg/deb/debrecords.cc: -- cgit v1.2.3 From 020daa7b026cf1496959ccc9d062d95cb5f8ec02 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 20 Dec 2006 10:58:57 +0100 Subject: * apt-pkg/algorithms.cc: - make sure we have a candidateVer if we check it for downloadability --- apt-pkg/algorithms.cc | 2 +- po/apt-all.pot | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index e1b9406e2..5fa16e66f 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -497,7 +497,7 @@ void pkgProblemResolver::MakeScores() on the same level. We enhance the score of installed packages if those are not obsolete */ - if (I->CurrentVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable()) + if (I->CurrentVer != 0 && Cache[I].CandidateVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable()) Score += 1; } diff --git a/po/apt-all.pot b/po/apt-all.pot index 0ac6df6c1..d2dbcb7a0 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -2191,13 +2191,13 @@ msgid "" "The package %s needs to be reinstalled, but I can't find an archive for it." msgstr "" -#: apt-pkg/algorithms.cc:1061 +#: apt-pkg/algorithms.cc:1066 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." msgstr "" -#: apt-pkg/algorithms.cc:1063 +#: apt-pkg/algorithms.cc:1068 msgid "Unable to correct problems, you have held broken packages." msgstr "" -- cgit v1.2.3