From 2c4eaffff40d4ee4a2c8410a48f1a6170d9beff9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 15 Sep 2006 17:29:53 +0200 Subject: * apt-pkg/tagfile.cc: - applied patch from jvw to make the tag key stuff case-insensitive --- apt-pkg/tagfile.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 8fcbeb23b..0bc6ce6fd 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -192,12 +192,12 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) // --------------------------------------------------------------------- /* This looks for the first double new line in the data stream. It also indexes the tags in the section. This very simple hash function for the - first 3 letters gives very good performance on the debian package files */ + last 8 letters gives very good performance on the debian package files */ inline static unsigned long AlphaHash(const char *Text, const char *End = 0) { unsigned long Res = 0; for (; Text != End && *Text != ':' && *Text != 0; Text++) - Res = (unsigned long)(*Text) ^ (Res << 2); + Res = ((unsigned long)(*Text) & 0xDF) ^ (Res << 1); return Res & 0xFF; } -- cgit v1.2.3-70-g09d2 From 2ca99a0dceb4101f1ecaff0348b1684cb975099c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 15 Sep 2006 18:24:47 +0200 Subject: * apt-pkg/tagfile.cc, tagfile.h: - reverted the mmap patch again, it caused too much trouble with pipes etc --- apt-pkg/tagfile.cc | 74 ++++++++++++++++-------------------------------------- apt-pkg/tagfile.h | 2 -- debian/changelog | 4 ++- 3 files changed, 24 insertions(+), 56 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 0bc6ce6fd..040562fff 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -33,33 +33,22 @@ using std::string; /* */ pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long Size) : Fd(*pFd), - Size(Size), - Map(NULL), - Buffer(0) + Size(Size) { if (Fd.IsOpen() == false) { + Buffer = 0; Start = End = Buffer = 0; Done = true; iOffset = 0; - Map = NULL; return; } - // check if we can MMap it - if(Fd.Size() == 0) - { - Buffer = new char[Size]; - Start = End = Buffer; - Done = false; - Fill(); - } else { - Map = new MMap (Fd, MMap::Public | MMap::ReadOnly); - Buffer = (char *) Map->Data (); - Start = Buffer; - End = Buffer + Map->Size (); - } + Buffer = new char[Size]; + Start = End = Buffer; + Done = false; iOffset = 0; + Fill(); } /*}}}*/ // TagFile::~pkgTagFile - Destructor /*{{{*/ @@ -67,8 +56,7 @@ pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long Size) : /* */ pkgTagFile::~pkgTagFile() { - if(!Map) delete [] Buffer; - delete Map; + delete [] Buffer; } /*}}}*/ // TagFile::Step - Advance to the next section /*{{{*/ @@ -76,15 +64,8 @@ pkgTagFile::~pkgTagFile() /* If the Section Scanner fails we refill the buffer and try again. */ bool pkgTagFile::Step(pkgTagSection &Tag) { - if ((Map != NULL) && (Start == End)) - return false; - if (Tag.Scan(Start,End - Start) == false) { - if (Map != NULL) - return _error->Error(_("Unable to parse package file %s (1)"), - Fd.Name().c_str()); - if (Fill() == false) return false; @@ -158,30 +139,23 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) return Step(Tag); } + // Reposition and reload.. iOffset = Offset; - if (Map != NULL) - { - Start = Buffer + iOffset; - } - else - { - // Reposition and reload.. - Done = false; - if (Fd.Seek(Offset) == false) - return false; - End = Start = Buffer; + Done = false; + if (Fd.Seek(Offset) == false) + return false; + End = Start = Buffer; - if (Fill() == false) - return false; + if (Fill() == false) + return false; - if (Tag.Scan(Start,End - Start) == true) - return true; + if (Tag.Scan(Start,End - Start) == true) + return true; + + // This appends a double new line (for the real eof handling) + if (Fill() == false) + return false; - // This appends a double new line (for the real eof handling) - if (Fill() == false) - return false; - } - if (Tag.Scan(Start,End - Start) == false) return _error->Error(_("Unable to parse package file %s (2)"),Fd.Name().c_str()); @@ -207,7 +181,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) Stop = Section = Start; memset(AlphaIndexes,0,sizeof(AlphaIndexes)); - if (Stop == 0 || MaxLength == 0) + if (Stop == 0) return false; TagCount = 0; @@ -238,12 +212,6 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) Stop++; } - if ((Stop+1 >= End) && (End[-1] == '\n' || End[-1] == '\r')) - { - Indexes[TagCount] = (End - 1) - Section; - return true; - } - return false; } /*}}}*/ diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index dd481ba51..f7f8155a5 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -25,7 +25,6 @@ #endif #include -#include #include class pkgTagSection @@ -70,7 +69,6 @@ class pkgTagSection class pkgTagFile { FileFd &Fd; - MMap *Map; char *Buffer; char *Start; char *End; diff --git a/debian/changelog b/debian/changelog index 5f5421355..4c5841057 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,8 +25,10 @@ apt (0.6.45.1) unstable; urgency=low * apt-pkg/tagfile.cc: - applied patch from Jeroen van Wolffelaar to make the tags caseinsensitive (closes: #384182) + - reverted MMap use in the tagfile because it does not work + across pipes (closes: #383487) - -- + -- apt (0.6.45) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From 21e1008e144c50770997bc00dc1b27826a31064c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 30 Sep 2006 14:28:00 +0200 Subject: * apt-pkg/deb/dpkgpm.cc: - translate the dpkg progress strings when they are used, not in the struct (thanks to Steinar Gunderson) * debian/changelog: - updated --- apt-pkg/deb/dpkgpm.cc | 22 +++++++++++----------- buildlib/apti18n.h.in | 2 ++ debian/changelog | 7 ++++++- 3 files changed, 19 insertions(+), 12 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index bf0434ccc..2b167dbf6 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -355,28 +355,28 @@ bool pkgDPkgPM::Go(int OutStatusFd) static const struct DpkgState DpkgStatesOpMap[][5] = { // Install operation { - {"half-installed", _("Preparing %s")}, - {"unpacked", _("Unpacking %s") }, + {"half-installed", N_("Preparing %s")}, + {"unpacked", N_("Unpacking %s") }, {NULL, NULL} }, // Configure operation { - {"unpacked",_("Preparing to configure %s") }, - {"half-configured", _("Configuring %s") }, - { "installed", _("Installed %s")}, + {"unpacked",N_("Preparing to configure %s") }, + {"half-configured", N_("Configuring %s") }, + { "installed", N_("Installed %s")}, {NULL, NULL} }, // Remove operation { - {"half-configured", _("Preparing for removal of %s")}, - {"half-installed", _("Removing %s")}, - {"config-files", _("Removed %s")}, + {"half-configured", N_("Preparing for removal of %s")}, + {"half-installed", N_("Removing %s")}, + {"config-files", N_("Removed %s")}, {NULL, NULL} }, // Purge operation { - {"config-files", _("Preparing to completely remove %s")}, - {"not-installed", _("Completely removed %s")}, + {"config-files", N_("Preparing to completely remove %s")}, + {"not-installed", N_("Completely removed %s")}, {NULL, NULL} }, }; @@ -670,7 +670,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) { // only read the translation if there is actually a next // action - const char *translation = states[PackageOpsDone[pkg]].str; + const char *translation = _(states[PackageOpsDone[pkg]].str); char s[200]; snprintf(s, sizeof(s), translation, pkg); diff --git a/buildlib/apti18n.h.in b/buildlib/apti18n.h.in index 812457643..a5b91b1ee 100644 --- a/buildlib/apti18n.h.in +++ b/buildlib/apti18n.h.in @@ -14,8 +14,10 @@ # else # define _(x) gettext(x) # endif +# define N_(x) x #else // apt will not use any gettext # define setlocale(a, b) # define _(x) x +# define N_(x) x #endif diff --git a/debian/changelog b/debian/changelog index 448f4f1ee..92c12b5a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,12 @@ apt (0.6.46.1) unstable; urgency=low * methods/gzip.cc: - deal with empty files * Applied patch from Daniel Schepler to make apt bin-NMU able. - (Closes: bug#359634) + (closes: bug#359634) + * rebuild against current g++ because of: + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29289 + (closes: #390189) + * fix broken i18n in the dpkg progress reporting, thanks to + Frans Pop and Steinar Gunderson. (closes: #389261) -- -- cgit v1.2.3-70-g09d2 From c407612f82f02ed97ec879e48e3cd1c187b4f5ea Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 30 Sep 2006 22:50:41 +0200 Subject: * apt-pkg/tagfile.h: - increase the buffer in tagfile.cc for now, this really needs to become a dynamic buffer --- apt-pkg/tagfile.h | 2 +- debian/changelog | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index f7f8155a5..35ffebda8 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -84,7 +84,7 @@ class pkgTagFile inline unsigned long Offset() {return iOffset;}; bool Jump(pkgTagSection &Tag,unsigned long Offset); - pkgTagFile(FileFd *F,unsigned long Size = 64*1024); + pkgTagFile(FileFd *F,unsigned long Size = 128*1024); ~pkgTagFile(); }; diff --git a/debian/changelog b/debian/changelog index db84bc65a..77c7cf698 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ apt (0.6.46.1) unstable; urgency=low * fi.po: Updated to 514t. Closes: #390149 * eu.po: Updated to 514t. Closes: #389725 * vi.po: Updated to 514t. Closes: #388555 + * use a bigger buffer in tagfile for now, this needs to + become much more dynamic (closes: #388708) -- -- cgit v1.2.3-70-g09d2 From 75c541fdeda664bdf0e48e68a2aa5dae7015587c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 2 Oct 2006 00:58:53 +0200 Subject: * apt-pkg/tagfile.cc,h: - make the internal buffer grow dynamically if required --- apt-pkg/tagfile.cc | 41 +++++++++++++++++++++++++++++++++++++---- apt-pkg/tagfile.h | 7 ++++--- debian/changelog | 4 ++-- 3 files changed, 43 insertions(+), 9 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 040562fff..223618cd1 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -59,19 +59,52 @@ pkgTagFile::~pkgTagFile() delete [] Buffer; } /*}}}*/ +// TagFile::Resize - Resize the internal buffer /*{{{*/ +// --------------------------------------------------------------------- +/* Resize the internal buffer (double it in size). Fail if a maximum size + * size is reached. + */ +bool pkgTagFile::Resize() +{ + char *tmp; + unsigned long EndSize = End - Start; + + // fail is the buffer grows too big + if(Size > 1024*1024+1) + return false; + + // get new buffer and use it + tmp = new char[2*Size]; + memcpy(tmp, Buffer, Size); + Size = Size*2; + delete [] Buffer; + Buffer = tmp; + + // update the start/end pointers to the new buffer + Start = Buffer; + End = Start + EndSize; + return true; +} + // TagFile::Step - Advance to the next section /*{{{*/ // --------------------------------------------------------------------- -/* If the Section Scanner fails we refill the buffer and try again. */ +/* If the Section Scanner fails we refill the buffer and try again. + * If that fails too, double the buffer size and try again until a + * maximum buffer is reached. + */ bool pkgTagFile::Step(pkgTagSection &Tag) { - if (Tag.Scan(Start,End - Start) == false) + while (Tag.Scan(Start,End - Start) == false) { if (Fill() == false) return false; - if (Tag.Scan(Start,End - Start) == false) + if(Tag.Scan(Start,End - Start)) + break; + + if (Resize() == false) return _error->Error(_("Unable to parse package file %s (1)"), - Fd.Name().c_str()); + Fd.Name().c_str()); } Start += Tag.size(); iOffset += Tag.size(); diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 35ffebda8..70381ad13 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -75,16 +75,17 @@ class pkgTagFile bool Done; unsigned long iOffset; unsigned long Size; - + bool Fill(); - + bool Resize(); + public: bool Step(pkgTagSection &Section); inline unsigned long Offset() {return iOffset;}; bool Jump(pkgTagSection &Tag,unsigned long Offset); - pkgTagFile(FileFd *F,unsigned long Size = 128*1024); + pkgTagFile(FileFd *F,unsigned long Size = 32*1024); ~pkgTagFile(); }; diff --git a/debian/changelog b/debian/changelog index 77c7cf698..6b842898c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,8 +13,8 @@ apt (0.6.46.1) unstable; urgency=low * fi.po: Updated to 514t. Closes: #390149 * eu.po: Updated to 514t. Closes: #389725 * vi.po: Updated to 514t. Closes: #388555 - * use a bigger buffer in tagfile for now, this needs to - become much more dynamic (closes: #388708) + * make the internal buffer in pkgTagFile grow dynamically + (closes: #388708) -- -- cgit v1.2.3-70-g09d2 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 ++++++++++++------- configure.in | 2 +- debian/changelog | 9 +++++++++ 3 files changed, 22 insertions(+), 8 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) { diff --git a/configure.in b/configure.in index 35d0ea5ee..81f327c37 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.45.1") +AC_DEFINE_UNQUOTED(VERSION,"0.6.46.3") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 2aa21c399..887d2f254 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.6.46.3) unstable; urgency=low + + * apt-pkg/deb/dpkgpm.cc: + - make progress reporting robust against multiline error + messages + + -- + apt (0.6.46.2) unstable; urgency=low * Merged from Christian Perrier bzr branch: @@ -6,6 +14,7 @@ apt (0.6.46.2) unstable; urgency=low - cs.po: Updated. Closes: #391064 - es.po: Updated to 514t. Closes: #391661 - da.po: Updated to 514t. Closes: #391424 + -- Michael Vogt Wed, 11 Oct 2006 09:03:15 +0200 apt (0.6.46.1) unstable; urgency=low -- 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 tilgngelige offentlige ngler for flgende ngle-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 pblica 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 contrle MD5 incohrente" #: 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 nkkel tilgjengelig for de flgende nkkel-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 "Bdna 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 nastpujcego 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 stmmer 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 tillgnglig fr fljande 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 From 19ec5723caa6ea6ab196a9e960c769ded4ee0d28 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 1 Dec 2006 17:03:43 +0100 Subject: * apt-pkg/deb/debsrcrecords.{cc,h}: - cast correct --- apt-pkg/deb/debsrcrecords.cc | 2 +- apt-pkg/deb/debsrcrecords.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index e1c6427e8..7d5dab747 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -40,7 +40,7 @@ const char **debSrcRecordParser::Binaries() { delete [] Buffer; // allocate new size based on buffer (but never smaller than 4000) - BufSize = max((unsigned long)4000, max(Bins.length()+1,2*BufSize)); + BufSize = max((unsigned int)4000, max((unsigned int)Bins.length()+1,2*BufSize)); Buffer = new char[BufSize]; } diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index f4e2cb46c..7645dc564 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -27,7 +27,7 @@ class debSrcRecordParser : public pkgSrcRecords::Parser char *StaticBinList[400]; unsigned long iOffset; char *Buffer; - unsigned long BufSize; + unsigned int BufSize; public: -- cgit v1.2.3-70-g09d2