Browse Source

* merged with apt--fixes--0

Patches applied:

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-7
   * fixed incorrect man-page example

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-8
   * changelog udpate

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-9
   * we only need to check once for xmlto

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-10
   * fix a bug in a man-page, fix a problem with overly long lines in apt-cdrom

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-11
   * merged with apt--main--0

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-12
   * fix a incorrect error message (it always added .gz regardless what was downloaded)

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-13
   * merged with main

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-14
   * added Hashsum support for file and cdrom 

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-15
   * added README.arch

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-16
   * merged with main

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-17
   * move the changelog to the right place

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-18
   * Change pkgPolicy::Pin from private to protected 

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-19
   * added a default constructor for PrvIterator 

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-20
   * applied otavios patch to reread the statusFile on debSystem::Initialize

 * otavio@debian.org--2005/apt--fixes--0--patch-28
   Reread status configuration, needed for clients using independent apt ...
debian/1.8.y
Michael Vogt 17 years ago
parent
commit
13e8426f80
  1. 8
      README.arch
  2. 18
      apt-pkg/acquire-item.cc
  3. 5
      apt-pkg/acquire-item.h
  4. 4
      apt-pkg/cacheiterators.h
  5. 3
      apt-pkg/cdrom.cc
  6. 7
      apt-pkg/deb/debsystem.cc
  7. 4
      apt-pkg/policy.h
  8. 2
      cmdline/apt-get.cc
  9. 5
      configure.in
  10. 20
      debian/changelog
  11. 2
      doc/apt.conf.5.xml
  12. 2
      doc/apt_preferences.5.xml
  13. 7
      methods/cdrom.cc
  14. 8
      methods/file.cc
  15. 471
      po/apt-all.pot

8
README.arch

@ -0,0 +1,8 @@
You can build apt from arch, but this needs the following additional
packages (in addtion to the usual build-depends):
xmlto perlsgml sgml2x sgmlspl docbook
then run:
debian/rules arch-build

18
apt-pkg/acquire-item.cc

@ -142,20 +142,21 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
{
Decompression = false;
Erase = false;
DestFile = _config->FindDir("Dir::State::lists") + "partial/";
DestFile += URItoFileName(URI);
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 {
Desc.URI = URI + comprExt;
CompressionExtension = comprExt;
}
Desc.URI = URI + CompressionExtension;
Desc.Description = URIDesc;
Desc.Owner = this;
@ -905,7 +906,8 @@ void pkgAcqArchive::Done(string Message,unsigned long Size,string Md5Hash,
{
Status = StatError;
ErrorText = _("MD5Sum mismatch");
Rename(DestFile,DestFile + ".FAILED");
if(FileExists(DestFile))
Rename(DestFile,DestFile + ".FAILED");
return;
}
}

5
apt-pkg/acquire-item.h

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

4
apt-pkg/cacheiterators.h

@ -222,7 +222,7 @@ class pkgCache::PrvIterator
void operator ++(int) {if (Prv != Owner->ProvideP) Prv = Owner->ProvideP +
(Type == PrvVer?Prv->NextPkgProv:Prv->NextProvides);};
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
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 unsigned long Index() const {return Prv - Owner->ProvideP;};
inline PrvIterator() : Owner(0), Prv(0), Type(PrvVer) {};
inline PrvIterator(pkgCache &Owner,Provides *Trg,Version *) :
Prv(Trg), Type(PrvVer), Owner(&Owner)
{

3
apt-pkg/cdrom.cc

@ -422,6 +422,9 @@ bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source)
{
F.getline(Buffer,sizeof(Buffer));
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));
_strstrip(Buffer);

7
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::status","/var/lib/dpkg/status");
Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg");
if (StatusFile) {
delete StatusFile;
StatusFile = 0;
}
return true;
}
/*}}}*/

4
apt-pkg/policy.h

@ -45,6 +45,8 @@ using std::vector;
class pkgPolicy : public pkgDepCache::Policy
{
protected:
struct Pin
{
pkgVersionMatch::MatchType Type;
@ -58,8 +60,6 @@ class pkgPolicy : public pkgDepCache::Policy
string Pkg;
};
protected:
Pin *Pins;
signed short *PFPriority;
vector<Pin> Defaults;

2
cmdline/apt-get.cc

@ -1659,7 +1659,7 @@ bool DoInstall(CommandLine &CmdL)
// See if we need to prompt
if (Cache->InstCount() == ExpectedInst && Cache->DelCount() == 0)
return InstallPackages(Cache,false,false);
return InstallPackages(Cache,false);
}
/*}}}*/

5
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.40.2")
AC_DEFINE_UNQUOTED(VERSION,"0.6.41")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
@ -181,9 +181,6 @@ AC_PATH_PROG(DOCBOOK2MAN,docbook2man)
dnl Check for the XML tools needed to build man pages
AC_PATH_PROG(XMLTO,xmlto)
dnl Check for the XML tools needed to build man pages
AC_PATH_PROG(XMLTO,xmlto)
dnl Check for YODL
dnl AC_CHECK_PROG(YODL_MAN,yodl2man,"yes","")

20
debian/changelog

@ -1,11 +1,11 @@
apt (0.6.40.2) unstable; urgency=low
apt (0.6.41) unstable; urgency=low
* improved the support for "error" and "conffile" reporting from
dpkg, added the format to README.progress-reporting
* added README.progress-reporting to the apt-doc package
* improved the network timeout handling, if a index file from a
sources.list times out, don't try to get the other files from
that entry
sources.list times out or EAI_AGAIN is returned from getaddrinfo,
don't try to get the other files from that entry
* Support architecture-specific extra overrides
(closes: #225947). Thanks to Anthony Towns for idea and
the patch, thanks to Colin Watson for testing it.
@ -17,11 +17,15 @@ apt (0.6.40.2) unstable; urgency=low
* Andreas Pakulat:
- added example apt-ftparchive.conf file to doc/examples
(closes: #322483)
* methods/connect.cc:
- send failure reason for EAI_AGAIN (TmpResolveFailure) to acuire-item
* apt-pkg/acquire-item.cc:
- fail early if a FailReason is TmpResolveFailure (avoids hangs during
the install when no network is available)
* Fix a incorrect example in the man-page (closes: #282918)
* Fix a bug for very long lines in the apt-cdrom code (closes: #280356)
* Fix a manual page bug (closes: #316314)
* Do md5sum checking for file and cdrom method (closes: #319142)
* Change pkgPolicy::Pin from private to protected to let subclasses
access it too (closes: #321799)
* add default constructor for PrvIterator (closes: #322267)
* Reread status configuration on debSystem::Initialize()
(needed for apt-proxy, thanks to Otavio for this patch)
-- Michael Vogt <michael.vogt@ubuntu.com> Tue, 23 Aug 2005 00:15:00 +0200

2
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>main</literal> is the default configuration file (setting has no effect,
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
lexical order from the directory specified. After this is done then the

2
doc/apt_preferences.5.xml

@ -183,7 +183,7 @@ belonging to any distribution whose Archive name is "<literal>unstable</literal>
<programlisting>
Package: *
Pin: release a=unstable
Pin-Priority: 50
Pin-Priority: 500
</programlisting>
<simpara>The following record assigns a high priority to all package versions

7
methods/cdrom.cc

@ -13,6 +13,7 @@
#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
#include <sys/stat.h>
#include <unistd.h>
@ -180,6 +181,12 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
CurrentID = NewID;
Res.LastModified = Buf.st_mtime;
Res.Size = Buf.st_size;
Hashes Hash;
FileFd Fd(Res.Filename, FileFd::ReadOnly);
Hash.AddFD(Fd.Fd(), Fd.Size());
Res.TakeHashes(Hash);
URIDone(Res);
return true;
}

8
methods/file.cc

@ -15,6 +15,8 @@
// Include Files /*{{{*/
#include <apt-pkg/acquire-method.h>
#include <apt-pkg/error.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/fileutl.h>
#include <sys/stat.h>
#include <unistd.h>
@ -75,7 +77,11 @@ bool FileMethod::Fetch(FetchItem *Itm)
if (Res.Filename.empty() == true)
return _error->Error(_("File not found"));
Hashes Hash;
FileFd Fd(Res.Filename, FileFd::ReadOnly);
Hash.AddFD(Fd.Fd(), Fd.Size());
Res.TakeHashes(Hash);
URIDone(Res);
return true;
}

471
po/apt-all.pot

File diff suppressed because it is too large
Loading…
Cancel
Save