Browse Source

merge with my debian-sid branch

David Kalnischkies 14 years ago
parent
commit
89d88ac3ef

+ 5 - 5
apt-pkg/acquire-method.cc

@@ -291,12 +291,12 @@ bool pkgAcqMethod::Configuration(string Message)
       I += Length + 1;
       
       for (; I < MsgEnd && *I == ' '; I++);
-      const char *Equals = I;
-      for (; Equals < MsgEnd && *Equals != '='; Equals++);
-      const char *End = Equals;
-      for (; End < MsgEnd && *End != '\n'; End++);
-      if (End == Equals)
+      const char *Equals = (const char*) memchr(I, '=', MsgEnd - I);
+      if (Equals == NULL)
 	 return false;
+      const char *End = (const char*) memchr(Equals, '\n', MsgEnd - Equals);
+      if (End == NULL)
+	 End = MsgEnd;
       
       Cnf.Set(DeQuoteString(string(I,Equals-I)),
 	      DeQuoteString(string(Equals+1,End-Equals-1)));

+ 9 - 2
apt-pkg/algorithms.cc

@@ -1220,16 +1220,23 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
 */
 bool pkgProblemResolver::InstOrNewPolicyBroken(pkgCache::PkgIterator I)
 {
-   
    // a broken install is always a problem
    if (Cache[I].InstBroken() == true)
+   {
+      if (Debug == true)
+	 std::clog << "  Dependencies are not satisfied for " << I << std::endl;
       return true;
+   }
 
    // a newly broken policy (recommends/suggests) is a problem
    if (Cache[I].NowPolicyBroken() == false &&
        Cache[I].InstPolicyBroken() == true)
+   {
+      if (Debug == true)
+	 std::clog << "  Policy breaks with upgrade of " << I << std::endl;
       return true;
-       
+   }
+
    return false;
 }
 									/*}}}*/

+ 11 - 17
apt-pkg/contrib/cmndline.cc

@@ -90,9 +90,8 @@ bool CommandLine::Parse(int argc,const char **argv)
       Opt++;
 
       // Match up to a = against the list
-      const char *OptEnd = Opt;
       Args *A;
-      for (; *OptEnd != 0 && *OptEnd != '='; OptEnd++);
+      const char *OptEnd = strchrnul(Opt, '=');
       for (A = ArgList; A->end() == false && 
 	   stringcasecmp(Opt,OptEnd,A->LongOpt) != 0; A++);
       
@@ -100,9 +99,8 @@ bool CommandLine::Parse(int argc,const char **argv)
       bool PreceedMatch = false;
       if (A->end() == true)
       {
-	 for (; Opt != OptEnd && *Opt != '-'; Opt++);
-
-	 if (Opt == OptEnd)
+         Opt = (const char*) memchr(Opt, '-', OptEnd - Opt);
+	 if (Opt == NULL)
 	    return _error->Error(_("Command line option %s is not understood"),argv[I]);
 	 Opt++;
 	 
@@ -197,9 +195,8 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[],
       // Arbitrary item specification
       if ((A->Flags & ArbItem) == ArbItem)
       {
-	 const char *J;
-	 for (J = Argument; *J != 0 && *J != '='; J++);
-	 if (*J == 0)
+	 const char *J = strchr(Argument, '=');
+	 if (J == NULL)
 	    return _error->Error(_("Option %s: Configuration item specification must have an =<val>."),argv[I]);
 
 	 // = is trailing
@@ -215,8 +212,7 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[],
 	 return true;
       }
       
-      const char *I = A->ConfName;
-      for (; *I != 0 && *I != ' '; I++);
+      const char *I = strchrnul(A->ConfName, ' ');
       if (*I == ' ')
 	 Conf->Set(string(A->ConfName,0,I-A->ConfName),string(I+1) + Argument);
       else
@@ -272,10 +268,9 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[],
 	 // Skip the leading dash
 	 const char *J = argv[I];
 	 for (; *J != 0 && *J == '-'; J++);
-	 
-	 const char *JEnd = J;
-	 for (; *JEnd != 0 && *JEnd != '-'; JEnd++);
-	 if (*JEnd != 0)
+
+	 const char *JEnd = strchr(J, '-');
+	 if (JEnd != NULL)
 	 {
 	    strncpy(Buffer,J,JEnd - J);
 	    Buffer[JEnd - J] = 0;
@@ -376,9 +371,8 @@ void CommandLine::SaveInConfig(unsigned int const &argc, char const * const * co
 	 {
 	    // That is possibly an option: Quote it if it includes spaces,
 	    // the benefit is that this will eliminate also most false positives
-	    const char* c = &argv[i][j+1];
-	    for (; *c != '\0' && *c != ' '; ++c);
-	    if (*c == '\0') continue;
+	    const char* c = strchr(&argv[i][j+1], ' ');
+	    if (c == NULL) continue;
 	    cmdline[++length] = '"';
 	    closeQuote = true;
 	 }

+ 7 - 8
apt-pkg/contrib/strutl.cc

@@ -179,14 +179,14 @@ bool ParseQuoteWord(const char *&String,string &Res)
    {
       if (*C == '"')
       {
-	 for (C++; *C != 0 && *C != '"'; C++);
-	 if (*C == 0)
+	 C = strchr(C + 1, '"');
+	 if (C == NULL)
 	    return false;
       }
       if (*C == '[')
       {
-	 for (C++; *C != 0 && *C != ']'; C++);
-	 if (*C == 0)
+	 C = strchr(C + 1, ']');
+	 if (C == NULL)
 	    return false;
       }
    }
@@ -904,11 +904,10 @@ bool StrToTime(const string &Val,time_t &Result)
 {
    struct tm Tm;
    char Month[10];
-   const char *I = Val.c_str();
-   
+
    // Skip the day of the week
-   for (;*I != 0  && *I != ' '; I++);
-   
+   const char *I = strchr(Val.c_str(), ' ');
+
    // Handle RFC 1123 time
    Month[0] = 0;
    if (sscanf(I," %d %3s %d %d:%d:%d GMT",&Tm.tm_mday,Month,&Tm.tm_year,

+ 8 - 13
apt-pkg/deb/deblistparser.cc

@@ -522,9 +522,9 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
       // Skip whitespace
       for (;I != Stop && isspace(*I) != 0; I++);
       Start = I;
-      for (;I != Stop && *I != ')'; I++);
-      if (I == Stop || Start == I)
-	 return 0;     
+      I = (const char*) memchr(I, ')', Stop - I);
+      if (I == NULL || Start == I)
+	 return 0;
       
       // Skip trailing whitespace
       const char *End = I;
@@ -797,21 +797,16 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
       }
 
       // seperate the tag from the data
-      for (; buffer[len] != ':' && buffer[len] != '\0'; ++len)
-         /* nothing */
-         ;
-      if (buffer[len] == '\0')
+      const char* dataStart = strchr(buffer + len, ':');
+      if (dataStart == NULL)
 	 continue;
-      char* dataStart = buffer + len;
+      len = dataStart - buffer;
       for (++dataStart; *dataStart == ' '; ++dataStart)
          /* nothing */
          ;
-      char* dataEnd = dataStart;
-      for (++dataEnd; *dataEnd != '\0'; ++dataEnd)
-         /* nothing */
-         ;
+      const char* dataEnd = (const char*)rawmemchr(dataStart, '\0');
       // The last char should be a newline, but we can never be sure: #633350
-      char* lineEnd = dataEnd;
+      const char* lineEnd = dataEnd;
       for (--lineEnd; *lineEnd == '\r' || *lineEnd == '\n'; --lineEnd)
          /* nothing */
          ;

+ 10 - 15
apt-pkg/deb/debversion.cc

@@ -127,14 +127,12 @@ int debVersioningSystem::CmpFragment(const char *A,const char *AEnd,
 int debVersioningSystem::DoCmpVersion(const char *A,const char *AEnd,
 				      const char *B,const char *BEnd)
 {
-   // Strip off the epoch and compare it 
-   const char *lhs = A;
-   const char *rhs = B;
-   for (;lhs != AEnd && *lhs != ':'; lhs++);
-   for (;rhs != BEnd && *rhs != ':'; rhs++);
-   if (lhs == AEnd)
+   // Strip off the epoch and compare it
+   const char *lhs = (const char*) memchr(A, ':', AEnd - A);
+   const char *rhs = (const char*) memchr(B, ':', BEnd - B);
+   if (lhs == NULL)
       lhs = A;
-   if (rhs == BEnd)
+   if (rhs == NULL)
       rhs = B;
    
    // Special case: a zero epoch is the same as no epoch,
@@ -169,15 +167,12 @@ int debVersioningSystem::DoCmpVersion(const char *A,const char *AEnd,
    if (rhs != B)
       rhs++;
    
-   // Find the last - 
-   const char *dlhs = AEnd-1;
-   const char *drhs = BEnd-1;
-   for (;dlhs > lhs && *dlhs != '-'; dlhs--);
-   for (;drhs > rhs && *drhs != '-'; drhs--);
-
-   if (dlhs == lhs)
+   // Find the last -
+   const char *dlhs = (const char*) memrchr(lhs, '-', AEnd - lhs);
+   const char *drhs = (const char*) memrchr(rhs, '-', BEnd - rhs);
+   if (dlhs == NULL)
       dlhs = AEnd;
-   if (drhs == rhs)
+   if (drhs == NULL)
       drhs = BEnd;
    
    // Compare the main version

+ 0 - 1
apt-pkg/deb/dpkgpm.cc

@@ -983,7 +983,6 @@ bool pkgDPkgPM::Go(int OutStatusFd)
       char status_fd_buf[20];
       snprintf(status_fd_buf,sizeof(status_fd_buf),"%i", fd[1]);
       ADDARG(status_fd_buf);
-
       unsigned long const Op = I->Op;
 
       switch (I->Op)

+ 6 - 7
apt-pkg/init.cc

@@ -86,13 +86,12 @@ bool pkgInitConfig(Configuration &Cnf)
    Cnf.CndSet("Dir::Log::Terminal","term.log");
    Cnf.CndSet("Dir::Log::History","history.log");
 
-   if (Cnf.Exists("Dir::Ignore-Files-Silently") == false)
-   {
-      Cnf.Set("Dir::Ignore-Files-Silently::", "~$");
-      Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$");
-      Cnf.Set("Dir::Ignore-Files-Silently::", "\\.bak$");
-      Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
-   }
+   Cnf.Set("Dir::Ignore-Files-Silently::", "~$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.bak$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.save$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.orig$");
 
    // Default cdrom mount point
    Cnf.CndSet("Acquire::cdrom::mount", "/media/cdrom/");

+ 2 - 1
apt-pkg/policy.cc

@@ -66,7 +66,8 @@ pkgPolicy::pkgPolicy(pkgCache *Owner) : Pins(0), PFPriority(0), Cache(Owner)
       {
 	 if ((F->Archive != 0 && vm.ExpressionMatches(DefRel, F.Archive()) == true) ||
 	     (F->Codename != 0 && vm.ExpressionMatches(DefRel, F.Codename()) == true) ||
-	     (F->Version != 0 && vm.ExpressionMatches(DefRel, F.Version()) == true))
+	     (F->Version != 0 && vm.ExpressionMatches(DefRel, F.Version()) == true) ||
+	     (DefRel.length() > 2 && DefRel[1] == '='))
 	    found = true;
       }
       if (found == false)

+ 1 - 1
apt-pkg/sourcelist.cc

@@ -270,7 +270,7 @@ bool pkgSourceList::ReadAppend(string File)
       // CNC:2003-02-20 - Do not break if '#' is inside [].
       for (I = Buffer; *I != 0 && *I != '#'; I++)
          if (*I == '[')
-	    for (I++; *I != 0 && *I != ']'; I++);
+	    I = strchr(I + 1, ']');
       *I = 0;
       
       const char *C = _strstrip(Buffer);

+ 7 - 7
cmdline/apt-get.cc

@@ -662,22 +662,22 @@ public:
 					pkgCache::PkgIterator Pkg = I.OwnerPkg();
 
 					if (Cache[Pkg].CandidateVerIter(Cache) == I.OwnerVer()) {
-						out << "  " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr();
+						c1out << "  " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr();
 						if (Cache[Pkg].Install() == true && Cache[Pkg].NewInstall() == false)
-							out << _(" [Installed]");
-						out << endl;
+							c1out << _(" [Installed]");
+						c1out << endl;
 						++provider;
 					}
 				}
 				// if we found no candidate which provide this package, show non-candidates
 				if (provider == 0)
 					for (I = Pkg.ProvidesList(); I.end() == false; ++I)
-						out << "  " << I.OwnerPkg().FullName(true) << " " << I.OwnerVer().VerStr()
+						c1out << "  " << I.OwnerPkg().FullName(true) << " " << I.OwnerVer().VerStr()
 						    << _(" [Not candidate version]") << endl;
 				else
 					out << _("You should explicitly select one to install.") << endl;
 			} else {
-				ioprintf(out,
+				ioprintf(c1out,
 					_("Package %s is not available, but is referred to by another package.\n"
 					  "This may mean that the package is missing, has been obsoleted, or\n"
 					  "is only available from another source\n"),Pkg.FullName(true).c_str());
@@ -696,9 +696,9 @@ public:
 					List += Dep.ParentPkg().FullName(true) + " ";
 					//VersionsList += string(Dep.ParentPkg().CurVersion) + "\n"; ???
 				}
-				ShowList(out,_("However the following packages replace it:"),List,VersionsList);
+				ShowList(c1out,_("However the following packages replace it:"),List,VersionsList);
 			}
-			out << std::endl;
+			c1out << std::endl;
 		}
 		return false;
 	}

+ 63 - 0
debian/changelog

@@ -191,6 +191,69 @@ apt (0.8.16~exp1) experimental; urgency=low
 
  -- Michael Vogt <mvo@debian.org>  Wed, 29 Jun 2011 12:40:31 +0200
 
+apt (1.8.15.9+nmu1) unstable; urgency=low
+
+  [ David Kalnischkies ]
+  * algorithms.cc:
+    - show a debug why a package was kept by ResolveByKeep()
+
+ -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 17 Oct 2011 16:36:22 +0200
+
+apt (0.8.15.9) unstable; urgency=low
+
+  [ David Kalnischkies ]
+  * Symbol file update
+  * doc/apt-get.8.xml:
+    - change wording of autoremove description as suggested
+      by Robert Simmons, thanks! (Closes: #641490)
+  * apt-pkg/deb/dpkgpm.cc:
+    - use std::vector instead of fixed size arrays to store args and
+      multiarch-packagename strings
+    - load the dpkg base arguments only one time and reuse them later
+  * cmdline/apt-get.cc:
+    - follow Provides in the evaluation of saving candidates, too, for
+      statisfying garbage package dependencies (Closes: #640590)
+  * apt-pkg/algorithms.cc:
+    - if a package is garbage, don't try to save it with FixByInstall
+  * apt-pkg/init.cc:
+    - silently ignore *.orig and *.save files by default
+  * apt-pkg/policy.cc:
+    - accept generic release pin expressions again in -t (Closes: #644166)
+  * apt-pkg/deb/debmetaindex.cc:
+    - none is a separator, not a language: no need for Index (Closes: #624218)
+  * apt-pkg/aptconfiguration.cc:
+    - do not builtin languages only if none is forced (Closes: #643787)
+  * doc/apt.conf.5.xml:
+    - apply spelling fix by Kevin Lyda, thanks! (Closes: #644104)
+
+  [ Christian Perrier ]
+  * Fix spelling error (sensée) in French translation. Thanks
+    to Corentin Le Gall for spotting it.
+
+  [ Colin Watson ]
+  * ftparchive/cachedb.cc:
+    - fix buffersize in bytes2hex
+
+  [ Michael Vogt ]
+  * ftparchive/cachedb.cc:
+    - make buffer fully dynamic (thanks to Colin Watson)
+
+ -- Michael Vogt <mvo@debian.org>  Fri, 14 Oct 2011 12:00:09 +0200
+
+apt (0.8.15.8) unstable; urgency=low
+
+  [ David Kalnischkies ]
+  * cmdline/apt-get.cc:
+    - output list of virtual package providers to c1out in -q=1
+      instead of /dev/null to unbreak sbuild (LP: #816155)
+
+  [ Michael Vogt ]
+  * apt-pkg/contrib/configuration.cc:
+    - fix double delete (LP: #848907)
+    - ignore only the invalid regexp instead of all options
+
+ -- Michael Vogt <mvo@debian.org>  Wed, 14 Sep 2011 12:08:25 +0200
+
 apt (0.8.15.7) unstable; urgency=low
 
   [ David Kalnischkies ]

+ 1 - 1
doc/apt-get.8.xml

@@ -317,7 +317,7 @@
 
      <varlistentry><term>autoremove</term>
      <listitem><para><literal>autoremove</literal> is used to remove packages that were automatically
-     installed to satisfy dependencies for some package and that are no more needed.</para></listitem>
+     installed to satisfy dependencies for other packages and are now no longer needed.</para></listitem>
      </varlistentry>
 
      <varlistentry><term>changelog</term>

+ 1 - 1
doc/apt.conf.5.xml

@@ -294,7 +294,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
 	 <para>Two sub-options to limit the use of PDiffs are also available:
 	 With <literal>FileLimit</literal> can be specified how many PDiff files
 	 are downloaded at most to patch a file. <literal>SizeLimit</literal>
-	 on the other hand is the maximum precentage of the size of all patches
+	 on the other hand is the maximum percentage of the size of all patches
 	 compared to the size of the targeted file. If one of these limits is
 	 exceeded the complete file is downloaded instead of the patches.
 	 </para></listitem>

+ 195 - 12
doc/po/de.po

@@ -1394,9 +1394,15 @@ msgstr "<option>--no-replaces</option>"
 msgid "<option>--no-enhances</option>"
 msgstr "<option>--no-enhances</option>"
 
-# FIXME s/twicked/tricked/
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-cache.8.xml:317
+#, fuzzy
+#| msgid ""
+#| "Per default the <literal>depends</literal> and <literal>rdepends</"
+#| "literal> print all dependencies. This can be twicked with these flags "
+#| "which will omit the specified dependency type.  Configuration Item: "
+#| "<literal>APT::Cache::Show<replaceable>DependencyType</replaceable></"
+#| "literal> e.g. <literal>APT::Cache::ShowRecommends</literal>."
 msgid ""
 "Per default the <literal>depends</literal> and <literal>rdepends</literal> "
 "print all dependencies. This can be twicked with these flags which will omit "
@@ -3133,9 +3139,20 @@ msgid ""
 msgstr ""
 "<option>--md5</option>, <option>--sha1</option>, <option>--sha256</option>"
 
-# FIXME <literal>Checksum</literal> im letzten Abschnitt <replaceable>?
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-ftparchive.1.xml:531
+#, fuzzy
+#| msgid ""
+#| "Generate the given checksum. These options default to on, when turned off "
+#| "the generated index files will not have the checksum fields where "
+#| "possible.  Configuration Items: <literal>APT::FTPArchive::"
+#| "<replaceable>Checksum</replaceable></literal> and <literal>APT::"
+#| "FTPArchive::<replaceable>Index</replaceable>::<replaceable>Checksum</"
+#| "replaceable></literal> where <literal><replaceable>Index</replaceable></"
+#| "literal> can be <literal>Packages</literal>, <literal>Sources</literal> "
+#| "or <literal>Release</literal> and <literal><replaceable>Checksum</"
+#| "replaceable></literal> can be <literal>MD5</literal>, <literal>SHA1</"
+#| "literal> or <literal>SHA256</literal>."
 msgid ""
 "Generate the given checksum. These options default to on, when turned off "
 "the generated index files will not have the checksum fields where possible.  "
@@ -3152,9 +3169,10 @@ msgstr ""
 "Möglichkeit keine Prüfsummenfelder erhalten. Konfigurationselemente: "
 "<literal>APT::FTPArchive::<replaceable>Prüfsumme</replaceable></literal> und "
 "<literal>APT::FTPArchive::<replaceable>Index</replaceable>::"
-"<replaceable>Prüfsumme</replaceable></literal>, wobei <literal>Index</"
-"literal> <literal>Packages</literal>, <literal>Sources</literal> oder "
-"<literal>Release</literal> sein kann und <literal>Checksum</literal> "
+"<replaceable>Prüfsumme</replaceable></literal>, wobei "
+"<literal><replaceable>Index</replaceable></literal> <literal>Packages</"
+"literal>, <literal>Sources</literal> oder <literal>Release</literal> sein "
+"kann und <literal><replaceable>Prüfsumme</replaceable></literal> "
 "<literal>MD5</literal>, <literal>SHA1</literal> oder <literal>SHA256</"
 "literal> sein kann."
 
@@ -3379,6 +3397,35 @@ msgstr "APT-Werkzeug für den Umgang mit Paketen -- Befehlszeilenschnittstelle"
 
 #. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis>
 #: apt-get.8.xml:39
+#, fuzzy
+#| msgid ""
+#| "<command>apt-get</command> <arg><option>-sqdyfmubV</option></arg> <arg> "
+#| "<option>-o= <replaceable>config_string</replaceable> </option> </arg> "
+#| "<arg> <option>-c= <replaceable>config_file</replaceable> </option> </arg> "
+#| "<arg> <option>-t=</option> <arg choice='plain'> "
+#| "<replaceable>target_release</replaceable> </arg> </arg> <group choice="
+#| "\"req\"> <arg choice='plain'>update</arg> <arg choice='plain'>upgrade</"
+#| "arg> <arg choice='plain'>dselect-upgrade</arg> <arg choice='plain'>dist-"
+#| "upgrade</arg> <arg choice='plain'>install <arg choice=\"plain\" rep="
+#| "\"repeat\"><replaceable>pkg</replaceable> <arg> <group choice='req'> <arg "
+#| "choice='plain'> =<replaceable>pkg_version_number</replaceable> </arg> "
+#| "<arg choice='plain'> /<replaceable>target_release</replaceable> </arg> </"
+#| "group> </arg> </arg> </arg> <arg choice='plain'>remove <arg choice=\"plain"
+#| "\" rep=\"repeat\"><replaceable>pkg</replaceable></arg></arg> <arg "
+#| "choice='plain'>purge <arg choice=\"plain\" rep=\"repeat"
+#| "\"><replaceable>pkg</replaceable></arg></arg> <arg choice='plain'>source "
+#| "<arg choice=\"plain\" rep=\"repeat\"><replaceable>pkg</replaceable> <arg> "
+#| "<group choice='req'> <arg choice='plain'> "
+#| "=<replaceable>pkg_version_number</replaceable> </arg> <arg "
+#| "choice='plain'> /<replaceable>target_release</replaceable> </arg> </"
+#| "group> </arg> </arg> </arg> <arg choice='plain'>build-dep <arg choice="
+#| "\"plain\" rep=\"repeat\"><replaceable>pkg</replaceable></arg></arg> <arg "
+#| "choice='plain'>check</arg> <arg choice='plain'>clean</arg> <arg "
+#| "choice='plain'>autoclean</arg> <arg choice='plain'>autoremove</arg> <arg "
+#| "choice='plain'> <group choice='req'> <arg choice='plain'>-v</arg> <arg "
+#| "choice='plain'>--version</arg> </group> </arg> <arg choice='plain'> "
+#| "<group choice='req'> <arg choice='plain'>-h</arg> <arg choice='plain'>--"
+#| "help</arg> </group> </arg> </group>"
 msgid ""
 "<command>apt-get</command> <arg><option>-sqdyfmubV</option></arg> <arg> "
 "<option>-o= <replaceable>config_string</replaceable> </option> </arg> <arg> "
@@ -3749,6 +3796,12 @@ msgstr ""
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-get.8.xml:255
+#, fuzzy
+#| msgid ""
+#| "If the <option>--compile</option> option is specified then the package "
+#| "will be compiled to a binary .deb using <command>dpkg-buildpackage</"
+#| "command>, if <option>--download-only</option> is specified then the "
+#| "source package will not be unpacked."
 msgid ""
 "If the <option>--compile</option> option is specified then the package will "
 "be compiled to a binary .deb using <command>dpkg-buildpackage</command>, if "
@@ -3794,6 +3847,10 @@ msgstr "build-dep"
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-get.8.xml:272
+#, fuzzy
+#| msgid ""
+#| "<literal>build-dep</literal> causes apt-get to install/remove packages in "
+#| "an attempt to satisfy the build dependencies for a source package."
 msgid ""
 "<literal>build-dep</literal> causes apt-get to install/remove packages in an "
 "attempt to satisfy the build dependencies for a source package."
@@ -3821,9 +3878,12 @@ msgstr ""
 msgid "download"
 msgstr "download"
 
-# FIXME s/directoy/directory/
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-get.8.xml:282
+#, fuzzy
+#| msgid ""
+#| "<literal>download</literal> will download the given binary package into "
+#| "the current directory."
 msgid ""
 "<literal>download</literal> will download the given binary package into the "
 "current directoy."
@@ -3882,6 +3942,11 @@ msgstr "autoremove"
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-get.8.xml:308
+#, fuzzy
+#| msgid ""
+#| "<literal>autoremove</literal> is used to remove packages that were "
+#| "automatically installed to satisfy dependencies for some package and that "
+#| "are no more needed."
 msgid ""
 "<literal>autoremove</literal> is used to remove packages that were "
 "automatically installed to satisfy dependencies for some package and that "
@@ -5514,9 +5579,17 @@ msgstr ""
 "die Datei, die durch die Umgebungsvariable <envar>APT_CONFIG</envar> "
 "angegeben wird (falls gesetzt)"
 
-# FIXME s/no or/no/
 #. type: Content of: <refentry><refsect1><orderedlist><listitem><para>
 #: apt.conf.5.xml:52
+#, fuzzy
+#| msgid ""
+#| "all files in <literal>Dir::Etc::Parts</literal> in alphanumeric ascending "
+#| "order which have no or \"<literal>conf</literal>\" as filename extension "
+#| "and which only contain alphanumeric, hyphen (-), underscore (_) and "
+#| "period (.) characters.  Otherwise APT will print a notice that it has "
+#| "ignored a file if the file doesn't match a pattern in the <literal>Dir::"
+#| "Ignore-Files-Silently</literal> configuration list - in this case it will "
+#| "be silently ignored."
 msgid ""
 "all files in <literal>Dir::Etc::Parts</literal> in alphanumeric ascending "
 "order which have no or \"<literal>conf</literal>\" as filename extension and "
@@ -6073,6 +6146,17 @@ msgstr "Max-ValidTime"
 
 #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para>
 #: apt.conf.5.xml:261
+#, fuzzy
+#| msgid ""
+#| "Seconds the Release file should be considered valid after it was created. "
+#| "The default is \"for ever\" (0) if the Release file of the archive "
+#| "doesn't include a <literal>Valid-Until</literal> header.  If it does then "
+#| "this date is the default. The date from the Release file or the date "
+#| "specified by the creation time of the Release file (<literal>Date</"
+#| "literal> header) plus the seconds specified with this options are used to "
+#| "check if the validation of a file has expired by using the earlier date "
+#| "of the two. Archive specific settings can be made by appending the label "
+#| "of the archive to the option name."
 msgid ""
 "Seconds the Release file should be considered valid after it was created. "
 "The default is \"for ever\" (0) if the Release file of the archive doesn't "
@@ -6112,6 +6196,14 @@ msgstr ""
 
 #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para>
 #: apt.conf.5.xml:277
+#, fuzzy
+#| msgid ""
+#| "Two sub-options to limit the use of PDiffs are also available: With "
+#| "<literal>FileLimit</literal> can be specified how many PDiff files are "
+#| "downloaded at most to patch a file. <literal>SizeLimit</literal> on the "
+#| "other hand is the maximum percentage of the size of all patches compared "
+#| "to the size of the targeted file. If one of these limits is exceeded the "
+#| "complete file is downloaded instead of the patches."
 msgid ""
 "Two sub-options to limit the use of PDiffs are also available: With "
 "<literal>FileLimit</literal> can be specified how many PDiff files are "
@@ -6561,9 +6653,20 @@ msgstr ""
 msgid "Dir::Bin::bzip2 \"/bin/bzip2\";"
 msgstr "Dir::Bin::bzip2 \"/bin/bzip2\";"
 
-# FIXME s/> Note/>. Note/
 #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para>
 #: apt.conf.5.xml:442
+#, fuzzy
+#| msgid ""
+#| "Note that at run time the <literal>Dir::Bin::<replaceable>Methodname</"
+#| "replaceable></literal> will be checked: If this setting exists the method "
+#| "will only be used if this file exists, e.g. for the bzip2 method (the "
+#| "inbuilt) setting is <placeholder type=\"literallayout\" id=\"0\"/> Note "
+#| "also that list entries specified on the command line will be added at the "
+#| "end of the list specified in the configuration files, but before the "
+#| "default entries. To prefer a type in this case over the ones specified in "
+#| "the configuration files you can set the option direct - not in list "
+#| "style.  This will not override the defined list, it will only prefix the "
+#| "list with this type."
 msgid ""
 "Note that at run time the <literal>Dir::Bin::<replaceable>Methodname</"
 "replaceable></literal> will be checked: If this setting exists the method "
@@ -6588,9 +6691,14 @@ msgstr ""
 "nicht im Listenstil. Dies wird die definierte Liste nicht überschreiben, es "
 "wird diesen Typ nur vor die Liste setzen."
 
-# FIXME: s/doesn't provide/don't provide/
 #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para>
 #: apt.conf.5.xml:449
+#, fuzzy
+#| msgid ""
+#| "The special type <literal>uncompressed</literal> can be used to give "
+#| "uncompressed files a preference, but note that most archives don't "
+#| "provide uncompressed files so this is mostly only useable for local "
+#| "mirrors."
 msgid ""
 "The special type <literal>uncompressed</literal> can be used to give "
 "uncompressed files a preference, but note that most archives doesn't provide "
@@ -7878,6 +7986,16 @@ msgstr ""
 
 #. type: Content of: <refentry><refsect1><para>
 #: apt_preferences.5.xml:70
+#, fuzzy
+#| msgid ""
+#| "Note that the files in the <filename>/etc/apt/preferences.d</filename> "
+#| "directory are parsed in alphanumeric ascending order and need to obey the "
+#| "following naming convention: The files have no or \"<literal>pref</"
+#| "literal>\" as filename extension and which only contain alphanumeric, "
+#| "hyphen (-), underscore (_) and period (.) characters.  Otherwise APT will "
+#| "print a notice that it has ignored a file if the file doesn't match a "
+#| "pattern in the <literal>Dir::Ignore-Files-Silently</literal> "
+#| "configuration list - in this case it will be silently ignored."
 msgid ""
 "Note that the files in the <filename>/etc/apt/preferences.d</filename> "
 "directory are parsed in alphanumeric ascending order and need to obey the "
@@ -8351,9 +8469,15 @@ msgstr ""
 msgid "Regular expressions and glob() syntax"
 msgstr "Reguläre Ausdrücke und glob()-Syntax"
 
-# FIXME: s/expression or/expression) or/
 #. type: Content of: <refentry><refsect1><refsect2><para>
 #: apt_preferences.5.xml:264
+#, fuzzy
+#| msgid ""
+#| "APT also supports pinning by glob() expressions and regular expressions "
+#| "surrounded by /. For example, the following example assigns the priority "
+#| "500 to all packages from experimental where the name starts with gnome "
+#| "(as a glob()-like expression) or contains the word kde (as a POSIX "
+#| "extended regular expression surrounded by slashes)."
 msgid ""
 "APT also supports pinning by glob() expressions and regular expressions "
 "surrounded by /. For example, the following example assigns the priority 500 "
@@ -8380,9 +8504,13 @@ msgstr ""
 "Pin: release n=experimental\n"
 "Pin-Priority: 500\n"
 
-# FIXME: s/Those/Thus/
 #. type: Content of: <refentry><refsect1><refsect2><para>
 #: apt_preferences.5.xml:279
+#, fuzzy
+#| msgid ""
+#| "The rule for those expressions is that they can occur anywhere where a "
+#| "string can occur. Thus, the following pin assigns the priority 990 to all "
+#| "packages from a release starting with karmic."
 msgid ""
 "The rule for those expressions is that they can occur anywhere where a "
 "string can occur. Those, the following pin assigns the priority 990 to all "
@@ -9299,7 +9427,8 @@ msgstr ""
 
 #. type: Content of: <refentry><refsect1><literallayout>
 #: sources.list.5.xml:81
-#, no-wrap
+#, fuzzy, no-wrap
+#| msgid "deb uri distribution [component1] [component2] [...]"
 msgid "deb uri distribution [component1] [component2] [...]"
 msgstr "deb URI Distribution [Komponente1] [Komponente2] [...]"
 
@@ -11221,6 +11350,60 @@ msgstr "  # apt-get -o dir::cache::archives=\"/Platte/\" dist-upgrade"
 msgid "Which will use the already fetched archives on the disc."
 msgstr "Es wird die bereits auf die Platte heruntergeladenen Archive benutzen."
 
+#, fuzzy
+#~| msgid "<option>--recurse</option>"
+#~ msgid "<option>--host-architecture</option>"
+#~ msgstr "<option>--recurse</option>"
+
+#, fuzzy
+#~| msgid "Max-ValidTime"
+#~ msgid "Min-ValidTime"
+#~ msgstr "Max-ValidTime"
+
+#, fuzzy
+#~| msgid ""
+#~| "Seconds the Release file should be considered valid after it was "
+#~| "created. The default is \"for ever\" (0) if the Release file of the "
+#~| "archive doesn't include a <literal>Valid-Until</literal> header.  If it "
+#~| "does then this date is the default. The date from the Release file or "
+#~| "the date specified by the creation time of the Release file "
+#~| "(<literal>Date</literal> header) plus the seconds specified with this "
+#~| "options are used to check if the validation of a file has expired by "
+#~| "using the earlier date of the two. Archive specific settings can be made "
+#~| "by appending the label of the archive to the option name."
+#~ msgid ""
+#~ "Minimum of seconds the Release file should be considered valid after it "
+#~ "was created (indicated by the <literal>Date</literal> header).  Use this "
+#~ "if you need to use a seldomly updated (local) mirror of a more regular "
+#~ "updated archive with a <literal>Valid-Until</literal> header instead of "
+#~ "competely disabling the expiration date checking.  Archive specific "
+#~ "settings can and should be used by appending the label of the archive to "
+#~ "the option name."
+#~ msgstr ""
+#~ "Sekunden, die die Release-Datei als gültig betrachtet werden sollte, "
+#~ "nachdem sie erzeugt wurde. Vorgabe ist »für immer« (0), falls die Release-"
+#~ "Datei des Archivs keine <literal>Valid-Until</literal>-Kopfzeile enthält. "
+#~ "Falls dies so ist, ist dieses Datum vorgegeben. Das Datum aus der Release-"
+#~ "Datei oder das Datum, das durch die Erstellungszeit der Release-Datei "
+#~ "angegeben wurde (<literal>Date</literal>-Kopfzeile) plus die mit diesen "
+#~ "Optionen angegebenen Sekunden werden benutzt, um zu prüfen, ob die "
+#~ "Bestätigung einer Datei abgelaufen ist indem das neuere Datum der beiden "
+#~ "benutzt wird. Archivspezifische Einstellungen können durch Anhängen des "
+#~ "Archivetiketts an die Option »name« vorgenommen werden."
+
+#, fuzzy
+#~| msgid ""
+#~| "deb http://ftp.debian.org/debian &stable-codename; main contrib non-free\n"
+#~| "deb http://security.debian.org/ &stable-codename;/updates main contrib non-free\n"
+#~| "   "
+#~ msgid ""
+#~ "deb http://ftp.debian.org/debian &stable-codename; main\n"
+#~ "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &stable-codename; main"
+#~ msgstr ""
+#~ "deb http://ftp.debian.org/debian &stable-codename; main contrib non-free\n"
+#~ "deb http://security.debian.org/ &stable-codename;/updates main contrib non-free\n"
+#~ "   "
+
 #~ msgid "<option>--md5</option>"
 #~ msgstr "<option>--md5</option>"
 

+ 8 - 0
doc/po/es.po

@@ -6158,6 +6158,14 @@ msgstr ""
 
 #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para>
 #: apt.conf.5.xml:277
+#, fuzzy
+#| msgid ""
+#| "Two sub-options to limit the use of PDiffs are also available: With "
+#| "<literal>FileLimit</literal> can be specified how many PDiff files are "
+#| "downloaded at most to patch a file. <literal>SizeLimit</literal> on the "
+#| "other hand is the maximum percentage of the size of all patches compared "
+#| "to the size of the targeted file. If one of these limits is exceeded the "
+#| "complete file is downloaded instead of the patches."
 msgid ""
 "Two sub-options to limit the use of PDiffs are also available: With "
 "<literal>FileLimit</literal> can be specified how many PDiff files are "

+ 8 - 0
doc/po/fr.po

@@ -6091,6 +6091,14 @@ msgstr ""
 
 #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para>
 #: apt.conf.5.xml:277
+#, fuzzy
+#| msgid ""
+#| "Two sub-options to limit the use of PDiffs are also available: With "
+#| "<literal>FileLimit</literal> can be specified how many PDiff files are "
+#| "downloaded at most to patch a file. <literal>SizeLimit</literal> on the "
+#| "other hand is the maximum percentage of the size of all patches compared "
+#| "to the size of the targeted file. If one of these limits is exceeded the "
+#| "complete file is downloaded instead of the patches."
 msgid ""
 "Two sub-options to limit the use of PDiffs are also available: With "
 "<literal>FileLimit</literal> can be specified how many PDiff files are "

+ 8 - 0
doc/po/ja.po

@@ -6270,6 +6270,14 @@ msgstr ""
 
 #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para>
 #: apt.conf.5.xml:277
+#, fuzzy
+#| msgid ""
+#| "Two sub-options to limit the use of PDiffs are also available: With "
+#| "<literal>FileLimit</literal> can be specified how many PDiff files are "
+#| "downloaded at most to patch a file. <literal>SizeLimit</literal> on the "
+#| "other hand is the maximum percentage of the size of all patches compared "
+#| "to the size of the targeted file. If one of these limits is exceeded the "
+#| "complete file is downloaded instead of the patches."
 msgid ""
 "Two sub-options to limit the use of PDiffs are also available: With "
 "<literal>FileLimit</literal> can be specified how many PDiff files are "

+ 8 - 0
doc/po/pt.po

@@ -6077,6 +6077,14 @@ msgstr ""
 
 #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para>
 #: apt.conf.5.xml:277
+#, fuzzy
+#| msgid ""
+#| "Two sub-options to limit the use of PDiffs are also available: With "
+#| "<literal>FileLimit</literal> can be specified how many PDiff files are "
+#| "downloaded at most to patch a file. <literal>SizeLimit</literal> on the "
+#| "other hand is the maximum percentage of the size of all patches compared "
+#| "to the size of the targeted file. If one of these limits is exceeded the "
+#| "complete file is downloaded instead of the patches."
 msgid ""
 "Two sub-options to limit the use of PDiffs are also available: With "
 "<literal>FileLimit</literal> can be specified how many PDiff files are "

File diff suppressed because it is too large
+ 712 - 703
po/apt-all.pot


+ 1 - 1
po/fr.po

@@ -1080,7 +1080,7 @@ msgstr "La commande de mise à jour ne prend pas d'argument"
 #: cmdline/apt-get.cc:1653
 msgid "We are not supposed to delete stuff, can't start AutoRemover"
 msgstr ""
-"Aucune suppression n'est sensée se produire : impossible de lancer "
+"Aucune suppression n'est censée se produire : impossible de lancer "
 "« Autoremover »"
 
 #: cmdline/apt-get.cc:1748

+ 21 - 2
test/integration/test-bug-407511-fail-invalid-default-release

@@ -23,18 +23,31 @@ getreleaseversionfromsuite() {
 	fi
 }
 
+getlabelfromsuite() {
+	if [ "$SUITE" = 'unstable' ]; then
+		echo -n 'UnstableTestcases'
+	else
+		echo -n 'Testcases'
+	fi
+}
+
 setupaptarchive
 
 passdist() {
-	msgtest "Test that target-release is accepted" $1
+	msgtest 'Test that target-release is accepted' $1
 	aptget dist-upgrade -t $1 -qq && msgpass || msgfail
+	msgtest 'Test that target-release pins with' $1
+	aptcache policy -t $1 | grep -q ' 990' && msgpass || msgfail
 }
 
 faildist() {
-	msgtest "Test that target-release is refused" $1
+	msgtest 'Test that target-release is refused' $1
 	aptget dist-upgrade -t $1 -qq 2> /dev/null && msgfail || msgpass
 }
 
+msgtest 'Test that no default-release is active in this test' 'setup'
+aptcache policy | grep -q ' 990' && msgfall || msgpass
+
 passdist unstable
 passdist sid
 faildist sidd
@@ -45,3 +58,9 @@ passdist 42*
 passdist 4*.0
 faildist 21.0
 faildist 21*
+# we accept, but don't validate the following
+passdist a=unstable
+passdist n=sid
+passdist v=42.0
+passdist c=main
+passdist l=UnstableTestcases

+ 50 - 8
test/integration/test-policy-pinning

@@ -25,28 +25,70 @@ testequalpolicy() {
 Pinned packages:" aptcache policy $*
 }
 
-aptget update -qq
+aptgetupdate() {
+	# just to be sure that no old files are used
+	rm -rf rootdir/var/lib/apt
+	if aptget update -qq 2>&1 | grep '^E: '; then
+		msgwarn 'apt-get update failed with an error'
+	fi
+}
+
+### not signed archive
+
+aptgetupdate
 testequalpolicy 100 500
 testequalpolicy 990 500 -t now
 
 sed -i aptarchive/Release -e 1i"NotAutomatic: yes"
-aptget update -qq
+aptgetupdate
 
 testequalpolicy 100 1 -o Test=NotAutomatic
 testequalpolicy 990 1 -o Test=NotAutomatic -t now
 
 sed -i aptarchive/Release -e 1i"ButAutomaticUpgrades: yes"
-aptget update -qq
+aptgetupdate
 
 testequalpolicy 100 100 -o Test=ButAutomaticUpgrades
 testequalpolicy 990 100 -o Test=ButAutomaticUpgrades -t now
 
 sed -i aptarchive/Release -e 's#NotAutomatic: yes#NotAutomatic: no#' -e '/ButAutomaticUpgrades: / d'
-aptget update -qq
+aptgetupdate
 
 testequalpolicy 100 500 -o Test=Automatic
 testequalpolicy 990 500 -o Test=Automatic -t now
 
+sed -i aptarchive/Release -e '/NotAutomatic: / d' -e '/ButAutomaticUpgrades: / d'
+
+### signed but no key in trusted
+
+signreleasefiles 'Marvin Paranoid'
+aptgetupdate
+testequalpolicy 100 500
+testequalpolicy 990 500 -t now
+
+sed -i aptarchive/Release -e 1i"NotAutomatic: yes"
+signreleasefiles 'Marvin Paranoid'
+aptgetupdate
+
+testequalpolicy 100 1 -o Test=NotAutomatic
+testequalpolicy 990 1 -o Test=NotAutomatic -t now
+
+sed -i aptarchive/Release -e 1i"ButAutomaticUpgrades: yes"
+signreleasefiles 'Marvin Paranoid'
+aptgetupdate
+
+testequalpolicy 100 100 -o Test=ButAutomaticUpgrades
+testequalpolicy 990 100 -o Test=ButAutomaticUpgrades -t now
+
+sed -i aptarchive/Release -e 's#NotAutomatic: yes#NotAutomatic: no#' -e '/ButAutomaticUpgrades: / d'
+signreleasefiles 'Marvin Paranoid'
+aptgetupdate
+
+testequalpolicy 100 500 -o Test=Automatic
+testequalpolicy 990 500 -o Test=Automatic -t now
+
+### signed and valid key
+
 buildsimplenativepackage "coolstuff" "all" "1.0" "stable"
 buildsimplenativepackage "coolstuff" "all" "2.0~bpo1" "backports"
 
@@ -132,7 +174,7 @@ Pin-Priority: -1" > rootdir/etc/apt/preferences
 rm rootdir/etc/apt/preferences
 sed -i aptarchive/dists/backports/Release -e 1i"NotAutomatic: yes"
 signreleasefiles
-aptget update -qq
+aptgetupdate
 
 testequalpolicycoolstuff "" "1.0" 1 500 0 "" -o Test=NotAutomatic
 testequalpolicycoolstuff "" "1.0" 1 990 0 "" -o Test=NotAutomatic -t stable
@@ -160,7 +202,7 @@ testequalpolicycoolstuff "" "1.0" 1 990 600 "2.0~bpo1" -o Test=NotAutomatic -t s
 rm rootdir/etc/apt/preferences
 sed -i aptarchive/dists/backports/Release -e 1i"ButAutomaticUpgrades: yes"
 signreleasefiles
-aptget update -qq
+aptgetupdate
 
 testequalpolicycoolstuff "" "1.0" 100 500 0 "" -o Test=ButAutomaticUpgrades
 testequalpolicycoolstuff "" "1.0" 100 990 0 "" -o Test=ButAutomaticUpgrades -t stable
@@ -206,7 +248,7 @@ setupaptarchive
 
 sed -i aptarchive/dists/backports/Release -e 1i"NotAutomatic: yes"
 signreleasefiles
-aptget update -qq
+aptgetupdate
 
 testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 1 500 0 "" "2.0~bpo2" -o Test=NotAutomatic
 testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 1 990 0 "" "2.0~bpo2" -o Test=NotAutomatic -t stable
@@ -214,7 +256,7 @@ testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 990 500 0 "" "2.0~bpo2" -o Test=N
 
 sed -i aptarchive/dists/backports/Release -e 1i"ButAutomaticUpgrades: yes"
 signreleasefiles
-aptget update -qq
+aptgetupdate
 
 testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 100 500 0 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades
 testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 100 990 0 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades -t stable