From ed94a0d6f60e7b236a3b62dd9d4d453e956cfcf9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 30 Oct 2006 10:39:18 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - fix segfault if dpkg sends multiline error messages --- apt-pkg/deb/dpkgpm.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 2b167dbf6..4c44cd01a 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -624,15 +624,20 @@ bool pkgDPkgPM::Go(int OutStatusFd) */ char* list[5]; - if(!TokSplitString(':', line, list, sizeof(list)/sizeof(list[0]))) - // FIXME: dpkg sends multiline error messages sometimes (see - // #374195 for a example. we should support this by - // either patching dpkg to not send multiline over the - // statusfd or by rewriting the code here to deal with - // it. for now we just ignore it and not crash - continue; + // dpkg sends multiline error messages sometimes (see + // #374195 for a example. we should support this by + // either patching dpkg to not send multiline over the + // statusfd or by rewriting the code here to deal with + // it. for now we just ignore it and not crash + TokSplitString(':', line, list, sizeof(list)/sizeof(list[0])); char *pkg = list[1]; char *action = _strstrip(list[2]); + if( pkg == NULL || action == NULL) + { + if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) + std::clog << "ignoring line: not enough ':'" << std::endl; + continue; + } if(strncmp(action,"error",strlen("error")) == 0) { -- cgit v1.2.3-70-g09d2 From 7882f8fed5bc1232ec51b54b06bf86bfad3d4e18 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 31 Oct 2006 20:06:34 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - reset the line if a invalid line was read --- apt-pkg/deb/dpkgpm.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 4c44cd01a..c7a6b921f 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -636,6 +636,8 @@ bool pkgDPkgPM::Go(int OutStatusFd) { if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) std::clog << "ignoring line: not enough ':'" << std::endl; + // reset the line buffer + line[0]=0; continue; } -- cgit v1.2.3-70-g09d2 From 400ad7a4b0b1776233462fa5e8687171a8b2f01a Mon Sep 17 00:00:00 2001 From: "bubulle@debian.org" <> Date: Wed, 22 Nov 2006 08:38:17 +0100 Subject: Correct grammar in one message. Unfuzzy translations. Closes: #399652 --- apt-pkg/acquire-item.cc | 2 +- po/bg.po | 2 +- po/bs.po | 2 +- po/ca.po | 2 +- po/cs.po | 2 +- po/cy.po | 2 +- po/da.po | 2 +- po/de.po | 2 +- po/dz.po | 2 +- po/el.po | 2 +- po/en_GB.po | 4 ++-- po/es.po | 2 +- po/eu.po | 2 +- po/fi.po | 2 +- po/fr.po | 2 +- po/gl.po | 2 +- po/he.po | 2 +- po/hu.po | 2 +- po/it.po | 2 +- po/ja.po | 2 +- po/km.po | 2 +- po/ko.po | 2 +- po/ku.po | 2 +- po/nb.po | 2 +- po/ne.po | 2 +- po/nl.po | 2 +- po/nn.po | 2 +- po/pl.po | 2 +- po/pt.po | 2 +- po/pt_BR.po | 2 +- po/ro.po | 2 +- po/ru.po | 2 +- po/sk.po | 2 +- po/sl.po | 2 +- po/sv.po | 2 +- po/tl.po | 2 +- po/uk.po | 2 +- po/vi.po | 2 +- po/zh_CN.po | 2 +- po/zh_TW.po | 2 +- 40 files changed, 41 insertions(+), 41 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 421288007..8ec4ba2c0 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -637,7 +637,7 @@ bool pkgAcqMetaIndex::VerifyVendor(string Message) // check for missing sigs (that where not fatal because otherwise we had // bombed earlier) string missingkeys; - string msg = _("There are no public key available for the " + string msg = _("There is no public key available for the " "following key IDs:\n"); pos = Message.find("NO_PUBKEY "); if (pos != std::string::npos) diff --git a/po/bg.po b/po/bg.po index ce6145bb7..02604066a 100644 --- a/po/bg.po +++ b/po/bg.po @@ -2607,7 +2607,7 @@ msgid "MD5Sum mismatch" msgstr "Несъответствие на контролна сума MD5" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Няма налични публични ключове за следните идентификатори на ключове:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/bs.po b/po/bs.po index b86c48b01..bc1a05753 100644 --- a/po/bs.po +++ b/po/bs.po @@ -2386,7 +2386,7 @@ msgid "MD5Sum mismatch" msgstr "" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" #: apt-pkg/acquire-item.cc:753 diff --git a/po/ca.po b/po/ca.po index ed721c33e..a5665b84c 100644 --- a/po/ca.po +++ b/po/ca.po @@ -2592,7 +2592,7 @@ msgid "MD5Sum mismatch" msgstr "Suma MD5 diferent" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "No hi ha cap clau pública disponible per als següents ID de clau:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/cs.po b/po/cs.po index 84affdacc..41c7a48c1 100644 --- a/po/cs.po +++ b/po/cs.po @@ -2557,7 +2557,7 @@ msgid "MD5Sum mismatch" msgstr "Neshoda MD5 součtů" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "K následujícím ID klíčů není dostupný veřejný klíč:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/cy.po b/po/cy.po index 4cd08631b..65929f49d 100644 --- a/po/cy.po +++ b/po/cy.po @@ -2663,7 +2663,7 @@ msgid "MD5Sum mismatch" msgstr "Camgyfatebiaeth swm MD5" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" # FIXME: case diff --git a/po/da.po b/po/da.po index a7bc69fbe..530de40d6 100644 --- a/po/da.po +++ b/po/da.po @@ -2575,7 +2575,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum stemmer ikke" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" "Der er ingen tilgængelige offentlige nøgler for følgende nøgle-ID'er:\n" diff --git a/po/de.po b/po/de.po index c63b517c4..464308bfc 100644 --- a/po/de.po +++ b/po/de.po @@ -2615,7 +2615,7 @@ msgid "MD5Sum mismatch" msgstr "MD5-Summe stimmt nicht" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Es gibt keine öffentlichen Schlüssel für die folgenden Schlüssel-IDs:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/dz.po b/po/dz.po index 274dde1a3..de6ccf091 100644 --- a/po/dz.po +++ b/po/dz.po @@ -2587,7 +2587,7 @@ msgid "MD5Sum mismatch" msgstr "ཨེམ་ཌི་༥་ ཁྱོན་བསྡོམས་མ་མཐུན་པ།" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "འོག་གི་ ཨའི་ཌི་་ ལྡེ་མིག་ཚུ་གི་དོན་ལུ་མི་དམང་གི་ལྡེ་མིག་འདི་འཐོབ་མི་ཚུགས་པས:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/el.po b/po/el.po index 06ea5e576..c88b2c34a 100644 --- a/po/el.po +++ b/po/el.po @@ -2613,7 +2613,7 @@ msgid "MD5Sum mismatch" msgstr "Ανόμοιο MD5Sum" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" #: apt-pkg/acquire-item.cc:753 diff --git a/po/en_GB.po b/po/en_GB.po index ef2407959..5c75b599f 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -2558,8 +2558,8 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum mismatch" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" -msgstr "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" +msgstr "There is no public key available for the following key IDs:\n" #: apt-pkg/acquire-item.cc:753 #, c-format diff --git a/po/es.po b/po/es.po index 8596da56c..2a9511c70 100644 --- a/po/es.po +++ b/po/es.po @@ -2607,7 +2607,7 @@ msgid "MD5Sum mismatch" msgstr "La suma MD5 difiere" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" "No existe ninguna clave pública disponible para los siguientes " "identificadores de clave:\n" diff --git a/po/eu.po b/po/eu.po index 1c32a4663..eec4a88a1 100644 --- a/po/eu.po +++ b/po/eu.po @@ -2576,7 +2576,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum ez dator bat" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Hurrengo gako ID hauentzat ez dago gako publiko eskuragarririk:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/fi.po b/po/fi.po index 846a60389..2dfa9678d 100644 --- a/po/fi.po +++ b/po/fi.po @@ -2567,7 +2567,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum ei täsmää" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Julkisia avaimia ei ole saatavilla, avainten ID:t ovat:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/fr.po b/po/fr.po index a5d71f750..f50326f44 100644 --- a/po/fr.po +++ b/po/fr.po @@ -2635,7 +2635,7 @@ msgid "MD5Sum mismatch" msgstr "Somme de contrôle MD5 incohérente" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" "Aucune clé publique n'est disponible pour la/les clé(s) suivante(s) :\n" diff --git a/po/gl.po b/po/gl.po index fc08862b5..00d5a0f5b 100644 --- a/po/gl.po +++ b/po/gl.po @@ -2586,7 +2586,7 @@ msgid "MD5Sum mismatch" msgstr "Os MD5Sum non coinciden" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" "Non hai unha clave pública dispoñible para os seguintes IDs de clave:\n" diff --git a/po/he.po b/po/he.po index 4f78e7562..5879310a1 100644 --- a/po/he.po +++ b/po/he.po @@ -2374,7 +2374,7 @@ msgid "MD5Sum mismatch" msgstr "" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" #: apt-pkg/acquire-item.cc:753 diff --git a/po/hu.po b/po/hu.po index 990a75e41..660a7c3d6 100644 --- a/po/hu.po +++ b/po/hu.po @@ -2608,7 +2608,7 @@ msgid "MD5Sum mismatch" msgstr "Az MD5Sum nem megfelelő" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Nincs elérhető nyilvános kulcs az alábbi kulcs azonosítókhoz:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/it.po b/po/it.po index 6b02c08a1..18911caa1 100644 --- a/po/it.po +++ b/po/it.po @@ -2606,7 +2606,7 @@ msgid "MD5Sum mismatch" msgstr "Somma MD5 non corrispondente" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" "Non esiste una chiave pubblica disponibile per i seguenti ID di chiave:\n" diff --git a/po/ja.po b/po/ja.po index db5c12e9c..c88e042d8 100644 --- a/po/ja.po +++ b/po/ja.po @@ -2585,7 +2585,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum が適合しません" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "以下の鍵 ID に対して利用可能な公開鍵がありません:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/km.po b/po/km.po index ba6efd7b4..6ad30acdb 100644 --- a/po/km.po +++ b/po/km.po @@ -2550,7 +2550,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum មិន​ផ្គួផ្គង​" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "គ្មាន​កូនសោ​សាធារណៈ​អាច​រក​បាន​ក្នុងកូនសោ IDs ខាងក្រោម​នេះទេ ៖\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/ko.po b/po/ko.po index 0f3ecc185..c892e342f 100644 --- a/po/ko.po +++ b/po/ko.po @@ -2562,7 +2562,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum이 맞지 않습니다" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "다음 키 ID의 공개키가 없습니다:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/ku.po b/po/ku.po index a1ea37a53..06789f9c2 100644 --- a/po/ku.po +++ b/po/ku.po @@ -2396,7 +2396,7 @@ msgid "MD5Sum mismatch" msgstr "" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" #: apt-pkg/acquire-item.cc:753 diff --git a/po/nb.po b/po/nb.po index 33005c80b..dbe5f11ba 100644 --- a/po/nb.po +++ b/po/nb.po @@ -2618,7 +2618,7 @@ msgid "MD5Sum mismatch" msgstr "Feil MD5sum" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Det er ingen offentlig nøkkel tilgjengelig for de følgende nøkkel-ID-ene:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/ne.po b/po/ne.po index 595488d4c..28300670c 100644 --- a/po/ne.po +++ b/po/ne.po @@ -2543,7 +2543,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum मेल भएन" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "निम्न कुञ्जी IDs को लागि कुनै सार्वजनिक कुञ्जी उपलब्ध छैन:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/nl.po b/po/nl.po index a106a3414..87b9750cf 100644 --- a/po/nl.po +++ b/po/nl.po @@ -2618,7 +2618,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum komt niet overeen" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" "Er zijn geen publieke sleutels beschikbaar voor de volgende sleutel-IDs:\n" diff --git a/po/nn.po b/po/nn.po index 797368515..0b2a48f1f 100644 --- a/po/nn.po +++ b/po/nn.po @@ -2575,7 +2575,7 @@ msgid "MD5Sum mismatch" msgstr "Feil MD5-sum" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" #: apt-pkg/acquire-item.cc:753 diff --git a/po/pl.po b/po/pl.po index d87620e3e..1c69109ce 100644 --- a/po/pl.po +++ b/po/pl.po @@ -2579,7 +2579,7 @@ msgid "MD5Sum mismatch" msgstr "B³êdna suma MD5" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Dla nastêpuj±cego identyfikatora klucza brakuje klucza publicznego:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/pt.po b/po/pt.po index 63312a0c7..204954dcb 100644 --- a/po/pt.po +++ b/po/pt.po @@ -2593,7 +2593,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum incorreto" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" "Não existe qualquer chave pública disponível para as seguintes IDs de " "chave:\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 73ea5ac59..26d5f861a 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -2593,7 +2593,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum incorreto" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Não existem chaves públicas para os seguintes IDs de chaves:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/ro.po b/po/ro.po index 59fc606f6..e29472229 100644 --- a/po/ro.po +++ b/po/ro.po @@ -2598,7 +2598,7 @@ msgid "MD5Sum mismatch" msgstr "Nepotrivire MD5Sum" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" "Nu există nici o cheie publică disponibilă pentru următoarele " "identificatoare de chei:\n" diff --git a/po/ru.po b/po/ru.po index 1d71bf579..d357557bf 100644 --- a/po/ru.po +++ b/po/ru.po @@ -2596,7 +2596,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum не совпадает" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Недоступен общий ключ для следующих ключей (ID):\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/sk.po b/po/sk.po index fba4b3587..c1a6f8e02 100644 --- a/po/sk.po +++ b/po/sk.po @@ -2561,7 +2561,7 @@ msgid "MD5Sum mismatch" msgstr "Nezhoda MD5 súčtov" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Nie sú dostupné žiadne verejné kľúče ku kľúčom s nasledovnými ID:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/sl.po b/po/sl.po index 8cf8b7916..44f3bb48c 100644 --- a/po/sl.po +++ b/po/sl.po @@ -2564,7 +2564,7 @@ msgid "MD5Sum mismatch" msgstr "Neujemanje vsote MD5" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "" #: apt-pkg/acquire-item.cc:753 diff --git a/po/sv.po b/po/sv.po index 9dc2bde55..479227060 100644 --- a/po/sv.po +++ b/po/sv.po @@ -2594,7 +2594,7 @@ msgid "MD5Sum mismatch" msgstr "MD5-kontrollsumma stämmer inte" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Det finns ingen publik nyckel tillgänglig för följande nyckel-id:n:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/tl.po b/po/tl.po index 22ca71aa8..b7bbd9fe2 100644 --- a/po/tl.po +++ b/po/tl.po @@ -2599,7 +2599,7 @@ msgid "MD5Sum mismatch" msgstr "Di tugmang MD5Sum" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Walang public key na magagamit para sa sumusunod na key ID:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/uk.po b/po/uk.po index 3c50fa5f1..a2848d0eb 100644 --- a/po/uk.po +++ b/po/uk.po @@ -2614,7 +2614,7 @@ msgid "MD5Sum mismatch" msgstr "Невідповідність MD5Sum" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Відсутній публічний ключ для заданих ID ключа:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/vi.po b/po/vi.po index 64e28a0a1..6636d4d18 100644 --- a/po/vi.po +++ b/po/vi.po @@ -2622,7 +2622,7 @@ msgid "MD5Sum mismatch" msgstr "MD5Sum (tổng kiểm) không khớp được" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "Không có khóa công sẵn sàng cho những ID khóa theo đây:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/zh_CN.po b/po/zh_CN.po index 6a8c7bfa8..fd699a021 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -2542,7 +2542,7 @@ msgid "MD5Sum mismatch" msgstr "MD5 校验和不符" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "以下 key ID 没有可用的公钥:\n" #: apt-pkg/acquire-item.cc:753 diff --git a/po/zh_TW.po b/po/zh_TW.po index 346628b86..b9368ebf7 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -2609,7 +2609,7 @@ msgid "MD5Sum mismatch" msgstr "MD5 檢查碼不符合。" #: apt-pkg/acquire-item.cc:640 -msgid "There are no public key available for the following key IDs:\n" +msgid "There is no public key available for the following key IDs:\n" msgstr "以下 key ID 沒有可用的公鑰:\n" #: apt-pkg/acquire-item.cc:753 -- cgit v1.2.3-70-g09d2 From c70496f94c8a16072b0b7a7906dec4b1aa4f306e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 27 Nov 2006 12:07:06 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - added "Dpkg::StopOnError" variable that controls if apt will abort on errors from dpkg --- apt-pkg/deb/dpkgpm.cc | 23 ++++++++++++++++------- debian/changelog | 5 ++++- doc/examples/configure-index | 4 ++++ 3 files changed, 24 insertions(+), 8 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index c7a6b921f..3204fc1bb 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -711,14 +711,23 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Check for an error code. if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0) { - RunScripts("DPkg::Post-Invoke"); - if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV) - return _error->Error("Sub-process %s received a segmentation fault.",Args[0]); - - if (WIFEXITED(Status) != 0) - return _error->Error("Sub-process %s returned an error code (%u)",Args[0],WEXITSTATUS(Status)); + // if it was set to "keep-dpkg-runing" then we won't return + // here but keep the loop going and just report it as a error + // for later + bool stopOnError = _config->FindB("Dpkg::StopOnError",true); - return _error->Error("Sub-process %s exited unexpectedly",Args[0]); + if(stopOnError) + RunScripts("DPkg::Post-Invoke"); + + if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV) + _error->Error("Sub-process %s received a segmentation fault.",Args[0]); + else if (WIFEXITED(Status) != 0) + _error->Error("Sub-process %s returned an error code (%u)",Args[0],WEXITSTATUS(Status)); + else + _error->Error("Sub-process %s exited unexpectedly",Args[0]); + + if(stopOnError) + return false; } } diff --git a/debian/changelog b/debian/changelog index 24e10dcd5..8da0d6471 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ apt (0.6.46.4) unstable; urgency=low - * add apt-secure.8 to "See also" section + * added apt-secure.8 to "See also" section + * apt-pkg/deb/dpkgpm.cc: + - added "Dpkg::StopOnError" variable that controls if apt + will abort on errors from dpkg -- diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 0f0abc30c..73e20aa43 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -237,6 +237,10 @@ DPkg // Control the size of the command line passed to dpkg. MaxBytes 1024; MaxArgs 350; + + // controls if apt will apport on the first dpkg error or if it + // tries to install as many packages as possible + StopOnError "true"; } /* Options you can set to see some debugging text They correspond to names -- cgit v1.2.3-70-g09d2 From 4ab24e53db1d39cd26072f03795efd0f6425a369 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 30 Nov 2006 15:06:28 +0100 Subject: * apt-pkg/deb/debsrcrecords.{cc,h}: - make the buffer dynmaic --- apt-pkg/deb/debsrcrecords.cc | 28 +++++++++------------------- apt-pkg/deb/debsrcrecords.h | 10 +++++----- debian/changelog | 2 ++ 3 files changed, 16 insertions(+), 24 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index cac36c2e6..17645a5ac 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -18,6 +18,8 @@ #include #include #include + +using std::max; /*}}}*/ // SrcRecordParser::Binaries - Return the binaries field /*{{{*/ @@ -34,31 +36,19 @@ const char **debSrcRecordParser::Binaries() if (Bins.empty() == true || Bins.length() >= 102400) return 0; - // Workaround for #236688. Only allocate a new buffer if the field - // is large, to avoid a performance penalty - char *BigBuf = NULL; - char *Buf; - if (Bins.length() > sizeof(Buffer)) - { - BigBuf = new char[Bins.length()]; - Buf = BigBuf; - } - else + if (Bins.length() > BufSize) { - Buf = Buffer; + delete [] Buffer; + // allocate new size based on buffer (but never smaller than 4000) + BufSize = max((unsigned long)4000, max(Bins.length()+1,2*BufSize)); + Buffer = new char[BufSize]; } - strcpy(Buf,Bins.c_str()); - if (TokSplitString(',',Buf,StaticBinList, + strcpy(Buffer,Bins.c_str()); + if (TokSplitString(',',Buffer,StaticBinList, sizeof(StaticBinList)/sizeof(StaticBinList[0])) == false) - { - if (BigBuf != NULL) - delete BigBuf; return 0; - } - if (BigBuf != NULL) - delete BigBuf; return (const char **)StaticBinList; } /*}}}*/ diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index f899993df..f4e2cb46c 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -24,9 +24,10 @@ class debSrcRecordParser : public pkgSrcRecords::Parser FileFd Fd; pkgTagFile Tags; pkgTagSection Sect; - char Buffer[10000]; char *StaticBinList[400]; unsigned long iOffset; + char *Buffer; + unsigned long BufSize; public: @@ -49,10 +50,9 @@ class debSrcRecordParser : public pkgSrcRecords::Parser }; virtual bool Files(vector &F); - debSrcRecordParser(string File,pkgIndexFile const *Index) : - Parser(Index), - Fd(File,FileFd::ReadOnly), - Tags(&Fd,102400) {}; + debSrcRecordParser(string File,pkgIndexFile const *Index) + : Parser(Index), Fd(File,FileFd::ReadOnly), Tags(&Fd,102400), + Buffer(0), BufSize(0) {} }; #endif diff --git a/debian/changelog b/debian/changelog index 8da0d6471..a3cb3028a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ apt (0.6.46.4) unstable; urgency=low * apt-pkg/deb/dpkgpm.cc: - added "Dpkg::StopOnError" variable that controls if apt will abort on errors from dpkg + * apt-pkg/deb/debsrcrecords.{cc,h}: + - make the Buffer dynmaic -- -- cgit v1.2.3-70-g09d2 From d295f24c56451438dd77a8e0b7abd7ed4c85d7a4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 1 Dec 2006 13:06:07 +0100 Subject: * apt-pkg/deb/debsrcrecords.cc: - fix off-by-one problem --- apt-pkg/deb/debsrcrecords.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index 17645a5ac..e1c6427e8 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -36,7 +36,7 @@ const char **debSrcRecordParser::Binaries() if (Bins.empty() == true || Bins.length() >= 102400) return 0; - if (Bins.length() > BufSize) + if (Bins.length() >= BufSize) { delete [] Buffer; // allocate new size based on buffer (but never smaller than 4000) -- cgit v1.2.3-70-g09d2