From: David Kalnischkies Date: Sat, 13 Feb 2010 00:45:26 +0000 (+0100) Subject: merge with debian-sid X-Git-Tag: 0.8.0~39^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/d328fd1a20543192a7ea3eac124f10a5793743e9?hp=-c merge with debian-sid --- d328fd1a20543192a7ea3eac124f10a5793743e9 diff --combined debian/changelog index 5da8edb3b,f14e3fe52..df16a69dd --- a/debian/changelog +++ b/debian/changelog @@@ -1,30 -1,19 +1,38 @@@ -apt (0.7.25.4) UNRELEASED; urgency=low +apt (0.7.26) UNRELEASED; urgency=low + ++ [ David Kalnischkies ] + * [BREAK] add possibility to download and use multiply + Translation files, configurable with Acquire::Translation + (Closes: #444222, #448216, #550564) + * Ignore :qualifiers after package name in build dependencies + for now as long we don't understand them (Closes: #558103) + * apt-pkg/contrib/mmap.{cc,h}: + - extend it to have a growable flag - unused now but maybe... + * apt-pkg/pkgcache.h: + - use long instead of short for {Ver,Desc}File size, + patch from Víctor Manuel Jáquez Leal, thanks! (Closes: #538917) + * apt-pkg/acquire-item.cc: + - allow also to skip the last patch if target is reached, + thanks Bernhard R. Link! (Closes: #545699) + * ftparchive/writer.{cc,h}: + - add APT::FTPArchive::AlwaysStat to disable the too aggressive + caching if versions are build multiply times (not recommend) + Patch by Christoph Goehre, thanks! (Closes: #463260) - -- Michael Vogt Thu, 10 Dec 2009 22:02:38 +0100 + [ Ivan Masár ] + * Slovak translation update. Closes: #568294 + - -- Christian Perrier Wed, 03 Feb 2010 20:08:19 +0100 ++ -- David Kalnischkies Sat, 13 Feb 2010 01:42:50 +0100 - apt (0.7.25.3) UNRELEASED; urgency=low + apt (0.7.25.3) unstable; urgency=low + + [ Christian Perrier ] + * Italian translation update. Closes: #567532 + [ David Kalnischkies ] * apt-pkg/contrib/macros.h: - - move the header system.h with a new name to the public domain, - to be able to use it in other headers (Closes: #567662) + - install the header system.h with a new name to be able to use + it in other headers (Closes: #567662) * cmdline/acqprogress.cc: - Set Mode to Medium so that the correct prefix is used. Thanks Stefan Haller for the patch! (Closes: #567304 LP: #275243) @@@ -32,11 -21,34 +40,34 @@@ - generate sha1 and sha256 checksums for dsc (Closes: #567343) * cmdline/apt-get.cc: - don't mark as manually if in download only (Closes: #468180) - - -- David Kalnischkies Sat, 30 Jan 2010 22:13:48 +0100 + + -- Michael Vogt Mon, 01 Feb 2010 18:41:15 +0100 apt (0.7.25.2) unstable; urgency=low + [ Michael Vogt ] + * apt-pkg/contrib/cdromutl.cc: + - fix UnmountCdrom() fails, give it a bit more time and try + the umount again + * apt-pkg/cdrom.cc: + - fix crash in pkgUdevCdromDevices + * methods/cdrom.cc: + - fixes in multi cdrom setup code (closes: #549312) + - add new "Acquire::cdrom::AutoDetect" config that enables/disables + the dlopen of libudev for automatic cdrom detection. Off by default + currently, feedback/testing welcome + * cmdline/apt-cdrom.cc: + - add new --auto-detect option that uses libudev to figure out + the cdrom/mount-point + * cmdline/apt-mark: + - merge fix from Gene Cash that supports markauto for + packages that are not in the extended_states file yet + (closes: #534920) + * ftparchive/writer.{cc,h}: + - merge crash fix for apt-ftparchive on hurd, thanks to + Samuel Thibault for the patch (closes: #566664) + + [ David Kalnischkies ] * apt-pkg/contrib/fileutl.cc: - Fix the newly introduced method GetListOfFilesInDir to not accept every file if no extension is enforced @@@ -61,13 -73,15 +92,15 @@@ - fix malloc asseration fail with ja_JP.eucJP locale in apt-cache search. Thanks Kusanagi Kouichi! (Closes: #548884) - -- David Kalnischkies Sat, 16 Jan 2010 21:06:38 +0100 + [ Christian Perrier ] + * French translation update + + -- Michael Vogt Wed, 27 Jan 2010 16:16:10 +0100 apt (0.7.25.1) unstable; urgency=low [ Christian Perrier ] * French manpage translation update - * French translation update * Russian translation update by Yuri Kozlov Closes: #564171 diff --combined doc/examples/configure-index index 2ee838216,ddee86388..0b30a50a9 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@@ -248,6 -248,10 +248,10 @@@ Acquir cdrom { + // do auto detection of the cdrom mountpoint + AutoDetect "true"; + + // cdrom mountpoint (needs to be defined in fstab if AutoDetect is not used) mount "/cdrom"; // You need the trailing slash! @@@ -271,15 -275,6 +275,15 @@@ Order { "gz"; "lzma"; "bz2"; }; }; + + Languages + { + "environment"; + "de"; + "en"; + "none"; + "fr"; + }; }; // Directory layout @@@ -335,6 -330,13 +339,13 @@@ Dir "/ Log "var/log/apt" { Terminal "term.log"; }; + + // Media + Media + { + // Media AutoDetect mount path + MountPath "/media/apt"; + }; }; // Things that effect the APT dselect method diff --combined ftparchive/writer.cc index b9dd554b3,95b73a84d..18a3de0c2 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@@ -58,10 -58,6 +58,6 @@@ FTWScanner::FTWScanner( { ErrorPrinted = false; NoLinkAct = !_config->FindB("APT::FTPArchive::DeLinkAct",true); - RealPath = 0; - long PMax = pathconf(".",_PC_PATH_MAX); - if (PMax > 0) - RealPath = new char[PMax]; } /*}}}*/ // FTWScanner::Scanner - FTW Scanner /*{{{*/ @@@ -89,15 -85,17 +85,17 @@@ int FTWScanner::ScannerFTW(const char * // FTWScanner::ScannerFile - File Scanner /*{{{*/ // --------------------------------------------------------------------- /* */ -int FTWScanner::ScannerFile(const char *File, bool ReadLink) +int FTWScanner::ScannerFile(const char *File, bool const &ReadLink) { const char *LastComponent = strrchr(File, '/'); + char *RealPath = NULL; + if (LastComponent == NULL) LastComponent = File; else LastComponent++; - vector::iterator I; + vector::const_iterator I; for(I = Owner->Patterns.begin(); I != Owner->Patterns.end(); ++I) { if (fnmatch((*I).c_str(), LastComponent, 0) == 0) @@@ -111,10 -109,13 +109,13 @@@ given are not links themselves. */ char Jnk[2]; Owner->OriginalPath = File; - if (ReadLink && Owner->RealPath != 0 && + if (ReadLink && readlink(File,Jnk,sizeof(Jnk)) != -1 && - realpath(File,Owner->RealPath) != 0) - Owner->DoPackage(Owner->RealPath); + (RealPath = realpath(File,NULL)) != 0) + { + Owner->DoPackage(RealPath); + free(RealPath); + } else Owner->DoPackage(File); @@@ -127,7 -128,7 +128,7 @@@ { Owner->NewLine(1); - bool Type = _error->PopMessage(Err); + bool const Type = _error->PopMessage(Err); if (Type == true) cerr << _("E: ") << Err << endl; else @@@ -148,20 -149,22 +149,22 @@@ // FTWScanner::RecursiveScan - Just scan a directory tree /*{{{*/ // --------------------------------------------------------------------- /* */ -bool FTWScanner::RecursiveScan(string Dir) +bool FTWScanner::RecursiveScan(string const &Dir) { + char *RealPath = NULL; /* If noprefix is set then jam the scan root in, so we don't generate link followed paths out of control */ if (InternalPrefix.empty() == true) { - if (realpath(Dir.c_str(),RealPath) == 0) + if ((RealPath = realpath(Dir.c_str(),NULL)) == 0) return _error->Errno("realpath",_("Failed to resolve %s"),Dir.c_str()); - InternalPrefix = RealPath; + InternalPrefix = RealPath; + free(RealPath); } // Do recursive directory searching Owner = this; - int Res = ftw(Dir.c_str(),ScannerFTW,30); + int const Res = ftw(Dir.c_str(),ScannerFTW,30); // Error treewalking? if (Res != 0) @@@ -178,15 -181,17 +181,17 @@@ // --------------------------------------------------------------------- /* This is an alternative to using FTW to locate files, it reads the list of files from another file. */ -bool FTWScanner::LoadFileList(string Dir,string File) +bool FTWScanner::LoadFileList(string const &Dir, string const &File) { + char *RealPath = NULL; /* If noprefix is set then jam the scan root in, so we don't generate link followed paths out of control */ if (InternalPrefix.empty() == true) { - if (realpath(Dir.c_str(),RealPath) == 0) + if ((RealPath = realpath(Dir.c_str(),NULL)) == 0) return _error->Errno("realpath",_("Failed to resolve %s"),Dir.c_str()); InternalPrefix = RealPath; + free(RealPath); } Owner = this; @@@ -236,7 -241,7 +241,7 @@@ /* */ bool FTWScanner::Delink(string &FileName,const char *OriginalPath, unsigned long &DeLinkBytes, - off_t FileSize) + off_t const &FileSize) { // See if this isn't an internaly prefix'd file name. if (InternalPrefix.empty() == false && @@@ -293,8 -298,8 +298,8 @@@ // PackagesWriter::PackagesWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -PackagesWriter::PackagesWriter(string DB,string Overrides,string ExtOverrides, - string aArch) : +PackagesWriter::PackagesWriter(string const &DB,string const &Overrides,string const &ExtOverrides, + string const &aArch) : Db(DB),Stats(Db.Stats), Arch(aArch) { Output = stdout; @@@ -306,7 -311,6 +311,7 @@@ DoMD5 = _config->FindB("APT::FTPArchive::MD5",true); DoSHA1 = _config->FindB("APT::FTPArchive::SHA1",true); DoSHA256 = _config->FindB("APT::FTPArchive::SHA256",true); + DoAlwaysStat = _config->FindB("APT::FTPArchive::AlwaysStat", false); DoContents = _config->FindB("APT::FTPArchive::Contents",true); NoOverride = _config->FindB("APT::FTPArchive::NoOverrideMsg",false); LongDescription = _config->FindB("APT::FTPArchive::LongDescription",true); @@@ -329,7 -333,7 +334,7 @@@ // FTWScanner::SetExts - Set extensions to support /*{{{*/ // --------------------------------------------------------------------- /* */ -bool FTWScanner::SetExts(string Vals) +bool FTWScanner::SetExts(string const &Vals) { ClearPatterns(); string::size_type Start = 0; @@@ -361,7 -365,7 +366,7 @@@ bool PackagesWriter::DoPackage(string FileName) { // Pull all the data we need form the DB - if (Db.GetFileInfo(FileName, true, DoContents, true, DoMD5, DoSHA1, DoSHA256) + if (Db.GetFileInfo(FileName, true, DoContents, true, DoMD5, DoSHA1, DoSHA256, DoAlwaysStat) == false) { return false; @@@ -476,7 -480,7 +481,7 @@@ SetTFRewriteData(Changes[End++], "Suggests", OptionalStr.c_str()); } - for (map::iterator I = OverItem->FieldOverride.begin(); + for (map::const_iterator I = OverItem->FieldOverride.begin(); I != OverItem->FieldOverride.end(); I++) SetTFRewriteData(Changes[End++],I->first.c_str(),I->second.c_str()); @@@ -494,8 -498,8 +499,8 @@@ // SourcesWriter::SourcesWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -SourcesWriter::SourcesWriter(string BOverrides,string SOverrides, - string ExtOverrides) +SourcesWriter::SourcesWriter(string const &BOverrides,string const &SOverrides, + string const &ExtOverrides) { Output = stdout; AddPattern("*.dsc"); @@@ -687,6 -691,7 +692,7 @@@ bool SourcesWriter::DoPackage(string Fi // Perform the delinking operation over all of the files string ParseJnk; const char *C = Files; + char *RealPath = NULL; for (;isspace(*C); C++); while (*C != 0) { @@@ -698,10 -703,11 +704,11 @@@ char Jnk[2]; string OriginalPath = Directory + ParseJnk; - if (RealPath != 0 && readlink(OriginalPath.c_str(),Jnk,sizeof(Jnk)) != -1 && - realpath(OriginalPath.c_str(),RealPath) != 0) + if (readlink(OriginalPath.c_str(),Jnk,sizeof(Jnk)) != -1 && + (RealPath = realpath(OriginalPath.c_str(),NULL)) != 0) { string RP = RealPath; + free(RealPath); if (Delink(RP,OriginalPath.c_str(),Stats.DeLinkBytes,St.st_size) == false) return false; } @@@ -740,7 -746,7 +747,7 @@@ if (NewMaint.empty() == false) SetTFRewriteData(Changes[End++], "Maintainer", NewMaint.c_str()); - for (map::iterator I = SOverItem->FieldOverride.begin(); + for (map::const_iterator I = SOverItem->FieldOverride.begin(); I != SOverItem->FieldOverride.end(); I++) SetTFRewriteData(Changes[End++],I->first.c_str(),I->second.c_str()); @@@ -760,7 -766,7 +767,7 @@@ // ContentsWriter::ContentsWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -ContentsWriter::ContentsWriter(string DB) : +ContentsWriter::ContentsWriter(string const &DB) : Db(DB), Stats(Db.Stats) { @@@ -772,9 -778,9 +779,9 @@@ // --------------------------------------------------------------------- /* If Package is the empty string the control record will be parsed to determine what the package name is. */ -bool ContentsWriter::DoPackage(string FileName,string Package) +bool ContentsWriter::DoPackage(string FileName, string Package) { - if (!Db.GetFileInfo(FileName, Package.empty(), true, false, false, false, false)) + if (!Db.GetFileInfo(FileName, Package.empty(), true, false, false, false, false, false)) { return false; } @@@ -793,7 -799,7 +800,7 @@@ // ContentsWriter::ReadFromPkgs - Read from a packages file /*{{{*/ // --------------------------------------------------------------------- /* */ -bool ContentsWriter::ReadFromPkgs(string PkgFile,string PkgCompress) +bool ContentsWriter::ReadFromPkgs(string const &PkgFile,string const &PkgCompress) { MultiCompress Pkgs(PkgFile,PkgCompress,0,false); if (_error->PendingError() == true) @@@ -848,7 -854,7 +855,7 @@@ // ReleaseWriter::ReleaseWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -ReleaseWriter::ReleaseWriter(string DB) +ReleaseWriter::ReleaseWriter(string const &DB) { AddPattern("Packages"); AddPattern("Packages.gz"); @@@ -862,7 -868,7 +869,7 @@@ AddPattern("md5sum.txt"); Output = stdout; - time_t now = time(NULL); + time_t const now = time(NULL); char datestr[128]; if (strftime(datestr, sizeof(datestr), "%a, %d %b %Y %H:%M:%S UTC", gmtime(&now)) == 0) @@@ -949,7 -955,7 +956,7 @@@ bool ReleaseWriter::DoPackage(string Fi void ReleaseWriter::Finish() { fprintf(Output, "MD5Sum:\n"); - for(map::iterator I = CheckSums.begin(); + for(map::const_iterator I = CheckSums.begin(); I != CheckSums.end(); ++I) { @@@ -960,7 -966,7 +967,7 @@@ } fprintf(Output, "SHA1:\n"); - for(map::iterator I = CheckSums.begin(); + for(map::const_iterator I = CheckSums.begin(); I != CheckSums.end(); ++I) { @@@ -971,7 -977,7 +978,7 @@@ } fprintf(Output, "SHA256:\n"); - for(map::iterator I = CheckSums.begin(); + for(map::const_iterator I = CheckSums.begin(); I != CheckSums.end(); ++I) { diff --combined ftparchive/writer.h index ad58dee0a,9aaadbdab..520e91dd6 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@@ -35,7 -35,6 +35,6 @@@ class FTWScanne protected: vector Patterns; const char *OriginalPath; - char *RealPath; bool ErrorPrinted; // Stuff for the delinker @@@ -43,12 -42,12 +42,12 @@@ static FTWScanner *Owner; static int ScannerFTW(const char *File,const struct stat *sb,int Flag); - static int ScannerFile(const char *File, bool ReadLink); + static int ScannerFile(const char *File, bool const &ReadLink); bool Delink(string &FileName,const char *OriginalPath, - unsigned long &Bytes,off_t FileSize); + unsigned long &Bytes,off_t const &FileSize); - inline void NewLine(unsigned Priority) + inline void NewLine(unsigned const &Priority) { if (ErrorPrinted == false && Quiet <= Priority) { @@@ -63,14 -62,13 +62,13 @@@ string InternalPrefix; virtual bool DoPackage(string FileName) = 0; - bool RecursiveScan(string Dir); - bool LoadFileList(string BaseDir,string File); + bool RecursiveScan(string const &Dir); + bool LoadFileList(string const &BaseDir,string const &File); void ClearPatterns() { Patterns.clear(); }; - void AddPattern(string Pattern) { Patterns.push_back(Pattern); }; - bool SetExts(string Vals); + void AddPattern(string const &Pattern) { Patterns.push_back(Pattern); }; + bool SetExts(string const &Vals); FTWScanner(); - virtual ~FTWScanner() {delete [] RealPath;}; }; class PackagesWriter : public FTWScanner @@@ -84,7 -82,6 +82,7 @@@ bool DoMD5; bool DoSHA1; bool DoSHA256; + bool DoAlwaysStat; bool NoOverride; bool DoContents; bool LongDescription; @@@ -96,13 -93,13 +94,13 @@@ struct CacheDB::Stats &Stats; string Arch; - inline bool ReadOverride(string File) {return Over.ReadOverride(File);}; - inline bool ReadExtraOverride(string File) + inline bool ReadOverride(string const &File) {return Over.ReadOverride(File);}; + inline bool ReadExtraOverride(string const &File) {return Over.ReadExtraOverride(File);}; virtual bool DoPackage(string FileName); - PackagesWriter(string DB,string Overrides,string ExtOverrides=string(), - string Arch=string()); + PackagesWriter(string const &DB,string const &Overrides,string const &ExtOverrides=string(), + string const &Arch=string()); virtual ~PackagesWriter() {}; }; @@@ -122,12 -119,12 +120,12 @@@ class ContentsWriter : public FTWScanne bool DoPackage(string FileName,string Package); virtual bool DoPackage(string FileName) {return DoPackage(FileName,string());}; - bool ReadFromPkgs(string PkgFile,string PkgCompress); + bool ReadFromPkgs(string const &PkgFile,string const &PkgCompress); void Finish() {Gen.Print(Output);}; - inline bool ReadyDB(string DB) {return Db.ReadyDB(DB);}; + inline bool ReadyDB(string const &DB) {return Db.ReadyDB(DB);}; - ContentsWriter(string DB); + ContentsWriter(string const &DB); virtual ~ContentsWriter() {}; }; @@@ -150,15 -147,15 +148,15 @@@ class SourcesWriter : public FTWScanne virtual bool DoPackage(string FileName); - SourcesWriter(string BOverrides,string SOverrides, - string ExtOverrides=string()); + SourcesWriter(string const &BOverrides,string const &SOverrides, + string const &ExtOverrides=string()); virtual ~SourcesWriter() {free(Buffer);}; }; class ReleaseWriter : public FTWScanner { public: - ReleaseWriter(string DB); + ReleaseWriter(string const &DB); virtual bool DoPackage(string FileName); void Finish();