]> git.saurik.com Git - apt.git/commitdiff
merged from the debian-sid branch
authorMichael Vogt <egon@debian-devbox>
Fri, 1 Mar 2013 11:06:50 +0000 (12:06 +0100)
committerMichael Vogt <egon@debian-devbox>
Fri, 1 Mar 2013 11:06:50 +0000 (12:06 +0100)
apt-pkg/contrib/progress.cc
apt-pkg/indexrecords.cc
debian/apt.cron.daily
debian/changelog
debian/rules
doc/makefile
doc/po/it.po
methods/http.cc
methods/https.cc
methods/https.h
po/ja.po

index 317048845c1a89fb9a1ee0d8941ad413d0b05518..17a6b70e91c92886cd2c379f2e6e848bbd087463 100644 (file)
@@ -176,7 +176,7 @@ void OpTextProgress::Update()
         if (OldOp.empty() == false)
            cout << endl;
         OldOp = "a";
-        cout << Op << "..." << flush;
+        cout << Op << _("...") << flush;
       }
       
       return;
@@ -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),_("\r%s... %u%%"),Op.c_str(),(unsigned int)Percent);
    Write(S);
 
    OldOp = Op;
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 5c00f22db11b9e5af618df3ef75e84c88ab190a5..2665b65796e9e6a1c07eb88af23d95fc7e0f685a 100644 (file)
@@ -289,7 +289,7 @@ random_sleep()
     fi
     if [ -z "$RANDOM" ] ; then
         # A fix for shells that do not have this bash feature.
-       RANDOM=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -c"1-5")
+       RANDOM=$(( $(dd if=/dev/urandom bs=2 count=1 2> /dev/null | cksum | cut -d' ' -f1) % 32767 ))
     fi
     TIME=$(($RANDOM % $RandomSleep))
     debug_echo "sleeping for $TIME seconds"
index 6f611f2f576af5efe7c5bd2f9b950af63f8c5618..9f4dca04e5a13443682834873a6ca1b80d14f599 100644 (file)
@@ -25,11 +25,38 @@ apt (0.9.7.8) UNRELEASED; 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
   * [ABI BREAK] apt-pkg/pkgcache.h:
     - adjust pkgCache::State::VerPriority enum, to match reality
+  * fix missing translated apt.8 manpages, thanks to Helge Kreutzmann
+    for the report. Closes: #696923
+  * apt-pkg/contrib/progress.cc:
+    - Make "..." translatable to fix inconsistencies in the output
+      of e.g. apt-get update. While this adds new translatable strings,
+      not having translations for them will not break anything.
+      Thanks to Guillem Jover. Closes: #696225
+  * debian/apt.cron.daily:
+    - when reading from /dev/urandom, use less entropy and fix a rare
+      bug when the random number chksum is less than 1000.
+      Closes: #695285
+  * methods/https.cc:
+    - reuse connection in https, thanks to Thomas Bushnell, BSG for the
+      patch. LP: #1087543, Closes: #695359
+    - add missing curl_easy_cleanup()
+  * methods/http.cc:
+    - quote spaces in filenames to ensure as the http method is also
+      (potentially) used for non deb,dsc content that may contain
+      spaces, thanks to Daniel Hartwig and Thomas Bushnell 
+      (LP: #1086997)
+    - 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
 
  -- Christian Perrier <bubulle@debian.org>  Mon, 24 Dec 2012 07:01:20 +0100
 
index 83e23881c49b17469b0ad67cd43ed5bf179beb4a..5051dab4f8caaa32bcd05574dd71fee51a567684 100755 (executable)
@@ -172,7 +172,7 @@ apt-doc: build-debiandoc
 # Build architecture-dependent files here.
 
 binary-arch: $(LIBAPT_PKG) $(LIBAPT_INST) apt libapt-pkg-dev apt-utils apt-transport-https
-apt_MANPAGES = apt-cache apt-cdrom apt-config apt-get apt-key apt-mark apt-secure apt apt.conf apt_preferences sources.list
+apt_MANPAGES = apt apt-cache apt-cdrom apt-config apt-get apt-key apt-mark apt-secure apt apt.conf apt_preferences sources.list
 apt: build build-manpages
        dh_testdir -p$@
        dh_testroot -p$@
index 8021bce3f35c95b7a42878a16e7fde598aa91a32..be8357d8065029c6aba21ed7eda9002844972c68 100644 (file)
@@ -87,7 +87,9 @@ update-po:
                --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
 
 $(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a.conf
+       # first line is for apt.8 (see Bug#696923)
        po4a --previous --no-backups --translate-only $(dir $<)apt.ent \
+               $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.8,%.$(subst /,,$(dir $<)).8,$(wildcard *.8))) \
                $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.1.xml,%.$(subst /,,$(dir $<)).1.xml,$(wildcard *.1.xml))) \
                $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.2.xml,%.$(subst /,,$(dir $<)).2.xml,$(wildcard *.2.xml))) \
                $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.3.xml,%.$(subst /,,$(dir $<)).3.xml,$(wildcard *.3.xml))) \
index a4d8d0ccc0c960e1afadeef279bd2b5f35ec76d8..544263d0d1264ed340748a2f6e42b129f18e6ec7 100644 (file)
@@ -1001,7 +1001,7 @@ msgid ""
 "literal>, the <option>-t</option> option or per package with the "
 "<literal>pkg/release</literal> syntax, if possible."
 msgstr ""
-"<literal>source</literal> fa sì che </command>apt-get</command> scarichi i "
+"<literal>source</literal> fa sì che <command>apt-get</command> scarichi i "
 "pacchetti sorgente. APT esaminerà i pacchetti disponibili per decidere quali "
 "pacchetti sorgente scaricare. Poi, se possibile, troverà e scaricherà nella "
 "directory corrente la versione più recente disponibile di quel pacchetto "
@@ -6965,7 +6965,7 @@ msgid ""
 msgstr ""
 "APT può essere esteso con ulteriori metodi forniti in altri pacchetti "
 "opzionali, i cui nomi devono seguire lo schema <package>apt-"
-"transport-<replaceable>metodo</replaceable>. Per esempio, il team di APT "
+"transport-<replaceable>metodo</replaceable></package>. Per esempio, il team di APT "
 "mantiene anche il pacchetto <package>apt-transport-https</package> che "
 "fornisce i metodi di accesso per URI HTTPS con funzionalità simili a quelle "
 "del metodo http. Sono disponibili anche i metodi per usare, ad esempio, "
index acf25a42a06b4eb11c222ea4e3d4fa1c99bc6fc0..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 c1a49ba6093b621743dd2726f329d79f1f3eeff9..11d4ba8aa785377d0d4bcf4afc334c9aa9520fc2 100644 (file)
@@ -124,7 +124,6 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
    curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
    curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, this);
    curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false);
-   curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
    curl_easy_setopt(curl, CURLOPT_FILETIME, true);
 
    // SSL parameters are set by default to the common (non mirror-specific) value
@@ -240,6 +239,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
       curl_easy_setopt(curl, CURLOPT_VERBOSE, true);
 
    // error handling
+   curl_errorstr[0] = '\0';
    curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_errorstr);
 
    // If we ask for uncompressed files servers might respond with content-
@@ -288,7 +288,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
    File->Close();
 
    // cleanup
-   if(success != 0
+   if(success != 0 || (curl_responsecode != 200 && curl_responsecode != 304))
    {
       _error->Error("%s", curl_errorstr);
       // unlink, no need keep 401/404 page content in partial/
index b1961a8706f4043cacbe31f4fc5d20912e3b987e..293e288e06f8d6fe1872bbcf4769ff4d2fc48ae5 100644 (file)
@@ -41,6 +41,11 @@ class HttpsMethod : public pkgAcqMethod
       File = 0;
       curl = curl_easy_init();
    };
+
+   ~HttpsMethod()
+   {
+      curl_easy_cleanup(curl);
+   };
 };
 
 #include <apt-pkg/strutl.h>
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