// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: policy.cc,v 1.9 2002/11/06 06:43:14 jgg Exp $
+// $Id: policy.cc,v 1.10 2003/08/12 00:17:37 mdz Exp $
/* ######################################################################
Package Version Policy implementation
}
for (; Word != End && isspace(*Word) != 0; Word++);
- Plcy.CreatePin(Type,Name,string(Word,End),
- Tags.FindI("Pin-Priority"));
+ short int priority = Tags.FindI("Pin-Priority", 0);
+ if (priority == 0)
+ {
+ _error->Warning(_("No priority (or zero) specified for pin"));
+ continue;
+ }
+
+ Plcy.CreatePin(Type,Name,string(Word,End),priority);
}
Plcy.InitDefaults();
+apt (0.5.10) unstable; urgency=low
+
+ * Correct the section in apt_preferences(5) on interpreting priorities
+ to show that zero is not a valid priority, and print a warning if such
+ a pin is encountered in the preferences file (Closes: #204971)
+
+ --
+
apt (0.5.9) unstable; urgency=low
* Oh well, apt isn't going to make it into testing anytime soon due to
the &sources-list; file contains references to more than one source.
In this case <command>apt-get</command> downloads the instance listed
earliest in the &sources-list; file.
-The APT preferences file does not affect the choice of instance.
+The APT preferences file does not affect the choice of instance, only
+the choice of version.
</para>
<RefSect2><Title>APT's Default Priority Assignments</>
unless there is a version available belonging to some other
distribution or the installed version is more recent</simpara></listitem>
<varlistentry>
-<term>0 <= P <=100</term>
+<term>0 < P <=100</term>
<listitem><simpara>causes a version to be installed
only if there is no installed version of the package</simpara></listitem>
</varlistentry>
msgid "Did not understand pin type %s"
msgstr ""
+#: apt-pkg/policy.cc:299
+msgid "No priority (or zero) specified for pin"
+msgstr ""
+
#: apt-pkg/pkgcachegen.cc:74
msgid "Cache has an incompatible versioning system"
msgstr ""