From 0c6b381f7b61bffc36e462005945027adfc43295 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 21 Sep 2010 13:23:21 +0200 Subject: doc/examples/configure-index: - add info on debug::acquire::cdrom --- doc/examples/configure-index | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 26fb53fec..c4c2acb64 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -433,6 +433,7 @@ Debug Acquire::Http "false"; // Show http command traffic Acquire::Https "false"; // Show https debug Acquire::gpgv "false"; // Show the gpgv traffic + Acquire::cdrom "false"; // Show cdrom debug output aptcdrom "false"; // Show found package files IdentCdrom "false"; acquire::netrc "false"; // netrc parser -- cgit v1.2.3 From 966a4c5320a8d7a76749c2ddbfc29708d71bda3c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 1 Oct 2010 14:36:31 +0200 Subject: * debian/apt.cron.daily: - source /etc/default/locale (if available) so that the apt-get update cron job fetches the right translated package descriptions --- debian/apt.cron.daily | 7 +++++++ debian/changelog | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 8c0e4c416..40be6e55d 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -430,6 +430,13 @@ do_cache_backup $BackupArchiveInterval # mirrors at the same time random_sleep +# include default system language so that "apt-get update" will +# fetch the right translated package descriptions +if [ -r /etc/default/locale ]; then + . /etc/default/locale + export LANG +fi + # update package lists UPDATED=0 UPDATE_STAMP=/var/lib/apt/periodic/update-stamp diff --git a/debian/changelog b/debian/changelog index f1976f516..feafede86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,10 @@ apt (0.8.2) unstable; urgency=low not use the root directory to identify the medium (as all changes there change the ident id). Use the .disk directory instead + * debian/apt.cron.daily: + - source /etc/default/locale (if available) so that the + apt-get update cron job fetches the right translated package + descriptions -- Michael Vogt Fri, 03 Sep 2010 20:21:43 +0200 -- cgit v1.2.3 From 6e2398300f16741d028a022ddf73c72403728d0c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 1 Oct 2010 15:02:14 +0200 Subject: debian/apt.cron.daily: export LANGUAGE LC_MESSAGES LC_ALL as well --- debian/apt.cron.daily | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 40be6e55d..3da279c13 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -434,7 +434,7 @@ random_sleep # fetch the right translated package descriptions if [ -r /etc/default/locale ]; then . /etc/default/locale - export LANG + export LANG LANGUAGE LC_MESSAGES LC_ALL fi # update package lists -- cgit v1.2.3 From 4b2a4ab8abb9f9b6ce262882480eee945a041d14 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 13 Oct 2010 12:23:25 +0200 Subject: merge fix for testrun on amd64 --- test/integration/framework | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/integration/framework b/test/integration/framework index d832bedbe..95fce1247 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -64,6 +64,8 @@ runapt() { msgdebug "Executing: ${CCMD}$*${CDEBUG} " if [ -f ./aptconfig.conf ]; then APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/$* + elif [ -f ../aptconfig.conf ]; then + APT_CONFIG=../aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/$* else LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/$* fi -- cgit v1.2.3 From 5473df3fec08eaea6e84b98551cc247e87f4b6df Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 13 Oct 2010 12:45:47 +0200 Subject: * apt-pkg/deb/debindexfile.cc: - Use FileFd::Size() instead of stat()ing the sources/binary/translations indexes directly, so that we have transparent handling of gzipped indexes. --- apt-pkg/deb/debindexfile.cc | 22 +++++++++++++--------- debian/changelog | 6 ++++++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index ba5b3f266..a89a2574f 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -149,10 +149,11 @@ bool debSourcesIndex::Exists() const /* */ unsigned long debSourcesIndex::Size() const { - struct stat S; - if (stat(IndexFile("Sources").c_str(),&S) != 0) + FileFd f = FileFd (IndexFile("Sources"), FileFd::ReadOnlyGzip); + + if (f.Failed()) return 0; - return S.st_size; + return f.Size(); } /*}}}*/ @@ -268,10 +269,11 @@ bool debPackagesIndex::Exists() const /* This is really only used for progress reporting. */ unsigned long debPackagesIndex::Size() const { - struct stat S; - if (stat(IndexFile("Packages").c_str(),&S) != 0) + FileFd f = FileFd (IndexFile("Packages"), FileFd::ReadOnlyGzip); + + if (f.Failed()) return 0; - return S.st_size; + return f.Size(); } /*}}}*/ // PackagesIndex::Merge - Load the index file into a cache /*{{{*/ @@ -458,10 +460,12 @@ bool debTranslationsIndex::Exists() const /* This is really only used for progress reporting. */ unsigned long debTranslationsIndex::Size() const { - struct stat S; - if (stat(IndexFile(Language).c_str(),&S) != 0) + FileFd f = FileFd (IndexFile(Language), FileFd::ReadOnlyGzip); + + if (f.Failed()) return 0; - return S.st_size; + + return f.Size(); } /*}}}*/ // TranslationsIndex::Merge - Load the index file into a cache /*{{{*/ diff --git a/debian/changelog b/debian/changelog index e7d784eb8..ad6d05cf0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,12 @@ apt (0.8.7) UNRELEASED; urgency=low * Wrong translation for "showauto" fixed. Thanks to Raphaël Hertzog Closes: #599265 + [ Martin Pitt ] + * apt-pkg/deb/debindexfile.cc: + - Use FileFd::Size() instead of stat()ing the sources/binary/translations + indexes directly, so that we have transparent handling of gzipped + indexes. + -- Christian Perrier Tue, 05 Oct 2010 05:35:58 +0200 apt (0.8.6) unstable; urgency=low -- cgit v1.2.3 From 9c182afa045dc889a5025d166328c6115924d706 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 13 Oct 2010 13:00:49 +0200 Subject: * apt-pkg/contrib/fileutl.cc: - Fix FileFd::Size() for gzipped files to give the size of the uncompressed data. This fixes cache progress building progress going way over 100%. --- apt-pkg/contrib/fileutl.cc | 21 ++++++++++++++++++++- debian/changelog | 4 ++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index eabaadf90..bf07f6008 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -915,8 +915,27 @@ unsigned long FileFd::Tell() /* */ unsigned long FileFd::Size() { - //TODO: For gz, do we need the actual file size here or the uncompressed length? struct stat Buf; + long size; + off_t orig_pos; + + if (gz) + { + /* unfortunately zlib.h doesn't provide a gzsize(), so we have to do + * this ourselves; the original (uncompressed) file size is the last 32 + * bits of the file */ + orig_pos = lseek(iFd, 0, SEEK_CUR); + if (lseek(iFd, -4, SEEK_END) < 0) + return _error->Errno("lseek","Unable to seek to end of gzipped file"); + if (read(iFd, &size, 4) != 4) + return _error->Errno("read","Unable to read original size of gzipped file"); + size &= 0xFFFFFFFF; + + if (lseek(iFd, orig_pos, SEEK_SET) < 0) + return _error->Errno("lseek","Unable to seek in gzipped file"); + return size; + } + if (fstat(iFd,&Buf) != 0) return _error->Errno("fstat","Unable to determine the file size"); return Buf.st_size; diff --git a/debian/changelog b/debian/changelog index ad6d05cf0..f1737a5a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,10 @@ apt (0.8.7) UNRELEASED; urgency=low - Use FileFd::Size() instead of stat()ing the sources/binary/translations indexes directly, so that we have transparent handling of gzipped indexes. + * apt-pkg/contrib/fileutl.cc: + - Fix FileFd::Size() for gzipped files to give the size of the + uncompressed data. This fixes cache progress building progress going way + over 100%. -- Christian Perrier Tue, 05 Oct 2010 05:35:58 +0200 -- cgit v1.2.3 From c988fe215ba08bd2163024d9b1d27b76a9c59696 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 13 Oct 2010 14:08:52 +0200 Subject: * revert commit: * apt-pkg/deb/debsystem.cc: - set dir::state::status based at least on dir This causes problems with alternative rootdirs --- apt-pkg/deb/debsystem.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index ab08a8f4d..7056d771d 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -165,7 +165,7 @@ bool debSystem::Initialize(Configuration &Cnf) which is yet to be determined. The functions in pkgcachegen should be the only users of these */ Cnf.CndSet("Dir::State::extended_states", Cnf.FindDir("Dir::State").append("extended_states")); - Cnf.CndSet("Dir::State::status", Cnf.FindDir("Dir", "/").append("var/lib/dpkg/status")); + Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status"); Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg"); if (StatusFile) { -- cgit v1.2.3 From 940ff5d6b5634b57c2e622b5295f499a7807f3de Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 13 Oct 2010 14:11:57 +0200 Subject: apt-pkg/deb/debsystem.cc: remove duplicated rootdir (FindFile will prepend the rootdir later anyway) --- apt-pkg/deb/debsystem.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index 7056d771d..8619822df 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -164,7 +164,7 @@ bool debSystem::Initialize(Configuration &Cnf) /* These really should be jammed into a generic 'Local Database' engine which is yet to be determined. The functions in pkgcachegen should be the only users of these */ - Cnf.CndSet("Dir::State::extended_states", Cnf.FindDir("Dir::State").append("extended_states")); + Cnf.CndSet("Dir::State::extended_states", "extended_states"); Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status"); Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg"); -- cgit v1.2.3 From 5e7da0b444781f1d147bd1813369495dabda97e1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 13 Oct 2010 14:21:35 +0200 Subject: doc/po/fr.po: refreshed after running make --- doc/po/fr.po | 86 ++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 54 insertions(+), 32 deletions(-) diff --git a/doc/po/fr.po b/doc/po/fr.po index 3f1239f0e..2de064707 100644 --- a/doc/po/fr.po +++ b/doc/po/fr.po @@ -1154,7 +1154,7 @@ msgstr "" " " -#. The last update date +#. The last update date #. type: Content of: #: apt-cache.8.xml:13 apt-config.8.xml:13 apt-extracttemplates.1.xml:13 #: apt-sortpkgs.1.xml:13 sources.list.5.xml:13 @@ -2586,7 +2586,7 @@ msgstr "" "apt-extracttemplates retourne zéro si tout se passe bien, " "le nombre 100 en cas d'erreur." -#. The last update date +#. The last update date #. type: Content of: #: apt-ftparchive.1.xml:13 msgid "" @@ -2712,7 +2712,8 @@ msgstr "" #. type: Content of: #: apt-ftparchive.1.xml:83 apt-ftparchive.1.xml:107 -msgid "The option can be used to specify a binary caching DB." +msgid "" +"The option can be used to specify a binary caching DB." msgstr "" "On peut se servir de l'option pour demander un cache " "binaire." @@ -2869,8 +2870,10 @@ msgstr "" #. type: Content of: #: apt-ftparchive.1.xml:157 -msgid "The generate configuration has 4 separate sections, each described below." -msgstr "Ce fichier de configuration possède quatre sections, décrites ci-dessous." +msgid "" +"The generate configuration has 4 separate sections, each described below." +msgstr "" +"Ce fichier de configuration possède quatre sections, décrites ci-dessous." #. type: Content of: #: apt-ftparchive.1.xml:159 @@ -3828,7 +3831,7 @@ msgstr "" "<command>apt-ftparchive</command> retourne zéro si tout se passe bien, le " "nombre 100 en cas d'erreur." -#. The last update date +#. The last update date #. type: Content of: <refentry><refentryinfo> #: apt-get.8.xml:13 msgid "" @@ -3846,7 +3849,8 @@ msgstr "apt-get" #. type: Content of: <refentry><refnamediv><refpurpose> #: apt-get.8.xml:30 msgid "APT package handling utility -- command-line interface" -msgstr "Utilitaire APT pour la gestion des paquets -- interface en ligne de commande." +msgstr "" +"Utilitaire APT pour la gestion des paquets -- interface en ligne de commande." #. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis> #: apt-get.8.xml:36 @@ -5200,8 +5204,10 @@ msgstr "Trousseau des clés fiables de l'archive Debian." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt-key.8.xml:166 -msgid "<filename>/usr/share/keyrings/debian-archive-removed-keys.gpg</filename>" -msgstr "<filename>/usr/share/keyrings/debian-archive-removed-keys.gpg</filename>" +msgid "" +"<filename>/usr/share/keyrings/debian-archive-removed-keys.gpg</filename>" +msgstr "" +"<filename>/usr/share/keyrings/debian-archive-removed-keys.gpg</filename>" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-key.8.xml:167 @@ -5213,7 +5219,7 @@ msgstr "Trousseau des clés fiables supprimées de l'archive Debian." msgid "&apt-get;, &apt-secure;" msgstr "&apt-get;, &apt-secure;" -#. The last update date +#. The last update date #. type: Content of: <refentry><refentryinfo> #: apt-mark.8.xml:13 msgid "" @@ -5318,13 +5324,15 @@ msgid "" "<literal>showauto</literal> is used to print a list of automatically " "installed packages with each package on a new line." msgstr "" -"<literal>showauto</literal>, affiche les paquets installés automatiquement, un " -"paquet par ligne." +"<literal>showauto</literal>, affiche les paquets installés automatiquement, " +"un paquet par ligne." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt-mark.8.xml:93 -msgid "<option>-f=<filename><replaceable>FILENAME</replaceable></filename></option>" -msgstr "<option>-f=<filename><replaceable>FICHIER</replaceable></filename></option>" +msgid "" +"<option>-f=<filename><replaceable>FILENAME</replaceable></filename></option>" +msgstr "" +"<option>-f=<filename><replaceable>FICHIER</replaceable></filename></option>" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt-mark.8.xml:94 @@ -5773,7 +5781,7 @@ msgstr "" "<command>apt-sortpkgs</command> retourne zéro si tout se passe bien ou 100 " "en cas d'erreur." -#. The last update date +#. The last update date #. type: Content of: <refentry><refentryinfo> #: apt.conf.5.xml:13 msgid "" @@ -5851,8 +5859,10 @@ msgstr "" #. type: Content of: <refentry><refsect1><orderedlist><listitem><para> #: apt.conf.5.xml:54 -msgid "the main configuration file specified by <literal>Dir::Etc::main</literal>" -msgstr "le fichier de configuration défini par <literal>Dir::Etc::Main</literal>" +msgid "" +"the main configuration file specified by <literal>Dir::Etc::main</literal>" +msgstr "" +"le fichier de configuration défini par <literal>Dir::Etc::Main</literal>" #. type: Content of: <refentry><refsect1><orderedlist><listitem><para> #: apt.conf.5.xml:56 @@ -7671,7 +7681,7 @@ msgstr "" #. TODO: provide a #. motivating example, except I haven't a clue why you'd want -#. to do this. +#. to do this. #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para> #: apt.conf.5.xml:746 msgid "" @@ -7693,7 +7703,8 @@ msgstr "<literal>Debug::Acquire::cdrom</literal>" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:765 -msgid "Print information related to accessing <literal>cdrom://</literal> sources." +msgid "" +"Print information related to accessing <literal>cdrom://</literal> sources." msgstr "" "Affiche les informations concernant les sources de type <literal>cdrom://</" "literal>" @@ -7706,7 +7717,8 @@ msgstr "<literal>Debug::Acquire::ftp</literal>" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:776 msgid "Print information related to downloading packages using FTP." -msgstr "Affiche les informations concernant le téléchargement de paquets par FTP." +msgstr "" +"Affiche les informations concernant le téléchargement de paquets par FTP." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt.conf.5.xml:783 @@ -7716,7 +7728,8 @@ msgstr "<literal>Debug::Acquire::http</literal>" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:787 msgid "Print information related to downloading packages using HTTP." -msgstr "Affiche les informations concernant le téléchargement de paquets par HTTP." +msgstr "" +"Affiche les informations concernant le téléchargement de paquets par HTTP." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt.conf.5.xml:794 @@ -7877,7 +7890,8 @@ msgstr "<literal>Debug::pkgAcquire::Worker</literal>" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:916 -msgid "Log all interactions with the sub-processes that actually perform downloads." +msgid "" +"Log all interactions with the sub-processes that actually perform downloads." msgstr "" "Affiche toutes les interactions avec les processus enfants qui se chargent " "effectivement des téléchargements." @@ -8018,7 +8032,8 @@ msgstr "<literal>Debug::pkgPackageManager</literal>" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:1017 -msgid "Output status messages tracing the steps performed when invoking &dpkg;." +msgid "" +"Output status messages tracing the steps performed when invoking &dpkg;." msgstr "Affiche le détail des opérations liées à l'invocation de &dpkg;." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> @@ -8089,17 +8104,19 @@ msgstr "" msgid "&file-aptconf;" msgstr "&file-aptconf;" -#. ? reading apt.conf +#. ? reading apt.conf #. type: Content of: <refentry><refsect1><para> #: apt.conf.5.xml:1096 msgid "&apt-cache;, &apt-config;, &apt-preferences;." msgstr "&apt-cache;, &apt-config;, &apt-preferences;." -#. The last update date +#. The last update date #. type: Content of: <refentry><refentryinfo> #: apt_preferences.5.xml:13 -msgid "&apt-author.team; &apt-email; &apt-product; <date>16 February 2010</date>" -msgstr "&apt-author.team; &apt-email; &apt-product; <date>16 février 2010</date>" +msgid "" +"&apt-author.team; &apt-email; &apt-product; <date>16 February 2010</date>" +msgstr "" +"&apt-author.team; &apt-email; &apt-product; <date>16 février 2010</date>" #. type: Content of: <refentry><refnamediv><refname> #: apt_preferences.5.xml:21 apt_preferences.5.xml:28 @@ -8288,7 +8305,8 @@ msgstr "une priorité égale à 990" #. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> #: apt_preferences.5.xml:118 -msgid "to the versions that are not installed and belong to the target release." +msgid "" +"to the versions that are not installed and belong to the target release." msgstr "" "est affectée aux versions qui ne sont pas installées et qui appartiennent à " "la distribution par défaut." @@ -8803,7 +8821,8 @@ msgstr "" #. type: Content of: <refentry><refsect1><refsect2><title> #: apt_preferences.5.xml:339 msgid "Determination of Package Version and Distribution Properties" -msgstr "Détermination de la version des paquets et des propriétés des distributions" +msgstr "" +"Détermination de la version des paquets et des propriétés des distributions" #. type: Content of: <refentry><refsect1><refsect2><para> #: apt_preferences.5.xml:341 @@ -9875,7 +9894,8 @@ msgstr "$Id: guide.sgml,v 1.7 2003/04/26 23:26:13 doogie Exp $" #. type: <abstract></abstract> #: guide.sgml:11 -msgid "This document provides an overview of how to use the the APT package manager." +msgid "" +"This document provides an overview of how to use the the APT package manager." msgstr "" "Ce document fournit un aperçu des méthode d'utilisation du gestionnaire de " "paquets APT." @@ -10781,8 +10801,10 @@ msgstr "Résumé final" #. type: <p></p> #: guide.sgml:447 -msgid "Finally, APT will print out a summary of all the changes that will occur." -msgstr "Enfin, APT affichera un résumé de toutes les opérations qui prendront place." +msgid "" +"Finally, APT will print out a summary of all the changes that will occur." +msgstr "" +"Enfin, APT affichera un résumé de toutes les opérations qui prendront place." #. type: <example></example> #: guide.sgml:452 -- cgit v1.2.3 From e344c4a7a1569c77ef8f8921852fd9822ee64b90 Mon Sep 17 00:00:00 2001 From: Martin Pitt <martin@piware.de> Date: Wed, 13 Oct 2010 14:34:23 +0200 Subject: fix changelog typo --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3a552d01e..739f1b425 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,7 +23,7 @@ apt (0.8.7) UNRELEASED; urgency=low indexes. * apt-pkg/contrib/fileutl.cc: - Fix FileFd::Size() for gzipped files to give the size of the - uncompressed data. This fixes cache progress building progress going way + uncompressed data. This fixes cache building progress going way over 100%. -- Christian Perrier <bubulle@debian.org> Tue, 05 Oct 2010 05:35:58 +0200 -- cgit v1.2.3 From 9962ae934b367294a57b27d58f7cdb4e2d54ce04 Mon Sep 17 00:00:00 2001 From: Michael Vogt <mvo@debian.org> Date: Wed, 13 Oct 2010 15:22:48 +0200 Subject: tests/integration/test-*: remove a bunch of "local" that are used outside funtions (bash complains) --- test/integration/run-tests | 2 +- test/integration/test-autoremove | 2 +- test/integration/test-bug-590438-broken-provides-thanks-to-remove-order | 2 +- test/integration/test-bug-591882-conkeror | 2 +- test/integration/test-bug-595691-empty-and-broken-archive-files | 2 +- test/integration/test-bug-598669-install-postfix-gets-exim-heavy | 2 +- test/integration/test-compressed-indexes | 2 +- test/integration/test-disappearing-packages | 2 +- test/integration/test-pdiff-usage | 2 +- test/integration/test-policy-pinning | 2 +- test/integration/test-ubuntu-bug-614993 | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/integration/run-tests b/test/integration/run-tests index cb74f21e7..c7ea0a61a 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -1,7 +1,7 @@ #!/bin/sh set -e -local DIR=$(readlink -f $(dirname $0)) +DIR=$(readlink -f $(dirname $0)) for testcase in $(run-parts --list $DIR | grep '/test-'); do echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m" ${testcase} diff --git a/test/integration/test-autoremove b/test/integration/test-autoremove index 7127b3d82..1ca325b29 100755 --- a/test/integration/test-autoremove +++ b/test/integration/test-autoremove @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture 'i386' diff --git a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order index 9fd7741f4..3be0bec48 100755 --- a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order +++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment diff --git a/test/integration/test-bug-591882-conkeror b/test/integration/test-bug-591882-conkeror index 27a217b5f..e1c0b42d1 100755 --- a/test/integration/test-bug-591882-conkeror +++ b/test/integration/test-bug-591882-conkeror @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files index d982a4981..2f127221a 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-bug-598669-install-postfix-gets-exim-heavy b/test/integration/test-bug-598669-install-postfix-gets-exim-heavy index 3fee63bbb..c3a77f346 100755 --- a/test/integration/test-bug-598669-install-postfix-gets-exim-heavy +++ b/test/integration/test-bug-598669-install-postfix-gets-exim-heavy @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index 0b73f4c35..97a1453f7 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages index ebf2bb14f..12d215d7a 100755 --- a/test/integration/test-disappearing-packages +++ b/test/integration/test-disappearing-packages @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index 85cbe9082..a70b6122c 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning index 97447b330..fa356ed54 100755 --- a/test/integration/test-policy-pinning +++ b/test/integration/test-policy-pinning @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment diff --git a/test/integration/test-ubuntu-bug-614993 b/test/integration/test-ubuntu-bug-614993 index d70c65ba2..49955f231 100755 --- a/test/integration/test-ubuntu-bug-614993 +++ b/test/integration/test-ubuntu-bug-614993 @@ -1,7 +1,7 @@ #!/bin/sh set -e -local TESTDIR=$(readlink -f $(dirname $0)) +TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "amd64" -- cgit v1.2.3 From 94eb3bee531ae1f3042eb8378e383b34dd083851 Mon Sep 17 00:00:00 2001 From: Michael Vogt <mvo@debian.org> Date: Wed, 13 Oct 2010 15:30:47 +0200 Subject: test/integration/framework: set proper dir::state::status --- test/integration/framework | 1 + 1 file changed, 1 insertion(+) diff --git a/test/integration/framework b/test/integration/framework index e2c5234e2..2422f0886 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -113,6 +113,7 @@ setupenvironment() { cp $(find $TESTDIR -name '*.pub' -o -name '*.sec') keys/ ln -s ${TMPWORKINGDIRECTORY}/keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf + echo "Dir::state::status \"${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status\";" >> aptconfig.conf echo "Debug::NoLocking \"true\";" >> aptconfig.conf echo "APT::Get::Show-User-Simulation-Note \"false\";" >> aptconfig.conf echo "Dir::Bin::dpkg \"fakeroot\";" >> aptconfig.conf -- cgit v1.2.3 From 44dc669e08353716da835608ea54563b4c8c32bb Mon Sep 17 00:00:00 2001 From: Michael Vogt <michael.vogt@ubuntu.com> Date: Wed, 13 Oct 2010 16:03:56 +0200 Subject: apt-pkg/contrib/fileutl.cc: fix FileFd::Size() for files that are empty or for non-gzip files --- apt-pkg/contrib/fileutl.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index bf07f6008..cbf1d64a9 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -916,10 +916,17 @@ unsigned long FileFd::Tell() unsigned long FileFd::Size() { struct stat Buf; - long size; + unsigned long size; off_t orig_pos; - if (gz) + if (fstat(iFd,&Buf) != 0) + return _error->Errno("fstat","Unable to determine the file size"); + size = Buf.st_size; + + // only check gzsize if we are actually a gzip file, just checking for + // "gz" is not sufficient as uncompressed files will be opened with + // gzopen in "direct" mode as well + if (gz && !gzdirect(gz) && size > 0) { /* unfortunately zlib.h doesn't provide a gzsize(), so we have to do * this ourselves; the original (uncompressed) file size is the last 32 @@ -936,9 +943,7 @@ unsigned long FileFd::Size() return size; } - if (fstat(iFd,&Buf) != 0) - return _error->Errno("fstat","Unable to determine the file size"); - return Buf.st_size; + return size; } /*}}}*/ // FileFd::Close - Close the file if the close flag is set /*{{{*/ -- cgit v1.2.3