From: Michael Vogt Date: Thu, 14 Dec 2006 09:59:16 +0000 (+0100) Subject: * merged with apt--debian-sid X-Git-Tag: 0.7.21~284^2~14 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/b790b130ad0a43be5738c467c16bbc2dd657ca66?hp=4716731f20c72dde5b280af90af2dc2bd16a9aff * merged with apt--debian-sid --- diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 9e9f5c2a6..f620dff93 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1094,7 +1094,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/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index cac36c2e6..e1c6427e8 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/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 2b167dbf6..3204fc1bb 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -624,15 +624,22 @@ 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; + // reset the line buffer + line[0]=0; + continue; + } if(strncmp(action,"error",strlen("error")) == 0) { @@ -704,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/configure.in b/configure.in index 19828cc85..91c095c7e 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.46.1exp1") +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 f3b191ca2..a1e084fe2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,58 @@ -apt (0.6.46.1exp1) experimental; urgency=low +apt (0.6.46.4) unstable; urgency=low + + * 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 + * apt-pkg/deb/debsrcrecords.{cc,h}: + - make the Buffer grow dynmaically (closes: #400874) + * Merged from Christian Perrier bzr branch: + - uk.po: New Ukrainian translation: 483t28f3u + - el.po: Update to 503t9f2u + - de.po: Updates and corrections. + + -- + +apt (0.6.46.3) unstable; urgency=low + + * apt-pkg/deb/dpkgpm.cc: + - make progress reporting robust against multiline error + messages + + * Merged from Christian Perrier bzr branch: + - ca.po: Updated to 514t + - be.po: Updated to 514t + - it.po: Updated to 514t + - hu.po: Updated to 514t + - zh_TW.po: Updated to 514t + - ar.po: Updated to 293t221u. + - ru.po: Updated to 514t. Closes: #392466 + - nb.po: Updated to 514t. Closes: #392466 + - pt.po: Updated to 514t. Closes: #393199 + - fr.po: One spelling error corrected: s/accèder/accéder + - km.po: Updated to 514t. + - ko.po: Updated to 514t. + - bg.po: Updated to 514t. + - de.po: Updated to 514t. + - en_GB.po: Updated to 514t. + + -- Michael Vogt Thu, 2 Nov 2006 11:37:58 +0100 + +apt (0.6.46.2) unstable; urgency=low + + * debian/control: + - depend on debian-archive-keyring to offer clean upgrade path + (closes: #386800) + * Merged from Christian Perrier bzr branch: + - es.po: Updated to 514t. Closes: #391661 + - da.po: Updated to 514t. Closes: #391424 + - 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 * merged "install-recommends" branch (ABI break): - new "--install-recommends" @@ -24,7 +78,7 @@ apt (0.6.46.1exp1) experimental; urgency=low * make the internal buffer in pkgTagFile grow dynamically (closes: #388708) - -- Michael Vogt Mon, 2 Oct 2006 01:12:49 +0200 + -- Michael Vogt Mon, 2 Oct 2006 20:42:20 +0200 apt (0.6.46) unstable; urgency=low diff --git a/debian/control b/debian/control index 3cba50acb..f331a84c1 100644 --- a/debian/control +++ b/debian/control @@ -9,12 +9,11 @@ Build-Depends-Indep: debiandoc-sgml, docbook-utils (>= 0.6.12-1) Package: apt Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, debian-archive-keyring Priority: important Replaces: libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7) Provides: ${libapt-pkg:provides} -Recommends: debian-archive-keyring -Suggests: aptitude | synaptic | gnome-apt | wajig, dpkg-dev, apt-doc, bzip2, gnupg +Suggests: aptitude | synaptic | gnome-apt | wajig, dpkg-dev, apt-doc, bzip2 Section: admin Description: Advanced front-end for dpkg This is Debian's next generation front-end for the dpkg package manager. diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index b98d58737..17f663a35 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -467,7 +467,7 @@ See Also &apt-cache;, &apt-cdrom;, &dpkg;, &dselect;, &sources-list;, - &apt-conf;, &apt-config;, + &apt-conf;, &apt-config;, &apt-secure;, The APT User's guide in &guidesdir;, &apt-preferences;, the APT Howto. diff --git a/doc/apt.8 b/doc/apt.8 index 3fb214a3b..6f39c5387 100644 --- a/doc/apt.8 +++ b/doc/apt.8 @@ -32,7 +32,8 @@ None. .BR apt-cache (8), .BR apt-get (8), .BR apt.conf (5), -.BR sources.list (5) +.BR sources.list (5), +.BR apt-secure (8) .SH DIAGNOSTICS apt returns zero on normal operation, decimal 100 on error. .SH BUGS diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 831e276c7..55e9761a2 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -247,6 +247,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 diff --git a/doc/fr/apt-get.fr.8.xml b/doc/fr/apt-get.fr.8.xml index cfaa76c7d..dccf415b1 100644 --- a/doc/fr/apt-get.fr.8.xml +++ b/doc/fr/apt-get.fr.8.xml @@ -175,8 +175,8 @@ d' Avec la commande source, apt-get récupère des paquets sources. APT examine les paquets disponibles pour choisir le paquet source à récupérer. Il trouve ensuite et télécharge dans le répertoire courant -la version la plus récente. Les paquets source sont suivis différemment que -les paquets binaires, via les lignes de type deb-src dans le fichier +la version la plus récente. Les paquets source sont gérés indépendamment +des paquets binaires, via les lignes de type deb-src dans le fichier &sources-list;. On n'obtiendra probablement pas les mêmes sources que celles du paquet installé ou celles du paquet qu'on pourrait installer. Si l'option est spécifiée, le paquet est compilé en un binaire .deb diff --git a/doc/fr/apt_preferences.fr.5.xml b/doc/fr/apt_preferences.fr.5.xml index 6e1d2043e..aba9f0d06 100644 --- a/doc/fr/apt_preferences.fr.5.xml +++ b/doc/fr/apt_preferences.fr.5.xml @@ -208,7 +208,7 @@ d' Package: * Pin: release a=unstable -Pin-Priority: 500 +Pin-Priority: 50 L'entrée suivante affecte une priorité haute à toutes les versions @@ -578,4 +578,4 @@ apt-get install paquet/unstable &manbugs; &traducteur; - \ No newline at end of file + diff --git a/doc/fr/makefile b/doc/fr/makefile index 596de7b09..c650dc03a 100644 --- a/doc/fr/makefile +++ b/doc/fr/makefile @@ -7,7 +7,7 @@ include ../../buildlib/defaults.mak # Do not use XMLTO, build the manpages directly with XSLTPROC XSLTPROC=/usr/bin/xsltproc -STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl +STYLESHEET=./style.fr.xsl # Man pages diff --git a/doc/fr/style.fr.xsl b/doc/fr/style.fr.xsl new file mode 100644 index 000000000..11593bb42 --- /dev/null +++ b/doc/fr/style.fr.xsl @@ -0,0 +1,9 @@ + + + + + + + diff --git a/doc/ja/sources.list.ja.5.xml b/doc/ja/sources.list.ja.5.xml index e000d8767..8522a3be3 100644 --- a/doc/ja/sources.list.ja.5.xml +++ b/doc/ja/sources.list.ja.5.xml @@ -391,7 +391,7 @@ deb http://http.us.debian.org/debian dists/stable-updates/