summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/acquire-item.cc9
-rw-r--r--apt-pkg/acquire.cc19
-rw-r--r--apt-pkg/acquire.h2
-rw-r--r--apt-pkg/init.h2
-rw-r--r--apt-pkg/makefile2
-rw-r--r--apt-pkg/policy.cc9
-rw-r--r--debian/changelog25
-rw-r--r--doc/apt_preferences.5.xml7
-rw-r--r--methods/makefile2
-rw-r--r--po/gl.po2
10 files changed, 61 insertions, 18 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 8ec4ba2c0..f566b16b8 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -183,6 +183,7 @@ string pkgAcqIndex::Custom600Headers()
void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
{
+
// no .bz2 found, retry with .gz
if(Desc.URI.substr(Desc.URI.size()-3) == "bz2") {
Desc.URI = Desc.URI.substr(0,Desc.URI.size()-3) + "gz";
@@ -194,9 +195,15 @@ void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
Complete = false;
Dequeue();
return;
+ }
+
+ // on decompression failure, remove bad versions in partial/
+ if(Decompression && Erase) {
+ string s = _config->FindDir("Dir::State::lists") + "partial/";
+ s += URItoFileName(RealURI);
+ unlink(s.c_str());
}
-
Item::Failed(Message,Cnf);
}
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index fff1b2b6a..e1dccf25a 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -193,9 +193,9 @@ void pkgAcquire::Enqueue(ItemDesc &Item)
Item.Owner->Status = Item::StatIdle;
// Queue it into the named queue
- I->Enqueue(Item);
- ToFetch++;
-
+ if(I->Enqueue(Item))
+ ToFetch++;
+
// Some trace stuff
if (Debug == true)
{
@@ -549,11 +549,17 @@ pkgAcquire::Queue::~Queue()
// Queue::Enqueue - Queue an item to the queue /*{{{*/
// ---------------------------------------------------------------------
/* */
-void pkgAcquire::Queue::Enqueue(ItemDesc &Item)
+bool pkgAcquire::Queue::Enqueue(ItemDesc &Item)
{
QItem **I = &Items;
- for (; *I != 0; I = &(*I)->Next);
-
+ // move to the end of the queue and check for duplicates here
+ for (; *I != 0; I = &(*I)->Next)
+ if (Item.URI == (*I)->URI)
+ {
+ Item.Owner->Status = Item::StatDone;
+ return false;
+ }
+
// Create a new item
QItem *Itm = new QItem;
*Itm = Item;
@@ -563,6 +569,7 @@ void pkgAcquire::Queue::Enqueue(ItemDesc &Item)
Item.Owner->QueueCounter++;
if (Items->Next == 0)
Cycle();
+ return true;
}
/*}}}*/
// Queue::Dequeue - Remove an item from the queue /*{{{*/
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h
index 27bb3d363..1d5daf12e 100644
--- a/apt-pkg/acquire.h
+++ b/apt-pkg/acquire.h
@@ -173,7 +173,7 @@ class pkgAcquire::Queue
public:
// Put an item into this queue
- void Enqueue(ItemDesc &Item);
+ bool Enqueue(ItemDesc &Item);
bool Dequeue(Item *Owner);
// Find a Queued item
diff --git a/apt-pkg/init.h b/apt-pkg/init.h
index 8255b406a..b584b2cce 100644
--- a/apt-pkg/init.h
+++ b/apt-pkg/init.h
@@ -18,7 +18,7 @@
// See the makefile
#define APT_PKG_MAJOR 3
-#define APT_PKG_MINOR 11
+#define APT_PKG_MINOR 12
#define APT_PKG_RELEASE 0
extern const char *pkgVersion;
diff --git a/apt-pkg/makefile b/apt-pkg/makefile
index 7e5feae53..c493d3dd9 100644
--- a/apt-pkg/makefile
+++ b/apt-pkg/makefile
@@ -13,7 +13,7 @@ include ../buildlib/defaults.mak
# methods/makefile - FIXME
LIBRARY=apt-pkg
LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER)
-MAJOR=3.11
+MAJOR=3.12
MINOR=0
SLIBS=$(PTHREADLIB) $(INTLLIBS)
APT_DOMAIN:=libapt-pkg$(MAJOR)
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index d8b8825c2..35a50425b 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -36,6 +36,7 @@
#include <apti18n.h>
#include <iostream>
+#include <sstream>
/*}}}*/
using namespace std;
@@ -300,7 +301,13 @@ bool ReadPinFile(pkgPolicy &Plcy,string File)
continue;
}
- Plcy.CreatePin(Type,Name,string(Word,End),priority);
+ istringstream s(Name);
+ string pkg;
+ while(!s.eof())
+ {
+ s >> pkg;
+ Plcy.CreatePin(Type, pkg, string(Word,End),priority);
+ };
}
Plcy.InitDefaults();
diff --git a/debian/changelog b/debian/changelog
index a2daa2d3a..1fd4922b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-apt (0.6.46.5) UNRELEASED; urgency=low
+apt (0.6.47) UNRELEASED; urgency=low
* apt-pkg/algorithm.cc:
- use clog for all debugging
@@ -14,7 +14,28 @@ apt (0.6.46.5) UNRELEASED; urgency=low
- only unmount if APT::CDROM::NoMount is false
* methods/cdrom.cc:
- only umount if it was mounted by the method before
-
+ * po/gl.po:
+ - fix error translation that causes trouble to lsb_release
+ * apt-pkg/acquire-item.cc:
+ - if decompression of a index fails, delete the index
+ * [ABI] apt-pkg/acquire.{cc,h}:
+ - deal better with duplicated sources.list entries (avoid
+ double queuing of URLs) - this fixes hangs in bzip/gzip
+ * apt-pkg/policy.cc:
+ - allow multiple packages (thanks to David Foerster)
+ * merged from Christian Perrier:
+ * mr.po: New Marathi translation Closes: #416806
+ * zh_CN.po: Updated by Eric Pareja Closes: #416822
+ * tl.po: Updated by Eric Pareja Closes: #416638
+ * gl.po: Updated by Jacobo Tarrio
+ Closes: #412828
+ * da.po: Updated by Claus Hindsgaul
+ Closes: #409483
+ * fr.po: Remove a non-breakable space for usability
+ issues. Closes: #408877
+ * ru.po: Updated Russian translation. Closes: #405476
+ * *.po: Unfuzzy after upstream typo corrections
+
-- Michael Vogt <michael.vogt@ubuntu.com> Mon, 18 Dec 2006 19:39:05 +0100
apt (0.6.46.4) unstable; urgency=high
diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml
index 3e50bef8c..175339f5a 100644
--- a/doc/apt_preferences.5.xml
+++ b/doc/apt_preferences.5.xml
@@ -143,10 +143,11 @@ separated by blank lines. Records can have one of two forms, a specific form
and a general form.
<itemizedlist>
<listitem>
-<simpara>The specific form assigns a priority (a "Pin-Priority") to a
-specified package and specified version or version range. For example,
+<simpara>The specific form assigns a priority (a "Pin-Priority") to one or more
+specified packages and specified version or version range. For example,
the following record assigns a high priority to all versions of
-the <filename>perl</filename> package whose version number begins with "<literal>5.8</literal>".</simpara>
+the <filename>perl</filename> package whose version number begins with "<literal>5.8</literal>".
+Multiple packages can be separated by spaces.</simpara>
<programlisting>
Package: perl
diff --git a/methods/makefile b/methods/makefile
index 1e3b1ef85..3f561a2c3 100644
--- a/methods/makefile
+++ b/methods/makefile
@@ -7,7 +7,7 @@ include ../buildlib/defaults.mak
BIN := $(BIN)/methods
# FIXME..
-LIB_APT_PKG_MAJOR = 3.11
+LIB_APT_PKG_MAJOR = 3.12
APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR)
# The file method
diff --git a/po/gl.po b/po/gl.po
index 40f269baa..bff17bd98 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -108,7 +108,7 @@ msgstr ""
#: cmdline/apt-cache.cc:1470
#, c-format
msgid "%4i %s\n"
-msgstr "[%4i] %s\n"
+msgstr "%4i %s\n"
#. Show any packages have explicit pins
#: cmdline/apt-cache.cc:1482