summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/tagfile.cc78
-rw-r--r--apt-pkg/tagfile.h2
-rw-r--r--configure.in2
-rw-r--r--debian/changelog20
-rw-r--r--doc/examples/sources.list1
-rw-r--r--methods/gzip.cc1
-rw-r--r--po/apt-all.pot80
-rw-r--r--share/debian-archive.gpgbin4171 -> 2280 bytes
8 files changed, 84 insertions, 100 deletions
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index 8fcbeb23b..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());
@@ -192,12 +166,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;
}
@@ -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 <apt-pkg/fileutl.h>
-#include <apt-pkg/mmap.h>
#include <stdio.h>
class pkgTagSection
@@ -70,7 +69,6 @@ class pkgTagSection
class pkgTagFile
{
FileFd &Fd;
- MMap *Map;
char *Buffer;
char *Start;
char *End;
diff --git a/configure.in b/configure.in
index cc4e6e007..35d0ea5ee 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")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.45.1")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
diff --git a/debian/changelog b/debian/changelog
index e69c5091f..4c5841057 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,7 +9,25 @@ apt (0.6.45.1) unstable; urgency=low
suggested/recommends packages (closes: #311619)
* methods/http.cc:
- check more careful for incorrect proxy settings (closes: #378868)
-
+ * methods/gzip.cc:
+ - don't hang when /var is full (closes: #341537), thanks to
+ Luis Rodrigo Gallardo Cruz for the patch
+ * doc/examples/sources.list:
+ - removed non-us.debian.org from the example (closes: #380030,#316196)
+ * Merged from Christian Perrier bzr branch:
+ * sk.po: Updated to 514t. Closes: #386851
+ * ja.po: Updated to 514t. Closes: #386537
+ * gl.po: Updated to 514t. Closes: #386397
+ * fr.po: Updated to 516t.
+ * fi.po: Updated to 512t. Closes: #382702
+ * share/archive-archive.gpg:
+ - removed the outdated amd64 and debian-2004 keys
+ * 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
diff --git a/doc/examples/sources.list b/doc/examples/sources.list
index 9f2343277..9af1c3c4c 100644
--- a/doc/examples/sources.list
+++ b/doc/examples/sources.list
@@ -2,7 +2,6 @@
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
deb http://http.us.debian.org/debian stable main contrib non-free
-deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free
# Uncomment if you want the apt-get source function to work
diff --git a/methods/gzip.cc b/methods/gzip.cc
index 809afc0fc..55ff33270 100644
--- a/methods/gzip.cc
+++ b/methods/gzip.cc
@@ -111,6 +111,7 @@ bool GzipMethod::Fetch(FetchItem *Itm)
if (To.Write(Buffer,Count) == false)
{
Failed = true;
+ FromGz.Close();
break;
}
}
diff --git a/po/apt-all.pot b/po/apt-all.pot
index 095de7f6d..352f2f5a6 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-08-09 16:17+0200\n"
+"POT-Creation-Date: 2006-09-12 11:18+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -148,7 +148,7 @@ msgstr ""
#: cmdline/apt-cache.cc:1652 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70
#: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:550
-#: cmdline/apt-get.cc:2380 cmdline/apt-sortpkgs.cc:144
+#: cmdline/apt-get.cc:2387 cmdline/apt-sortpkgs.cc:144
#, c-format
msgid "%s %s for %s %s compiled on %s %s\n"
msgstr ""
@@ -705,11 +705,11 @@ msgstr ""
msgid "Internal error, Ordering didn't finish"
msgstr ""
-#: cmdline/apt-get.cc:791 cmdline/apt-get.cc:1811 cmdline/apt-get.cc:1844
+#: cmdline/apt-get.cc:791 cmdline/apt-get.cc:1818 cmdline/apt-get.cc:1851
msgid "Unable to lock the download directory"
msgstr ""
-#: cmdline/apt-get.cc:801 cmdline/apt-get.cc:1892 cmdline/apt-get.cc:2128
+#: cmdline/apt-get.cc:801 cmdline/apt-get.cc:1899 cmdline/apt-get.cc:2135
#: apt-pkg/cachefile.cc:67
msgid "The list of sources could not be read."
msgstr ""
@@ -738,7 +738,7 @@ msgstr ""
msgid "After unpacking %sB disk space will be freed.\n"
msgstr ""
-#: cmdline/apt-get.cc:846 cmdline/apt-get.cc:1982
+#: cmdline/apt-get.cc:846 cmdline/apt-get.cc:1989
#, c-format
msgid "Couldn't determine free space in %s"
msgstr ""
@@ -772,7 +772,7 @@ msgstr ""
msgid "Do you want to continue [Y/n]? "
msgstr ""
-#: cmdline/apt-get.cc:961 cmdline/apt-get.cc:1365 cmdline/apt-get.cc:2025
+#: cmdline/apt-get.cc:961 cmdline/apt-get.cc:1365 cmdline/apt-get.cc:2032
#, c-format
msgid "Failed to fetch %s %s\n"
msgstr ""
@@ -781,7 +781,7 @@ msgstr ""
msgid "Some files failed to download"
msgstr ""
-#: cmdline/apt-get.cc:980 cmdline/apt-get.cc:2034
+#: cmdline/apt-get.cc:980 cmdline/apt-get.cc:2041
msgid "Download complete and in download only mode"
msgstr ""
@@ -938,144 +938,144 @@ msgstr ""
msgid "The following extra packages will be installed:"
msgstr ""
-#: cmdline/apt-get.cc:1685
+#: cmdline/apt-get.cc:1692
msgid "Suggested packages:"
msgstr ""
-#: cmdline/apt-get.cc:1686
+#: cmdline/apt-get.cc:1693
msgid "Recommended packages:"
msgstr ""
-#: cmdline/apt-get.cc:1706
+#: cmdline/apt-get.cc:1713
msgid "Calculating upgrade... "
msgstr ""
-#: cmdline/apt-get.cc:1709 methods/ftp.cc:702 methods/connect.cc:101
+#: cmdline/apt-get.cc:1716 methods/ftp.cc:702 methods/connect.cc:101
msgid "Failed"
msgstr ""
-#: cmdline/apt-get.cc:1714
+#: cmdline/apt-get.cc:1721
msgid "Done"
msgstr ""
-#: cmdline/apt-get.cc:1779 cmdline/apt-get.cc:1787
+#: cmdline/apt-get.cc:1786 cmdline/apt-get.cc:1794
msgid "Internal error, problem resolver broke stuff"
msgstr ""
-#: cmdline/apt-get.cc:1887
+#: cmdline/apt-get.cc:1894
msgid "Must specify at least one package to fetch source for"
msgstr ""
-#: cmdline/apt-get.cc:1917 cmdline/apt-get.cc:2146
+#: cmdline/apt-get.cc:1924 cmdline/apt-get.cc:2153
#, c-format
msgid "Unable to find a source package for %s"
msgstr ""
-#: cmdline/apt-get.cc:1961
+#: cmdline/apt-get.cc:1968
#, c-format
msgid "Skipping already downloaded file '%s'\n"
msgstr ""
-#: cmdline/apt-get.cc:1985
+#: cmdline/apt-get.cc:1992
#, c-format
msgid "You don't have enough free space in %s"
msgstr ""
-#: cmdline/apt-get.cc:1990
+#: cmdline/apt-get.cc:1997
#, c-format
msgid "Need to get %sB/%sB of source archives.\n"
msgstr ""
-#: cmdline/apt-get.cc:1993
+#: cmdline/apt-get.cc:2000
#, c-format
msgid "Need to get %sB of source archives.\n"
msgstr ""
-#: cmdline/apt-get.cc:1999
+#: cmdline/apt-get.cc:2006
#, c-format
msgid "Fetch source %s\n"
msgstr ""
-#: cmdline/apt-get.cc:2030
+#: cmdline/apt-get.cc:2037
msgid "Failed to fetch some archives."
msgstr ""
-#: cmdline/apt-get.cc:2058
+#: cmdline/apt-get.cc:2065
#, c-format
msgid "Skipping unpack of already unpacked source in %s\n"
msgstr ""
-#: cmdline/apt-get.cc:2070
+#: cmdline/apt-get.cc:2077
#, c-format
msgid "Unpack command '%s' failed.\n"
msgstr ""
-#: cmdline/apt-get.cc:2071
+#: cmdline/apt-get.cc:2078
#, c-format
msgid "Check if the 'dpkg-dev' package is installed.\n"
msgstr ""
-#: cmdline/apt-get.cc:2088
+#: cmdline/apt-get.cc:2095
#, c-format
msgid "Build command '%s' failed.\n"
msgstr ""
-#: cmdline/apt-get.cc:2107
+#: cmdline/apt-get.cc:2114
msgid "Child process failed"
msgstr ""
-#: cmdline/apt-get.cc:2123
+#: cmdline/apt-get.cc:2130
msgid "Must specify at least one package to check builddeps for"
msgstr ""
-#: cmdline/apt-get.cc:2151
+#: cmdline/apt-get.cc:2158
#, c-format
msgid "Unable to get build-dependency information for %s"
msgstr ""
-#: cmdline/apt-get.cc:2171
+#: cmdline/apt-get.cc:2178
#, c-format
msgid "%s has no build depends.\n"
msgstr ""
-#: cmdline/apt-get.cc:2223
+#: cmdline/apt-get.cc:2230
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because the package %s cannot be "
"found"
msgstr ""
-#: cmdline/apt-get.cc:2275
+#: cmdline/apt-get.cc:2282
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because no available versions of "
"package %s can satisfy version requirements"
msgstr ""
-#: cmdline/apt-get.cc:2310
+#: cmdline/apt-get.cc:2317
#, c-format
msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
msgstr ""
-#: cmdline/apt-get.cc:2335
+#: cmdline/apt-get.cc:2342
#, c-format
msgid "Failed to satisfy %s dependency for %s: %s"
msgstr ""
-#: cmdline/apt-get.cc:2349
+#: cmdline/apt-get.cc:2356
#, c-format
msgid "Build-dependencies for %s could not be satisfied."
msgstr ""
-#: cmdline/apt-get.cc:2353
+#: cmdline/apt-get.cc:2360
msgid "Failed to process build dependencies"
msgstr ""
-#: cmdline/apt-get.cc:2385
+#: cmdline/apt-get.cc:2392
msgid "Supported modules:"
msgstr ""
-#: cmdline/apt-get.cc:2426
+#: cmdline/apt-get.cc:2433
msgid ""
"Usage: apt-get [options] command\n"
" apt-get [options] install|remove pkg1 [pkg2 ...]\n"
@@ -1490,12 +1490,12 @@ msgstr ""
msgid "File not found"
msgstr ""
-#: methods/copy.cc:42 methods/gpgv.cc:281 methods/gzip.cc:133
-#: methods/gzip.cc:142
+#: methods/copy.cc:42 methods/gpgv.cc:281 methods/gzip.cc:134
+#: methods/gzip.cc:143
msgid "Failed to stat"
msgstr ""
-#: methods/copy.cc:79 methods/gpgv.cc:278 methods/gzip.cc:139
+#: methods/copy.cc:79 methods/gpgv.cc:278 methods/gzip.cc:140
msgid "Failed to set modification time"
msgstr ""
diff --git a/share/debian-archive.gpg b/share/debian-archive.gpg
index ce412117d..da1aa5e97 100644
--- a/share/debian-archive.gpg
+++ b/share/debian-archive.gpg
Binary files differ