]> git.saurik.com Git - apt.git/commitdiff
merged lp:~mvo/apt/hash-order
authorMichael Vogt <michael.vogt@ubuntu.com>
Fri, 1 Mar 2013 18:04:15 +0000 (19:04 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Fri, 1 Mar 2013 18:04:15 +0000 (19:04 +0100)
apt-pkg/contrib/progress.cc
apt-pkg/depcache.cc
apt-pkg/indexrecords.cc
debian/changelog
methods/http.cc
po/ca.po
po/cs.po
po/ja.po
po/ru.po
test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings [new file with mode: 0755]

index 17a6b70e91c92886cd2c379f2e6e848bbd087463..916e1d730a7abf76153813c6304c5fdcb987b7c7 100644 (file)
@@ -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;
index 2ec346f0b2c04c06562e4d68e7b4e3ea077e7a2a..a48cd8b0cf8b9f9b43b6409508f7dd040ed5587f 100644 (file)
@@ -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)
       {
index af2639beb851cfb125bf84b072c9aab2109e4daf..649b6059d7e6d1d4be51e8bf4def229a7dca6c9c 100644 (file)
@@ -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++;
 
index ef50ea4231569d3b5746fca0c01d78b9a2c4406b..b22712a4f3c0d72fbf0513062a39382ae49e2135 100644 (file)
@@ -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
 
index b7e7660048273948fc9ab3381680dcd556fba853..fddf8a78e096bc94a645dd938303d6bccdf09152 100644 (file)
@@ -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
index 03d11e1aad43dc8cc37fffe88f469d4447462ea4..61d23127763ef91607aa99b42e696a726be5fd63 100644 (file)
--- a/po/ca.po
+++ b/po/ca.po
@@ -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."
index 4ccb2f70bf409dda13cba32e9fc0e34cb82192c9..3d16d6811a3e12d56f9eea34eab1c6b1f788cbb4 100644 (file)
--- a/po/cs.po
+++ b/po/cs.po
@@ -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."
index fb455abccb7df66ac215bd1198eb774024be70f5..9fe66d972002f958a65dd266dd468d8cbc8a09fb 100644 (file)
--- a/po/ja.po
+++ b/po/ja.po
@@ -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' のこと"
+"ã\81§ã\81\97ã\82\87ã\81\86ã\81\8b?\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 "注æ\84\8f: ã\81\93ã\82\8cã\81¯ dpkg ã\81«ã\82\88ã\82\8aè\87ªå\8b\95ã\81§ã\82\8fã\81\96ã\81¨è¡\8cã\82\8fã\82\8cã\82\8cã\81¾ã\81\99ã\80\82"
+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
index c60c9a384411239612ac6a0ec5ccb00ac62c2e28..9b66cc268384962159992fdb53ca09bc65acfd37 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -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 (executable)
index 0000000..af6b7b5
--- /dev/null
@@ -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