Просмотр исходного кода

* merged with the current debian version

Patches applied:

 * bubulle@debian.org--2005/apt--main--0--patch-132
   Completed Simplified Chinese translation

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-94
   * pkgDirStream has (slightly) better extract support now

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-95
   * merge fix for #339533

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-96
   * merged with bubulle

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-97
   * some more debug output

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-98
   * ABI change: merged more flexible pkgAcquireFile code

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-99
   * merged http download limit for apt (#146877)

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-100
   * applied parts of the string speedup patch from debian #319377 (ABI change)

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-101
   * fix for #340448
Michael Vogt лет назад: 20
Родитель
Сommit
7a6058744b

+ 8 - 7
apt-pkg/acquire-item.cc

@@ -142,20 +142,21 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
 {
 {
    Decompression = false;
    Decompression = false;
    Erase = false;
    Erase = false;
-   
+
    DestFile = _config->FindDir("Dir::State::lists") + "partial/";
    DestFile = _config->FindDir("Dir::State::lists") + "partial/";
    DestFile += URItoFileName(URI);
    DestFile += URItoFileName(URI);
 
 
    if(comprExt.empty()) 
    if(comprExt.empty()) 
    {
    {
-      // autoselect 
-      if(FileExists("/usr/bin/bzip2"))
-	 Desc.URI = URI + ".bz2"; 
-      else
-	 Desc.URI = URI + ".gz"; 
+      // autoselect the compression method
+      if(FileExists("/usr/bin/bzip2")) 
+	 CompressionExtension = ".bz2";
+      else 
+	 CompressionExtension = ".gz";
    } else {
    } else {
-      Desc.URI = URI + comprExt; 
+      CompressionExtension = comprExt;
    }
    }
+   Desc.URI = URI + CompressionExtension; 
 
 
    Desc.Description = URIDesc;
    Desc.Description = URIDesc;
    Desc.Owner = this;
    Desc.Owner = this;

+ 3 - 2
apt-pkg/acquire-item.h

@@ -92,7 +92,8 @@ class pkgAcqIndex : public pkgAcquire::Item
    pkgAcquire::ItemDesc Desc;
    pkgAcquire::ItemDesc Desc;
    string RealURI;
    string RealURI;
    string ExpectedMD5;
    string ExpectedMD5;
-   
+   string CompressionExtension;
+
    public:
    public:
    
    
    // Specialized action members
    // Specialized action members
@@ -100,7 +101,7 @@ class pkgAcqIndex : public pkgAcquire::Item
    virtual void Done(string Message,unsigned long Size,string Md5Hash,
    virtual void Done(string Message,unsigned long Size,string Md5Hash,
 		     pkgAcquire::MethodConfig *Cnf);
 		     pkgAcquire::MethodConfig *Cnf);
    virtual string Custom600Headers();
    virtual string Custom600Headers();
-   virtual string DescURI() {return RealURI + ".gz";};
+   virtual string DescURI() {return RealURI + CompressionExtension;};
 
 
    pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
    pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
 	       string ShortDesct, string ExpectedMD5, string compressExt="");
 	       string ShortDesct, string ExpectedMD5, string compressExt="");

+ 2 - 1
apt-pkg/algorithms.h

@@ -118,7 +118,8 @@ class pkgProblemResolver
    
    
    // Try to resolve problems only by using keep
    // Try to resolve problems only by using keep
    bool ResolveByKeep();
    bool ResolveByKeep();
-   
+
+   // Install all protected packages   
    void InstallProtect();   
    void InstallProtect();   
    
    
    pkgProblemResolver(pkgDepCache *Cache);
    pkgProblemResolver(pkgDepCache *Cache);

+ 3 - 1
apt-pkg/cacheiterators.h

@@ -222,7 +222,7 @@ class pkgCache::PrvIterator
    void operator ++(int) {if (Prv != Owner->ProvideP) Prv = Owner->ProvideP +
    void operator ++(int) {if (Prv != Owner->ProvideP) Prv = Owner->ProvideP +
 	(Type == PrvVer?Prv->NextPkgProv:Prv->NextProvides);};
 	(Type == PrvVer?Prv->NextPkgProv:Prv->NextProvides);};
    inline void operator ++() {operator ++(0);};
    inline void operator ++() {operator ++(0);};
-   inline bool end() const {return Prv == Owner->ProvideP?true:false;};
+   inline bool end() const {return Owner == 0 || Prv == Owner->ProvideP?true:false;};
    
    
    // Comparison
    // Comparison
    inline bool operator ==(const PrvIterator &B) const {return Prv == B.Prv;};
    inline bool operator ==(const PrvIterator &B) const {return Prv == B.Prv;};
@@ -244,6 +244,8 @@ class pkgCache::PrvIterator
    inline PkgIterator OwnerPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[Prv->Version].ParentPkg);};
    inline PkgIterator OwnerPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[Prv->Version].ParentPkg);};
    inline unsigned long Index() const {return Prv - Owner->ProvideP;};
    inline unsigned long Index() const {return Prv - Owner->ProvideP;};
 
 
+   inline PrvIterator() : Prv(0), Type(PrvVer), Owner(0)  {};
+
    inline PrvIterator(pkgCache &Owner,Provides *Trg,Version *) :
    inline PrvIterator(pkgCache &Owner,Provides *Trg,Version *) :
           Prv(Trg), Type(PrvVer), Owner(&Owner) 
           Prv(Trg), Type(PrvVer), Owner(&Owner) 
    {
    {

+ 3 - 0
apt-pkg/cdrom.cc

@@ -422,6 +422,9 @@ bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source)
    {      
    {      
       F.getline(Buffer,sizeof(Buffer));
       F.getline(Buffer,sizeof(Buffer));
       CurLine++;
       CurLine++;
+      if (F.fail() && !F.eof())
+	 return _error->Error(_("Line %u too long in source list %s."),
+			      CurLine,File.c_str());
       _strtabexpand(Buffer,sizeof(Buffer));
       _strtabexpand(Buffer,sizeof(Buffer));
       _strstrip(Buffer);
       _strstrip(Buffer);
             
             

+ 6 - 1
apt-pkg/deb/debsystem.cc

@@ -164,7 +164,12 @@ bool debSystem::Initialize(Configuration &Cnf)
    Cnf.CndSet("Dir::State::userstatus","status.user"); // Defunct
    Cnf.CndSet("Dir::State::userstatus","status.user"); // Defunct
    Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status");
    Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status");
    Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg");
    Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg");
-   
+
+   if (StatusFile) {
+     delete StatusFile;
+     StatusFile = 0;
+   }
+
    return true;
    return true;
 }
 }
 									/*}}}*/
 									/*}}}*/

+ 1 - 0
cmdline/apt-get.cc

@@ -2040,6 +2040,7 @@ bool DoSource(CommandLine &CmdL)
 	    if (system(S) != 0)
 	    if (system(S) != 0)
 	    {
 	    {
 	       fprintf(stderr,_("Unpack command '%s' failed.\n"),S);
 	       fprintf(stderr,_("Unpack command '%s' failed.\n"),S);
+	       fprintf(stderr,_("Check if the 'dpkg-dev' package is installed.\n"));
 	       _exit(1);
 	       _exit(1);
 	    }	    
 	    }	    
 	 }
 	 }

+ 1 - 0
debian/apt.manpages

@@ -3,6 +3,7 @@ doc/apt-cdrom.8
 doc/apt-config.8
 doc/apt-config.8
 doc/apt-get.8
 doc/apt-get.8
 doc/apt-key.8
 doc/apt-key.8
+doc/apt-secure.8
 doc/apt.8
 doc/apt.8
 doc/apt.conf.5
 doc/apt.conf.5
 doc/apt_preferences.5
 doc/apt_preferences.5

+ 1 - 0
debian/rules

@@ -274,6 +274,7 @@ apt-utils: build debian/shlibs.local
 
 
 	cp $(addprefix $(BLD)/bin/apt-,$(APT_UTILS)) debian/$@/usr/bin/
 	cp $(addprefix $(BLD)/bin/apt-,$(APT_UTILS)) debian/$@/usr/bin/
 	dh_installdocs -p$@
 	dh_installdocs -p$@
+	dh_installexamples -p$@
 
 
 	# Install the man pages..
 	# Install the man pages..
 	dh_installman -p$@
 	dh_installman -p$@

+ 43 - 4
doc/apt-key.8.xml

@@ -68,17 +68,56 @@
      <para>
      <para>
 
 
        List trusted keys.
        List trusted keys.
+
      </para>
      </para>
 
 
      </listitem>
      </listitem>
      </varlistentry>
      </varlistentry>
+
+     <varlistentry><term>update</term>
+     <listitem>
+     <para>
+
+       Update the local keyring with the keyring of Debian archive
+       keys and removes from the keyring the archive keys which are no
+       longer valid.
+
+     </para>
+
+     </listitem>
+     </varlistentry>
+   </variablelist>
+</refsect1>
+
+ <refsect1><title>Files</title>
+   <variablelist>
+     <varlistentry><term><filename>/etc/apt/trusted.gpg</filename></term>
+     <listitem><para>Keyring of local trusted keys, new keys will be added here.</para></listitem>
+     </varlistentry>
+
+     <varlistentry><term><filename>/etc/apt/trustdb.gpg</filename></term>
+     <listitem><para>Local trust database of archive keys.</para></listitem>
+     </varlistentry>
+
+     <varlistentry><term><filename>/usr/share/keyrings/debian-archive-keyring.gpg</filename></term>
+     <listitem><para>Keyring of Debian archive trusted keys.</para></listitem>
+     </varlistentry>
+
+     <varlistentry><term><filename>/usr/share/keyrings/debian-archive-removed-keys.gpg</filename></term>
+     <listitem><para>Keyring of Debian archive removed trusted keys.</para></listitem>
+     </varlistentry>
+
+
+
    </variablelist>
    </variablelist>
+
 </refsect1>
 </refsect1>
 
 
-<!--  <refsect1><title>See Also</title> -->
-<!--    <para> -->
-<!--    &apt-conf;, &apt-get;, &sources-list; -->
-<!--  </refsect1> -->
+<refsect1><title>See Also</title>
+<para>
+&apt-get;, &apt-secure;
+</para>
+</refsect1>
 
 
  &manbugs;
  &manbugs;
  &manauthor;
  &manauthor;

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

@@ -284,7 +284,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
    <literal>sourcelist</literal> gives the location of the sourcelist and 
    <literal>sourcelist</literal> gives the location of the sourcelist and 
    <literal>main</literal> is the default configuration file (setting has no effect,
    <literal>main</literal> is the default configuration file (setting has no effect,
    unless it is done from the config file specified by 
    unless it is done from the config file specified by 
-   <envar>APT_CONFIG</envar>.</para>
+   <envar>APT_CONFIG</envar>).</para>
 
 
    <para>The <literal>Dir::Parts</literal> setting reads in all the config fragments in 
    <para>The <literal>Dir::Parts</literal> setting reads in all the config fragments in 
    lexical order from the directory specified. After this is done then the
    lexical order from the directory specified. After this is done then the

+ 2 - 2
doc/fr/apt-config.fr.8.xml

@@ -57,7 +57,7 @@ des commandes suivantes doit 
 <listitem><para>
 <listitem><para>
 Le terme shell est utilisé pour accéder aux informations de configuration
 Le terme shell est utilisé pour accéder aux informations de configuration
 depuis un script shell. Deux arguments doivent lui être donnés&nbsp;; le 
 depuis un script shell. Deux arguments doivent lui être donnés&nbsp;; le 
-premier est une variable de shell et le second une valeur de configuration à 
+premier est une variable du shell et le second une valeur de configuration à 
 demander.
 demander.
 La sortie standard consiste en une liste de commandes d'assignation de shell 
 La sortie standard consiste en une liste de commandes d'assignation de shell 
 pour chaque valeur présente. Dans un script shell, cette commande devrait
 pour chaque valeur présente. Dans un script shell, cette commande devrait
@@ -69,7 +69,7 @@ RES=`apt-config shell OPTS MyApp::Options`
 eval $RES
 eval $RES
 </programlisting></informalexample>
 </programlisting></informalexample>
 
 
-<para>La variable d'environnement de shell $OPTS sera définie par la valeur de
+<para>La variable d'environnement du shell $OPTS sera définie par la valeur de
 MyApp::Options ou, par défaut, la valeur -f.
 MyApp::Options ou, par défaut, la valeur -f.
      </para>
      </para>
 <para>
 <para>

+ 39 - 5
doc/fr/apt-key.fr.8.xml

@@ -34,7 +34,7 @@
    <para>
    <para>
    <command>apt-key</command> gère les clés dont se sert apt pour
    <command>apt-key</command> gère les clés dont se sert apt pour
 authentifier les paquets. Les paquets authentifiés par ces clés seront
 authentifier les paquets. Les paquets authentifiés par ces clés seront
-réputés 
+réputés fiables. 
    </para>
    </para>
 </refsect1>
 </refsect1>
 
 
@@ -73,13 +73,47 @@ Afficher la liste des cl
 
 
      </listitem>
      </listitem>
      </varlistentry>
      </varlistentry>
+
+     <varlistentry><term>update</term>
+     <listitem>
+     <para>
+Mettre à jour le trousseau de clés local avec le trousseau de clés de l'archive
+Debian et supprimer les clés qui sont périmées.
+</para>
+	</listitem>
+      </varlistentry>
+
    </variablelist>
    </variablelist>
 </refsect1>
 </refsect1>
 
 
-<!--  <refsect1><title>See Also</title> -->
-<!--    <para> -->
-<!--    &apt-conf;, &apt-get;, &sources-list; -->
-<!--  </refsect1> -->
+ <refsect1><title>Fichiers</title>
+   <variablelist>
+     <varlistentry><term><filename>/etc/apt/trusted.gpg</filename></term>
+<listitem><para>Trousseau de clés locales fiables, les nouvelles clés sont ajoutées ici.</para>
+</listitem>
+     </varlistentry>
+
+     <varlistentry><term><filename>/etc/apt/trustdb.gpg</filename></term>
+     <listitem><para>Base de données locale fiable des clés de l'archive.</para></listitem>
+     </varlistentry>
+
+   <varlistentry><term><filename>/usr/share/keyrings/debian-archive-keyring.gpg</filename></term>
+     <listitem><para>Trousseau des clés fiables de l'archive Debian.</para></listitem>
+     </varlistentry>
+
+     <varlistentry><term><filename>/usr/share/keyrings/debian-archive-removed-keys.gpg</filename>
+</term>
+    <listitem><para>>Trousseau des clés fiables supprimées de l'archive Debian.</para></listitem>
+     </varlistentry>
+
+   </variablelist>
+  </refsect1>
+
+<refsect1><title>Voir aussi</title>
+<para>
+&apt-get;, &apt-secure;
+</para>
+</refsect1>
 
 
  &manbugs;
  &manbugs;
  &manauthor;
  &manauthor;

+ 2 - 2
doc/fr/apt_preferences.fr.5.xml

@@ -7,7 +7,7 @@
 
 
 ]>
 ]>
 
 
-<refentry>
+<refentry lang="fr">
 
 
  <refentryinfo>
  <refentryinfo>
    &apt-author.team;
    &apt-author.team;
@@ -208,7 +208,7 @@ d'
 <programlisting>
 <programlisting>
 Package: *
 Package: *
 Pin: release a=unstable
 Pin: release a=unstable
-Pin-Priority: 50
+Pin-Priority: 500
 </programlisting>
 </programlisting>
 
 
 <simpara>L'entrée suivante affecte une priorité haute à toutes les versions
 <simpara>L'entrée suivante affecte une priorité haute à toutes les versions

+ 10 - 2
doc/fr/makefile

@@ -5,11 +5,16 @@ SUBDIR=doc/fr
 # Bring in the default rules
 # Bring in the default rules
 include ../../buildlib/defaults.mak
 include ../../buildlib/defaults.mak
 
 
+# Do not use XMLTO, build the manpages directly with XSLTPROC
+XSLTPROC=/usr/bin/xsltproc
+STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
+
+
 # Man pages
 # Man pages
 SOURCE = apt-cache.fr.8 apt-get.fr.8 apt-cdrom.fr.8 apt.conf.fr.5 \
 SOURCE = apt-cache.fr.8 apt-get.fr.8 apt-cdrom.fr.8 apt.conf.fr.5 \
          sources.list.fr.5 apt-config.fr.8 apt-sortpkgs.fr.1 \
          sources.list.fr.5 apt-config.fr.8 apt-sortpkgs.fr.1 \
 	 apt-ftparchive.fr.1 apt_preferences.fr.5 apt-extracttemplates.fr.1 \
 	 apt-ftparchive.fr.1 apt_preferences.fr.5 apt-extracttemplates.fr.1 \
-	 apt-key.fr.8
+	 apt-key.fr.8 apt-secure.fr.8
 
 
 INCLUDES = apt.ent.fr
 INCLUDES = apt.ent.fr
 
 
@@ -17,7 +22,7 @@ doc: $(SOURCE)
 
 
 $(SOURCE) ::  % : %.xml $(INCLUDES)
 $(SOURCE) ::  % : %.xml $(INCLUDES)
 	echo Creating man page $@
 	echo Creating man page $@
-	$(XMLTO) man $<
+	$(XSLTPROC) -o $@ $(STYLESHEET) $<
 
 
 apt-cache.fr.8:: apt-cache.8 
 apt-cache.fr.8:: apt-cache.8 
 	cp $< $@
 	cp $< $@
@@ -52,4 +57,7 @@ apt-extracttemplates.fr.1:: apt-extracttemplates.1
 apt-key.fr.8:: apt-key.8 
 apt-key.fr.8:: apt-key.8 
 	cp $< $@
 	cp $< $@
 
 
+apt-secure.fr.8:: apt-secure.8 
+	cp $< $@
+
 
 

+ 2 - 1
doc/makefile

@@ -14,7 +14,8 @@ include $(DEBIANDOC_H)
 # XML man pages
 # XML man pages
 SOURCE = apt-cache.8 apt-get.8 apt-cdrom.8 apt.conf.5 sources.list.5 \
 SOURCE = apt-cache.8 apt-get.8 apt-cdrom.8 apt.conf.5 sources.list.5 \
          apt-config.8 apt_preferences.5  \
          apt-config.8 apt_preferences.5  \
-         apt-sortpkgs.1 apt-ftparchive.1 apt-extracttemplates.1 apt-key.8
+         apt-sortpkgs.1 apt-ftparchive.1 apt-extracttemplates.1 \
+	 apt-key.8 apt-secure.8
 INCLUDES = apt.ent	 
 INCLUDES = apt.ent	 
 include $(XML_MANPAGE_H)
 include $(XML_MANPAGE_H)