diff options
-rw-r--r-- | apt-pkg/contrib/progress.cc | 2 | ||||
-rw-r--r-- | apt-pkg/depcache.cc | 31 | ||||
-rw-r--r-- | apt-pkg/indexrecords.cc | 5 | ||||
-rw-r--r-- | debian/changelog | 26 | ||||
-rw-r--r-- | methods/http.cc | 6 | ||||
-rw-r--r-- | po/ca.po | 10 | ||||
-rw-r--r-- | po/cs.po | 10 | ||||
-rw-r--r-- | po/ja.po | 12 | ||||
-rw-r--r-- | po/ru.po | 10 | ||||
-rwxr-xr-x | test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings | 104 |
10 files changed, 203 insertions, 13 deletions
diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc index 17a6b70e9..916e1d730 100644 --- a/apt-pkg/contrib/progress.cc +++ b/apt-pkg/contrib/progress.cc @@ -192,7 +192,7 @@ void OpTextProgress::Update() } // Print the spinner - snprintf(S,sizeof(S),_("\r%s... %u%%"),Op.c_str(),(unsigned int)Percent); + snprintf(S,sizeof(S),_("%c%s... %u%%"),'\r',Op.c_str(),(unsigned int)Percent); Write(S); OldOp = Op; diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 2ec346f0b..a48cd8b0c 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -951,6 +951,37 @@ struct CompareProviders { { pkgCache::PkgIterator const A = AV.ParentPkg(); pkgCache::PkgIterator const B = BV.ParentPkg(); + // Prefer MA:same packages if other architectures for it are installed + if ((AV->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same || + (BV->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same) + { + bool instA = false; + if ((AV->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same) + { + pkgCache::GrpIterator Grp = A.Group(); + for (pkgCache::PkgIterator P = Grp.PackageList(); P.end() == false; P = Grp.NextPkg(P)) + if (P->CurrentVer != 0) + { + instA = true; + break; + } + } + bool instB = false; + if ((BV->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same) + { + pkgCache::GrpIterator Grp = B.Group(); + for (pkgCache::PkgIterator P = Grp.PackageList(); P.end() == false; P = Grp.NextPkg(P)) + { + if (P->CurrentVer != 0) + { + instB = true; + break; + } + } + } + if (instA != instB) + return instA == false; + } // Prefer packages in the same group as the target; e.g. foo:i386, foo:amd64 if (A->Group != B->Group) { diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index af2639beb..649b6059d 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -173,7 +173,7 @@ bool indexRecords::parseSumData(const char *&Start, const char *End, /*{{{*/ Hash = ""; Size = 0; /* Skip over the first blank */ - while ((*Start == '\t' || *Start == ' ' || *Start == '\n') + while ((*Start == '\t' || *Start == ' ' || *Start == '\n' || *Start == '\r') && Start < End) Start++; if (Start >= End) @@ -215,7 +215,8 @@ bool indexRecords::parseSumData(const char *&Start, const char *End, /*{{{*/ EntryEnd = Start; /* Find the end of the third entry (the filename) */ - while ((*EntryEnd != '\t' && *EntryEnd != ' ' && *EntryEnd != '\n') + while ((*EntryEnd != '\t' && *EntryEnd != ' ' && + *EntryEnd != '\n' && *EntryEnd != '\r') && EntryEnd < End) EntryEnd++; diff --git a/debian/changelog b/debian/changelog index ef50ea423..b22712a4f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,20 @@ -apt (0.9.7.8) UNRELEASED; urgency=low +apt (0.9.7.8~exp2) UNRELEASEDexperimental; urgency=low + + * include two missing patches to really fix bug #696225, thanks to + Guillem Jover + * ensure sha512 is really used when available, thanks to Tyler Hicks + (LP: #1098752) + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 01 Mar 2013 18:50:17 +0100 + +apt (0.9.7.8~exp1) experimental; urgency=low [ Manpages translation updates ] * Italian (Beatrice Torracca). Closes: #696601 + [ Programs translation updates ] + * Japanese (Kenshi Muto). Closes: #699783 + [ Michael Vogt ] * fix pkgProblemResolver::Scores, thanks to Paul Wise. Closes: #697577 @@ -26,9 +38,17 @@ apt (0.9.7.8) UNRELEASED; urgency=low (potentially) used for non deb,dsc content that may contain spaces, thanks to Daniel Hartwig and Thomas Bushnell (LP: #1086997) - * use sha512 when available (LP: #1098752) + - quote plus in filenames to work around a bug in the S3 server + (LP: #1003633) + * apt-pkg/indexrecords.cc: + - support '\r' in the Release file + + [ David Kalnischkies ] + * apt-pkg/depcache.cc: + - prefer to install packages which have an already installed M-A:same + sibling while choosing providers (LP: #1130419) - -- Christian Perrier <bubulle@debian.org> Mon, 24 Dec 2012 07:01:20 +0100 + -- Michael Vogt <mvo@debian.org> Fri, 01 Mar 2013 14:16:42 +0100 apt (0.9.7.7) unstable; urgency=low diff --git a/methods/http.cc b/methods/http.cc index b7e766004..fddf8a78e 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -685,8 +685,12 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out) pass it on, HTTP/1.1 says the connection should default to keep alive and we expect the proxy to do this */ if (Proxy.empty() == true || Proxy.Host.empty()) + { + // see LP bugs #1003633 and #1086997. The "+" is encoded as a workaround + // for a amazon S3 bug sprintf(Buf,"GET %s HTTP/1.1\r\nHost: %s\r\nConnection: keep-alive\r\n", - QuoteString(Uri.Path,"~ ").c_str(),ProperHost.c_str()); + QuoteString(Uri.Path,"+~ ").c_str(),ProperHost.c_str()); + } else { /* Generate a cache control header if necessary. We place a max @@ -2403,6 +2403,16 @@ msgstr "%c%s… Error!" msgid "%c%s... Done" msgstr "%c%s… Fet" +#: apt-pkg/contrib/progress.cc:179 +msgid "..." +msgstr "…" + +#. Print the spinner +#: apt-pkg/contrib/progress.cc:195 +#, c-format +msgid "%c%s... %u%%" +msgstr "%c%s… %u%%" + #: apt-pkg/contrib/cmndline.cc:80 #, c-format msgid "Command line option '%c' [from %s] is not known." @@ -2399,6 +2399,16 @@ msgstr "%c%s… Chyba!" msgid "%c%s... Done" msgstr "%c%s… Hotovo" +#: apt-pkg/contrib/progress.cc:179 +msgid "..." +msgstr "…" + +#. Print the spinner +#: apt-pkg/contrib/progress.cc:195 +#, c-format +msgid "%c%s... %u%%" +msgstr "%c%s… %u%%" + #: apt-pkg/contrib/cmndline.cc:80 #, c-format msgid "Command line option '%c' [from %s] is not known." @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: apt 0.9.7.1\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" "POT-Creation-Date: 2012-10-15 09:49+0200\n" -"PO-Revision-Date: 2012-07-01 00:14+0900\n" +"PO-Revision-Date: 2013-02-05 09:41+0900\n" "Last-Translator: Kenshi Muto <kmuto@debian.org>\n" "Language-Team: Debian Japanese List <debian-japanese@lists.debian.org>\n" "Language: ja\n" @@ -227,7 +227,7 @@ msgstr "" " -p=? パッケージキャッシュ\n" " -s=? ソースキャッシュ\n" " -q プログレス表示をしない\n" -" -i umnet コマンドで重要な依存情報のみを表示する\n" +" -i unmet コマンドで重要な依存情報のみを表示する\n" " -c=? 指定した設定ファイルを読み込む\n" " -o=? 指定した設定オプションを読み込む (例: -o dir::cache=/tmp)\n" "詳細は、apt-cache(8) や apt.conf(5) のマニュアルページを参照してください。\n" @@ -448,8 +448,8 @@ msgstr "'%s' のような仮想パッケージは削除できません\n" #, c-format msgid "Package '%s' is not installed, so not removed. Did you mean '%s'?\n" msgstr "" -"パッケージ %s はインストールされていないため、削除はできません。'%s' のことで" -"しょうか?\n" +"パッケージ '%s' はインストールされていないため、削除はできません。'%s' のこと" +"でしょうか?\n" #: cmdline/apt-get.cc:743 cmdline/apt-get.cc:946 #, c-format @@ -679,7 +679,7 @@ msgstr[0] "" #: cmdline/apt-get.cc:1421 msgid "Note: This is done automatically and on purpose by dpkg." -msgstr "注意: これは dpkg により自動でわざと行われれます。" +msgstr "注意: これは dpkg により自動でわざと行われます。" #: cmdline/apt-get.cc:1559 #, c-format @@ -2726,7 +2726,7 @@ msgstr "" #: apt-pkg/sourcelist.cc:116 #, c-format msgid "Malformed line %lu in source list %s ([%s] has no key)" -msgstr "ソースリスト %2$s の %1$lu 行目が不正です ([%3$s にキーがありません)" +msgstr "ソースリスト %2$s の %1$lu 行目が不正です ([%3$s] にキーがありません)" #: apt-pkg/sourcelist.cc:119 #, c-format @@ -2457,6 +2457,16 @@ msgstr "%c%s… Ошибка!" msgid "%c%s... Done" msgstr "%c%s… Готово" +#: apt-pkg/contrib/progress.cc:179 +msgid "..." +msgstr "…" + +#. Print the spinner +#: apt-pkg/contrib/progress.cc:195 +#, c-format +msgid "%c%s... %u%%" +msgstr "%c%s… %u%%" + #: apt-pkg/contrib/cmndline.cc:80 #, c-format msgid "Command line option '%c' [from %s] is not known." diff --git a/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings b/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings new file mode 100755 index 000000000..af6b7b504 --- /dev/null +++ b/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings @@ -0,0 +1,104 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertpackage 'stable' 'libmesa' 'amd64,i386' '1' 'Multi-Arch: same' +insertpackage 'stable' 'libmesa-lts' 'amd64,i386' '1' 'Provides: libmesa +Conflicts: libmesa +Multi-Arch: same' +insertpackage 'stable' 'steam' 'i386' '1' 'Depends: libmesa' + +insertpackage 'unstable' 'libmesa' 'amd64,i386' '2' 'Multi-Arch: same' +insertpackage 'unstable' 'libmesa-lts' 'amd64,i386' '2' 'Provides: libmesa +Conflicts: libmesa +Multi-Arch: same' +insertpackage 'unstable' 'steam' 'i386' '2' 'Depends: libmesa' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + libmesa:i386 +The following NEW packages will be installed: + libmesa:i386 steam:i386 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libmesa:i386 (1 stable [i386]) +Inst steam:i386 (1 stable [i386]) +Conf libmesa:i386 (1 stable [i386]) +Conf steam:i386 (1 stable [i386])' aptget install steam -st stable +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + libmesa:i386 +The following NEW packages will be installed: + libmesa:i386 steam:i386 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libmesa:i386 (2 unstable [i386]) +Inst steam:i386 (2 unstable [i386]) +Conf libmesa:i386 (2 unstable [i386]) +Conf steam:i386 (2 unstable [i386])' aptget install steam -st unstable + +cp rootdir/var/lib/dpkg/status default-status.dpkg +insertinstalledpackage 'libmesa' 'amd64' '1' 'Multi-Arch: same' +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + libmesa:i386 +The following NEW packages will be installed: + libmesa:i386 steam:i386 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libmesa:i386 (1 stable [i386]) +Inst steam:i386 (1 stable [i386]) +Conf libmesa:i386 (1 stable [i386]) +Conf steam:i386 (1 stable [i386])' aptget install steam -st stable +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + libmesa libmesa:i386 +The following NEW packages will be installed: + libmesa:i386 steam:i386 +The following packages will be upgraded: + libmesa +1 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libmesa [1] (2 unstable [amd64]) +Inst libmesa:i386 (2 unstable [i386]) +Inst steam:i386 (2 unstable [i386]) +Conf libmesa (2 unstable [amd64]) +Conf libmesa:i386 (2 unstable [i386]) +Conf steam:i386 (2 unstable [i386])' aptget install steam -st unstable + +cp default-status.dpkg rootdir/var/lib/dpkg/status +insertinstalledpackage 'libmesa-lts' 'amd64' '1' 'Provides: libmesa +Conflicts: libmesa +Multi-Arch: same' +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + libmesa-lts:i386 +The following NEW packages will be installed: + libmesa-lts:i386 steam:i386 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libmesa-lts:i386 (1 stable [i386]) +Inst steam:i386 (1 stable [i386]) +Conf libmesa-lts:i386 (1 stable [i386]) +Conf steam:i386 (1 stable [i386])' aptget install steam -st stable +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + libmesa-lts libmesa-lts:i386 +The following NEW packages will be installed: + libmesa-lts:i386 steam:i386 +The following packages will be upgraded: + libmesa-lts +1 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libmesa-lts [1] (2 unstable [amd64]) +Inst libmesa-lts:i386 (2 unstable [i386]) +Inst steam:i386 (2 unstable [i386]) +Conf libmesa-lts (2 unstable [amd64]) +Conf libmesa-lts:i386 (2 unstable [i386]) +Conf steam:i386 (2 unstable [i386])' aptget install steam -st unstable |