From d3aac32ece65fd5424a94402f46db065298c07a8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 22 May 2012 18:33:43 +0200 Subject: * apt-pkg/contrib/fileutl.cc: - dup() given compressed fd in OpenDescriptor if AutoClose is disabled as otherwise gzclose() and co will close it --- apt-pkg/contrib/fileutl.cc | 19 +++++++++++++++---- debian/changelog | 8 ++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index c7f78cdfb..119cd1974 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1024,7 +1024,20 @@ bool FileFd::OpenDescriptor(int Fd, unsigned int const Mode, APT::Configuration: { Close(); Flags = (AutoClose) ? FileFd::AutoClose : 0; - iFd = Fd; + if (AutoClose == false && ( +#ifdef HAVE_ZLIB + compressor.Name == "gzip" || +#endif +#ifdef HAVE_BZ2 + compressor.Name == "bzip2" || +#endif + false)) + { + // Need to duplicate fd here or gzclose for cleanup will close the fd as well + iFd = dup(Fd); + } + else + iFd = Fd; this->FileName = ""; if (OpenInternDescriptor(Mode, compressor) == false) { @@ -1183,8 +1196,6 @@ bool FileFd::OpenInternDescriptor(unsigned int const Mode, APT::Configuration::C close(Pipe[0]); else close(Pipe[1]); - if ((Comp == true || FileName.empty() == true) && d->compressed_fd != -1) - close(d->compressed_fd); return true; } @@ -1712,7 +1723,7 @@ bool FileFd::Close() } } - if ((Flags & Replace) == Replace && iFd >= 0) { + if ((Flags & Replace) == Replace) { if (rename(TemporaryFileName.c_str(), FileName.c_str()) != 0) Res &= _error->Errno("rename",_("Problem renaming the file %s to %s"), TemporaryFileName.c_str(), FileName.c_str()); diff --git a/debian/changelog b/debian/changelog index e17ee702b..3c43f6589 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.9.6) UNRELEASED; urgency=low + + * apt-pkg/contrib/fileutl.cc: + - dup() given compressed fd in OpenDescriptor if AutoClose + is disabled as otherwise gzclose() and co will close it + + -- David Kalnischkies Tue, 22 May 2012 18:13:19 +0200 + apt (0.9.5) unstable; urgency=low [ Chris Leick ] -- cgit v1.2.3 From aec2216091b3d70b3baa5a5b8c87ce208e35c19c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 23 May 2012 18:00:32 +0200 Subject: * doc/*.xml: - mark even more stuff as untranslateable and improve the markup here and there (no real text change) --- debian/changelog | 3 + doc/apt-cache.8.xml | 4 +- doc/apt-cdrom.8.xml | 5 +- doc/apt-config.8.xml | 2 +- doc/apt-ftparchive.1.xml | 14 +- doc/apt-mark.8.xml | 9 +- doc/apt-verbatim.ent | 12 ++ doc/apt.ent | 4 +- doc/makefile | 4 +- doc/po/apt-doc.pot | 390 +++++++++++++----------------------- doc/po/de.po | 502 ++++++++++++++++++----------------------------- doc/po4a.conf | 9 +- doc/sources.list.5.xml | 25 ++- 13 files changed, 385 insertions(+), 598 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3c43f6589..d416dc83e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ apt (0.9.6) UNRELEASED; urgency=low * apt-pkg/contrib/fileutl.cc: - dup() given compressed fd in OpenDescriptor if AutoClose is disabled as otherwise gzclose() and co will close it + * doc/*.xml: + - mark even more stuff as untranslateable and improve the + markup here and there (no real text change) -- David Kalnischkies Tue, 22 May 2012 18:13:19 +0200 diff --git a/doc/apt-cache.8.xml b/doc/apt-cache.8.xml index f36347107..1429af185 100644 --- a/doc/apt-cache.8.xml +++ b/doc/apt-cache.8.xml @@ -168,9 +168,7 @@ Reverse Provides: search performs a full text search on all available package - lists for the POSIX regex pattern given, see - regex - 7. + lists for the POSIX regex pattern given, see ®ex;. It searches the package names and the descriptions for an occurrence of the regular expression and prints out the package name and the short description, including virtual package diff --git a/doc/apt-cdrom.8.xml b/doc/apt-cdrom.8.xml index 501c4ee7e..dee42c1b1 100644 --- a/doc/apt-cdrom.8.xml +++ b/doc/apt-cdrom.8.xml @@ -49,8 +49,8 @@ Unless the , or option is - given one of the commands below must be present. - + given, one of the commands below must be present. + add is used to add a new disc to the @@ -75,7 +75,6 @@ - Options diff --git a/doc/apt-config.8.xml b/doc/apt-config.8.xml index a8fb897ef..134c8b086 100644 --- a/doc/apt-config.8.xml +++ b/doc/apt-config.8.xml @@ -42,7 +42,7 @@ manner that is easy to use by scripted applications. Unless the , or option is - given one of the commands below must be present. + given, one of the commands below must be present. diff --git a/doc/apt-ftparchive.1.xml b/doc/apt-ftparchive.1.xml index 028d9f70e..06d794a19 100644 --- a/doc/apt-ftparchive.1.xml +++ b/doc/apt-ftparchive.1.xml @@ -51,8 +51,8 @@ programs aside from &gzip;. When doing a full generate it automatically performs file-change checks and builds the desired compressed output files. - Unless the , or option is given one of the - commands below must be present. + Unless the , or option is given, + one of the commands below must be present. @@ -141,7 +141,7 @@ The generate configuration has 4 separate sections, each described below. - Dir Section + <literal>Dir</literal> Section The Dir section defines the standard directories needed to locate the files required during the generation process. These @@ -173,7 +173,7 @@ - Default Section + <literal>Default</literal> Section The Default section specifies default values, and settings that control the operation of the generator. Other sections may override @@ -239,7 +239,7 @@ - TreeDefault Section + <literal>TreeDefault</literal> Section Sets defaults specific to Tree sections. All of these variables are substitution variables and have the strings $(DIST), @@ -339,7 +339,7 @@ - Tree Section + <literal>Tree</literal> Section The Tree section defines a standard Debian file tree which consists of a base directory, then multiple sections in that base @@ -407,7 +407,7 @@ for i in Sections do - BinDirectory Section + <literal>BinDirectory</literal> Section The bindirectory section defines a binary directory tree with no special structure. The scope tag specifies the location of diff --git a/doc/apt-mark.8.xml b/doc/apt-mark.8.xml index 3b2b43c24..fcded2bf4 100644 --- a/doc/apt-mark.8.xml +++ b/doc/apt-mark.8.xml @@ -109,12 +109,11 @@ - - + + Read/Write package stats from the filename given with the parameter - &synopsis-filename; - instead of from the default location, which + &synopsis-param-filename; instead of from the default location, which is extended_status in the directory defined by the Configuration Item: Dir::State. @@ -130,7 +129,7 @@ See Also - &apt-get;,&aptitude;,&apt-conf; + &apt-get;,&aptitude;,&apt-conf; Diagnostics diff --git a/doc/apt-verbatim.ent b/doc/apt-verbatim.ent index a44f37ab8..ff37f4ae7 100644 --- a/doc/apt-verbatim.ent +++ b/doc/apt-verbatim.ent @@ -154,6 +154,18 @@ " > + + apt-transport-debtorrent + 1 + " +> + + + regex + 7 + " +> + diff --git a/doc/apt.ent b/doc/apt.ent index ea1dc0265..6a3837b95 100644 --- a/doc/apt.ent +++ b/doc/apt.ent @@ -103,7 +103,7 @@ &cachedir;/archives/partial/ Storage area for package files in transit. - Configuration Item: Dir::Cache::Archives (partial will be implicitly appended). + Configuration Item: Dir::Cache::Archives (partial will be implicitly appended) "> @@ -144,7 +144,7 @@ &statedir;/lists/partial/ Storage area for state information in transit. - Configuration Item: Dir::State::Lists (partial will be implicitly appended). + Configuration Item: Dir::State::Lists (partial will be implicitly appended) "> diff --git a/doc/makefile b/doc/makefile index d9542b438..7b49ac269 100644 --- a/doc/makefile +++ b/doc/makefile @@ -84,12 +84,12 @@ doc: po4a update-po: po4a --previous --no-backups --force --no-translations \ - --package-name='$(PACKAGE)' --package-version='$(PACKAGE_VERSION)' \ + --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \ --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf po4a: po4a --previous --no-backups \ - --package-name='$(PACKAGE)' --package-version='$(PACKAGE_VERSION)' \ + --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \ --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf endif diff --git a/doc/po/apt-doc.pot b/doc/po/apt-doc.pot index 377e83429..38689d28d 100644 --- a/doc/po/apt-doc.pot +++ b/doc/po/apt-doc.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. -# This file is distributed under the same license as the apt package. +# This file is distributed under the same license as the apt-doc package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: apt 0.9.5\n" +"Project-Id-Version: apt-doc 0.9.4\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2012-05-22 16:30+0300\n" +"POT-Creation-Date: 2012-05-23 17:06+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -309,7 +309,7 @@ msgid "" " Storage area for package files in transit.\n" " Configuration Item: Dir::Cache::Archives " "(partial will be implicitly " -"appended). \n" +"appended)\n" " \n" "\">\n" msgstr "" @@ -391,7 +391,7 @@ msgid "" " Storage area for state information in transit.\n" " Configuration Item: Dir::State::Lists " "(partial will be implicitly " -"appended).\n" +"appended)\n" " \n" "\">\n" msgstr "" @@ -635,7 +635,7 @@ msgid "" msgstr "" #. type: Content of: -#: apt-cache.8.xml:44 apt-get.8.xml:44 +#: apt-cache.8.xml:44 apt-cdrom.8.xml:51 apt-config.8.xml:44 apt-ftparchive.1.xml:54 apt-get.8.xml:44 msgid "" "Unless the , or option is given, " "one of the commands below must be present." @@ -649,7 +649,7 @@ msgid "" msgstr "" #. type: Content of: