diff options
68 files changed, 2001 insertions, 940 deletions
diff --git a/.bzrignore b/.bzrignore index 45db3c607..ac276b3fb 100644 --- a/.bzrignore +++ b/.bzrignore @@ -8,6 +8,8 @@ aclocal.m4 autom4te.cache/ build/ configure +buildlib/config.sub +buildlib/config.guess # generated files in the progress to build all # apt man pages and other documentation diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index afb3daad3..4f0abbb91 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -219,19 +219,19 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ if(TF.Step(Tags) == true) { - string local_sha1; bool found = false; DiffInfo d; string size; - string tmp = Tags.FindS("SHA1-Current"); + string const tmp = Tags.FindS("SHA1-Current"); std::stringstream ss(tmp); - ss >> ServerSha1; + ss >> ServerSha1 >> size; + unsigned long const ServerSize = atol(size.c_str()); FileFd fd(CurrentPackagesFile, FileFd::ReadOnly); SHA1Summation SHA1; SHA1.AddFD(fd.Fd(), fd.Size()); - local_sha1 = string(SHA1.Result()); + string const local_sha1 = SHA1.Result(); if(local_sha1 == ServerSha1) { @@ -248,20 +248,56 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ std::clog << "SHA1-Current: " << ServerSha1 << std::endl; // check the historie and see what patches we need - string history = Tags.FindS("SHA1-History"); + string const history = Tags.FindS("SHA1-History"); std::stringstream hist(history); - while(hist >> d.sha1 >> size >> d.file) + while(hist >> d.sha1 >> size >> d.file) { - d.size = atoi(size.c_str()); // read until the first match is found + // from that point on, we probably need all diffs if(d.sha1 == local_sha1) found=true; - // from that point on, we probably need all diffs - if(found) + else if (found == false) + continue; + + if(Debug) + std::clog << "Need to get diff: " << d.file << std::endl; + available_patches.push_back(d); + } + + if (available_patches.empty() == false) + { + // patching with too many files is rather slow compared to a fast download + unsigned long const fileLimit = _config->FindI("Acquire::PDiffs::FileLimit", 0); + if (fileLimit != 0 && fileLimit < available_patches.size()) { - if(Debug) - std::clog << "Need to get diff: " << d.file << std::endl; - available_patches.push_back(d); + if (Debug) + std::clog << "Need " << available_patches.size() << " diffs (Limit is " << fileLimit + << ") so fallback to complete download" << std::endl; + return false; + } + + // see if the patches are too big + found = false; // it was true and it will be true again at the end + d = *available_patches.begin(); + string const firstPatch = d.file; + unsigned long patchesSize = 0; + std::stringstream patches(Tags.FindS("SHA1-Patches")); + while(patches >> d.sha1 >> size >> d.file) + { + if (firstPatch == d.file) + found = true; + else if (found == false) + continue; + + patchesSize += atol(size.c_str()); + } + unsigned long const sizeLimit = ServerSize * _config->FindI("Acquire::PDiffs::SizeLimit", 100); + if (sizeLimit > 0 && (sizeLimit/100) < patchesSize) + { + if (Debug) + std::clog << "Need " << patchesSize << " bytes (Limit is " << sizeLimit/100 + << ") so fallback to complete download" << std::endl; + return false; } } } @@ -270,11 +306,11 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ if(found) { // queue the diffs - string::size_type last_space = Description.rfind(" "); + string::size_type const last_space = Description.rfind(" "); if(last_space != string::npos) Description.erase(last_space, Description.size()-last_space); new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc, - ExpectedHash, available_patches); + ExpectedHash, ServerSha1, available_patches); Complete = false; Status = StatDone; Dequeue(); @@ -342,9 +378,10 @@ void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash, /*{ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner, string URI,string URIDesc,string ShortDesc, HashString ExpectedHash, + string ServerSha1, vector<DiffInfo> diffs) : Item(Owner), RealURI(URI), ExpectedHash(ExpectedHash), - available_patches(diffs) + available_patches(diffs), ServerSha1(ServerSha1) { DestFile = _config->FindDir("Dir::State::lists") + "partial/"; @@ -430,6 +467,13 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/ std::clog << "QueueNextDiff: " << FinalFile << " (" << local_sha1 << ")"<<std::endl; + // final file reached before all patches are applied + if(local_sha1 == ServerSha1) + { + Finish(true); + return true; + } + // remove all patches until the next matching patch is found // this requires the Index file to be ordered for(vector<DiffInfo>::iterator I=available_patches.begin(); @@ -527,7 +571,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, /* // see if there is more to download if(available_patches.size() > 0) { new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc, - ExpectedHash, available_patches); + ExpectedHash, ServerSha1, available_patches); return Finish(); } else return Finish(true); diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 3f073de5b..d862d0fdd 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -422,6 +422,10 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item * off the front? */ vector<DiffInfo> available_patches; + + /** Stop applying patches when reaching that sha1 */ + string ServerSha1; + /** The current status of this patch. */ enum DiffState { @@ -475,6 +479,7 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item */ pkgAcqIndexDiffs(pkgAcquire *Owner,string URI,string URIDesc, string ShortDesc, HashString ExpectedHash, + string ServerSha1, vector<DiffInfo> diffs=vector<DiffInfo>()); }; /*}}}*/ diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 45ae9bed5..899004d9f 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -87,4 +87,140 @@ const Configuration::getCompressionTypes(bool const &Cached) { return types; } /*}}}*/ +// GetLanguages - Return Vector of Language Codes /*{{{*/ +// --------------------------------------------------------------------- +/* return a vector of language codes in the prefered order. + the special word "environment" will be replaced with the long and the short + code of the local settings and it will be insured that this will not add + duplicates. So in an german local the setting "environment, de_DE, en, de" + will result in "de_DE, de, en". + The special word "none" is the stopcode for the not-All code vector */ +std::vector<std::string> const Configuration::getLanguages(bool const &All, + bool const &Cached, char const * const Locale) { + using std::string; + + // The detection is boring and has a lot of cornercases, + // so we cache the results to calculated it only once. + std::vector<string> static allCodes; + std::vector<string> static codes; + + // we have something in the cache + if (codes.empty() == false || allCodes.empty() == false) { + if (Cached == true) { + if(All == true && allCodes.empty() == false) + return allCodes; + else + return codes; + } else { + allCodes.clear(); + codes.clear(); + } + } + + // get the environment language code + // we extract both, a long and a short code and then we will + // check if we actually need both (rare) or if the short is enough + string const envMsg = string(Locale == 0 ? std::setlocale(LC_MESSAGES, NULL) : Locale); + size_t const lenShort = (envMsg.find('_') != string::npos) ? envMsg.find('_') : 2; + size_t const lenLong = (envMsg.find('.') != string::npos) ? envMsg.find('.') : (lenShort + 3); + + string envLong = envMsg.substr(0,lenLong); + string const envShort = envLong.substr(0,lenShort); + bool envLongIncluded = true, envShortIncluded = false; + + // first cornercase: LANG=C, so we use only "en" Translation + if (envLong == "C") { + codes.push_back("en"); + return codes; + } + + if (envLong != envShort) { + // to save the servers from unneeded queries, we only try also long codes + // for languages it is realistic to have a long code translation file... + char const *needLong[] = { "cs", "en", "pt", "sv", "zh", NULL }; + for (char const **l = needLong; *l != NULL; l++) + if (envShort.compare(*l) == 0) { + envLongIncluded = false; + break; + } + } + + // we don't add the long code, but we allow the user to do so + if (envLongIncluded == true) + envLong.clear(); + + // FIXME: Remove support for the old APT::Acquire::Translation + // it was undocumented and so it should be not very widthly used + string const oldAcquire = _config->Find("APT::Acquire::Translation",""); + if (oldAcquire.empty() == false && oldAcquire != "environment") { + if (oldAcquire != "none") + codes.push_back(oldAcquire); + return codes; + } + + // Support settings like Acquire::Translation=none on the command line to + // override the configuration settings vector of languages. + string const forceLang = _config->Find("Acquire::Languages",""); + if (forceLang.empty() == false) { + if (forceLang == "environment") { + if (envLongIncluded == false) + codes.push_back(envLong); + if (envShortIncluded == false) + codes.push_back(envShort); + return codes; + } else if (forceLang != "none") + codes.push_back(forceLang); + return codes; + } + + std::vector<string> const lang = _config->FindVector("Acquire::Languages"); + // the default setting -> "environment, en" + if (lang.empty() == true) { + if (envLongIncluded == false) + codes.push_back(envLong); + if (envShortIncluded == false) + codes.push_back(envShort); + if (envShort != "en") + codes.push_back("en"); + return codes; + } + + // the configs define the order, so add the environment + // then needed and ensure the codes are not listed twice. + bool noneSeen = false; + for (std::vector<string>::const_iterator l = lang.begin(); + l != lang.end(); l++) { + if (*l == "environment") { + if (envLongIncluded == true && envShortIncluded == true) + continue; + if (envLongIncluded == false) { + envLongIncluded = true; + if (noneSeen == false) + codes.push_back(envLong); + allCodes.push_back(envLong); + } + if (envShortIncluded == false) { + envShortIncluded = true; + if (noneSeen == false) + codes.push_back(envShort); + allCodes.push_back(envShort); + } + continue; + } else if (*l == "none") { + noneSeen = true; + continue; + } else if ((envLongIncluded == true && *l == envLong) || + (envShortIncluded == true && *l == envShort)) + continue; + + if (noneSeen == false) + codes.push_back(*l); + allCodes.push_back(*l); + } + if (All == true) + return allCodes; + else + return codes; +} + /*}}}*/ } diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h index 6a123adce..f2f04a39b 100644 --- a/apt-pkg/aptconfiguration.h +++ b/apt-pkg/aptconfiguration.h @@ -39,6 +39,33 @@ public: /*{{{*/ * \return a vector of (all) Language Codes in the prefered usage order */ std::vector<std::string> static const getCompressionTypes(bool const &Cached = true); + + /** \brief Returns a vector of Language Codes + * + * Languages can be defined with their two or five chars long code. + * This methods handles the various ways to set the prefered codes, + * honors the environment and ensures that the codes are not listed twice. + * + * The special word "environment" will be replaced with the long and the short + * code of the local settings and it will be insured that this will not add + * duplicates. So in an german local the setting "environment, de_DE, en, de" + * will result in "de_DE, de, en". + * + * Another special word is "none" which separates the prefered from all codes + * in this setting. So setting and method can be used to get codes the user want + * to see or to get all language codes APT (should) have Translations available. + * + * \param All return all codes or only codes for languages we want to use + * \param Cached saves the result so we need to calculated it only once + * this parameter should ony be used for testing purposes. + * \param Locale don't get the locale from the system but use this one instead + * this parameter should ony be used for testing purposes. + * + * \return a vector of (all) Language Codes in the prefered usage order + */ + std::vector<std::string> static const getLanguages(bool const &All = false, + bool const &Cached = true, char const * const Locale = 0); + /*}}}*/ }; /*}}}*/ diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 4e8586e83..89aa854a3 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -22,14 +22,8 @@ #include <apti18n.h> #include <vector> -#include <algorithm> #include <fstream> #include <iostream> - -#include <stdio.h> -#include <dirent.h> -#include <sys/stat.h> -#include <unistd.h> using namespace std; /*}}}*/ @@ -85,7 +79,7 @@ Configuration::~Configuration() /* This will lookup a single item by name below another item. It is a helper function for the main lookup function */ Configuration::Item *Configuration::Lookup(Item *Head,const char *S, - unsigned long Len,bool Create) + unsigned long const &Len,bool const &Create) { int Res = 1; Item *I = Head->Child; @@ -118,7 +112,7 @@ Configuration::Item *Configuration::Lookup(Item *Head,const char *S, // --------------------------------------------------------------------- /* This performs a fully scoped lookup of a given name, possibly creating new items */ -Configuration::Item *Configuration::Lookup(const char *Name,bool Create) +Configuration::Item *Configuration::Lookup(const char *Name,bool const &Create) { if (Name == 0) return Root->Child; @@ -245,7 +239,7 @@ vector<string> Configuration::FindVector(const char *Name) const // Configuration::FindI - Find an integer value /*{{{*/ // --------------------------------------------------------------------- /* */ -int Configuration::FindI(const char *Name,int Default) const +int Configuration::FindI(const char *Name,int const &Default) const { const Item *Itm = Lookup(Name); if (Itm == 0 || Itm->Value.empty() == true) @@ -262,7 +256,7 @@ int Configuration::FindI(const char *Name,int Default) const // Configuration::FindB - Find a boolean type /*{{{*/ // --------------------------------------------------------------------- /* */ -bool Configuration::FindB(const char *Name,bool Default) const +bool Configuration::FindB(const char *Name,bool const &Default) const { const Item *Itm = Lookup(Name); if (Itm == 0 || Itm->Value.empty() == true) @@ -338,7 +332,7 @@ void Configuration::Set(const char *Name,const string &Value) // Configuration::Set - Set an integer value /*{{{*/ // --------------------------------------------------------------------- /* */ -void Configuration::Set(const char *Name,int Value) +void Configuration::Set(const char *Name,int const &Value) { Item *Itm = Lookup(Name,true); if (Itm == 0) @@ -351,7 +345,7 @@ void Configuration::Set(const char *Name,int Value) // Configuration::Clear - Clear an single value from a list /*{{{*/ // --------------------------------------------------------------------- /* */ -void Configuration::Clear(const string Name, int Value) +void Configuration::Clear(string const &Name, int const &Value) { char S[300]; snprintf(S,sizeof(S),"%i",Value); @@ -361,7 +355,7 @@ void Configuration::Clear(const string Name, int Value) // Configuration::Clear - Clear an single value from a list /*{{{*/ // --------------------------------------------------------------------- /* */ -void Configuration::Clear(const string Name, string Value) +void Configuration::Clear(string const &Name, string const &Value) { Item *Top = Lookup(Name.c_str(),false); if (Top == 0 || Top->Child == 0) @@ -392,7 +386,7 @@ void Configuration::Clear(const string Name, string Value) // Configuration::Clear - Clear an entire tree /*{{{*/ // --------------------------------------------------------------------- /* */ -void Configuration::Clear(string Name) +void Configuration::Clear(string const &Name) { Item *Top = Lookup(Name.c_str(),false); if (Top == 0) @@ -507,8 +501,8 @@ string Configuration::Item::FullTag(const Item *Stop) const sections like 'zone "foo.org" { .. };' This causes each section to be added in with a tag like "zone::foo.org" instead of being split tag/value. AsSectional enables Sectional parsing.*/ -bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional, - unsigned Depth) +bool ReadConfigFile(Configuration &Conf,const string &FName,bool const &AsSectional, + unsigned const &Depth) { // Open the stream for reading ifstream F(FName.c_str(),ios::in); @@ -835,39 +829,10 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional, // ReadConfigDir - Read a directory of config files /*{{{*/ // --------------------------------------------------------------------- /* */ -bool ReadConfigDir(Configuration &Conf,const string &Dir,bool AsSectional, - unsigned Depth) -{ - DIR *D = opendir(Dir.c_str()); - if (D == 0) - return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); - - vector<string> List; - - for (struct dirent *Ent = readdir(D); Ent != 0; Ent = readdir(D)) - { - if (Ent->d_name[0] == '.') - continue; - - // Skip bad file names ala run-parts - const char *C = Ent->d_name; - for (; *C != 0; C++) - if (isalpha(*C) == 0 && isdigit(*C) == 0 && *C != '_' && *C != '-') - break; - if (*C != 0) - continue; - - // Make sure it is a file and not something else - string File = flCombine(Dir,Ent->d_name); - struct stat St; - if (stat(File.c_str(),&St) != 0 || S_ISREG(St.st_mode) == 0) - continue; - - List.push_back(File); - } - closedir(D); - - sort(List.begin(),List.end()); +bool ReadConfigDir(Configuration &Conf,const string &Dir,bool const &AsSectional, + unsigned const &Depth) +{ + vector<string> const List = GetListOfFilesInDir(Dir, "", true); // Read the files for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++) diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h index e2da83f5b..2494c1d7c 100644 --- a/apt-pkg/contrib/configuration.h +++ b/apt-pkg/contrib/configuration.h @@ -58,8 +58,8 @@ class Configuration Item *Root; bool ToFree; - Item *Lookup(Item *Head,const char *S,unsigned long Len,bool Create); - Item *Lookup(const char *Name,bool Create); + Item *Lookup(Item *Head,const char *S,unsigned long const &Len,bool const &Create); + Item *Lookup(const char *Name,const bool &Create); inline const Item *Lookup(const char *Name) const { return ((Configuration *)this)->Lookup(Name,false); @@ -68,32 +68,33 @@ class Configuration public: string Find(const char *Name,const char *Default = 0) const; - string Find(const string Name,const char *Default = 0) const {return Find(Name.c_str(),Default);}; + string Find(string const &Name,const char *Default = 0) const {return Find(Name.c_str(),Default);}; + string Find(string const &Name, string const &Default) const {return Find(Name.c_str(),Default.c_str());}; string FindFile(const char *Name,const char *Default = 0) const; string FindDir(const char *Name,const char *Default = 0) const; - std::vector<string> FindVector(const string &Name) const; + std::vector<string> FindVector(string const &Name) const; std::vector<string> FindVector(const char *Name) const; - int FindI(const char *Name,int Default = 0) const; - int FindI(const string Name,int Default = 0) const {return FindI(Name.c_str(),Default);}; - bool FindB(const char *Name,bool Default = false) const; - bool FindB(const string Name,bool Default = false) const {return FindB(Name.c_str(),Default);}; + int FindI(const char *Name,int const &Default = 0) const; + int FindI(string const &Name,int const &Default = 0) const {return FindI(Name.c_str(),Default);}; + bool FindB(const char *Name,bool const &Default = false) const; + bool FindB(string const &Name,bool const &Default = false) const {return FindB(Name.c_str(),Default);}; string FindAny(const char *Name,const char *Default = 0) const; - inline void Set(const string Name,string Value) {Set(Name.c_str(),Value);}; + inline void Set(const string &Name,const string &Value) {Set(Name.c_str(),Value);}; void CndSet(const char *Name,const string &Value); void Set(const char *Name,const string &Value); - void Set(const char *Name,int Value); + void Set(const char *Name,const int &Value); - inline bool Exists(const string Name) const {return Exists(Name.c_str());}; + inline bool Exists(const string &Name) const {return Exists(Name.c_str());}; bool Exists(const char *Name) const; bool ExistsAny(const char *Name) const; // clear a whole tree - void Clear(const string Name); + void Clear(const string &Name); // remove a certain value from a list (e.g. the list of "APT::Keep-Fds") - void Clear(const string List, string Value); - void Clear(const string List, int Value); + void Clear(string const &List, string const &Value); + void Clear(string const &List, int const &Value); inline const Item *Tree(const char *Name) const {return Lookup(Name);}; @@ -108,11 +109,11 @@ class Configuration extern Configuration *_config; bool ReadConfigFile(Configuration &Conf,const string &FName, - bool AsSectional = false, - unsigned Depth = 0); + bool const &AsSectional = false, + unsigned const &Depth = 0); bool ReadConfigDir(Configuration &Conf,const string &Dir, - bool AsSectional = false, - unsigned Depth = 0); + bool const &AsSectional = false, + unsigned const &Depth = 0); #endif diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 4240d9f49..3adab8fe7 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -34,9 +34,11 @@ #include <sys/types.h> #include <sys/time.h> #include <sys/wait.h> +#include <dirent.h> #include <signal.h> #include <errno.h> #include <set> +#include <algorithm> /*}}}*/ using namespace std; @@ -195,6 +197,51 @@ bool FileExists(string File) return true; } /*}}}*/ +// GetListOfFilesInDir - returns a vector of files in the given dir /*{{{*/ +// --------------------------------------------------------------------- +/* If an extension is given only files with this extension are included + in the returned vector, otherwise every "normal" file is included. */ +std::vector<string> GetListOfFilesInDir(string const &Dir, string const &Ext, + bool const &SortList) { + std::vector<string> List; + DIR *D = opendir(Dir.c_str()); + if (D == 0) { + _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); + return List; + } + + for (struct dirent *Ent = readdir(D); Ent != 0; Ent = readdir(D)) { + if (Ent->d_name[0] == '.') + continue; + + if (Ext.empty() == false && flExtension(Ent->d_name) != Ext) + continue; + + // Skip bad file names ala run-parts + const char *C = Ent->d_name; + for (; *C != 0; ++C) + if (isalpha(*C) == 0 && isdigit(*C) == 0 + && *C != '_' && *C != '-' && *C != '.') + break; + + if (*C != 0) + continue; + + // Make sure it is a file and not something else + string const File = flCombine(Dir,Ent->d_name); + struct stat St; + if (stat(File.c_str(),&St) != 0 || S_ISREG(St.st_mode) == 0) + continue; + + List.push_back(File); + } + closedir(D); + + if (SortList == true) + std::sort(List.begin(),List.end()); + return List; +} + /*}}}*/ // SafeGetCWD - This is a safer getcwd that returns a dynamic string /*{{{*/ // --------------------------------------------------------------------- /* We return / on failure. */ diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 73b5ea3be..3cbf67fbb 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -23,6 +23,7 @@ #include <string> +#include <vector> using std::string; @@ -81,6 +82,8 @@ bool RunScripts(const char *Cnf); bool CopyFile(FileFd &From,FileFd &To); int GetLock(string File,bool Errors = true); bool FileExists(string File); +std::vector<string> GetListOfFilesInDir(string const &Dir, string const &Ext, + bool const &SortList); string SafeGetCWD(); void SetCloseExec(int Fd,bool Close); void SetNonBlock(int Fd,bool Block); diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index 4d5fcf71e..f440f9489 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -140,8 +140,10 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop) // DynamicMMap::DynamicMMap - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace) : - MMap(F,Flags | NoImmMap), Fd(&F), WorkSpace(WorkSpace) +DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long const &Workspace, + unsigned long const &Grow, unsigned long const &Limit) : + MMap(F,Flags | NoImmMap), Fd(&F), WorkSpace(Workspace), + GrowFactor(Grow), Limit(Limit) { if (_error->PendingError() == true) return; @@ -165,32 +167,48 @@ DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace) /* We try here to use mmap to reserve some space - this is much more cooler than the fallback solution to simply allocate a char array and could come in handy later than we are able to grow such an mmap */ -DynamicMMap::DynamicMMap(unsigned long Flags,unsigned long WorkSpace) : - MMap(Flags | NoImmMap | UnMapped), Fd(0), WorkSpace(WorkSpace) +DynamicMMap::DynamicMMap(unsigned long Flags,unsigned long const &WorkSpace, + unsigned long const &Grow, unsigned long const &Limit) : + MMap(Flags | NoImmMap | UnMapped), Fd(0), WorkSpace(WorkSpace), + GrowFactor(Grow), Limit(Limit) { - if (_error->PendingError() == true) - return; + if (_error->PendingError() == true) + return; + + // disable Moveable if we don't grow + if (Grow == 0) + Flags &= ~Moveable; + +#ifndef __linux__ + // kfreebsd doesn't have mremap, so we use the fallback + if ((Flags & Moveable) == Moveable) + Flags |= Fallback; +#endif #ifdef _POSIX_MAPPED_FILES - // Set the permissions. - int Prot = PROT_READ; - int Map = MAP_PRIVATE | MAP_ANONYMOUS; - if ((Flags & ReadOnly) != ReadOnly) - Prot |= PROT_WRITE; - if ((Flags & Public) == Public) - Map = MAP_SHARED | MAP_ANONYMOUS; + if ((Flags & Fallback) != Fallback) { + // Set the permissions. + int Prot = PROT_READ; + int Map = MAP_PRIVATE | MAP_ANONYMOUS; + if ((Flags & ReadOnly) != ReadOnly) + Prot |= PROT_WRITE; + if ((Flags & Public) == Public) + Map = MAP_SHARED | MAP_ANONYMOUS; - // use anonymous mmap() to get the memory - Base = (unsigned char*) mmap(0, WorkSpace, Prot, Map, -1, 0); + // use anonymous mmap() to get the memory + Base = (unsigned char*) mmap(0, WorkSpace, Prot, Map, -1, 0); - if(Base == MAP_FAILED) - _error->Errno("DynamicMMap",_("Couldn't make mmap of %lu bytes"),WorkSpace); -#else - // fallback to a static allocated space - Base = new unsigned char[WorkSpace]; - memset(Base,0,WorkSpace); + if(Base == MAP_FAILED) + _error->Errno("DynamicMMap",_("Couldn't make mmap of %lu bytes"),WorkSpace); + + iSize = 0; + return; + } #endif - iSize = 0; + // fallback to a static allocated space + Base = new unsigned char[WorkSpace]; + memset(Base,0,WorkSpace); + iSize = 0; } /*}}}*/ // DynamicMMap::~DynamicMMap - Destructor /*{{{*/ @@ -311,30 +329,55 @@ unsigned long DynamicMMap::WriteString(const char *String, /*}}}*/ // DynamicMMap::Grow - Grow the mmap /*{{{*/ // --------------------------------------------------------------------- -/* This method will try to grow the mmap we currently use. This doesn't - work most of the time because we can't move the mmap around in the - memory for now as this would require to adjust quite a lot of pointers - but why we should not at least try to grow it before we give up? */ -bool DynamicMMap::Grow() -{ -#if defined(_POSIX_MAPPED_FILES) && defined(__linux__) - unsigned long newSize = WorkSpace + 1024*1024; +/* This method is a wrapper around different methods to (try to) grow + a mmap (or our char[]-fallback). Encounterable environments: + 1. Moveable + !Fallback + linux -> mremap with MREMAP_MAYMOVE + 2. Moveable + !Fallback + !linux -> not possible (forbidden by constructor) + 3. Moveable + Fallback -> realloc + 4. !Moveable + !Fallback + linux -> mremap alone - which will fail in 99,9% + 5. !Moveable + !Fallback + !linux -> not possible (forbidden by constructor) + 6. !Moveable + Fallback -> not possible + [ While Moveable and Fallback stands for the equally named flags and + "linux" indicates a linux kernel instead of a freebsd kernel. ] + So what you can see here is, that a MMAP which want to be growable need + to be moveable to have a real chance but that this method will at least try + the nearly impossible 4 to grow it before it finally give up: Never say never. */ +bool DynamicMMap::Grow() { + if (Limit != 0 && WorkSpace >= Limit) + return _error->Error(_("The size of a MMap has already reached the defined limit of %lu bytes," + "abort the try to grow the MMap."), Limit); - if(Fd != 0) - { - Fd->Seek(newSize - 1); - char C = 0; - Fd->Write(&C,sizeof(C)); - } + unsigned long const newSize = WorkSpace + 1024*1024; - Base = mremap(Base, WorkSpace, newSize, 0); - if(Base == MAP_FAILED) - return false; + if(Fd != 0) { + Fd->Seek(newSize - 1); + char C = 0; + Fd->Write(&C,sizeof(C)); + } + if ((Flags & Fallback) != Fallback) { +#if defined(_POSIX_MAPPED_FILES) && defined(__linux__) + #ifdef MREMAP_MAYMOVE + if ((Flags & Moveable) == Moveable) + Base = mremap(Base, WorkSpace, newSize, MREMAP_MAYMOVE); + else + #endif + Base = mremap(Base, WorkSpace, newSize, 0); - WorkSpace = newSize; - return true; + if(Base == MAP_FAILED) + return false; #else - return false; + return false; #endif + } else { + if ((Flags & Moveable) != Moveable) + return false; + + Base = realloc(Base, newSize); + if (Base == NULL) + return false; + } + + WorkSpace = newSize; + return true; } /*}}}*/ diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index bde62217d..cd2b15ba2 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -50,7 +50,7 @@ class MMap public: enum OpenFlags {NoImmMap = (1<<0),Public = (1<<1),ReadOnly = (1<<2), - UnMapped = (1<<3)}; + UnMapped = (1<<3), Moveable = (1<<4), Fallback = (1 << 5)}; // Simple accessors inline operator void *() {return Base;}; @@ -82,6 +82,8 @@ class DynamicMMap : public MMap FileFd *Fd; unsigned long WorkSpace; + unsigned long const GrowFactor; + unsigned long const Limit; Pool *Pools; unsigned int PoolCount; @@ -96,8 +98,10 @@ class DynamicMMap : public MMap inline unsigned long WriteString(const string &S) {return WriteString(S.c_str(),S.length());}; void UsePools(Pool &P,unsigned int Count) {Pools = &P; PoolCount = Count;}; - DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace = 2*1024*1024); - DynamicMMap(unsigned long Flags,unsigned long WorkSpace = 2*1024*1024); + DynamicMMap(FileFd &F,unsigned long Flags,unsigned long const &WorkSpace = 2*1024*1024, + unsigned long const &Grow = 1024*1024, unsigned long const &Limit = 0); + DynamicMMap(unsigned long Flags,unsigned long const &WorkSpace = 2*1024*1024, + unsigned long const &Grow = 1024*1024, unsigned long const &Limit = 0); virtual ~DynamicMMap(); }; diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index ed7633803..5beb83665 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -319,10 +319,11 @@ pkgCache::PkgFileIterator debPackagesIndex::FindInCache(pkgCache &Cache) const // TranslationsIndex::debTranslationsIndex - Contructor /*{{{*/ // --------------------------------------------------------------------- /* */ -debTranslationsIndex::debTranslationsIndex(string URI,string Dist,string Section) : - pkgIndexFile(true), URI(URI), Dist(Dist), Section(Section) -{ -} +debTranslationsIndex::debTranslationsIndex(string URI,string Dist,string Section, + char const * const Translation) : + pkgIndexFile(true), URI(URI), Dist(Dist), Section(Section), + Language(Translation) +{} /*}}}*/ // TranslationIndex::Trans* - Return the URI to the translation files /*{{{*/ // --------------------------------------------------------------------- @@ -355,8 +356,8 @@ string debTranslationsIndex::IndexURI(const char *Type) const bool debTranslationsIndex::GetIndexes(pkgAcquire *Owner) const { if (TranslationsAvailable()) { - string TranslationFile = "Translation-" + LanguageCode(); - new pkgAcqIndexTrans(Owner, IndexURI(LanguageCode().c_str()), + string const TranslationFile = string("Translation-").append(Language); + new pkgAcqIndexTrans(Owner, IndexURI(Language), Info(TranslationFile.c_str()), TranslationFile); } @@ -375,7 +376,7 @@ string debTranslationsIndex::Describe(bool Short) const snprintf(S,sizeof(S),"%s",Info(TranslationFile().c_str()).c_str()); else snprintf(S,sizeof(S),"%s (%s)",Info(TranslationFile().c_str()).c_str(), - IndexFile(LanguageCode().c_str()).c_str()); + IndexFile(Language).c_str()); return S; } /*}}}*/ @@ -397,20 +398,20 @@ string debTranslationsIndex::Info(const char *Type) const return Info; } /*}}}*/ -bool debTranslationsIndex::HasPackages() const +bool debTranslationsIndex::HasPackages() const /*{{{*/ { if(!TranslationsAvailable()) return false; - return FileExists(IndexFile(LanguageCode().c_str())); + return FileExists(IndexFile(Language)); } - + /*}}}*/ // TranslationsIndex::Exists - Check if the index is available /*{{{*/ // --------------------------------------------------------------------- /* */ bool debTranslationsIndex::Exists() const { - return FileExists(IndexFile(LanguageCode().c_str())); + return FileExists(IndexFile(Language)); } /*}}}*/ // TranslationsIndex::Size - Return the size of the index /*{{{*/ @@ -419,7 +420,7 @@ bool debTranslationsIndex::Exists() const unsigned long debTranslationsIndex::Size() const { struct stat S; - if (stat(IndexFile(LanguageCode().c_str()).c_str(),&S) != 0) + if (stat(IndexFile(Language).c_str(),&S) != 0) return 0; return S.st_size; } @@ -430,7 +431,7 @@ unsigned long debTranslationsIndex::Size() const bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const { // Check the translation file, if in use - string TranslationFile = IndexFile(LanguageCode().c_str()); + string TranslationFile = IndexFile(Language); if (TranslationsAvailable() && FileExists(TranslationFile)) { FileFd Trans(TranslationFile,FileFd::ReadOnly); @@ -462,7 +463,7 @@ bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const /* */ pkgCache::PkgFileIterator debTranslationsIndex::FindInCache(pkgCache &Cache) const { - string FileName = IndexFile(LanguageCode().c_str()); + string FileName = IndexFile(Language); pkgCache::PkgFileIterator File = Cache.FileBegin(); for (; File.end() == false; File++) diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h index b0012c96b..c0e8d7d8e 100644 --- a/apt-pkg/deb/debindexfile.h +++ b/apt-pkg/deb/debindexfile.h @@ -77,12 +77,13 @@ class debTranslationsIndex : public pkgIndexFile string URI; string Dist; string Section; + const char * const Language; string Info(const char *Type) const; string IndexFile(const char *Type) const; string IndexURI(const char *Type) const; - inline string TranslationFile() const {return "Translation-" + LanguageCode();}; + inline string TranslationFile() const {return string("Translation-").append(Language);}; public: @@ -99,7 +100,7 @@ class debTranslationsIndex : public pkgIndexFile virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const; virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; - debTranslationsIndex(string URI,string Dist,string Section); + debTranslationsIndex(string URI,string Dist,string Section, char const * const Language); }; class debSourcesIndex : public pkgIndexFile diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 517b771a5..25a1df3f9 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -13,6 +13,7 @@ #include <apt-pkg/deblistparser.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> +#include <apt-pkg/aptconfiguration.h> #include <apt-pkg/strutl.h> #include <apt-pkg/crc-16.h> #include <apt-pkg/md5.h> @@ -129,10 +130,11 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) only describe package properties */ string debListParser::Description() { - if (DescriptionLanguage().empty()) + string const lang = DescriptionLanguage(); + if (lang.empty()) return Section.FindS("Description"); else - return Section.FindS(("Description-" + pkgIndexFile::LanguageCode()).c_str()); + return Section.FindS(string("Description-").append(lang).c_str()); } /*}}}*/ // ListParser::DescriptionLanguage - Return the description lang string /*{{{*/ @@ -142,7 +144,16 @@ string debListParser::Description() assumed to describe original description. */ string debListParser::DescriptionLanguage() { - return Section.FindS("Description").empty() ? pkgIndexFile::LanguageCode() : ""; + if (Section.FindS("Description").empty() == false) + return ""; + + std::vector<string> const lang = APT::Configuration::getLanguages(); + for (std::vector<string>::const_iterator l = lang.begin(); + l != lang.end(); l++) + if (Section.FindS(string("Description-").append(*l).c_str()).empty() == false) + return *l; + + return ""; } /*}}}*/ // ListParser::Description - Return the description_md5 MD5SumValue /*{{{*/ @@ -384,7 +395,8 @@ const char *debListParser::ConvertRelation(const char *I,unsigned int &Op) bit by bit. */ const char *debListParser::ParseDepends(const char *Start,const char *Stop, string &Package,string &Ver, - unsigned int &Op, bool ParseArchFlags) + unsigned int &Op, bool const &ParseArchFlags, + bool const &StripMultiArch) { // Strip off leading space for (;Start != Stop && isspace(*Start) != 0; Start++); @@ -403,7 +415,14 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop, // Stash the package name Package.assign(Start,I - Start); - + + // We don't want to confuse library users which can't handle MultiArch + if (StripMultiArch == true) { + size_t const found = Package.rfind(':'); + if (found != string::npos) + Package = Package.substr(0,found); + } + // Skip white space to the '(' for (;I != Stop && isspace(*I) != 0 ; I++); diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 34bb29c72..1c709229f 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -64,7 +64,8 @@ class debListParser : public pkgCacheGenerator::ListParser static const char *ParseDepends(const char *Start,const char *Stop, string &Package,string &Ver,unsigned int &Op, - bool ParseArchFlags = false); + bool const &ParseArchFlags = false, + bool const &StripMultiArch = false); static const char *ConvertRelation(const char *I,unsigned int &Op); debListParser(FileFd *File); diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index f3ab6960c..8f28f053b 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -5,6 +5,7 @@ #include <apt-pkg/strutl.h> #include <apt-pkg/acquire-item.h> #include <apt-pkg/configuration.h> +#include <apt-pkg/aptconfiguration.h> #include <apt-pkg/error.h> using namespace std; @@ -170,13 +171,19 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool GetAll) const new indexRecords (Dist)); // Queue the translations + std::vector<std::string> const lang = APT::Configuration::getLanguages(true); for (vector<const debSectionEntry *>::const_iterator I = SectionEntries.begin(); I != SectionEntries.end(); I++) { if((*I)->IsSrc) continue; - debTranslationsIndex i = debTranslationsIndex(URI,Dist,(*I)->Section); - i.GetIndexes(Owner); + + for (vector<string>::const_iterator l = lang.begin(); + l != lang.end(); l++) + { + debTranslationsIndex i = debTranslationsIndex(URI,Dist,(*I)->Section,(*l).c_str()); + i.GetIndexes(Owner); + } } return true; @@ -202,6 +209,7 @@ vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles() return Indexes; Indexes = new vector <pkgIndexFile*>; + std::vector<std::string> const lang = APT::Configuration::getLanguages(true); for (vector<const debSectionEntry *>::const_iterator I = SectionEntries.begin(); I != SectionEntries.end(); I++) { if ((*I)->IsSrc) @@ -209,7 +217,10 @@ vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles() else { Indexes->push_back(new debPackagesIndex (URI, Dist, (*I)->Section, IsTrusted())); - Indexes->push_back(new debTranslationsIndex(URI, Dist, (*I)->Section)); + + for (vector<string>::const_iterator l = lang.begin(); + l != lang.end(); l++) + Indexes->push_back(new debTranslationsIndex(URI,Dist,(*I)->Section,(*l).c_str())); } } diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index 8ed0bb7eb..5b8538a46 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -11,6 +11,7 @@ #include <apt-pkg/debrecords.h> #include <apt-pkg/strutl.h> #include <apt-pkg/error.h> +#include <apt-pkg/aptconfiguration.h> #include <langinfo.h> /*}}}*/ @@ -109,13 +110,18 @@ string debRecordParser::ShortDesc() string debRecordParser::LongDesc() { string orig, dest; - char *codeset = nl_langinfo(CODESET); if (!Section.FindS("Description").empty()) orig = Section.FindS("Description").c_str(); - else - orig = Section.FindS(("Description-" + pkgIndexFile::LanguageCode()).c_str()).c_str(); + else + { + vector<string> const lang = APT::Configuration::getLanguages(); + for (vector<string>::const_iterator l = lang.begin(); + orig.empty() && l != lang.end(); l++) + orig = Section.FindS(string("Description-").append(*l).c_str()); + } + char const * const codeset = nl_langinfo(CODESET); if (strcmp(codeset,"UTF-8") != 0) { UTF8ToCodeset(codeset, orig, &dest); orig = dest; diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index bde10aa6d..21336e1af 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -54,7 +54,8 @@ const char **debSrcRecordParser::Binaries() package/version records representing the build dependency. The returned array need not be freed and will be reused by the next call to this function */ -bool debSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec> &BuildDeps, bool ArchOnly) +bool debSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec> &BuildDeps, + bool const &ArchOnly, bool const &StripMultiArch) { unsigned int I; const char *Start, *Stop; @@ -77,7 +78,7 @@ bool debSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec> while (1) { Start = debListParser::ParseDepends(Start, Stop, - rec.Package,rec.Version,rec.Op,true); + rec.Package,rec.Version,rec.Op,true, StripMultiArch); if (Start == 0) return _error->Error("Problem parsing dependency: %s", fields[I]); diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index a3b5a8286..c39d78bae 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -30,14 +30,14 @@ class debSrcRecordParser : public pkgSrcRecords::Parser virtual bool Restart() {return Tags.Jump(Sect,0);}; virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);}; - virtual bool Jump(unsigned long Off) {iOffset = Off; return Tags.Jump(Sect,Off);}; + virtual bool Jump(unsigned long const &Off) {iOffset = Off; return Tags.Jump(Sect,Off);}; virtual string Package() const {return Sect.FindS("Package");}; virtual string Version() const {return Sect.FindS("Version");}; virtual string Maintainer() const {return Sect.FindS("Maintainer");}; virtual string Section() const {return Sect.FindS("Section");}; virtual const char **Binaries(); - virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps, bool ArchOnly); + virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true); virtual unsigned long Offset() {return iOffset;}; virtual string AsStr() { @@ -47,7 +47,7 @@ class debSrcRecordParser : public pkgSrcRecords::Parser }; virtual bool Files(vector<pkgSrcRecords::File> &F); - debSrcRecordParser(string File,pkgIndexFile const *Index) + debSrcRecordParser(string const &File,pkgIndexFile const *Index) : Parser(Index), Fd(File,FileFd::ReadOnly), Tags(&Fd,102400), Buffer(0), BufSize(0) {} ~debSrcRecordParser(); diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 57c9f95ca..53eb11172 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -275,7 +275,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List, _error->Warning("No valid records were found."); if (NotFound + WrongSize > 10) - _error->Warning("Alot of entries were discarded, something may be wrong.\n"); + _error->Warning("A lot of entries were discarded, something may be wrong.\n"); return true; @@ -847,7 +847,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ _error->Warning("No valid records were found."); if (NotFound + WrongSize > 10) - _error->Warning("Alot of entries were discarded, something may be wrong.\n"); + _error->Warning("A lot of entries were discarded, something may be wrong.\n"); return true; diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc index 08f71feb0..37be87055 100644 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@ -8,9 +8,9 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include <apt-pkg/configuration.h> #include <apt-pkg/indexfile.h> #include <apt-pkg/error.h> +#include <apt-pkg/aptconfiguration.h> #include <clocale> #include <cstring> @@ -66,28 +66,20 @@ string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record, return string(); } /*}}}*/ -// IndexFile::TranslationsAvailable - Check if will use Translation /*{{{*/ +// IndexFile::TranslationsAvailable - Check if will use Translation /*{{{*/ // --------------------------------------------------------------------- /* */ -bool pkgIndexFile::TranslationsAvailable() -{ - const string Translation = _config->Find("APT::Acquire::Translation"); - - if (Translation.compare("none") != 0) - return CheckLanguageCode(LanguageCode().c_str()); - else - return false; +bool pkgIndexFile::TranslationsAvailable() { + return (APT::Configuration::getLanguages().empty() != true); } /*}}}*/ -// IndexFile::CheckLanguageCode - Check the Language Code /*{{{*/ +// IndexFile::CheckLanguageCode - Check the Language Code /*{{{*/ // --------------------------------------------------------------------- -/* */ -/* common cases: de_DE, de_DE@euro, de_DE.UTF-8, de_DE.UTF-8@euro, - de_DE.ISO8859-1, tig_ER - more in /etc/gdm/locale.conf -*/ - -bool pkgIndexFile::CheckLanguageCode(const char *Lang) +/* No intern need for this method anymore as the check for correctness + is already done in getLanguages(). Note also that this check is + rather bad (doesn't take three character like ast into account). + TODO: Remove method with next API break */ +__attribute__ ((deprecated)) bool pkgIndexFile::CheckLanguageCode(const char *Lang) { if (strlen(Lang) == 2 || (strlen(Lang) == 5 && Lang[2] == '_')) return true; @@ -98,31 +90,14 @@ bool pkgIndexFile::CheckLanguageCode(const char *Lang) return false; } /*}}}*/ -// IndexFile::LanguageCode - Return the Language Code /*{{{*/ +// IndexFile::LanguageCode - Return the Language Code /*{{{*/ // --------------------------------------------------------------------- -/* return the language code */ -string pkgIndexFile::LanguageCode() -{ - const string Translation = _config->Find("APT::Acquire::Translation"); - - if (Translation.compare("environment") == 0) - { - string lang = std::setlocale(LC_MESSAGES,NULL); - - // we have a mapping of the language codes that contains all the language - // codes that need the country code as well - // (like pt_BR, pt_PT, sv_SE, zh_*, en_*) - const char *need_full_langcode[] = { "pt","sv","zh","en", NULL }; - for(const char **s = need_full_langcode;*s != NULL; s++) - if(lang.find(*s) == 0) - return lang.substr(0,5); - - if(lang.size() > 2) - return lang.substr(0,2); - else - return lang; - } - else - return Translation; +/* As we have now possibly more than one LanguageCode this method is + supersided by a) private classmembers or b) getLanguages(). + TODO: Remove method with next API break */ +__attribute__ ((deprecated)) string pkgIndexFile::LanguageCode() { + if (TranslationsAvailable() == false) + return ""; + return APT::Configuration::getLanguages()[0]; } /*}}}*/ diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index b0ce6e598..eb7e4957a 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -22,11 +22,11 @@ // Include Files /*{{{*/ #include <apt-pkg/pkgcache.h> #include <apt-pkg/policy.h> -#include <apt-pkg/indexfile.h> #include <apt-pkg/version.h> #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> #include <apt-pkg/configuration.h> +#include <apt-pkg/aptconfiguration.h> #include <apti18n.h> @@ -298,7 +298,7 @@ const char * pkgCache::PkgIterator::CandVersion() const { //TargetVer is empty, so don't use it. - VerIterator version = pkgPolicy::pkgPolicy(Owner).GetCandidateVer(*this); + VerIterator version = pkgPolicy(Owner).GetCandidateVer(*this); if (version.IsGood()) return version.VerStr(); return 0; @@ -674,14 +674,22 @@ string pkgCache::PkgFileIterator::RelStr() */ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const { - pkgCache::DescIterator DescDefault = DescriptionList(); - pkgCache::DescIterator Desc = DescDefault; - for (; Desc.end() == false; Desc++) - if (pkgIndexFile::LanguageCode() == Desc.LanguageCode()) - break; - if (Desc.end() == true) - Desc = DescDefault; - return Desc; + std::vector<string> const lang = APT::Configuration::getLanguages(); + for (std::vector<string>::const_iterator l = lang.begin(); + l != lang.end(); l++) + { + pkgCache::DescIterator DescDefault = DescriptionList(); + pkgCache::DescIterator Desc = DescDefault; + + for (; Desc.end() == false; Desc++) + if (*l == Desc.LanguageCode()) + break; + if (Desc.end() == true) + Desc = DescDefault; + return Desc; + } + + return DescriptionList(); }; /*}}}*/ diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 38733713f..e8a3e1064 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -245,7 +245,7 @@ struct pkgCache::VerFile /*{{{*/ map_ptrloc File; // PackageFile map_ptrloc NextFile; // PkgVerFile map_ptrloc Offset; // File offset - unsigned short Size; + unsigned long Size; }; /*}}}*/ struct pkgCache::DescFile /*{{{*/ @@ -253,7 +253,7 @@ struct pkgCache::DescFile /*{{{*/ map_ptrloc File; // PackageFile map_ptrloc NextFile; // PkgVerFile map_ptrloc Offset; // File offset - unsigned short Size; + unsigned long Size; }; /*}}}*/ struct pkgCache::Version /*{{{*/ diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 81fdb0431..393181b6d 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -27,14 +27,12 @@ #include <apt-pkg/configuration.h> #include <apt-pkg/tagfile.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> #include <apt-pkg/error.h> #include <apt-pkg/sptr.h> - + #include <apti18n.h> -#include <dirent.h> -#include <sys/stat.h> -#include <algorithm> #include <iostream> #include <sstream> /*}}}*/ @@ -282,36 +280,7 @@ bool ReadPinDir(pkgPolicy &Plcy,string Dir) return true; } - DIR *D = opendir(Dir.c_str()); - if (D == 0) - return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); - - vector<string> List; - - for (struct dirent *Ent = readdir(D); Ent != 0; Ent = readdir(D)) - { - if (Ent->d_name[0] == '.') - continue; - - // Skip bad file names ala run-parts - const char *C = Ent->d_name; - for (; *C != 0; C++) - if (isalpha(*C) == 0 && isdigit(*C) == 0 && *C != '_' && *C != '-') - break; - if (*C != 0) - continue; - - // Make sure it is a file and not something else - string File = flCombine(Dir,Ent->d_name); - struct stat St; - if (stat(File.c_str(),&St) != 0 || S_ISREG(St.st_mode) == 0) - continue; - - List.push_back(File); - } - closedir(D); - - sort(List.begin(),List.end()); + vector<string> const List = GetListOfFilesInDir(Dir, "", true); // Read the files for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++) diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 4b3abe918..929259961 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -17,13 +17,6 @@ #include <apti18n.h> #include <fstream> - -// CNC:2003-03-03 - This is needed for ReadDir stuff. -#include <algorithm> -#include <stdio.h> -#include <dirent.h> -#include <sys/stat.h> -#include <unistd.h> /*}}}*/ using namespace std; @@ -322,41 +315,7 @@ bool pkgSourceList::GetIndexes(pkgAcquire *Owner, bool GetAll) const /* */ bool pkgSourceList::ReadSourceDir(string Dir) { - DIR *D = opendir(Dir.c_str()); - if (D == 0) - return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); - - vector<string> List; - - for (struct dirent *Ent = readdir(D); Ent != 0; Ent = readdir(D)) - { - if (Ent->d_name[0] == '.') - continue; - - // CNC:2003-12-02 Only accept .list files as valid sourceparts - if (flExtension(Ent->d_name) != "list") - continue; - - // Skip bad file names ala run-parts - const char *C = Ent->d_name; - for (; *C != 0; C++) - if (isalpha(*C) == 0 && isdigit(*C) == 0 - && *C != '_' && *C != '-' && *C != '.') - break; - if (*C != 0) - continue; - - // Make sure it is a file and not something else - string File = flCombine(Dir,Ent->d_name); - struct stat St; - if (stat(File.c_str(),&St) != 0 || S_ISREG(St.st_mode) == 0) - continue; - - List.push_back(File); - } - closedir(D); - - sort(List.begin(),List.end()); + vector<string> const List = GetListOfFilesInDir(Dir, "list", true); // Read the files for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++) diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc index 5e40ae624..46a02b55c 100644 --- a/apt-pkg/srcrecords.cc +++ b/apt-pkg/srcrecords.cc @@ -77,7 +77,7 @@ bool pkgSrcRecords::Restart() /* This searches on both source package names and output binary names and returns the first found. A 'cursor' like system is used to allow this function to be called multiple times to get successive entries */ -pkgSrcRecords::Parser *pkgSrcRecords::Find(const char *Package,bool SrcOnly) +pkgSrcRecords::Parser *pkgSrcRecords::Find(const char *Package,bool const &SrcOnly) { if (Current == Files.end()) return 0; @@ -116,7 +116,7 @@ pkgSrcRecords::Parser *pkgSrcRecords::Find(const char *Package,bool SrcOnly) // Parser::BuildDepType - Convert a build dep to a string /*{{{*/ // --------------------------------------------------------------------- /* */ -const char *pkgSrcRecords::Parser::BuildDepType(unsigned char Type) +const char *pkgSrcRecords::Parser::BuildDepType(unsigned char const &Type) { const char *fields[] = {"Build-Depends", "Build-Depends-Indep", diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h index 99cbc6060..a49533864 100644 --- a/apt-pkg/srcrecords.h +++ b/apt-pkg/srcrecords.h @@ -59,7 +59,7 @@ class pkgSrcRecords virtual bool Restart() = 0; virtual bool Step() = 0; - virtual bool Jump(unsigned long Off) = 0; + virtual bool Jump(unsigned long const &Off) = 0; virtual unsigned long Offset() = 0; virtual string AsStr() = 0; @@ -69,8 +69,8 @@ class pkgSrcRecords virtual string Section() const = 0; virtual const char **Binaries() = 0; // Ownership does not transfer - virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps, bool ArchOnly) = 0; - static const char *BuildDepType(unsigned char Type); + virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) = 0; + static const char *BuildDepType(unsigned char const &Type); virtual bool Files(vector<pkgSrcRecords::File> &F) = 0; @@ -90,7 +90,7 @@ class pkgSrcRecords bool Restart(); // Locate a package by name - Parser *Find(const char *Package,bool SrcOnly = false); + Parser *Find(const char *Package,bool const &SrcOnly = false); pkgSrcRecords(pkgSourceList &List); ~pkgSrcRecords(); diff --git a/buildlib/po4a_manpage.mak b/buildlib/po4a_manpage.mak index dfa215d29..6eec9d031 100644 --- a/buildlib/po4a_manpage.mak +++ b/buildlib/po4a_manpage.mak @@ -57,5 +57,5 @@ endif # Debian Doc SGML Documents SOURCE := $(wildcard *.$(LC).sgml) -DEBIANDOC_HTML_OPTIONS=-l $(LC) +DEBIANDOC_HTML_OPTIONS=-l $(LC).UTF-8 include $(DEBIANDOC_H) diff --git a/buildlib/tools.m4 b/buildlib/tools.m4 index d1d692331..433d5ca32 100644 --- a/buildlib/tools.m4 +++ b/buildlib/tools.m4 @@ -1,4 +1,4 @@ -AC_DEFUN(ah_HAVE_GETCONF, +AC_DEFUN([ah_HAVE_GETCONF], [AC_ARG_WITH(getconf, [ --with-getconf Enable automagical buildtime configuration], [if test "$withval" = "yes"; then @@ -14,7 +14,7 @@ AC_DEFUN(ah_HAVE_GETCONF, ]) dnl ah_GET_CONF(variable, value ..., [default]) -AC_DEFUN(ah_GET_GETCONF, +AC_DEFUN([ah_GET_GETCONF], [AC_REQUIRE([ah_HAVE_GETCONF]) if test ! -z "$GETCONF";then old_args="[$]@" @@ -28,7 +28,7 @@ AC_DEFUN(ah_GET_GETCONF, eval $1="$3" fi ]) -AC_DEFUN(ah_NUM_CPUS, +AC_DEFUN([ah_NUM_CPUS], [AC_MSG_CHECKING([number of cpus]) AC_ARG_WITH(cpus, [ --with-cpus The number of cpus to be used for building(see --with-procs, default 1)], @@ -56,7 +56,7 @@ AC_DEFUN(ah_NUM_CPUS, AC_MSG_RESULT([$ah_NUM_CPUS_msg]) AC_SUBST(NUM_CPUS) ]) -AC_DEFUN(ah_PROC_MULTIPLY, +AC_DEFUN([ah_PROC_MULTIPLY], [AC_REQUIRE([ah_NUM_CPUS]) AC_MSG_CHECKING([processor multiplier]) AC_ARG_WITH(proc-multiply, @@ -72,7 +72,7 @@ AC_DEFUN(ah_PROC_MULTIPLY, AC_SUBST(PROC_MULTIPLY) ]) -AC_DEFUN(ah_NUM_PROCS, +AC_DEFUN([ah_NUM_PROCS], [AC_REQUIRE([ah_PROC_MULTIPLY]) AC_REQUIRE([ah_NUM_CPUS]) AC_MSG_CHECKING([number of processes to run during make]) @@ -89,7 +89,7 @@ AC_DEFUN(ah_NUM_PROCS, AC_SUBST(NUM_PROCS) ]) -AC_DEFUN(ah_GCC3DEP,[ +AC_DEFUN([ah_GCC3DEP],[ AC_MSG_CHECKING(if $CXX -MD works) touch gcc3dep.cc ${CXX-c++} -MD -o gcc3dep_test.o -c gcc3dep.cc diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 7d7f58a62..286f306cd 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1620,7 +1620,7 @@ bool Policy(CommandLine &CmdL) if (SrcList->FindIndex(VF.File(),Indx) == false && _system->FindIndex(VF.File(),Indx) == false) return _error->Error(_("Cache is out of sync, can't x-ref a package file")); - printf(_(" %4i %s\n"),Plcy.GetPriority(VF.File()), + printf(" %4i %s\n",Plcy.GetPriority(VF.File()), Indx->Describe(true).c_str()); } } diff --git a/cmdline/apt-key b/cmdline/apt-key index 5f4e02fdf..1950723f3 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -5,10 +5,8 @@ unset GREP_OPTIONS # We don't use a secret keyring, of course, but gpg panics and # implodes if there isn't one available - GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg" -GPG="$GPG_CMD --keyring /etc/apt/trusted.gpg" - +GPG="$GPG_CMD" MASTER_KEYRING="" ARCHIVE_KEYRING_URI="" @@ -56,7 +54,14 @@ add_keys_with_verify_against_master_keyring() { # (otherwise it does not make sense from a security POV) net_update() { if [ -z "$ARCHIVE_KEYRING_URI" ]; then - echo "ERROR: no location for the archive-keyring given" + echo "ERROR: no location for the archive-keyring given" + exit 1 + fi + # in theory we would need to depend on wget for this, but this feature + # isn't useable in debian anyway as we have no keyring uri nor a master key + if ! which wget >/dev/null 2>&1; then + echo "ERROR: an installed wget is required for a network-based update" + exit 1 fi if [ ! -d /var/lib/apt/keyrings ]; then mkdir -p /var/lib/apt/keyrings @@ -108,7 +113,7 @@ update() { usage() { - echo "Usage: apt-key [command] [arguments]" + echo "Usage: apt-key [--keyring file] [command] [arguments]" echo echo "Manage apt's list of trusted keys" echo @@ -122,8 +127,39 @@ usage() { echo " apt-key finger - list fingerprints" echo " apt-key adv - pass advanced options to gpg (download key)" echo + echo "If no specific keyring file is given the command applies to all keyring files." } +# Determine on which keyring we want to work +if [ "$1" = "--keyring" ]; then + echo "keyfile given" + shift + TRUSTEDFILE="$1" + if [ -r "$TRUSTEDFILE" ]; then + GPG="$GPG --keyring $TRUSTEDFILE --primary-keyring $TRUSTEDFILE" + else + echo >&2 "Error: The specified keyring »$TRUSTEDFILE« is missing or not readable" + exit 1 + fi + shift +else + echo "generate list" + TRUSTEDFILE="/etc/apt/trusted.gpg" + if [ -r "$TRUSTEDFILE" ]; then + GPG="$GPG --keyring $TRUSTEDFILE" + fi + GPG="$GPG --primary-keyring $TRUSTEDFILE" + TRUSTEDPARTS="/etc/apt/trusted.gpg.d" + if [ -d "$TRUSTEDPARTS" ]; then + echo "parts active" + for trusted in $(run-parts --list $TRUSTEDPARTS --regex '^.*\.gpg$'); do + echo "part -> $trusted" + GPG="$GPG --keyring $trusted" + done + fi +fi +echo "COMMAND: $GPG" + command="$1" if [ -z "$command" ]; then usage diff --git a/configure.in b/configure.in index fe30d4ca1..302d88d51 100644 --- a/configure.in +++ b/configure.in @@ -96,10 +96,10 @@ AC_MSG_RESULT($archset) AC_DEFINE_UNQUOTED(COMMON_ARCH,"$archset") dnl We use C99 types if at all possible -AC_CACHE_CHECK([for C99 integer types],c9x_ints,[ +AC_CACHE_CHECK([for C99 integer types],apt_cv_c9x_ints,[ AC_TRY_COMPILE([#include <inttypes.h>], [uint8_t Foo1;uint16_t Foo2;uint32_t Foo3;], - c9x_ints=yes,c9x_ints=no)]) + apt_cv_c9x_ints=yes,apt_cv_c9x_ints=no)]) dnl Single Unix Spec statvfs AC_CHECK_FUNC(statvfs,[HAVE_STATVFS=yes]) @@ -150,7 +150,7 @@ AC_C_BIGENDIAN dnl We do not need this if we have inttypes! HAVE_C9X=yes -if test x"$c9x_ints" = x"no"; then +if test x"$apt_cv_c9x_ints" = x"no"; then AC_CHECK_SIZEOF(char,$size_char) AC_CHECK_SIZEOF(int,$size_int) AC_CHECK_SIZEOF(short,$size_short) diff --git a/debian/apt.dirs b/debian/apt.dirs index fb6716c35..66556e453 100644 --- a/debian/apt.dirs +++ b/debian/apt.dirs @@ -5,6 +5,7 @@ etc/apt etc/apt/apt.conf.d etc/apt/preferences.d etc/apt/sources.list.d +etc/apt/trusted.gpg.d etc/logrotate.d var/cache/apt/archives/partial var/lib/apt/lists/partial diff --git a/debian/apt.postinst b/debian/apt.postinst index 88fb932df..cc0d8b1fe 100644 --- a/debian/apt.postinst +++ b/debian/apt.postinst @@ -15,13 +15,7 @@ set -e case "$1" in configure) - - if ! test -f /etc/apt/trusted.gpg; then - cp /usr/share/apt/debian-archive.gpg /etc/apt/trusted.gpg - fi - apt-key update - ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/changelog b/debian/changelog index 53dfcce12..cdf477cfd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,56 @@ +apt (0.7.26) UNRELEASED; urgency=low + + [ Christian Perrier ] + * French manpage translation update + + [Chris Leick] + * spot & fix various typos in all manpages + * German manpage translation update + + [ 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) + * cmdline/apt-cache.cc: + - remove translatable marker from the "%4i %s\n" string + * buildlib/po4a_manpage.mak: + - instruct debiandoc to build files with utf-8 encoding + * buildlib/tools.m4: + - fix some warning from the buildtools + * apt-pkg/acquire-item.cc: + - add configuration PDiffs::Limit-options to not download + too many or too big patches (Closes: #554349) + * debian/control: + - let all packages depend on ${misc:Depends} + * share/*-archive.gpg: + - remove the horrible outdated files. We already depend on + the keyring so we don't need to ship our own version + * cmdline/apt-key: + - errors out if wget is not installed (Closes: #545754) + - add --keyring option as we have now possibly many + * methods/gpgv.cc: + - pass all keyrings (TrustedParts) to gpgv instead of + using only one trusted.gpg keyring (Closes: #304846) + * methods/https.cc: + - finally merge the rest of the patchset from Arnaud Ebalard + with the CRL and Issuers options, thanks! (Closes: #485963) + + -- Michael Vogt <mvo@debian.org> Thu, 10 Dec 2009 22:02:38 +0100 + apt (0.7.25) unstable; urgency=low [ Christian Perrier ] diff --git a/debian/control b/debian/control index 357fb3f5f..d756871d1 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/ Package: apt Architecture: any -Depends: ${shlibs:Depends}, debian-archive-keyring +Depends: ${shlibs:Depends}, debian-archive-keyring, ${misc:Depends} Replaces: libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7) Provides: ${libapt-pkg:provides} Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt @@ -26,6 +26,7 @@ Description: Advanced front-end for dpkg Package: apt-doc Architecture: all Priority: optional +Depends: ${misc:Depends} Replaces: apt (<< 0.5.4.9) Section: doc Description: Documentation for APT @@ -35,7 +36,7 @@ Description: Documentation for APT Package: libapt-pkg-dev Architecture: any Priority: optional -Depends: apt (= ${binary:Version}), apt-utils (= ${binary:Version}), ${libapt-pkg:provides}, ${libapt-inst:provides} +Depends: apt (= ${binary:Version}), apt-utils (= ${binary:Version}), ${libapt-pkg:provides}, ${libapt-inst:provides}, ${misc:Depends} Section: libdevel Description: Development files for APT's libapt-pkg and libapt-inst This package contains the header files and libraries for @@ -45,6 +46,7 @@ Description: Development files for APT's libapt-pkg and libapt-inst Package: libapt-pkg-doc Architecture: all Priority: optional +Depends: ${misc:Depends} Section: doc Description: Documentation for APT development This package contains documentation for development of the APT @@ -52,7 +54,7 @@ Description: Documentation for APT development Package: apt-utils Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} Provides: ${libapt-inst:provides} Replaces: apt (<< 0.5.9) Description: APT utility programs @@ -65,7 +67,7 @@ Description: APT utility programs Package: apt-transport-https Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} Priority: optional Description: APT https transport This package contains a APT https transport. It makes it possible to diff --git a/debian/rules b/debian/rules index d01b57cd6..37c96ef20 100755 --- a/debian/rules +++ b/debian/rules @@ -213,7 +213,6 @@ apt: build build-doc debian/shlibs.local cp debian/bugscript debian/$@/usr/share/bug/apt/script cp debian/apt.logrotate debian/$@/etc/logrotate.d/apt - cp share/debian-archive.gpg debian/$@/usr/share/$@ cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove # head -n 500 ChangeLog > debian/ChangeLog diff --git a/doc/apt-ftparchive.1.xml b/doc/apt-ftparchive.1.xml index c56ff235a..eb61eae51 100644 --- a/doc/apt-ftparchive.1.xml +++ b/doc/apt-ftparchive.1.xml @@ -544,6 +544,18 @@ for i in Sections do Configuration Item: <literal>APT::FTPArchive::ReadOnlyDB</literal>.</para></listitem> </varlistentry> + <varlistentry><term><option>APT::FTPArchive::AlwaysStat</option></term> + <listitem><para> + &apt-ftparchive; caches as much as possible of metadata in it is cachedb. If packages + are recompiled and/or republished with the same version again, this will lead to problems + as the now outdated cached metadata like size and checksums will be used. With this option + enabled this will no longer happen as it will be checked if the file was changed. + Note that this option is set to "<literal>false</literal>" by default as it is not recommend + to upload multiply versions/builds of a package with the same versionnumber, so in theory + nobody will have these problems and therefore all these extra checks are useless. + </para></listitem> + </varlistentry> + <varlistentry><term><option>APT::FTPArchive::LongDescription</option></term> <listitem><para> This configuration option defaults to "<literal>true</literal>" and should only be set to diff --git a/doc/apt-key.8.xml b/doc/apt-key.8.xml index 7b0691b5e..8f445b7f9 100644 --- a/doc/apt-key.8.xml +++ b/doc/apt-key.8.xml @@ -26,7 +26,8 @@ <refsynopsisdiv> <cmdsynopsis> <command>apt-key</command> - <arg><replaceable>command</replaceable>/</arg> + <arg><option>--keyring <replaceable>filename</replaceable></option></arg> + <arg><replaceable>command</replaceable></arg> <arg rep="repeat"><option><replaceable>arguments</replaceable></option></arg> </cmdsynopsis> </refsynopsisdiv> @@ -135,11 +136,24 @@ </variablelist> </refsect1> + <refsect1><title>Options</title> +<para>Note that options need to be defined before the commands described in the previous section.</para> + <variablelist> + <varlistentry><term>--keyring <replaceable>filename</replaceable></term> + <listitem><para>With this option it is possible to specify a specific keyring + file the command should operate on. The default is that a command is executed + on the <filename>trusted.gpg</filename> file as well as on all parts in the + <filename>trusted.gpg.d</filename> directory, through <filename>trusted.gpg</filename> + is the primary keyring which means that e.g. new keys are added to this one. + </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> + + &file-trustedgpg; <varlistentry><term><filename>/etc/apt/trustdb.gpg</filename></term> <listitem><para>Local trust database of archive keys.</para></listitem> @@ -153,8 +167,6 @@ <listitem><para>Keyring of Debian archive removed trusted keys.</para></listitem> </varlistentry> - - </variablelist> </refsect1> diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index d7ad51cfb..e568baa35 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -142,7 +142,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; <listitem><para>Default release to install packages from if more than one version available. Contains release name, codename or release version. Examples: 'stable', 'testing', 'unstable', 'lenny', 'squeeze', '4.0', '5.0*'. See also &apt-preferences;.</para></listitem> </varlistentry> - + <varlistentry><term>Ignore-Hold</term> <listitem><para>Ignore Held packages; This global option causes the problem resolver to ignore held packages in its decision making.</para></listitem> @@ -166,10 +166,10 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; longer guaranteed to work as their dependency on A is not longer satisfied. The immediate configuration marker is also applied to all dependencies which can generate a problem if the dependencies e.g. form a circle as a dependency with the immediate flag is comparable with a Pre-Dependency. So in theory it is possible - that APT encounters a situation in which it is unable to perform immediate configuration, error out and - refers to this option so the user can deactivate the immediate configuration temporary to be able to perform + that APT encounters a situation in which it is unable to perform immediate configuration, errors out and + refers to this option so the user can deactivate the immediate configuration temporarily to be able to perform an install/upgrade again. Note the use of the word "theory" here as this problem was only encountered by now - in real world a few times in non-stable distribution versions and caused by wrong dependencies of the package + in real world a few times in non-stable distribution versions and was caused by wrong dependencies of the package in question or by a system in an already broken state, so you should not blindly disable this option as the mentioned scenario above is not the only problem immediate configuration can help to prevent in the first place. Before a big operation like <literal>dist-upgrade</literal> is run with this option disabled it should be tried to @@ -221,7 +221,14 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; <varlistentry><term>PDiffs</term> <listitem><para>Try to download deltas called <literal>PDiffs</literal> for Packages or Sources files instead of downloading whole ones. True - by default.</para></listitem> + by default.</para> + <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 + 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> </varlistentry> <varlistentry><term>Queue-Mode</term> @@ -392,6 +399,27 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; these warnings are most of the time false negatives. Future versions will maybe include a way to really prefer uncompressed files to support the usage of local mirrors.</para></listitem> </varlistentry> + + <varlistentry><term>Languages</term> + <listitem><para>The Languages subsection controls which <filename>Translation</filename> files are downloaded + and in which order APT tries to display the Description-Translations. APT will try to display the first + available Description in the Language which is listed at first. Languages can be defined with their + short or long Languagecodes. Note that not all archives provide <filename>Translation</filename> + files for every Language - especially the long Languagecodes are rare, so please + inform you which ones are available before you set here impossible values.</para> + <para>The default list includes "environment" and "en". "<literal>environment</literal>" has a special meaning here: + It will be replaced at runtime with the languagecodes extracted from the <literal>LC_MESSAGES</literal> environment variable. + It will also ensure that these codes are not included twice in the list. If <literal>LC_MESSAGES</literal> + is set to "C" only the <filename>Translation-en</filename> file (if available) will be used. + To force apt to use no Translation file use the setting <literal>Acquire::Languages=none</literal>. "<literal>none</literal>" + is another special meaning code which will stop the search for a fitting <filename>Translation</filename> file. + This can be used by the system administrator to let APT know that it should download also this files without + actually use them if the environment doesn't specify this languages. So the following example configuration will + result in the order "en, de" in an english and in "de, en" in a german localization. Note that "fr" is downloaded, + but not used if APT is not used in a french localization, in such an environment the order would be "fr, de, en". + <programlisting>Acquire::Languages { "environment"; "de"; "en"; "none"; "fr"; };</programlisting></para></listitem> + </varlistentry> + </variablelist> </para> </refsect1> @@ -983,6 +1011,7 @@ is commented. </listitem> </varlistentry> --> + </variablelist> </refsect1> diff --git a/doc/apt.ent b/doc/apt.ent index 0b341ec14..da43d8f3d 100644 --- a/doc/apt.ent +++ b/doc/apt.ent @@ -353,3 +353,16 @@ Configuration Item: <literal>Dir::State::Lists</literal> (implicit partial).</para></listitem> </varlistentry> "> + +<!ENTITY file-trustedgpg " + <varlistentry><term><filename>/etc/apt/trusted.gpg</filename></term> + <listitem><para>Keyring of local trusted keys, new keys will be added here. + Configuration Item: <literal>Dir::Etc::Trusted</literal>.</para></listitem> + </varlistentry> + + <varlistentry><term><filename>/etc/apt/trusted.gpg.d/</filename></term> + <listitem><para>File fragments for the trusted keys, additional keyrings can + be stored here (by other packages or the administrator). + Configuration Item <literal>Dir::Etc::TrustedParts</literal>.</para></listitem> + </varlistentry> +"> diff --git a/doc/examples/apt-https-method-example.conf b/doc/examples/apt-https-method-example.conf index 0067171bd..cc7889044 100644 --- a/doc/examples/apt-https-method-example.conf +++ b/doc/examples/apt-https-method-example.conf @@ -36,6 +36,8 @@ to access its content. - The certificate presented by both server have (as expected) a CN that matches their respective DNS names. + - We have CRL available for both dom1.tld and dom2.tld PKI, and intend + to use them. - It somtimes happens that we had other more generic https available repository to our list. We want the checks to be performed against a common list of anchors (like the one provided by ca-certificates @@ -56,10 +58,13 @@ Acquire::https::CaInfo "/etc/ssl/certs/ca-certificates.pem"; // Use a specific anchor and associated CRL. Enforce issuer of // server certificate using its cert. Acquire::https::secure.dom1.tld::CaInfo "/etc/apt/certs/ca-dom1-crt.pem"; +Acquire::https::secure.dom1.tld::CrlFile "/etc/apt/certs/ca-dom1-crl.pem"; +Acquire::https::secure.dom1.tld::IssuerCert "/etc/apt/certs/secure.dom1-issuer-crt.pem"; // Like previous for anchor and CRL, but also provide our // certificate and keys for client authentication. Acquire::https::secure.dom2.tld::CaInfo "/etc/apt/certs/ca-dom2-crt.pem"; +Acquire::https::secure.dom2.tld::CrlFile "/etc/apt/certs/ca-dom2-crl.pem"; Acquire::https::secure.dom2.tld::SslCert "/etc/apt/certs/my-crt.pem"; Acquire::https::secure.dom2.tld::SslKey "/etc/apt/certs/my-key.pem"; @@ -97,6 +102,22 @@ Acquire::https::secure.dom2.tld::SslKey "/etc/apt/certs/my-key.pem"; used for the https entries in the sources.list file that use that repository (with the same name). + Acquire::https[::repo.domain.tld]::CrlFile "/path/to/all/crl.pem"; + + Like previous knob but for passing the list of CRL files (in PEM + format) to be used to verify revocation status. Again, if the + option is defined with no specific mirror (probably makes little + sense), this CRL information is used for all defined https entries + in sources.list file. In a mirror specific context, it only applies + to that mirror. + + Acquire::https[::repo.domain.tld]::IssuerCert "/path/to/issuer/cert.pem"; + + Allows to constrain the issuer of the server certificate (for all + https mirrors or a specific one) to a specific issuer. If the + server certificate has not been issued by this certificate, + connection fails. + Acquire::https[::repo.domain.tld]::Verify-Peer "true"; When authenticating the server, if the certificate verification fails diff --git a/doc/examples/configure-index b/doc/examples/configure-index index ced390447..87cf97ffe 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -90,11 +90,6 @@ APT TrustCDROM "false"; // consider the CDROM always trusted }; - GPGV - { - TrustedKeyring "/etc/apt/trusted.gpg"; - }; - // Some general options Ignore-Hold "false"; Clean-Installed "true"; @@ -176,7 +171,10 @@ Acquire Source-Symlinks "true"; PDiffs "true"; // try to get the IndexFile diffs - + PDiffs::FileLimit "4"; // don't use diffs if we would need more than 4 diffs + PDiffs::SizeLimit "50"; // don't use diffs if size of all patches excess + // 50% of the size of the original file + // HTTP method configuration http { @@ -273,6 +271,15 @@ Acquire Order { "gz"; "lzma"; "bz2"; }; }; + + Languages + { + "environment"; + "de"; + "en"; + "none"; + "fr"; + }; }; // Directory layout @@ -308,6 +315,8 @@ Dir "/" SourceParts "sources.list.d"; VendorList "vendors.list"; VendorParts "vendors.list.d"; + Trusted "trusted.gpg"; + TrustedParts "trusted.gpg.d"; }; // Locations of binaries diff --git a/doc/guide.sgml b/doc/guide.sgml index 1b7e1d8f3..ff727f6ca 100644 --- a/doc/guide.sgml +++ b/doc/guide.sgml @@ -56,7 +56,7 @@ requires another package to be installed at the same time to work properly. <p> For instance, mailcrypt is an emacs extension that aids in encrypting email -with GPG. Without GPGP installed mail-crypt is useless, so mailcrypt has a +with GPG. Without GPGP installed mailcrypt is useless, so mailcrypt has a simple dependency on GPG. Also, because it is an emacs extension it has a simple dependency on emacs, without emacs it is completely useless. @@ -171,7 +171,7 @@ the <prgn>dselect</> package selection GUI. <prgn>dselect</> is used to select the packages to be installed or removed and APT actually installs them. <p> -To enable the APT method you need to to select [A]ccess in <prgn>dselect</> +To enable the APT method you need to select [A]ccess in <prgn>dselect</> and then choose the APT method. You will be prompted for a set of <em>Sources</> which are places to fetch archives from. These can be remote Internet sites, local Debian mirrors or CDROMs. Each source can provide @@ -239,7 +239,7 @@ prompt until you have specified all that you want. <p> Before starting to use <prgn>dselect</> it is necessary to update the -available list by selecting [U]pdate from the menu. This is a super-set of +available list by selecting [U]pdate from the menu. This is a superset of <tt>apt-get update</> that makes the fetched information available to <prgn>dselect</>. [U]pdate must be performed even if <tt>apt-get update</> has been run before. diff --git a/doc/makefile b/doc/makefile index 6fb604e4e..6e6186466 100644 --- a/doc/makefile +++ b/doc/makefile @@ -8,7 +8,7 @@ include ../buildlib/defaults.mak # Debian Doc SGML Documents SOURCE = $(wildcard *.sgml) -DEBIANDOC_HTML_OPTIONS=-l en +DEBIANDOC_HTML_OPTIONS=-l en.UTF-8 include $(DEBIANDOC_H) # Do not use XMLTO, build the manpages directly with XSLTPROC diff --git a/doc/offline.sgml b/doc/offline.sgml index 99e260bc3..e7ede14de 100644 --- a/doc/offline.sgml +++ b/doc/offline.sgml @@ -50,7 +50,7 @@ no connection. <p> This is achieved by creatively manipulating the APT configuration file. The -essential premis to tell APT to look on a disc for it's archive files. Note +essential premise to tell APT to look on a disc for it's archive files. Note that the disc should be formated with a filesystem that can handle long file names such as ext2, fat32 or vfat. @@ -129,7 +129,7 @@ configuration file in <em>/usr/share/doc/apt/examples/apt.conf</em>. <p> On the target machine the first thing to do is mount the disc and copy <em>/var/lib/dpkg/status</em> to it. You will also need to create the directories -outlined in the Overview, <em>archives/partial/</em> and <em>lists/partial/</em> +outlined in the Overview, <em>archives/partial/</em> and <em>lists/partial/</em>. Then take the disc to the remote machine and configure the sources.list. On the remote machine execute the following: @@ -141,9 +141,9 @@ On the remote machine execute the following: [ APT fetches all the packages needed to upgrade the target machine ] </example> -The dist-upgrade command can be replaced with any-other standard APT commands, +The dist-upgrade command can be replaced with any other standard APT commands, particularly dselect-upgrade. You can even use an APT front end such as -<em>dselect</em> However this presents a problem in communicating your +<em>dselect</em>. However this presents a problem in communicating your selections back to the local computer. <p> diff --git a/doc/po/de.po b/doc/po/de.po index 3ec7c4a5b..00ebf7b3d 100644 --- a/doc/po/de.po +++ b/doc/po/de.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: apt-doc 0.7.24\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" "POT-Creation-Date: 2009-11-27 00:05+0100\n" -"PO-Revision-Date: 2009-10-28 23:51+GMT\n" +"PO-Revision-Date: 2009-12-31 17:41+GMT\n" "Last-Translator: Chris Leick <c.leick@vollbio.de>\n" "Language-Team: German <debian-l10n-german@lists.debian.org>\n" "MIME-Version: 1.0\n" @@ -42,7 +42,7 @@ msgstr "NAME" #. type: Plain text #: apt.8:20 msgid "apt - Advanced Package Tool" -msgstr "apt - Fortschrittliches Paketierungswerkzeug (Advanced Package Tool)" +msgstr "apt - Fortschrittliches Paketwerkzeug (Advanced Package Tool)" #. type: SH #: apt.8:20 @@ -350,13 +350,7 @@ msgstr "" #. type: Plain text #: apt.ent:84 -#, fuzzy, no-wrap -#| msgid "" -#| "<!ENTITY dpkg \"<citerefentry>\n" -#| " <refentrytitle><command>dpkg</command></refentrytitle>\n" -#| " <manvolnum>8</manvolnum>\n" -#| " </citerefentry>\"\n" -#| ">\n" +#, no-wrap msgid "" "<!ENTITY dpkg \"<citerefentry>\n" " <refentrytitle><command>dpkg</command></refentrytitle>\n" @@ -366,7 +360,7 @@ msgid "" msgstr "" "<!ENTITY dpkg \"<citerefentry>\n" " <refentrytitle><command>dpkg</command></refentrytitle>\n" -" <manvolnum>8</manvolnum>\n" +" <manvolnum>1</manvolnum>\n" " </citerefentry>\"\n" ">\n" @@ -404,13 +398,7 @@ msgstr "" #. type: Plain text #: apt.ent:102 -#, fuzzy, no-wrap -#| msgid "" -#| "<!ENTITY dpkg-scanpackages \"<citerefentry>\n" -#| " <refentrytitle><command>dpkg-scanpackages</command></refentrytitle>\n" -#| " <manvolnum>8</manvolnum>\n" -#| " </citerefentry>\"\n" -#| ">\n" +#, no-wrap msgid "" "<!ENTITY dpkg-scanpackages \"<citerefentry>\n" " <refentrytitle><command>dpkg-scanpackages</command></refentrytitle>\n" @@ -420,19 +408,13 @@ msgid "" msgstr "" "<!ENTITY dpkg-scanpackages \"<citerefentry>\n" " <refentrytitle><command>dpkg-scanpackages</command></refentrytitle>\n" -" <manvolnum>8</manvolnum>\n" +" <manvolnum>1</manvolnum>\n" " </citerefentry>\"\n" ">\n" #. type: Plain text #: apt.ent:108 -#, fuzzy, no-wrap -#| msgid "" -#| "<!ENTITY dpkg-scansources \"<citerefentry>\n" -#| " <refentrytitle><command>dpkg-scansources</command></refentrytitle>\n" -#| " <manvolnum>8</manvolnum>\n" -#| " </citerefentry>\"\n" -#| ">\n" +#, no-wrap msgid "" "<!ENTITY dpkg-scansources \"<citerefentry>\n" " <refentrytitle><command>dpkg-scansources</command></refentrytitle>\n" @@ -442,19 +424,13 @@ msgid "" msgstr "" "<!ENTITY dpkg-scansources \"<citerefentry>\n" " <refentrytitle><command>dpkg-scansources</command></refentrytitle>\n" -" <manvolnum>8</manvolnum>\n" +" <manvolnum>1</manvolnum>\n" " </citerefentry>\"\n" ">\n" #. type: Plain text #: apt.ent:114 -#, fuzzy, no-wrap -#| msgid "" -#| "<!ENTITY dselect \"<citerefentry>\n" -#| " <refentrytitle><command>dselect</command></refentrytitle>\n" -#| " <manvolnum>8</manvolnum>\n" -#| " </citerefentry>\"\n" -#| ">\n" +#, no-wrap msgid "" "<!ENTITY dselect \"<citerefentry>\n" " <refentrytitle><command>dselect</command></refentrytitle>\n" @@ -464,7 +440,7 @@ msgid "" msgstr "" "<!ENTITY dselect \"<citerefentry>\n" " <refentrytitle><command>dselect</command></refentrytitle>\n" -" <manvolnum>8</manvolnum>\n" +" <manvolnum>1</manvolnum>\n" " </citerefentry>\"\n" ">\n" @@ -1375,13 +1351,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para><itemizedlist><listitem><para> #: apt-cache.8.xml:152 -#, fuzzy -#| msgid "" -#| "<literal>Missing</literal> is the number of package names that were " -#| "referenced in a dependency but were not provided by any package. Missing " -#| "packages may be in evidence if a full distribution is not accessed, or if " -#| "a package (real or virtual) has been dropped from the distribution. " -#| "Usually they are referenced from Conflicts or Breaks statements." msgid "" "<literal>Missing</literal> is the number of package names that were " "referenced in a dependency but were not provided by any package. Missing " @@ -1408,8 +1377,9 @@ msgstr "" "<literal>Total distinct</literal> Versionen ist die Anzahl der im " "Zwischenspeicher gefundenen Paketversionen. Dieser Wert ist daher meistens " "gleich der Anzahl der gesamten Paketnamen. Wenn auf mehr als eine " -"Distribution (zum Beispiel »stable« und »unstable« zusammen) zugegriffen wird, " -"kann dieser Wert deutlich größer als die gesamte Anzahl der Paketnamen sein." +"Distribution (zum Beispiel »stable« und »unstable« zusammen) zugegriffen " +"wird, kann dieser Wert deutlich größer als die gesamte Anzahl der " +"Paketnamen sein." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para><itemizedlist><listitem><para> #: apt-cache.8.xml:166 @@ -1584,11 +1554,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-cache.8.xml:234 -#, fuzzy -#| msgid "" -#| "Note that a package which APT knows of is not nessasarily available to " -#| "download, installable or installed, e.g. virtual packages are also listed " -#| "in the generated list." msgid "" "Note that a package which APT knows of is not necessarily available to " "download, installable or installed, e.g. virtual packages are also listed in " @@ -2017,7 +1982,7 @@ msgid "" "<arg>add</arg> <arg>ident</arg> </group>" msgstr "" "<command>apt-cdrom</command> <arg><option>-hvrmfan</option></arg> " -"<arg><option>-d=<replaceable>CDROM-Einhängepunkt</replaceable></option></" +"<arg><option>-d=<replaceable>CD-ROM-Einhängepunkt</replaceable></option></" "arg><arg><option>-o=<replaceable>Konfigurationszeichenkette</replaceable></" "option></arg><arg><option>-c=<replaceable>Datei</replaceable></option></" "arg><group><arg>hinzufügen</arg><arg>Identifikation</arg></group>" @@ -2030,7 +1995,7 @@ msgid "" "the structure of the disc as well as correcting for several possible mis-" "burns and verifying the index files." msgstr "" -"<command>apt-cdrom</command> wird benutzt, um eine neue CDROM zu APTs Liste " +"<command>apt-cdrom</command> wird benutzt, um eine neue CD-ROM zu APTs Liste " "der verfügbaren Quellen hinzuzufügen. <command>apt-cdrom</command> kümmert " "sich um die festgestellte Struktur des Mediums, sowie die Korrektur für " "mehrere mögliche Fehlbrennungen und prüft die Indexdateien." @@ -2062,7 +2027,7 @@ msgid "" "title." msgstr "" "<literal>add</literal> wird benutzt, um ein neues Medium zur Quellenliste " -"hinzuzufügen. Es wird das CDROM-Gerät aushängen, verlangen, dass ein Medium " +"hinzuzufügen. Es wird das CD-ROM-Gerät aushängen, verlangen, dass ein Medium " "eingelegt wird und dann mit den Einlesen und Kopieren der Indexdateien " "fortfahren. Wenn das Medium kein angemessenes <filename>disk</filename>-" "Verzeichnis hat, werden Sie nach einem aussagekräftigen Titel gefragt." @@ -2074,7 +2039,7 @@ msgid "" "maintains a database of these IDs in <filename>&statedir;/cdroms.list</" "filename>" msgstr "" -"APT benutzt eine CDROM-ID, um nachzuverfolgen, welches Medium gerade im " +"APT benutzt eine CD-ROM-ID, um nachzuverfolgen, welches Medium gerade im " "Laufwerk ist und verwaltet eine Datenbank mit diesen IDs in " "<filename>&statedir;/cdroms.list</filename>" @@ -2341,9 +2306,9 @@ msgid "" "names, d returns directories, b returns true or false and i returns an " "integer. Each of the returns is normalized and verified internally." msgstr "" -"An das Konfigurationselement kann /[fdbi] angehängt werden. f gibt " -"Dateinamen zurück, d gibt Verzeichnisse zurück, b gibt true oder false " -"zurück und i gibt eine Ganzzahl zurück. Jede Rückgabe ist normiert und " +"An das Konfigurationselement kann /[fdbi] angehängt werden. »f« gibt " +"Dateinamen zurück, »d« gibt Verzeichnisse zurück, »b« gibt true oder false " +"zurück und »i« gibt eine Ganzzahl zurück. Jede Rückgabe ist normiert und " "intern geprüft." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> @@ -2426,10 +2391,10 @@ msgid "" "XXXX</filename> and <filename>package.config.XXXX</filename>" msgstr "" "Schablonendatei und Konfigurationsskript werden in das temporäre Verzeichnis " -"geschrieben, das durch -t oder --tempdir (<literal>APT::ExtractTemplates::" -"TempDir</literal>) Verzeichnis mit Dateinamen der Form <filename>package." -"template.XXXX</filename> und <filename>package.config.XXXX</filename> " -"angegeben wurde" +"geschrieben, das durch »-t« oder »--tempdir« " +"(<literal>APT::ExtractTemplates::TempDir</literal>) Verzeichnis mit " +"Dateinamen der Form <filename>package. template.XXXX</filename> und " +"<filename>package.config.XXXX</filename> angegeben wurde" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt-extracttemplates.1.xml:60 apt-get.8.xml:488 @@ -2443,11 +2408,6 @@ msgstr "<option>--tempdir</option>" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-extracttemplates.1.xml:62 -#, fuzzy -#| msgid "" -#| "Temporary directory in which to write extracted debconf template files " -#| "and config scripts Configuration Item: <literal>APT::ExtractTemplates::" -#| "TempDir</literal>" msgid "" "Temporary directory in which to write extracted debconf template files and " "config scripts. Configuration Item: <literal>APT::ExtractTemplates::" @@ -2469,15 +2429,11 @@ msgstr "" #. The last update date #. type: Content of: <refentry><refentryinfo> #: apt-ftparchive.1.xml:13 -#, fuzzy -#| msgid "" -#| "&apt-author.moconnor; &apt-author.team; &apt-email; &apt-product; <date>9 " -#| "August 2009</date>" msgid "" "&apt-author.jgunthorpe; &apt-author.team; &apt-email; &apt-product; <date>17 " "August 2009</date>" msgstr "" -"&apt-author.moconnor; &apt-author.team; &apt-email; &apt-product; <date>9. " +"&apt-author.jgunthorpe; &apt-author.team; &apt-email; &apt-product; <date>17. " "August 2009</date>" #. type: Content of: <refentry><refnamediv><refname> @@ -2567,9 +2523,9 @@ msgid "" "automatically performs file-change checks and builds the desired compressed " "output files." msgstr "" -"Intern kann <command>apt-ftparchive</command> von Programmdatenbänken " +"Intern kann <command>apt-ftparchive</command> von Programmdatenbanken " "Gebrauch machen, um die Inhalte einer .deb-Datei zwischenzuspeichern und es " -"verlässt sich nicht auf irgendwelche externen Programme, abgesehen von " +"verlasst sich nicht auf irgendwelche externen Programme, abgesehen von " "&gzip;. Wenn eine vollständige Generierung erfolgt, werden automatisch " "Dateiänderungsprüfungen durchgeführt und die gewünschten gepackten " "Ausgabedateien erzeugt." @@ -2587,8 +2543,8 @@ msgid "" "emitting a package record to stdout for each. This command is approximately " "equivalent to &dpkg-scanpackages;." msgstr "" -"Der packages-Befehl generiert eine Paketdatei aus einem Verzeichnisbaum. Er " -"nimmt ein vorgegebenes Verzeichnis und durchsucht es rekursiv nach .deb-" +"Der »packages«-Befehl generiert eine Paketdatei aus einem Verzeichnisbaum. " +"Er nimmt ein vorgegebenes Verzeichnis und durchsucht es rekursiv nach .deb-" "Dateien, wobei es für jede einen Paketdatensatz auf stdout ausgibt.Dieser " "Befehl entspricht etwa &dpkg-scanpackages;." @@ -2626,8 +2582,9 @@ msgid "" "change the source override file that will be used." msgstr "" "Wenn eine Override-Datei angegeben ist, wird nach einer Quellen-Override-" -"Datei mit einer .src-Dateiendung gesucht. Die Option --source-override kann " -"benutzt werden, um die Quellen-Override-Datei, die benutzt wird, zu ändern." +"Datei mit einer .src-Dateiendung gesucht. Die Option »--source-override« " +"kann benutzt werden, um die Quellen-Override-Datei, die benutzt wird, zu " +"ändern." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt-ftparchive.1.xml:97 @@ -2766,12 +2723,6 @@ msgstr "Dir-Abschnitt" #. type: Content of: <refentry><refsect1><refsect2><para> #: apt-ftparchive.1.xml:159 -#, fuzzy -#| msgid "" -#| "The <literal>Dir</literal> section defines the standard directories " -#| "needed to locate the files required during the generation process. These " -#| "directories are prepended to certain relative paths defined in later " -#| "sections to produce a complete an absolute path." msgid "" "The <literal>Dir</literal> section defines the standard directories needed " "to locate the files required during the generation process. These " @@ -3212,7 +3163,6 @@ msgstr "" "Wenn ein <literal>Tree</literal>-Abschnitt bearbeitet wird, führt " "<command>apt-ftparchive</command> eine Operation aus, die folgender ähnelt:" -# report, that this string is missing in man page #. type: Content of: <refentry><refsect1><refsect2><para><informalexample><programlisting> #: apt-ftparchive.1.xml:354 #, no-wrap @@ -3489,7 +3439,7 @@ msgid "" "Configuration Item: <literal>APT::FTPArchive::DB</literal>." msgstr "" "Benutzt eine Programmzwischenspeicherdatenbank. Dies hat keine Auswirkung " -"auf den generate-Befehl. Konfigurationselement: <literal>APT::FTPArchive::" +"auf den »generate«-Befehl. Konfigurationselement: <literal>APT::FTPArchive::" "DB</literal>." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> @@ -3542,7 +3492,7 @@ msgstr "" "Führt Inhaltsgenerierung durch. Wenn diese Option gesetzt ist und " "Paketindizes mit einer Zwischenspeicherdatenbank generiert werden, dann wird " "die Dateiliste auch extrahiert und für spätere Benutzung in der Datenbank " -"gespeichert. Wenn der generate-Befehl benutzt wird, erlaubt diese Option " +"gespeichert. Wenn der »generate«-Befehl benutzt wird, erlaubt diese Option " "außerdem die Erzeugung beliebiger Contents-Dateien. Die Vorgabe ist an. " "Konfigurationselement: <literal>APT::FTPArchive::Contents</literal>." @@ -3578,10 +3528,8 @@ msgstr "" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt-ftparchive.1.xml:547 -#, fuzzy -#| msgid "<option>--version</option>" msgid "<option>APT::FTPArchive::LongDescription</option>" -msgstr "<option>--version</option>" +msgstr "<option>APT::FTPArchive::LongDescription</option>" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-ftparchive.1.xml:549 @@ -3592,6 +3540,12 @@ msgid "" "that it is currently not possible to create these files with <command>apt-" "ftparchive</command>." msgstr "" +"Diese Konfigurationsoption ist standardmäßig »<literal>true</literal>« und " +"sollte nur auf »<literal>false</literal>« gesetzt werden, wenn das mit " +"&apt-ftparchive; generierte Archiv außerdem " +"<filename>Translation</filename>-Dateien bereitstellt. Beachten Sie, dass " +"es derzeit nicht möglich ist, diese Dateien mit " +"<command>apt-ftparchive</command> zu erstellen." #. type: Content of: <refentry><refsect1><title> #: apt-ftparchive.1.xml:561 apt.conf.5.xml:1011 apt_preferences.5.xml:462 @@ -3612,8 +3566,8 @@ msgid "" "packages (.deb): <placeholder type=\"programlisting\" id=\"0\"/>" msgstr "" "Um eine gepackte Paketdatei für ein Verzeichnis zu erstellen, das " -"Programmpakete (.deb) enthält: <placeholder type=\"programlisting\" id=\"0\"/" -">" +"Programmpakete (.deb) enthält: <placeholder type=\"programlisting\" " +"id=\"0\"/>" #. type: Content of: <refentry><refsect1><para> #: apt-ftparchive.1.xml:577 @@ -3885,8 +3839,8 @@ msgstr "" "ausgewählt werden. Dies bewirkt, dass diese Version gesucht und zum " "Installieren ausgewählt wird. Alternativ kann eine bestimmte Distribution " "durch den Paketnamen gefolgt von einem Schrägstrich und der Version der " -"Distribution oder des Archivnamens (stable, testing, unstable) ausgewählt " -"werden." +"Distribution oder des Archivnamens (»stable«, »testing«, »unstable«) " +"ausgewählt werden." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml:210 @@ -3939,13 +3893,13 @@ msgid "" "expression." msgstr "" "Wenn keine Pakete dem angegebenen Ausdruck entsprechen und der Ausdruck " -"entweder ».«,»,«,»?« oder »*« enthält, dann wird vermutet, dass es sich um einen " -"regulären POSIX-Ausdruck handelt und er wird auf alle Paketnamen in der " -"Datenbank angewandt. Jeder Treffer wird dann installiert (oder entfernt). " -"Beachten Sie, dass nach übereinstimmenden Zeichenkettenteilen gesucht wird, " -"so dass »lo.*« auf »how-lo« und »lowest« passt. Wenn dies nicht gewünscht wird, " -"hängen Sie an den regulären Ausdruck ein »^«- oder »$«-Zeichen, um genauere " -"reguläre Ausdruck zu erstellen." +"entweder ».«,»,«,»?« oder »*« enthält, dann wird vermutet, dass es sich um " +"einen regulären POSIX-Ausdruck handelt und er wird auf alle Paketnamen in " +"der Datenbank angewandt. Jeder Treffer wird dann installiert (oder " +"entfernt). Beachten Sie, dass nach übereinstimmenden Zeichenkettenteilen " +"gesucht wird, so dass »lo.*« auf »how-lo« und »lowest« passt. Wenn dies " +"nicht gewünscht wird, hängen Sie an den regulären Ausdruck ein »^«- oder " +"»$«-Zeichen, um genauere reguläre Ausdruck zu erstellen." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt-get.8.xml:237 @@ -3990,15 +3944,6 @@ msgstr "source" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml:251 -#, fuzzy -#| msgid "" -#| "<literal>source</literal> causes <command>apt-get</command> to fetch " -#| "source packages. APT will examine the available packages to decide which " -#| "source package to fetch. It will then find and download into the current " -#| "directory the newest available version of that source package while " -#| "respect the default release, set with the option <literal>APT::Default-" -#| "Release</literal>, the <option>-t</option> option or per package with " -#| "with the <literal>pkg/release</literal> syntax, if possible." msgid "" "<literal>source</literal> causes <command>apt-get</command> to fetch source " "packages. APT will examine the available packages to decide which source " @@ -4026,7 +3971,7 @@ msgid "" "from. If you don't do this you will properly get another (newer, older or " "none) source version than the one you have installed or could install." msgstr "" -"Paketquellen werden von Programmpaket getrennt über <literal>deb-src</" +"Paketquellen werden vom Programmpaket getrennt über <literal>deb-src</" "literal>-Typzeilen in der &sources-list;-Datei nachverfolgt. Das bedeutet, " "dass Sie für jedes Depot, aus dem Sie Quellen erhalten wollen, eine solche " "Zeile hinzufügen müssen. Wenn Sie dies nicht tun, werden Sie eine andere als " @@ -4035,12 +3980,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml:266 -#, fuzzy -#| msgid "" -#| "If the <option>--compile</option> options 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 " @@ -4150,7 +4089,7 @@ msgstr "" "Zwischenspeicher über eine lange Zeitspanne zu betreuen, ohne dass er " "unkontrolliert anwächst. Die Konfigurationsoption <literal>APT::Clean-" "Installed</literal> wird installierte Pakete vor der Löschung bewahren, wenn " -"sie auf off gesetzt ist." +"sie auf »off« gesetzt ist." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt-get.8.xml:312 @@ -4165,7 +4104,7 @@ msgid "" "are no more needed." msgstr "" "<literal>autoremove</literal> wird benutzt, um Pakete, die automatisch " -"installiert wurden, um Abhängigkeiten für einige Pakete zu erfüllen und und " +"installiert wurden, um Abhängigkeiten für einige Pakete zu erfüllen und " "die nicht mehr benötigt werden, zu entfernen." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> @@ -4202,7 +4141,6 @@ msgstr "" msgid "<option>--fix-broken</option>" msgstr "<option>--fix-broken</option>" -# s/Any Package that are specified/Any package that is specified/ #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml:334 msgid "" @@ -4219,7 +4157,7 @@ msgid "" "Get::Fix-Broken</literal>." msgstr "" "Beheben; Versucht ein System von vorhandenen beschädigten Abhängigkeiten zu " -"korrigieren. Diese Option kann, wenn sie mit install/remove benutzt wird, " +"korrigieren. Diese Option kann, wenn sie mit »install«/»remove« benutzt wird, " "einige Pakete weglassen, um es APT zu erlauben, eine wahrscheinliche Lösung " "herzuleiten. Jedes Paket, das angegeben ist, muss das Problem vollständig " "korrigieren. Die Option ist manchmal nötig, wenn APT zum ersten Mal " @@ -4335,18 +4273,12 @@ msgstr "" "(<literal>Debug::NoLocking</literal>) automatisch deaktivieren. Außerdem " "wird eine Mitteilung angezeigt, die angibt, dass dies nur eine Simulation " "ist, wenn die Option <literal>APT::Get::Show-User-Simulation-Note</literal> " -"gesetzt ist (Vorgabe ist true). Weder NoLocking noch die Mitteilung werden " +"gesetzt ist (Vorgabe ist »true«). Weder NoLocking noch die Mitteilung werden " "ausgelöst, wenn es als root ausgeführt wird (root sollte ohne weitere " "Warnungen von <literal>apt-get</literal> wissen, was er tut)." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml:392 -#, fuzzy -#| msgid "" -#| "Simulate prints out a series of lines each one representing a dpkg " -#| "operation, Configure (Conf), Remove (Remv), Unpack (Inst). Square " -#| "brackets indicate broken packages with and empty set of square brackets " -#| "meaning breaks that are of no consequence (rare)." msgid "" "Simulate prints out a series of lines each one representing a dpkg " "operation, Configure (Conf), Remove (Remv), Unpack (Inst). Square brackets " @@ -4558,7 +4490,6 @@ msgstr "" msgid "<option>--purge</option>" msgstr "<option>--purge</option>" -# s/equivalent for/equivalent to the/ #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml:467 msgid "" @@ -4567,10 +4498,11 @@ msgid "" "<option>remove --purge</option> is equivalent for <option>purge</option> " "command. Configuration Item: <literal>APT::Get::Purge</literal>." msgstr "" -"»remove« »purge« für alles zu entfernende benutzen. Ein Stern (»*«) wird bei " -"Paketen angezeigt, die zum vollständigen Entfernen vorgemerkt sind. " -"<option>remove --purge</option> entspricht dem Befehl <option>purge</" -"option>. Konfigurationselement: <literal>APT::Get::Purge</literal>." +"»purge« anstelle von »remove« für alles zu entfernende benutzen. Ein " +"Stern (»*«) wird bei Paketen angezeigt, die zum vollständigen Entfernen " +"vorgemerkt sind. <option>remove --purge</option> entspricht dem Befehl " +"<option>purge</option>. Konfigurationselement: " +"<literal>APT::Get::Purge</literal>." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt-get.8.xml:474 @@ -4606,8 +4538,8 @@ msgstr "" "<command>apt-get</command> den Inhalt von <filename>&statedir;/lists</" "filename> automatisch verwalten, um sicherzustellen, dass veraltete Dateien " "gelöscht werden. Nur das häufige Ändern der Quelllisten stellt den einzigen " -"Grund zum Ausschalten der Option dar.Konfigurationselement: <literal>APT::" -"Get::List-Cleanup</literal>." +"Grund zum Ausschalten der Option dar. Konfigurationselement: " +"<literal>APT::Get::List-Cleanup</literal>." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt-get.8.xml:489 @@ -5111,15 +5043,11 @@ msgstr "showauto" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-mark.8.xml:82 -#, fuzzy -#| msgid "" -#| "<literal>showauto</literal> is used to print a list of manually installed " -#| "packages with each package on a new line." msgid "" "<literal>showauto</literal> is used to print a list of automatically " "installed packages with each package on a new line." msgstr "" -"<literal>showauto</literal> wird benutzt, um eine Liste manuell " +"<literal>showauto</literal> wird benutzt, um eine Liste automatisch " "installierter Pakete mit einem Paket in jeder neuen Zeile, auszugeben." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> @@ -5266,14 +5194,6 @@ msgstr "Vertrauenswürdige Archive" #. type: Content of: <refentry><refsect1><para> #: apt-secure.8.xml:67 -#, fuzzy -#| msgid "" -#| "The chain of trust from an apt archive to the end user is made up of " -#| "different steps. <command>apt-secure</command> is the last step in this " -#| "chain, trusting an archive does not mean that the packages that you trust " -#| "it do not contain malicious code but means that you trust the archive " -#| "maintainer. Its the archive maintainer responsibility to ensure that the " -#| "archive integrity is correct." msgid "" "The chain of trust from an apt archive to the end user is made up of " "different steps. <command>apt-secure</command> is the last step in this " @@ -5323,15 +5243,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><para> #: apt-secure.8.xml:92 -#, fuzzy -#| msgid "" -#| "Once the uploaded package is verified and included in the archive, the " -#| "maintainer signature is stripped off, an MD5 sum of the package is " -#| "computed and put in the Packages file. The MD5 sum of all of the packages " -#| "files are then computed and put into the Release file. The Release file " -#| "is then signed by the archive key (which is created once a year and " -#| "distributed through the FTP server. This key is also on the Debian " -#| "keyring." msgid "" "Once the uploaded package is verified and included in the archive, the " "maintainer signature is stripped off, an MD5 sum of the package is computed " @@ -5465,48 +5376,34 @@ msgstr "" #. type: Content of: <refentry><refsect1><itemizedlist><listitem><para> #: apt-secure.8.xml:160 -#, fuzzy -#| msgid "" -#| "<literal>Create a toplevel Release file</literal>. if it does not exist " -#| "already. You can do this by running <command>apt-ftparchive release</" -#| "command> (provided in apt-utils)." msgid "" "<emphasis>Create a toplevel Release file</emphasis>, if it does not exist " "already. You can do this by running <command>apt-ftparchive release</" "command> (provided in apt-utils)." msgstr "" -"<literal>Create a toplevel Release file</literal>, wenn es nicht bereits " -"existiert. Sie können dies tun, indem Sie <command>apt-ftparchive release</" -"command> (aus apt-utils) ausführen." +"<emphasis>Erzeugen einer Release-Datei der obersten Stufe</emphasis>, wenn " +"sie nicht bereits existiert. Sie können dies erledigen, indem Sie " +"<command>apt-ftparchive release</command> (aus apt-utils) ausführen." #. type: Content of: <refentry><refsect1><itemizedlist><listitem><para> #: apt-secure.8.xml:165 -#, fuzzy -#| msgid "" -#| "<literal>Sign it</literal>. You can do this by running <command>gpg -abs -" -#| "o Release.gpg Release</command>." msgid "" "<emphasis>Sign it</emphasis>. You can do this by running <command>gpg -abs -" "o Release.gpg Release</command>." msgstr "" -"<literal>Sign it</literal>. Sie können dies tun, indem Sie <command>gpg -abs " -"-o Release.gpg Release</command> ausführen." +"<emphasis>Es signieren</emphasis>. Sie können dies tun, indem Sie " +"<command>gpg -abs -o Release.gpg Release</command> ausführen." #. type: Content of: <refentry><refsect1><itemizedlist><listitem><para> #: apt-secure.8.xml:168 -#, fuzzy -#| msgid "" -#| "<literal>Publish the key fingerprint</literal>, that way your users will " -#| "know what key they need to import in order to authenticate the files in " -#| "the archive." msgid "" "<emphasis>Publish the key fingerprint</emphasis>, that way your users will " "know what key they need to import in order to authenticate the files in the " "archive." msgstr "" -"<literal>Publish the key fingerprint</literal>, derart, dass Ihre Anwender " -"wissen, welchen Schlüssel sie importieren müssen, um die Dateien im Archiv " -"zu authentifizieren." +"<emphasis>Veröffentlichen Sie den Schlüsselfingerabdruck</emphasis>, damit " +"Ihre Anwender wissen, welchen Schlüssel sie importieren müssen, um die " +"Dateien im Archiv zu authentifizieren." #. type: Content of: <refentry><refsect1><para> #: apt-secure.8.xml:175 @@ -5680,13 +5577,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><para> #: apt.conf.5.xml:50 -#, fuzzy -#| msgid "" -#| "The configuration file is organized in a tree with options organized into " -#| "functional groups. option specification is given with a double colon " -#| "notation, for instance <literal>APT::Get::Assume-Yes</literal> is an " -#| "option within the APT tool group, for the Get tool. options do not " -#| "inherit from their parent groups." msgid "" "The configuration file is organized in a tree with options organized into " "functional groups. Option specification is given with a double colon " @@ -5702,15 +5592,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><para> #: apt.conf.5.xml:56 -#, fuzzy -#| msgid "" -#| "Syntactically the configuration language is modeled after what the ISC " -#| "tools such as bind and dhcp use. Lines starting with <literal>//</" -#| "literal> are treated as comments (ignored), as well as all text between " -#| "<literal>/*</literal> and <literal>*/</literal>, just like C/C++ " -#| "comments. Each line is of the form <literal>APT::Get::Assume-Yes \"true" -#| "\";</literal> The trailing semicolon is required and the quotes are " -#| "optional. A new scope can be opened with curly braces, like:" msgid "" "Syntactically the configuration language is modeled after what the ISC tools " "such as bind and dhcp use. Lines starting with <literal>//</literal> are " @@ -5729,9 +5610,14 @@ msgstr "" "literal> beginnen, werden als Kommentar betrachtet (und ignoriert), ebenso " "wie jeglicher Text zwischen <literal>/*</literal> und <literal>*/</literal>, " "wie bei C/C++-Kommentaren. Jede Zeile hat die Form <literal>APT::Get::Assume-" -"Yes \"true\";</literal>. Das abschließende Semikolon wird benötigt und " -"Klammern sind optional. Ein neuer Geltungsbereich kann mit geschweiften " -"Klammern geöffnet werden, wie:" +"Yes \"true\";</literal>. Das abschließende Semikolon und die " +"Anführungszeichen werden benötigt. Der Wert muss in einer Zeile stehen und " +"es gibt keine Möglichkeit Zeichenketten aneinander zu hängen. Er darf keine " +"inneren Anführungszeichen enthalten. Das Verhalten des Backslashs »\\« " +"und maskierter Zeichen innerhalb eines Wertes ist nicht festgelegt und diese " +"sollten nicht benutzt werden. Ein Optionsname darf alphanumerische Zeichen " +"und die Zeichen »/-:._+« enthalten. Ein neuer Geltungsbereich kann mit " +"geschweiften Klammern geöffnet werden, wie:" #. type: Content of: <refentry><refsect1><informalexample><programlisting> #: apt.conf.5.xml:70 @@ -5808,14 +5694,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><para> #: apt.conf.5.xml:98 -#, fuzzy -#| msgid "" -#| "Two specials are allowed, <literal>#include</literal> and " -#| "<literal>#clear</literal>: <literal>#include</literal> will include the " -#| "given file, unless the filename ends in a slash, then the whole directory " -#| "is included. <literal>#clear</literal> is used to erase a part of the " -#| "configuration tree. The specified element and all its descendants are " -#| "erased. (Note that these lines also need to end with a semicolon.)" msgid "" "Two specials are allowed, <literal>#include</literal> (which is deprecated " "and not supported by alternative implementations) and <literal>#clear</" @@ -5825,13 +5703,15 @@ msgid "" "The specified element and all its descendants are erased. (Note that these " "lines also need to end with a semicolon.)" msgstr "" -"Es sind die beiden Spezialfälle <literal>#include</literal> und " -"<literal>#clear</literal> erlaubt: <literal>#include</literal> wird die " -"angegebene Datei einfügen außer, wenn der Dateiname mit einem Schrägstrich " -"endet, dann wird das ganze Verzeichnis eingefügt. <literal>#clear</literal> " -"wird benutzt, um einen Teil des Konfigurationsbaums zu löschen. Das " -"angegebene Element und alle davon absteigenden Elemente werden gelöscht. " -"(Beachten Sie, dass diese Zeilen auch mit einem Semikolon enden müssen.)" +"Es sind die beiden Spezialfälle <literal>#include</literal> (das " +"missbilligt ist und von alternativen Implementierungen nicht unterstützt " +"wird) und <literal>#clear</literal> erlaubt: <literal>#include</literal> " +"wird die angegebene Datei einfügen außer, wenn der Dateiname mit einem " +"Schrägstrich endet, dann wird das ganze Verzeichnis eingefügt. " +"<literal>#clear</literal> wird benutzt, um einen Teil des " +"Konfigurationsbaums zu löschen. Das angegebene Element und alle davon " +"absteigenden Elemente werden gelöscht. (Beachten Sie, dass diese Zeilen " +"auch mit einem Semikolon enden müssen.)" #. type: Content of: <refentry><refsect1><para> #: apt.conf.5.xml:106 @@ -5944,8 +5824,8 @@ msgid "" msgstr "" "Standard-Release von dem Pakete installiert werden, wenn mehr als eine " "Version verfügbar ist. Enthält Release-Name, Codename oder Release-Version. " -"Beispiele: »stable«, »testing, »unstable«, »lenny«, »squeeze«, »4.0«, »5.0«. Siehe " -"auch &apt-preferences;." +"Beispiele: »stable«, »testing, »unstable«, »lenny«, »squeeze«, »4.0«, »5.0«. " +"Siehe auch &apt-preferences;." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt.conf.5.xml:146 @@ -6018,6 +5898,42 @@ msgid "" "distribution and to the APT team with the buglink below so they can work on " "improving or correcting the upgrade process." msgstr "" +"Standardmäßig »on«, wodurch APT veranlasst wird, »essential«- oder " +"»important«-Pakete so schnell wie möglich in der " +"»install«-/»upgrade«-Operation zu installieren. Dies wird getan, um den " +"Effekt eines gescheiterterten &dpkg;-Aufrufs zu begrenzen: Wenn diese " +"Option ausgeschaltet ist, behandelt APT ein »important«-Paket auf die " +"gleiche Weise wie ein »extra«-Paket: Zwischen dem Entpacken des " +"»important«-Pakets A und seiner Konfiguration können dann viele andere " +"Entpack- oder Konfigurationsaufrufe liegen, z.B. für Paket B, das keine " +"Beziehung zu A hat, aber den dpkg-Aufruf zum Scheitern bringt (z.B. weil " +"das Betreuerskript von Paket B Fehler generiert), die als Ergebnis einen " +"Systemstatus haben, in dem Paket A entpackt, aber nicht konfiguriert ist " +"und für kein von A abhängendes Paket länger gewährleistet ist, dass es " +"funktioniert, weil die Abhängigkeit zu A nicht länger befriedigt wird. Das " +"unmittelbare Konfigurationskennzeichen wird außerdem auf alle " +"Abhängigkeiten angewandt, was zu einem Problem führen könnten, falls die " +"Abhängigkeiten z.B. einen Kreis bilden, so dass eine Abhängigkeit mit der " +"Unmittelbarmarkierung mit einer Vorabhängigkeit vergleichbar ist. So ist es " +"theoretisch möglich, dass APT einer Situation begegnet, in der keine " +"unmittelbare Konfiguration durchgeführt, ein Fehler ausgegeben und sich auf " +"diese Option bezogen werden kann, so dass der Anwender die unmittelbare " +"Konfiguration zeitweise deaktivieren kann, um in der Lage zu sein, erneut " +"ein »install«/»upgrade« durchzuführen. Beachten Sie, dass hier das Wort " +"»theoretisch« benutzt wird, denn dieses Problem ist bis jetzt in der " +"Realität nur ein paar mal in unstabilen Distributionsversionen aufgetreten " +"und wurde durch falsche Abhängigkeiten des fraglichen Pakets ausgelöst oder " +"durch ein System in bereits kaputtem Status, so dass Sie diese Option nicht " +"unbesehen abschalten sollten, da das oben erwähnte Szenario nicht das " +"einzige unmittelbare Problem ist, das die Konfiguration überhaupt " +"verhindern sollte. Bevor eine große Operation wie " +"<literal>dist-upgrade</literal> mit dieser ausgeschalteten Option " +"ausgeführt wird, sollte explizit versucht werden, " +"<literal>install</literal> des Pakets durchzuführen. APT ist nicht in der " +"Lage unmittelbar zu konfigurieren, aber stellen Sie sicher, dass Sie Ihr " +"Problem außerdem an Ihre Distribution und an das APT-Team berichten mit " +"nachstehendem Fehlerverweis, so dass es am Verbessern oder Korrigieren des " +"Upgrade-Prozesses arbeiten kann." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt.conf.5.xml:181 @@ -6102,7 +6018,7 @@ msgstr "" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt.conf.5.xml:209 msgid "CDROM" -msgstr "CDROM" +msgstr "CD-ROM" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:210 @@ -6110,7 +6026,7 @@ msgid "" "The CDROM subsection controls the &apt-cdrom; tool, please see its " "documentation for more information about the options here." msgstr "" -"Der CDROM-Unterabschnitt steuert das &apt-cdrom;-Werkzeug. Lesen Sie bitte " +"Der CD-ROM-Unterabschnitt steuert das &apt-cdrom;-Werkzeug. Lesen Sie bitte " "dessen Dokumentation, um weitere Informationen über die Optionen hier zu " "erhalten." @@ -6246,15 +6162,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:267 -#, fuzzy -#| msgid "" -#| "One setting is provided to control the pipeline depth in cases where the " -#| "remote server is not RFC conforming or buggy (such as Squid 2.0.2) " -#| "<literal>Acquire::http::Pipeline-Depth</literal> can be a value from 0 to " -#| "5 indicating how many outstanding requests APT should send. A value of " -#| "zero MUST be specified if the remote host does not properly linger on TCP " -#| "connections - otherwise data corruption will occur. Hosts which require " -#| "this are in violation of RFC 2068." msgid "" "One setting is provided to control the pipeline depth in cases where the " "remote server is not RFC conforming or buggy (such as Squid 2.0.2). " @@ -6296,6 +6203,10 @@ msgid "" "User-Agent for the http download method as some proxies allow access for " "clients only if the client uses a known identifier." msgstr "" +"<literal>Acquire::http::User-Agent</literal> kann benutzt werden, um einen " +"unterschiedlichen User-Agent für die HTTP-Download-Methode zu setzten, da " +"einige Proxys den Clients nur dann Zugriff gewähren, wenn der Client einen " +"bekannten Bezeichner verwendet." #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> #: apt.conf.5.xml:286 @@ -6304,11 +6215,6 @@ msgstr "https" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:287 -#, fuzzy -#| msgid "" -#| "HTTPS URIs. Cache-control and proxy options are the same as for " -#| "<literal>http</literal> method. <literal>Pipeline-Depth</literal> option " -#| "is not supported yet." msgid "" "HTTPS URIs. Cache-control, Timeout, AllowRedirect, Dl-Limit and proxy " "options are the same as for <literal>http</literal> method and will also " @@ -6316,9 +6222,12 @@ msgid "" "not explicitly set for https. <literal>Pipeline-Depth</literal> option is " "not supported yet." msgstr "" -"HTTPS-URIs. Zwischenspeichersteuerung und Proxy-Optionen entsprehen denen " -"der <literal>http</literal>-Methode. Die Option <literal>Pipeline-Depth</" -"literal> wird noch nicht unterstützt." +"HTTPS-URIs. Zwischenspeichersteuerung-, Zeitüberschreitung-, AllowRedirect-, " +"Dl-Limit- und Proxy-Optionen entsprechen denen der " +"<literal>http</literal>-Methode und werden auch für die Optionen der " +"Methode <literal>http</literal> vorgegeben, falls sie nicht explizit für " +"HTTPS gesetzt sind. Die Option <literal>Pipeline-Depth</literal> wird noch " +"nicht unterstützt." #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:293 @@ -6453,10 +6362,9 @@ msgstr "cdrom" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para><literallayout> #: apt.conf.5.xml:356 -#, fuzzy, no-wrap -#| msgid "\"/cdrom/\"::Mount \"foo\";" +#, no-wrap msgid "/cdrom/::Mount \"foo\";" -msgstr "\"/cdrom/\"::Mount \"foo\";" +msgstr "/cdrom/::Mount \"foo\";" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:351 @@ -6471,12 +6379,12 @@ msgid "" "can be specified using UMount." msgstr "" "CDROM-URIs; Die einzige Einstellung für CDROM-URIs ist der Einhängepunkt " -"<literal>cdrom::Mount</literal>, der der Einhängepunkt des CDROM-Laufwerks " +"<literal>cdrom::Mount</literal>, der der Einhängepunkt des CD-ROM-Laufwerks " "sein muss, wie er in <filename>/etc/fstab</filename> angegeben wurde. Es ist " "möglich alternative Ein- und Aushängebefehle anzugeben, falls Ihr " "Einhängepunkt nicht in der fstab aufgelistet werden kann (so wie beim " "Einhängen per SMB und alten Mount-Paketen). Die Syntax besteht darin, " -"<placeholder type=\"literallayout\" id=\"0\"/> in den CDROM-Block " +"<placeholder type=\"literallayout\" id=\"0\"/> in den CD-ROM-Block " "einzufügen. Der abschließende Schrägstrich ist wichtig. Aushängebefehle " "können per UMount angegeben werden." @@ -6622,7 +6530,7 @@ msgstr "" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> #: apt.conf.5.xml:396 msgid "Languages" -msgstr "" +msgstr "Sprachen" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:397 @@ -6636,12 +6544,21 @@ msgid "" "long Languagecodes are rare, so please inform you which ones are available " "before you set here impossible values." msgstr "" +"Der Unterabschnitt Languages steuert welche " +"<filename>Translation</filename>-Dateien heruntergeladen werden und in " +"welcher Reihenfolge APT versucht, die Beschreibungsübersetzungen anzuzeigen. " +"APT wird versuchen, die erste verfügbare Beschreibung für die zuerst " +"aufgelistete Sprache anzuzeigen. Sprachen können durch ihre kurzen oder " +"langen Sprachcodes definiert sein. Beachten Sie, dass nicht alle Archive " +"<filename>Translation</filename>-Dateien für jede Sprache bereitstellen, " +"besonders lange Sprachcodes sind selten. Informieren Sie sich deshalb bitte " +"welche verfügbar sind, bevor Sie hier unmögliche Werte einsetzen." #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para><programlisting> #: apt.conf.5.xml:413 #, no-wrap msgid "Acquire::Languages { \"environment\"; \"de\"; \"en\"; \"none\"; \"fr\"; };" -msgstr "" +msgstr "Acquire::Languages { \"environment\"; \"de\"; \"en\"; \"none\"; \"fr\"; };" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:403 @@ -6665,6 +6582,26 @@ msgid "" "order would be \"fr, de, en\". <placeholder type=\"programlisting\" id=\"0" "\"/>" msgstr "" +"Die Standardliste beinhaltet »environment« und »en«. " +"»<literal>environment</literal>« hat hier eine besondere Bedeutung: Es wird " +"zur Laufzeit durch die Sprachcodes ersetzt, die aus der Umgebungsvariable " +"<literal>LC_MESSAGES</literal> extrahiert wurden. Es wird außerdem " +"sicherstellen, dass diese Codes nicht zweimal in der Liste enthalten sind. " +"Falls <literal>LC_MESSAGES</literal> auf »C« gesetzt ist, wird nur die " +"Datei <filename>Translation-en</filename> (falls verfügbar) benutzt. Um APT " +"zu zwingen, keine Übersetzungsdatei zu benutzen, benutzen Sie die Einstellung " +"<literal>Acquire::Languages=none</literal>. »<literal>none</literal>« ist " +"ein weiterer Code mit besonderer Bedeutung, der die Suche nach einer " +"passenden <filename>Translation</filename>-Datei stoppen wird. Dies kann " +"vom Systemadministrator benutzt werden, um APT mitzuteilen, dass es auch " +"diese Dateien herunterladen soll ohne sie aktuell zu benutzen, falls die " +"Umgebungsvariable diese Sprachen nicht angibt. Daher wird die folgende " +"Beispielkonfiguration in der Reihenfolge »en,de« zu einer englischen und " +"»de,en« zu einer deutschen Lokalisierung führen. Beachten Sie, dass »fr« " +"heruntergeladen, aber nicht benutzt wird, falls APT nicht in einer " +"französischen Lokalisierung benutzt wird. In einer solchen Umgebung wäre " +"die Reihenfolge »fr, de, en«. <placeholder type=\"programlisting\" id=\"0" +"\"/>" #. type: Content of: <refentry><refsect1><para> #: apt.conf.5.xml:217 @@ -6820,13 +6757,13 @@ msgid "" "for instance). pre-auto performs this action before downloading new " "packages." msgstr "" -"Zwischenspeicherbereinigungsmodus; Dieser Wert kann entweder always, prompt, " -"auto, pre-auto oder never sein. always und prompt werden, nachdem das " -"Upgrade durchgeführt wurde, alle Pakete aus dem Zwischenspeicher entfernen, " -"prompt (die Vorgabe) tut dies bedingt. auto entfernt nur jene Pakete, die " -"nicht länger heruntergeladen werden können (zum Beispiel, weil sie durch " -"eine neue Version ersetzt wurden). pre-auto führt diese Aktion vor dem " -"Herunterladen neuer Pakete durch." +"Zwischenspeicherbereinigungsmodus; Dieser Wert kann entweder »always«, " +"»prompt«, »auto«, »pre-auto« oder »never« sein. »always« und »prompt« " +"werden, nachdem das Upgrade durchgeführt wurde, alle Pakete aus dem " +"Zwischenspeicher entfernen, »prompt« (die Vorgabe) tut dies bedingt. »auto« " +"entfernt nur jene Pakete, die nicht länger heruntergeladen werden können " +"(zum Beispiel, weil sie durch eine neue Version ersetzt wurden). »pre-auto« " +"führt diese Aktion vor dem Herunterladen neuer Pakete durch." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:485 @@ -7058,16 +6995,6 @@ msgstr "DPkg::NoTriggers" #. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:567 -#, fuzzy -#| msgid "" -#| "Add the no triggers flag to all dpkg calls (expect the ConfigurePending " -#| "call). See &dpkg; if you are interested in what this actually means. In " -#| "short: dpkg will not run the triggers then this flag is present unless it " -#| "is explicit called to do so in an extra call. Note that this option " -#| "exists (undocumented) also in older apt versions with a slightly " -#| "different meaning: Previously these option only append --no-triggers to " -#| "the configure calls to dpkg - now apt will add these flag also to the " -#| "unpack and remove calls." msgid "" "Add the no triggers flag to all dpkg calls (except the ConfigurePending " "call). See &dpkg; if you are interested in what this actually means. In " @@ -7085,7 +7012,7 @@ msgstr "" "außerdem in älteren APT-Versionen mit einer geringfügig anderen Bedeutung " "existiert (nicht dokumentiert): Vorher hing diese Option nur --no-triggers " "an die Konfigurationsaufrufe für Dpkg an – nun wird APT diese Markierung " -"außerdem an die unpack- und remove-Aufrufe anhängen." +"außerdem an die »unpack«- und »remove«-Aufrufe anhängen." #. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> #: apt.conf.5.xml:574 @@ -7094,20 +7021,6 @@ msgstr "PackageManager::Configure" #. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:575 -#, fuzzy -#| msgid "" -#| "Valid values are \"<literal>all</literal>\", \"<literal>smart</literal>\" " -#| "and \"<literal>no</literal>\". \"<literal>all</literal>\" is the default " -#| "value and causes APT to configure all packages explicit. The " -#| "\"<literal>smart</literal>\" way is it to configure only packages which " -#| "need to be configured before another package can be unpacked (Pre-" -#| "Depends) and let the rest configure by dpkg with a call generated by the " -#| "next option. \"<literal>no</literal>\" on the other hand will not " -#| "configure anything and totally relay on dpkg for configuration (which " -#| "will at the moment fail if a Pre-Depends is encountered). Setting this " -#| "option to another than the all value will implicit activate also the next " -#| "option per default as otherwise the system could end in an unconfigured " -#| "status which could be unbootable!" msgid "" "Valid values are \"<literal>all</literal>\", \"<literal>smart</literal>\" " "and \"<literal>no</literal>\". \"<literal>all</literal>\" is the default " @@ -7142,14 +7055,6 @@ msgstr "DPkg::ConfigurePending" #. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:586 -#, fuzzy -#| msgid "" -#| "If this option is set apt will call <command>dpkg --configure --pending</" -#| "command> to let dpkg handle all required configurations and triggers. " -#| "This option is activated automatic per default if the previous option is " -#| "not set to <literal>all</literal>, but deactivating could be useful if " -#| "you want to run APT multiple times in a row - e.g. in an installer. In " -#| "this sceneries you could deactivate this option in all but the last run." msgid "" "If this option is set apt will call <command>dpkg --configure --pending</" "command> to let dpkg handle all required configurations and triggers. This " @@ -7342,7 +7247,7 @@ msgid "" "in CDROM IDs." msgstr "" "<literal>Debug::IdentCdrom</literal> schaltet das Einbeziehen von statfs-" -"Daten in CDROM-IDs aus." +"Daten in CD-ROM-IDs aus." #. type: Content of: <refentry><refsect1><para> #: apt.conf.5.xml:684 @@ -7607,8 +7512,8 @@ msgid "" "there is none or if it is the same version as the installed. " "<literal>section</literal> is the name of the section the package appears in." msgstr "" -"Generiert Fehlersuchmeldungen, die beschreiben, welches Paket als keep/" -"install/remove markiert ist, währen der ProblemResolver seine Arbeit " +"Generiert Fehlersuchmeldungen, die beschreiben, welches Paket als »keep«/" +"»install«/»remove« markiert ist, während der ProblemResolver seine Arbeit " "verrichtet. Jedes Hinzufügen oder Löschen kann zusätzliche Aktionen " "auslösen. Sie werden nach zwei eingerückten Leerzeichen unter dem " "Originaleintrag angezeigt. Jede Zeile hat das Format <literal>MarkKeep</" @@ -7957,7 +7862,7 @@ msgid "" "Note also that downgrading a package can be risky.)" msgstr "" "Führen Sie niemals ein Downgrade durch, außer wenn die Priorität verfügbarer " -"Pakete 1000 übersteigt. »Downgrading« ist das Installieren einer weniger " +"Pakete 1000 übersteigt. (»Downgrading« ist das Installieren einer weniger " "aktuellen Version, an Stelle einer aktuelleren Version. Beachten Sie, dass " "keine Standardpriorität von APT 1000 übersteigt. So hohe Prioritäten können " "nur durch die Einstellungsdatei gesetzt werden. Beachten Sie außerdem, dass " @@ -8110,7 +8015,7 @@ msgid "" msgstr "" "Dieser Eintrag in allgemeiner Form in der APT-Einstellungsdatei verwendet " "nur Gruppen von Paketen. Der folgende Eintrag weist zum Beispiel allen " -"Paketversionen eine hohe Priorität zu, die lokale liegen." +"Paketversionen eine hohe Priorität zu, die lokal liegen." #. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><programlisting> #: apt_preferences.5.xml:175 @@ -8952,7 +8857,7 @@ msgstr "" "Mit einer geeigneten &sources-list;-Datei und der obigen Einstellungsdatei " "wird jeder der folgenden Befehle APT veranlassen, ein Upgrade auf die letzte" "(n) Version(en) im Release mit Codenamen <literal>squeeze</literal> " -"durchzuführen.<placeholder type=\"programlisting\" id=\"0\"/>" +"durchzuführen. <placeholder type=\"programlisting\" id=\"0\"/>" #. type: Content of: <refentry><refsect1><refsect2><para><programlisting> #: apt_preferences.5.xml:608 @@ -9002,12 +8907,6 @@ msgstr "Paketressourcenliste für APT" #. type: Content of: <refentry><refsect1><para> #: sources.list.5.xml:34 -#, fuzzy -#| msgid "" -#| "The package resource list is used to locate archives of the package " -#| "distribution system in use on the system. At this time, this manual page " -#| "documents only the packaging system used by the Debian GNU/Linux system. " -#| "This control file is located in <filename>/etc/apt/sources.list</filename>" msgid "" "The package resource list is used to locate archives of the package " "distribution system in use on the system. At this time, this manual page " @@ -9017,21 +8916,11 @@ msgstr "" "Die Paketquellenliste wird benutzt, um Archive des Paketverteilungssystems, " "das auf dem System benutzt wird, zu finden. Momentan dokumentiert diese " "Handbuchseite nur das vom Debian-GNU/Linux-System benutzte " -"Paketierungssystem. Die Steuerungsdatei befindet sich in <filename>/etc/apt/" -"sources.list</filename>." +"Paketierungssystem. Diese Steuerungsdatei ist " +"<filename>/etc/apt/sources.list</filename>." #. type: Content of: <refentry><refsect1><para> #: sources.list.5.xml:39 -#, fuzzy -#| msgid "" -#| "The source list is designed to support any number of active sources and a " -#| "variety of source media. The file lists one source per line, with the " -#| "most preferred source listed first. The format of each line is: " -#| "<literal>type uri args</literal> The first item, <literal>type</literal> " -#| "determines the format for <literal>args</literal> <literal>uri</literal> " -#| "is a Universal Resource Identifier (URI), which is a superset of the more " -#| "specific and well-known Universal Resource Locator, or URL. The rest of " -#| "the line can be marked as a comment by using a #." msgid "" "The source list is designed to support any number of active sources and a " "variety of source media. The file lists one source per line, with the most " @@ -9083,17 +8972,6 @@ msgstr "Die Typen deb und deb-src" #. type: Content of: <refentry><refsect1><para> #: sources.list.5.xml:61 -#, fuzzy -#| msgid "" -#| "The <literal>deb</literal> type describes a typical two-level Debian " -#| "archive, <filename>distribution/component</filename>. Typically, " -#| "<literal>distribution</literal> is generally one of <literal>stable</" -#| "literal> <literal>unstable</literal> or <literal>testing</literal> while " -#| "component is one of <literal>main</literal> <literal>contrib</literal> " -#| "<literal>non-free</literal> or <literal>non-us</literal> The <literal>deb-" -#| "src</literal> type describes a debian distribution's source code in the " -#| "same form as the <literal>deb</literal> type. A <literal>deb-src</" -#| "literal> line is required to fetch source indexes." msgid "" "The <literal>deb</literal> type describes a typical two-level Debian " "archive, <filename>distribution/component</filename>. Typically, " @@ -9118,10 +8996,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><para> #: sources.list.5.xml:73 -#, fuzzy -#| msgid "" -#| "The format for a <filename>sources.list</filename> entry using the " -#| "<literal>deb</literal> and <literal>deb-src</literal> types are:" msgid "" "The format for a <filename>sources.list</filename> entry using the " "<literal>deb</literal> and <literal>deb-src</literal> types is:" @@ -9137,16 +9011,6 @@ msgstr "deb URI Distribution [Komponente1] [Komponente2] [...]" #. type: Content of: <refentry><refsect1><para> #: sources.list.5.xml:78 -#, fuzzy -#| msgid "" -#| "The URI for the <literal>deb</literal> type must specify the base of the " -#| "Debian distribution, from which APT will find the information it needs. " -#| "<literal>distribution</literal> can specify an exact path, in which case " -#| "the components must be omitted and <literal>distribution</literal> must " -#| "end with a slash (/). This is useful for when only a particular sub-" -#| "section of the archive denoted by the URI is of interest. If " -#| "<literal>distribution</literal> does not specify an exact path, at least " -#| "one <literal>component</literal> must be present." msgid "" "The URI for the <literal>deb</literal> type must specify the base of the " "Debian distribution, from which APT will find the information it needs. " @@ -9275,14 +9139,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: sources.list.5.xml:141 -#, fuzzy -#| msgid "" -#| "The http scheme specifies an HTTP server for the archive. If an " -#| "environment variable <envar>http_proxy</envar> is set with the format " -#| "http://server:port/, the proxy server specified in <envar>http_proxy</" -#| "envar> will be used. Users of authenticated HTTP/1.1 proxies may use a " -#| "string of the format http://user:pass@server:port/ Note that this is an " -#| "insecure method of authentication." msgid "" "The http scheme specifies an HTTP server for the archive. If an environment " "variable <envar>http_proxy</envar> is set with the format http://server:" @@ -9364,7 +9220,7 @@ msgstr "" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> #: sources.list.5.xml:178 msgid "more recongnizable URI types" -msgstr "" +msgstr "weitere erkennbare URI-Typen" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: sources.list.5.xml:180 @@ -9378,6 +9234,15 @@ msgid "" "<citerefentry> <refentrytitle><filename>apt-transport-debtorrent</filename></" "refentrytitle> <manvolnum>1</manvolnum></citerefentry>." msgstr "" +"APT kann mit weiteren Methoden, die in anderen optionalen Paketen geliefert " +"werden, die dem Namensschema " +"<literal>apt-transport-<replaceable>Methode</replaceable></literal> folgen " +"sollten, erweitert werden. Das APT-Team betreut z.B. außerdem das Paket " +"<literal>apt-transport-https</literal>, das Zugriffsmethoden für HTTPS-URIs " +"mit Funktionen bereitstellt, die denen der HTTP-Methode ähneln, bei der " +"aber andere Methoden für z.B. debtorrent verfügbar sind, siehe " +"<citerefentry> <refentrytitle><filename>apt-transport-debtorrent</filename></" +"refentrytitle> <manvolnum>1</manvolnum></citerefentry>." #. type: Content of: <refentry><refsect1><para> #: sources.list.5.xml:122 @@ -9385,8 +9250,8 @@ msgid "" "The currently recognized URI types are cdrom, file, http, ftp, copy, ssh, " "rsh. <placeholder type=\"variablelist\" id=\"0\"/>" msgstr "" -"Die aktuell erkannten URI-Typen sind cdrom, file, http, ftp, copy, ssh, rsh. " -"<placeholder type=\"variablelist\" id=\"0\"/>" +"Die aktuell erkannten URI-Typen sind »cdrom«, »file«, »http«, »ftp«, " +"»copy«, »ssh«, »rsh«. <placeholder type=\"variablelist\" id=\"0\"/>" #. type: Content of: <refentry><refsect1><para> #: sources.list.5.xml:194 @@ -9407,7 +9272,8 @@ msgstr "deb file:/home/jason/debian stable main contrib non-free" #: sources.list.5.xml:198 msgid "As above, except this uses the unstable (development) distribution." msgstr "" -"Wie oben, außer das dies die unstable- (Entwicklungs-) Distribution benutzt." +"Wie oben, außer das dies die »unstable«- (Entwicklungs-) Distribution " +"benutzt." #. type: Content of: <refentry><refsect1><literallayout> #: sources.list.5.xml:199 @@ -9458,12 +9324,6 @@ msgstr "deb ftp://ftp.debian.org/debian stable contrib" #. type: Content of: <refentry><refsect1><para> #: sources.list.5.xml:212 -#, fuzzy -#| msgid "" -#| "Uses FTP to access the archive at ftp.debian.org, under the debian " -#| "directory, and uses only the unstable/contrib area. If this line appears " -#| "as well as the one in the previous example in <filename>sources.list</" -#| "filename>. a single FTP session will be used for both resource lines." msgid "" "Uses FTP to access the archive at ftp.debian.org, under the debian " "directory, and uses only the unstable/contrib area. If this line appears as " @@ -9519,8 +9379,8 @@ msgstr "" "<filename>unstable/binary-m68k</filename> auf m68k und so weiter für andere " "unterstützte Architekturen, gefunden werden. [Beachten Sie, dass dieses " "Beispiel nur anschaulich macht, wie die Platzhaltervariable benutzt wird. " -"non-us ist nicht länger so strukturiert] <placeholder type=\"literallayout\" " -"id=\"0\"/>" +"»non-us« ist nicht länger so strukturiert] " +"<placeholder type=\"literallayout\" id=\"0\"/>" #. type: Content of: <refentry><refsect1><para> #: sources.list.5.xml:234 @@ -9530,28 +9390,30 @@ msgstr "&apt-cache; &apt-conf;" #. type: <title></title> #: guide.sgml:4 msgid "APT User's Guide" -msgstr "" +msgstr "APT-Benutzerhandbuch" #. type: <author></author> #: guide.sgml:6 offline.sgml:6 msgid "<name>Jason Gunthorpe </name><email>jgg@debian.org</email>" -msgstr "" +msgstr "<name>Jason Gunthorpe </name><email>jgg@debian.org</email>" #. type: <version></version> #: guide.sgml:7 msgid "$Id: guide.sgml,v 1.7 2003/04/26 23:26:13 doogie Exp $" -msgstr "" +msgstr "$Id: guide.sgml,v 1.7 2003/04/26 23:26:13 doogie Exp $" #. type: <abstract></abstract> #: guide.sgml:11 msgid "" "This document provides an overview of how to use the the APT package manager." msgstr "" +"Dieses Dokument stellt eine Übersicht bereit, wie das " +"APT-Paketverwaltungsprogramm benutzt wird." #. type: <copyrightsummary></copyrightsummary> #: guide.sgml:15 msgid "Copyright © Jason Gunthorpe, 1998." -msgstr "" +msgstr "Copyright © Jason Gunthorpe, 1998." #. type: <p></p> #: guide.sgml:21 offline.sgml:22 @@ -9561,6 +9423,10 @@ msgid "" "published by the Free Software Foundation; either version 2 of the License, " "or (at your option) any later version." msgstr "" +"»APT« und dieses Dokument sind freie Software. Sie können sie weitergeben " +"und/oder verändern unter den Bedingungen der GNU General Public License, " +"wie sie von der Free Software Foundation veröffentlicht wird; entweder " +"Version 2 der Lizenz oder (optional) jeder späteren Version." #. type: <p></p> #: guide.sgml:24 offline.sgml:25 @@ -9568,13 +9434,13 @@ msgid "" "For more details, on Debian GNU/Linux systems, see the file /usr/share/" "common-licenses/GPL for the full license." msgstr "" +"Siehe für weitere Details auf Debian-Systemen die Datei " +"/usr/share/common-licenses/GPL, die die vollständige Lizenz enthält." #. type: <heading></heading> #: guide.sgml:32 -#, fuzzy -#| msgid "generate" msgid "General" -msgstr "generate" +msgstr "Allgemein" #. type: <p></p> #: guide.sgml:38 @@ -9584,11 +9450,16 @@ msgid "" "provide a way to install and remove packages as well as download new " "packages from the Internet." msgstr "" +"Das Paket APT enthält derzeit zwei Abschnitte, die " +"APT-<prgn>dselect</prgn>-Methode und die Anwenderschnittstelle " +"<prgn>apt-get</prgn> für die Befehlszeile. Beide stellen eine Möglichkeit " +"bereit, Pakete zu installieren, zu entfernen, sowie neue Pakete aus dem " +"Internet herunterzuladen." #. type: <heading></heading> #: guide.sgml:39 msgid "Anatomy of the Package System" -msgstr "" +msgstr "Anatomie des Paketsystems" #. type: <p></p> #: guide.sgml:44 @@ -9597,6 +9468,10 @@ msgid "" "with each package to help assure that it integrates cleanly and easily into " "the system. The most prominent of its features is the dependency system." msgstr "" +"Das Debian-Paketierungssystem besitzt eine große Anzahl von Informationen, " +"die mit jedem Paket verbunden sind, um zu helfen sicherzustellen, dass es " +"ordentlich und leicht in das System integriert wird. Das bekannteste seiner " +"Funktionen ist das Abhängigkeitssystem." #. type: <p></p> #: guide.sgml:52 @@ -9607,6 +9482,12 @@ msgid "" "things the average user is required to install. Also, it allows for choices " "in mail transport agents, X servers and so on." msgstr "" +"Das Abhängigkeitssystem erlaubt individuellen Programmen, Gebrauch von " +"gemeinsam im System benutzten Elementen, wie Bibliotheken, zu machen. Es " +"vereinfacht, selten benutze Teile eines Programms in separaten Paketen zu " +"platzieren, um die Zahl von Dingen zu verringern, die der " +"Durchschnittsanwender installieren sollte. Außerdem erlaubt es die Auswahl " +"von Mail-Transport-Agenten, X-Servern und so weiter." #. type: <p></p> #: guide.sgml:57 @@ -9616,6 +9497,11 @@ msgid "" "package requires another package to be installed at the same time to work " "properly." msgstr "" +"Der erste Schritt zum Verständnis des Abhängigkeitssystems besteht darin, " +"das Konzept einer einfachen Abhängigkeit zu begreifen. Die Bedeutung einer " +"einfachen Abhängigkeit besteht darin, dass ein Paket ein anderes Paket " +"benötigt, das zu gleichen Zeit installiert sein muss, um ordentlich zu " +"funktionieren." #. type: <p></p> #: guide.sgml:63 @@ -9625,6 +9511,11 @@ msgid "" "simple dependency on GPG. Also, because it is an emacs extension it has a " "simple dependency on emacs, without emacs it is completely useless." msgstr "" +"Mailcrypt ist zum Beispiel eine Emacs-Erweiterung, die hilft, E-Mails mit " +"GPG zu verschlüsseln. Ohne installiertes GPG ist Mailcrypt unbrauchbar, " +"deshalb hat Mailcrypt eine einfache Abhängigkeit von GPG. Da es außerdem " +"eine Emacs-Erweiterung ist, hat es ebenfalls eine einfache Abhängigkeit von " +"Emacs. Ohne Emacs ist es komplett unbenutzbar." #. type: <p></p> #: guide.sgml:73 @@ -9638,6 +9529,16 @@ msgid "" "system so all mail transport agents have a conflicting dependency with all " "other mail transport agents." msgstr "" +"Die andere wichtige Abhängigkeit, die es zu verstehen gilt, ist eine in " +"Konflikt stehende Abhängigkeit. Das bedeutet, dass das Paket, wenn es mit " +"einem anderen Paket installiert ist, nicht funktioniert und möglicherweise " +"extrem schädlich für das System sein könnte. Stellen Sie sich als Beispiel " +"einen Mail-Transport-Agenten wie Sendmail, Exim oder QMail vor. Es ist " +"nicht möglich, zwei Mail-Transport-Agenten installiert zu haben, da beide " +"im Netzwerk auf zu empfangende Mails warten. Der Versuch, zwei zu " +"installieren, würde das System ernsthaft beschädigen, weshalb alle " +"Mail-Transport-Agenten in Konflikt stehende Abhängigkeiten mit allen " +"anderen Mail-Transport-Agenten haben." #. type: <p></p> #: guide.sgml:83 @@ -9651,6 +9552,15 @@ msgid "" "depend on mail-transport-agent. This can add a great deal of confusion when " "trying to manually fix packages." msgstr "" +"Als zusätzliche Komplikation besteht die Möglichkeit, dass ein Paket " +"vortäuscht, ein anderes Paket zu sein. Bedenken Sie, dass Exim und Sendmail " +"in vieler Hinsicht identisch sind – sie liefern beide E-Mails aus und " +"verstehen eine gemeinsame Schnittstelle. Daher hat das Paketsystem " +"die Möglichkeit, beide als Mail-Transport-Agenten zu deklarieren. Deshalb " +"deklarieren Exim und Sendmail, dass sie einen Mail-Transport-Agenten " +"bereitstellen und andere Pakete, die einen Mail-Transport-Agenten benötigen, " +"dass sie von einem Mail-Transport-Agenten abhängen. Die kann zu großer " +"Verwirrung führen, wenn manuell versucht wird, Pakete zu reparieren." #. type: <p></p> #: guide.sgml:88 @@ -9660,6 +9570,11 @@ msgid "" "issues by providing a number of automatic algorithms that help in selecting " "packages for installation." msgstr "" +"Zu jeder Zeit könnte eine einzelne Abhängigkeit von Paketen vorgefunden " +"werden, die bereits installiert sind oder nicht. APT versucht beim Auflösen " +"von Abhängigkeitsproblemen zu helfen, indem es eine Anzahl automatischer " +"Algorithmen bereitstellt, die bei der Auswahl von Paketen zur Installation " +"helfen." #. type: <p></p> #: guide.sgml:102 @@ -9669,6 +9584,10 @@ msgid "" "understand .deb files, it works with the package's proper name and can only " "install .deb archives from a <em>Source</em>." msgstr "" +"<prgn>apt-get</prgn> stellt eine einfache Möglichkeit zu Verfügung, Pakete " +"auf der Befehlszeile zu installieren. Anders als <prgn>dpkg</prgn> versteht " +"<prgn>apt-get</prgn> keine .deb-Dateien. Es arbeitet mit dem Eigennamen des " +"Pakets und kann .deb-Archive nur aus einer <em>Quelle</em> installieren." #. type: <p></p> #: guide.sgml:109 @@ -9680,6 +9599,12 @@ msgid "" "packages are available. This is done with <tt>apt-get update</tt>. For " "instance," msgstr "" +"Das Erste <footnote><p>Falls Sie einen HTTP-Proxy-Server benutzen, müssen " +"Sie zuerst die Umgebungsvariable »http_proxy« setzen, siehe " +"sources.list(5)</p></footnote>, das Sie vor der Benutzung von " +"<prgn>apt-get</prgn> tun sollten, ist es, die Paketlisten von der " +"<em>Quelle</em> herunterzuladen, so dass es weiß, welche Pakete verfügbar " +"sind. Dies wird mit <tt>apt-get update</tt> erledigt. Zum Beispiel," #. type: <example></example> #: guide.sgml:116 @@ -9691,11 +9616,17 @@ msgid "" "Reading Package Lists... Done\n" "Building Dependency Tree... Done" msgstr "" +"# apt-get update\n" +"OK http://ftp.de.debian.org/debian-non-US/ stable/binary-i386/ Packages\n" +"OK http://llug.sep.bnl.gov/debian/ testing/contrib Packages\n" +"Paketlisten werden gelesen... Fertig\n" +"Abhängigkeitsbaum wird aufgebaut... Fertig" #. type: <p><taglist> #: guide.sgml:120 msgid "Once updated there are several commands that can be used:" msgstr "" +"Einmal aktualisiert stehen mehrere Befehl zur Benutzung zur Verfügung:" #. type: <p></p> #: guide.sgml:131 @@ -9708,6 +9639,16 @@ msgid "" "on new packages or conflict with some other package. <prgn>dselect</prgn> or " "<tt>apt-get install</tt> can be used to force these packages to install." msgstr "" +"»Upgrade« wird versuchen, ein behutsames Upgrade des ganzen Systems " +"durchzuführen. »Upgrade« wird niemals ein neues Paket installieren oder " +"entfernen, noch wird es jemals ein Upgrade eines Pakets durchführen, das " +"andere Pakete beschädigen könnte. Dies kann täglich dazu benutzt werden, um " +"ein relativ sicheres Upgrade des Systems durchzuführen. »Upgrade« wird alle " +"Pakete auflisten, von denen es kein Upgrade durchführen kann, was " +"üblicherweise bedeutet, dass sie von neuen Paketen abhängen oder Konflikte " +"mit anderen Paketen haben. <prgn>dselect</prgn> oder " +"<tt>apt-get install</tt> können benutzt werden, um die Installation von " +"diesen Paketen zu erzwingen." #. type: <p></p> #: guide.sgml:140 @@ -9720,6 +9661,14 @@ msgid "" "listed packages and will print a summary and ask for confirmation if " "anything other than its arguments are changed." msgstr "" +"»Install« wird benutzt, um Pakete nach Namen zu installieren. Das Paket wird " +"automatisch heruntergeladen und installiert. Dies kann nützlich sein, wenn " +"Sie bereits den Namen des zu installierenden Pakets kennen und keine GUI " +"aufrufen möchten, um es auszuwählen. Jede Anzahl von Paketen könnte zum " +"Installieren übergeben werden, sie werden alle heruntergeladen. " +"»Install« versucht automatisch Abhängigkeitsprobleme mit den aufgelisteten " +"Paketen aufzulösen, wird eine Zusammenfassung ausgeben und nach einer " +"Bestätigung fragen, wenn sich etwas anderes als dessen Argumente ändert." #. type: <p></p> #: guide.sgml:149 @@ -9732,6 +9681,16 @@ msgid "" "<prgn>dselect</prgn>. Once dist-upgrade has completed then <prgn>dselect</" "prgn> can be used to install any packages that may have been left out." msgstr "" +"»Dist-upgrade« führt vollständige Upgrades durch. Es wurde entworfen, um " +"Upgrades zwischen Releases von Debian zu vereinfachen. Es benutzt einen " +"ausgeklügelten Algorithmus, um die beste Zusammenstellung von Paketen zum " +"Installieren, für das Upgrade oder zum Entfernen festzulegen, um soviel wie " +"möglich vom System auf das neuste Release zu bekommen. In einigen " +"Situationen könnte es eher gewünscht sein, »dist-upgrade« zu benutzen, als " +"Zeit in das manuelle Auflösen von Abhängigkeiten in <prgn>dselect</prgn> " +"zu investieren. Ist »Dist-upgrade« erst vollständig, dann kann " +"<prgn>dselect</prgn> benutzt werden, um einige Pakete zu installieren, die " +"außen vor geblieben sind." #. type: <p></p> #: guide.sgml:152 @@ -9739,6 +9698,8 @@ msgid "" "It is important to closely look at what dist-upgrade is going to do, its " "decisions may sometimes be quite surprising." msgstr "" +"Es ist wichtig, genau zu schauen, was »Dist-upgrade« tun wird, seine " +"Entscheidungen können manchmal ziemlich überraschend sein." #. type: <p></p> #: guide.sgml:163 @@ -9751,13 +9712,20 @@ msgid "" "the downloaded archives can be installed by simply running the command that " "caused them to be downloaded again without <tt>-d</tt>." msgstr "" +"<prgn>apt-get</prgn> hat mehrere Befehlszeilenoptionen, die sich detailliert " +"in dessen Handbuchseite, <manref section=\"8\" name=\"apt-get\"> finden. Die " +"nützlichste Option ist <tt>-d</tt>, die die heruntergeladenen Dateien nicht " +"installiert. Falls das System eine große Anzahl Pakete herunterladen soll, " +"würde es nicht erwünscht sein, wenn die Installation in dem Fall gestartet " +"würde, wenn etwas schief läuft. Falls <tt>-d</tt> benutzt wird, können die " +"heruntergeladenen Archive dadurch installiert werden, indem einfach der " +"Befehl, der das Herunterladen veranlasste, erneut ohne <tt>-d</tt> ausführt " +"wird." #. type: <heading></heading> #: guide.sgml:168 -#, fuzzy -#| msgid "APT in DSelect" msgid "DSelect" -msgstr "APT in DSelect" +msgstr "DSelect" #. type: <p></p> #: guide.sgml:173 @@ -9767,6 +9735,10 @@ msgid "" "to select the packages to be installed or removed and APT actually installs " "them." msgstr "" +"Die APT-<prgn>dselect</prgn>-Methode stellt das komplette APT-System mit " +"dem <prgn>dselect</prgn>-Paketauswahl-GUI bereit. <prgn>dselect</prgn> wird " +"benutzt, um Pakete zum Installieren oder Entfernen auszuwählen und APT " +"installiert sie tatsächlich." #. type: <p></p> #: guide.sgml:184 @@ -9781,6 +9753,17 @@ msgid "" "have access to the latest bug fixes. APT will automatically use packages on " "your CDROM before downloading from the Internet." msgstr "" +"Um die APT-Methode einzuschalten, müssen Sie [Z]ugriff in " +"<prgn>dselect</prgn> auswählen und dann die APT-Methode wählen. Sie werden " +"nach einer Zusammenstellung von <em>Quellen</em> gefragt. Dies sind Plätze, " +"von denen Archive heruntergeladen werden. Dies können ferne Internetsites, " +"lokale Debian-Spiegel oder CD-ROMs sein. Jede Quelle kann einen Ausschnitt " +"des gesamten Debian-Archives bereitstellen. APT wird sie automatisch " +"kombinieren, um eine komplette Zusammenstellung von Paketen zu formen. " +"Falls Sie eine CD-ROM haben, ist es eine gute Idee, sie als erstes und dann " +"den Spiegel anzugeben, so dass Sie Zugriff auf die neusten Fehlerbehebungen " +"haben. APT wird automatisch Pakete auf der CD-ROM benutzen, bevor es sie " +"aus dem Internet herunterlädt." #. type: <example></example> #: guide.sgml:198 @@ -9799,6 +9782,18 @@ msgid "" " \n" " URL [http://llug.sep.bnl.gov/debian]:" msgstr "" +" eine Liste mit Orten von Distributionsquellen einrichten\n" +"\t \n" +" Bitte geben Sie die Basis-URL der Debian-Distribution an.\n" +" Die bekannten Zugriffsschemata dafür sind: http file\n" +"\t \n" +" Zum Beispiel:\n" +" file:/mnt/debian,\n" +" ftp://ftp.debian.org/debian,\n" +" http://ftp.de.debian.org/debian,\n" +" \n" +" \n" +" URL [http://llug.sep.bnl.gov/debian]:" #. type: <p></p> #: guide.sgml:205 @@ -9807,6 +9802,9 @@ msgid "" "archive, defaulting to a HTTP mirror. Next it asks for the distribution to " "get." msgstr "" +"Das Einrichten der <em>Quellen</em> beginnt durch das Erfragen der Basis " +"des Debian-Archives, vorgegeben ist ein HTTP-Spiegel. Als nächstes wird " +"nach der zu erhaltenden Distribution gefragt." #. type: <example></example> #: guide.sgml:212 @@ -9818,6 +9816,11 @@ msgid "" " \n" " Distribution [stable]:" msgstr "" +" Bitte geben Sie die zu erhaltende Distributionskennzeichnung oder den mit " +" einem / endenden Pfad zum Paket an. Die Distributionskennzeichnungen sind " +" normalerweise etwas wie: stable unstable testing non-US\n" +" \n" +" Distribution [stable]:" #. type: <p></p> #: guide.sgml:222 @@ -9829,6 +9832,13 @@ msgid "" "that cannot be exported from the United States. Importing these packages " "into the US is legal however." msgstr "" +"Die Distribution bezieht sich auf die Debian-Version im Archiv, " +"<em>stable</em> bezieht sich auf die zuletzt veröffentlichte Version und " +"<em>unstable</em> bezieht sich auf die Entwicklungsversion. <em>non-US</em> " +"ist nur auf einigen Spiegeln verfügbar und bezieht sich auf Pakete, die " +"Verschlüsselungstechnologie oder andere Dinge enthalten, die nicht aus den " +"Vereinigten Staaten exportiert werden können. Diese Pakete in die USA zu " +"importieren ist jedoch legal." #. type: <example></example> #: guide.sgml:228 @@ -9839,6 +9849,10 @@ msgid "" " \n" " Components [main contrib non-free]:" msgstr "" +" Bitte geben Sie die Komponenten an, die Sie erhalten möchten\n" +" Die Komponenten sind normalerweise etwas wie: »main« »contrib« »non-free«\n" +" \n" +" Komponenten [main contrib non-free]:" #. type: <p></p> #: guide.sgml:236 @@ -9848,6 +9862,11 @@ msgid "" "packages while contrib and non-free contain things that have various " "restrictions placed on their use and distribution." msgstr "" +"Die Komponentenliste bezieht sich auf die Liste von Unter-Distributionen " +"zum Herunterladen. Die Distribution ist auf Basis von Software-Lizenzen " +"unterteilt, »Main« besteht aus Paketen die gemäß der DFSG frei sind, während " +"»Contrib« und »Non-free« Dinge enthalten, die verschiedene Einschränkungen " +"in ihrer Benutzung und ihren Vertrieb haben." #. type: <p></p> #: guide.sgml:240 @@ -9855,6 +9874,9 @@ msgid "" "Any number of sources can be added, the setup script will continue to prompt " "until you have specified all that you want." msgstr "" +"Jegliche Anzahl von Quellen kann hinzugefügt werden, das Einrichtungsskript " +"wird mit Nachfragen fortfahren, bis Sie alles angegeben haben, was Sie " +"möchten." #. type: <p></p> #: guide.sgml:247 @@ -9865,6 +9887,12 @@ msgid "" "<prgn>dselect</prgn>. [U]pdate must be performed even if <tt>apt-get update</" "tt> has been run before." msgstr "" +"Bevor sie beginnen, <prgn>dselect</prgn> zu benutzen, ist es notwendig, die " +"Verfügbarkeitsliste zu aktualisieren, indem sie aus dem Menü [E]rneuern " +"auswählen. Dies ist eine Obermenge von <tt>apt-get update</tt>, das " +"<prgn>dselect</prgn> heruntergeladene Informationen zur Verfügung stellt. " +"[E]rneuern muss auch dann durchgeführt werden, wenn vorher " +"<tt>apt-get update</tt> ausgeführt wurde." #. type: <p></p> #: guide.sgml:253 @@ -9874,6 +9902,10 @@ msgid "" "[R]emove commands have no meaning, the [I]nstall command performs both of " "them together." msgstr "" +"Sie können dann fortfahren und Ihre Auswahl per [A]uswähle treffen und dann " +"die Installation mit [I]nstall. vornehmen. Wenn Sie die APT-Methode " +"benutzen, haben die Befehle Kon[f]ig. und [L]öschen keine Bedeutung, der " +"Befehl [I]nstall. führt beides gleichermaßen aus." #. type: <p></p> #: guide.sgml:258 @@ -9882,11 +9914,14 @@ msgid "" "have been successfully installed. To change this behavior place <tt>Dselect::" "clean \"prompt\";</tt> in /etc/apt/apt.conf." msgstr "" +"Standardmäßig wird APT automatisch die Paketdateien (.deb) entfernen, " +"sobald sie erfolgreich installiert sind. Um dieses Verhalten zu ändern, " +"platzieren Sie <tt>Dselect::clean \"prompt\";</tt> in /etc/apt/apt.conf." #. type: <heading></heading> #: guide.sgml:264 msgid "The Interface" -msgstr "" +msgstr "Die Schnittstelle" #. type: <p></p> #: guide.sgml:278 @@ -9900,11 +9935,20 @@ msgid "" "then will print out some informative status messages so that you can " "estimate how far along it is and how much is left to do." msgstr "" +"Sowohl die APT-Methode <prgn>dselect</prgn>, als auch <prgn>apt-get</prgn> " +"teilen sich die gleiche Schnittstelle. Es ist ein einfaches System, das " +"üblicherweise mitteilt, was es tun wird und es dann tut. <footnote><p>Die " +"Methode <prgn>dselect</prgn> ist tatsächlich eine Zusammenstellung von " +"Wrapper-Skripten für <prgn>apt-get</prgn>. Die Methode stellt tatsächlich " +"mehr Funktionalitäten bereit, als in <prgn>apt-get</prgn> allein vorhanden " +"sind.</p></footnote> Nach der Ausgabe einer Zusammenfassung was passieren " +"wird, gibt APT einige informative Statusmeldungen aus, so dass Sie " +"abschätzen können, wie weit es ist und wieviel noch zu tun ist." #. type: <heading></heading> #: guide.sgml:280 msgid "Startup" -msgstr "" +msgstr "Anfang" #. type: <p></p> #: guide.sgml:284 @@ -9914,6 +9958,10 @@ msgid "" "At any time these operations can be performed by running <tt>apt-get check</" "tt>." msgstr "" +"Vor allen Operationen, ausgenommen »update«, führt APT eine Reihe von " +"Aktionen durch, um seinen internen Status vorzubereiten. Es macht außerdem " +"einige Prüfungen des Systemstatus. Diese Operationen können jederzeit durch " +"Ausführung von <tt>apt-get check</tt> durchgeführt werden." #. type: <example></example> #: guide.sgml:289 @@ -9923,6 +9971,9 @@ msgid "" "Reading Package Lists... Done\n" "Building Dependency Tree... Done" msgstr "" +"# apt-get check\n" +"Paketlisten werden gelesen... Fertig\n" +"Abhängigkeitsbaum wird aufgebaut" #. type: <p></p> #: guide.sgml:297 @@ -9932,6 +9983,11 @@ msgid "" "If some of the package files are not found then they will be ignored and a " "warning will be printed when apt-get exits." msgstr "" +"Das erste was es tut, ist das Einlesen aller Paketdateien in den Speicher. " +"APT benutzt ein Zwischenspeicherschema, so dass diese Operation beim " +"zweiten Ausführen schneller laufen wird. Falls einige der Paketdateien nicht " +"gefunden werden, werden sie ignoriert und beim Beenden von Apt-get wird eine " +"Warnung ausgegeben." #. type: <p></p> #: guide.sgml:303 @@ -9941,6 +9997,11 @@ msgid "" "package and considers if it is OK. Should this find a problem then a report " "will be printed out and <prgn>apt-get</prgn> will refuse to run." msgstr "" +"Die letzte Operation führt eine detaillierte Analyse der Abhängigkeiten des " +"Systems durch. Sie prüft jede Abhängigkeit jedes installierten oder " +"entpackten Pakets und berücksichtigt, ob es in Ordnung ist. Sollte sie ein " +"Problem finden, dann wird eine Meldung ausgegeben und <prgn>apt-get</prgn> " +"wird die Ausführung verweigern." #. type: <example></example> #: guide.sgml:320 @@ -9962,6 +10023,22 @@ msgid "" " Depends: xlib6g (>= 3.3-5) but it is not installed\n" " libreadlineg2: Conflicts:libreadline2 (<< 2.1-2.1)" msgstr "" +"# apt-get check\n" +"Paketlisten werden gelesen... Fertig\n" +"Abhängigkeitsbaum wird aufgebaut\n" +"Status-Informationen einlesen... Fertig\n" +"Probieren Sie „apt-get -f install“, um diese zu korrigieren:\n" +"Die folgenden Pakete haben nichterfüllte Abhängigkeiten:\n" +" 9fonts: Hängt ab: xlib6g ist aber nicht installiert\n" +" uucp: Hängt ab: mailx ist aber nicht installiert\n" +" blast: Hängt ab: xlib6g (>= 3.3-5) ist aber nicht installiert\n" +" adduser: Hängt ab: perl-base ist aber nicht installiert\n" +" aumix: Hängt ab: libgpmg1 ist aber nicht installiert\n" +" debiandoc-sgml: Hängt ab: sgml-base ist aber nicht installiert\n" +" bash-builtins: Hängt ab: bash (>= 2.01) but 2.0-3 ist installiert\n" +" cthugha: Hängt ab: svgalibg1 ist aber nicht installiert\n" +" Hängt ab: xlib6g (>= 3.3-5) ist aber nicht installiert\n" +" libreadlineg2: Conflicts:libreadline2 (<< 2.1-2.1)" #. type: <p></p> #: guide.sgml:329 @@ -9972,6 +10049,11 @@ msgid "" "that are unmet. A short explanation of why the package has a dependency " "problem is also included." msgstr "" +"In diesem Beispiel hat das System viele Probleme, einschließlich eines " +"ernsten Problems mit libreadlineg2. Für jedes Paket, das nichterfüllte " +"Abhängigkeiten hat, wird eine Zeile ausgegeben, die das Paket mit dem " +"Problem anzeigt und die Abhängigkeiten, die nicht erfüllt sind. Eine kurze " +"Erklärung, warum das Paket ein Abhängigkeitsproblem hat, ist inbegriffen." #. type: <p></p> #: guide.sgml:337 @@ -9984,6 +10066,14 @@ msgid "" "situation a package may have been unpacked without its dependents being " "installed." msgstr "" +"Es gibt zwei Möglichkeiten, wie ein System in einen kaputten Status wie " +"diesen kommen kann. Die erste wird dadurch verursacht, dass " +"<prgn>dpkg</prgn> einige feine Beziehungen zwischen Paketen übersieht, wenn " +"Upgrades durchgeführt werden. <footnote><p>APT berücksichtigt jedoch alle " +"bekannten Abhängigkeiten und versucht, kaputte Pakete zu vermeiden" +"</p></footnote>. Die zweite tritt auf, falls eine Paketinstallation während " +"der Ausführung fehlschlägt. In dieser Situation könnte ein Paket entpackt " +"worden sein, ohne dass die von ihm Abhängigen installiert sind." #. type: <p></p> #: guide.sgml:345 @@ -9995,6 +10085,13 @@ msgid "" "<prgn>dselect</prgn> method always supplies the <tt>-f</tt> option to allow " "for easy continuation of failed maintainer scripts." msgstr "" +"Die zweite Situation ist weit weniger ernst als die erste, weil APT " +"bestimmte Beschränkungen in der Reihenfolge setzt, in der Pakete installiert " +"werden. In beiden Fällen veranlasst die Option <tt>-f</tt> " +"<prgn>apt-get</prgn>, eine mögliche Lösung für das Problem zu folgern und " +"dann fortzufahren. Die APT-Methode <prgn>dselect</prgn> liefert immer die " +"Option <tt>-f</tt>, zum einfachen Fortfahren von gescheiterten " +"Betreuerskripten." #. type: <p></p> #: guide.sgml:351 @@ -10005,11 +10102,17 @@ msgid "" "necessary to manually use dpkg (possibly with forcing options) to correct " "the situation enough to allow APT to proceed." msgstr "" +"Falls jedoch die Option <tt>-f</tt> benutzt wird, um ein ernsthaft kaputtes " +"System zu korrigieren, das vom ersten Fall verursacht wurde, dann ist es " +"möglich, dass es entweder sofort fehlschlägt oder die Installationsabfolge " +"fehlschlagen wird. In beiden Fällen ist es nötig, Dpkg (möglicherweise mit " +"erzwingenden Optionen) manuell zu benutzen, um die Situation ausreichend zu " +"korrigieren, so dass es APT ermöglicht wird, fortzufahren." #. type: <heading></heading> #: guide.sgml:356 msgid "The Status Report" -msgstr "" +msgstr "Der Statusbericht" #. type: <p></p> #: guide.sgml:363 @@ -10020,11 +10123,17 @@ msgid "" "final state of things, taking into account the <tt>-f</tt> option and any " "other relevant activities to the command being executed." msgstr "" +"Bevor es fortfährt, wird <prgn>apt-get</prgn> einen Bericht darüber " +"präsentieren, was geschehen wird. Im Allgemeinen spiegelt der Bericht den Typ " +"der Operation, die ausgeführt wird, wider, aber es gibt auch mehrere " +"geläufige Elemente. Auf jeden Fall spiegelt die Liste den Endstatus der Dinge " +"wider, bezieht die Option <tt>-f</tt> in Betracht und alle andere " +"relevante Aktivitäten zum Befehl, der ausgeführt wird." #. type: <heading></heading> #: guide.sgml:364 msgid "The Extra Package list" -msgstr "" +msgstr "Die zusätzliche Paketliste" #. type: <example></example> #: guide.sgml:372 @@ -10037,6 +10146,12 @@ msgid "" " squake pgp-i python-base debmake ldso perl libreadlineg2\n" " ssh" msgstr "" +"Die folgenden Pakete werden zusätzlich installiert:\n" +" libdbd-mysql-perl xlib6 zlib1 xzx libreadline2 libdbd-msql-perl\n" +" mailpgp xdpkg fileutils pinepgp zlib1g xlib6g perl-base\n" +" bin86 libgdbm1 libgdbmg1 quake-lib gmp2 bcc xbuffy\n" +" squake pgp-i python-base debmake ldso perl libreadlineg2\n" +" ssh" #. type: <p></p> #: guide.sgml:379 @@ -10046,11 +10161,16 @@ msgid "" "generated for an <tt>install</tt> command. The listed packages are often the " "result of an Auto Install." msgstr "" +"Die zusätzliche Paketliste zeigt alle Pakete, die installiert werden oder " +"von denen ein Upgrade durchgeführt wird, zusätzlich zu den auf der " +"Befehlszeile angegebenen. Sie wird nur für einen " +"<tt>install</tt>-Befehl generiert. Die aufgelisteten Pakete sind häufig das " +"Ergebnis einer automatischen Installation." #. type: <heading></heading> #: guide.sgml:382 msgid "The Packages to Remove" -msgstr "" +msgstr "Die zu entfernenden Pakete" #. type: <example></example> #: guide.sgml:389 @@ -10062,6 +10182,11 @@ msgid "" " xadmin xboard perl-debug tkined xtetris libreadline2-dev perl-suid\n" " nas xpilot xfig" msgstr "" +"Die folgenden Pakete werden ENTFERNT:\n" +" xlib6-dev xpat2 tk40-dev xkeycaps xbattle xonix\n" +" xdaliclock tk40 tk41 xforms0.86 ghostview xloadimage xcolorsel\n" +" xadmin xboard perl-debug tkined xtetris libreadline2-dev perl-suid\n" +" nas xpilot xfig" #. type: <p></p> #: guide.sgml:399 @@ -10074,11 +10199,19 @@ msgid "" "that are going to be removed because they are only partially installed, " "possibly due to an aborted installation." msgstr "" +"Die Liste der zu entfernenden Pakete zeigt all die Pakete, die vom System " +"entfernt werden. Sie kann für jede der Operationen angezeigt werden und " +"sollte einer sorgfältige Überprüfung unterzogen werden, um sicherzustellen, " +"dass nichts Wichtiges weggenommen wird. Die Option <tt>-f</tt> ist " +"insbesondere gut darin, Pakete zum Entfernen vorzumerken, so dass in diesem " +"Fall mit extremer Vorsicht vorgegangen werden sollte. Die Liste könnte " +"Pakete enthalten, die entfernt werden, weil sie nur teilweise installiert " +"sind, möglicherweise aufgrund einer abgebrochenen Installation." #. type: <heading></heading> #: guide.sgml:402 msgid "The New Packages list" -msgstr "" +msgstr "Die Liste neuer Pakete" #. type: <example></example> #: guide.sgml:406 @@ -10087,6 +10220,8 @@ msgid "" "The following NEW packages will installed:\n" " zlib1g xlib6g perl-base libgdbmg1 quake-lib gmp2 pgp-i python-base" msgstr "" +"Die folgenden NEUEN Pakete werden zusätzlich installiert:\n" +" zlib1g xlib6g perl-base libgdbmg1 quake-lib gmp2 pgp-i python-base" #. type: <p></p> #: guide.sgml:411 @@ -10095,11 +10230,14 @@ msgid "" "listed are not presently installed in the system but will be when APT is " "done." msgstr "" +"Die Liste neuer Pakete ist einfache eine Erinnerung, was geschehen " +"wird. Die aufgelisteten Pakete sind zurzeit nicht auf dem System " +"installiert, werden es aber sein, wenn APT fertig ist." #. type: <heading></heading> #: guide.sgml:414 msgid "The Kept Back list" -msgstr "" +msgstr "Die Liste zurückgehaltener Pakete" #. type: <example></example> #: guide.sgml:419 @@ -10109,6 +10247,9 @@ msgid "" " compface man-db tetex-base msql libpaper svgalib1\n" " gs snmp arena lynx xpat2 groff xscreensaver" msgstr "" +"Die folgenden Pakete werden zurückgehalten:\n" +" compface man-db tetex-base msql libpaper svgalib1\n" +" gs snmp arena lynx xpat2 groff xscreensaver" #. type: <p></p> #: guide.sgml:428 @@ -10120,11 +10261,18 @@ msgid "" "to install is with <tt>apt-get install</tt> or by using <prgn>dselect</prgn> " "to resolve their problems." msgstr "" +"Jedesmal, wenn ein Upgrade des ganzen Systems durchgeführt wird, besteht die " +"Möglichkeit, dass neue Versionen von Paketen nicht installiert werden " +"können, weil sie neue Dinge benötigen oder einen Konflikt mit bereits " +"installierten Dingen haben. In diesem Fall wird das Paket auf der Liste " +"zurückgehaltener Pakete erscheinen. Der beste Weg dort aufgeführte Pakete " +"zur Installation zu bewegen, ist per <tt>apt-get install</tt> oder indem " +"<prgn>dselect</prgn> zum Lösen ihrer Probleme benutzt wird." #. type: <heading></heading> #: guide.sgml:431 msgid "Held Packages warning" -msgstr "" +msgstr "Warnung wegen zurückgehaltener Pakete" #. type: <example></example> #: guide.sgml:435 @@ -10133,6 +10281,8 @@ msgid "" "The following held packages will be changed:\n" " cvs" msgstr "" +"Die folgenden zurückgehaltenen Pakete werden geändert:\n" +" cvs" #. type: <p></p> #: guide.sgml:441 @@ -10141,17 +10291,23 @@ msgid "" "case it prints out a warning that the held package is going to be changed. " "This should only happen during dist-upgrade or install." msgstr "" +"Manchmal können Sie APT bitten, ein auf »zurückgehalten« gesetztes Paket zu " +"installieren. In einem solchen Fall gibt es eine Warnung aus, dass das " +"zurückgehaltene Paket geändert wird. Dies sollte nur während »Dist-upgrade« " +"oder »Install« vorkommen." #. type: <heading></heading> #: guide.sgml:444 msgid "Final summary" -msgstr "" +msgstr "Abschließende Zusammenfassung" #. type: <p></p> #: guide.sgml:447 msgid "" "Finally, APT will print out a summary of all the changes that will occur." msgstr "" +"Abschließend wird APT eine Zusammenfassung aller Änderungen ausgeben, die " +"auftreten werden." #. type: <example></example> #: guide.sgml:452 @@ -10161,6 +10317,11 @@ msgid "" "12 packages not fully installed or removed.\n" "Need to get 65.7M/66.7M of archives. After unpacking 26.5M will be used." msgstr "" +"206 Pakete aktualisiert, 8 zusätzlich installiert, 23 werden entfernt und " +"51 nicht aktualisiert.\n" +"12 Pakete nicht vollständig installiert oder entfernt.\n" +"Muss 65,7MB/66,7MB an Archiven herunterladen. Nach dem Entpacken werden " +"26,5MB zusätzlich belegt sein." #. type: <p></p> #: guide.sgml:470 @@ -10179,6 +10340,20 @@ msgid "" "If a large number of packages are being removed then the value may indicate " "the amount of space that will be freed." msgstr "" +"Die erste Zeile der Zusammenfassung ist bloß eine Zusammenfassung von all " +"den Listen und umfasst die Anzahl der Upgrades – das sind bereits " +"installierte Pakete, für die neue Versionen verfügbar sind. Die zweite " +"Zeile zeigt die Anzahl von schlecht konfigurierten Paketen, die " +"möglicherweise das Ergebnis einer abgebrochenen Installation sind. Die " +"letzt Zeile zeigt den Speicherbedarf, den die Installation benötigt. Das " +"erste Zahlenpaar bezieht sich auf die Größe der Archivdateien. Die erste " +"Zahl zeigt die Anzahl der Bytes an, die von fernen Orten heruntergeladen " +"werden müssen und die zweite zeigt die gesamte Größe aller benötigten " +"Archive an. Die nächste Zahl zeigt den Größenunterschied zwischen den " +"derzeit installierten Paketen und den neu installierten Paketen. Es " +"entspricht ungefähr dem in /usr benötigten Speicher nachdem alles erledigt " +"ist. Wenn eine große Anzahl Pakete entfernt wird, dann kann der Wert den " +"Betrag des freiwerdenden Speichers anzeigen." #. type: <p></p> #: guide.sgml:473 @@ -10186,11 +10361,14 @@ msgid "" "Some other reports can be generated by using the -u option to show packages " "to upgrade, they are similar to the previous examples." msgstr "" +"Einige andere Berichte können durch Benutzung der Option »-u« generiert " +"werden, um Pakete anzuzeigen, von denen ein Upgrade durchgeführt werden " +"soll. Dies ist den vorherigen Beispielen ähnlich." #. type: <heading></heading> #: guide.sgml:477 msgid "The Status Display" -msgstr "" +msgstr "Der Anzeigestatus" #. type: <p></p> #: guide.sgml:481 @@ -10198,6 +10376,8 @@ msgid "" "During the download of archives and package files APT prints out a series of " "status messages." msgstr "" +"Während des Herunterladens von Archiven und Paketdateien gibt APT eine " +"Reihe von Statusmeldungen aus." #. type: <example></example> #: guide.sgml:490 @@ -10211,6 +10391,13 @@ msgid "" "Get:5 http://llug.sep.bnl.gov/debian/ testing/non-free Packages\n" "11% [5 testing/non-free `Waiting for file' 0/32.1k 0%] 2203b/s 1m52s" msgstr "" +"# apt-get update\n" +"Hole:1 http://ftp.de.debian.org/debian-non-US/ stable/non-US/ Packages\n" +"Hole:2 http://llug.sep.bnl.gov/debian/ testing/contrib Packages\n" +"Treffer http://llug.sep.bnl.gov/debian/ testing/main Packages\n" +"Hole:4 http://ftp.de.debian.org/debian-non-US/ unstable/binary-i386/ Packages\n" +"Hole:5 http://llug.sep.bnl.gov/debian/ testing/non-free Packages\n" +"11% [5 testing/non-free 'Warte auf Datei' 0/32.1k 0%] 2203b/s 1m52s" #. type: <p></p> #: guide.sgml:500 @@ -10222,6 +10409,13 @@ msgid "" "<tt>apt-get update</tt> estimates the percent done which causes some " "inaccuracies." msgstr "" +"Die Zeilen, die mit <em>Hole</em> beginnen, werden ausgegeben, wenn APT " +"anfängt, eine Datei herunterzuladen, während die letzte Zeile den " +"Fortschritt des Herunterladens anzeigt. Die erste Prozentzahl der " +"Fortschrittszeile zeigt die gesamt erledigte Prozentzahl aller Dateien an. " +"Unglücklicherweise schätzt <tt>apt-get update</tt> die erledigte " +"Prozentzahl, da die Größe der Pakete unbekannt ist, was einige " +"Ungenauigkeiten bewirkt." #. type: <p></p> #: guide.sgml:509 @@ -10234,6 +10428,15 @@ msgid "" "The next word is the short form name of the object being downloaded. For " "archives it will contain the name of the package that is being fetched." msgstr "" +"Der nächste Abschnitt der Statuszeile wird für jeden Download-Thread " +"wiederholt und zeigt die durchgeführte Operation, sowie einige nützliche " +"Informationen darüber an was geschieht. Manchmal wird dieser Abschnitt " +"einfach nur <em>Forking</em> darstellen, was bedeutet, dass das " +"Betriebssystem das Download-Modul am Laden ist. Das erste Wort nach dem " +"»[« ist die Ladenummer, wie sie auf den Verlaufszeilen angezeigt wird. Das " +"nächste Wort ist Name in Kurzform des Ojektes, das heruntergeladen wird. " +"Für Archive wird es den Namen des Paketes enthalten, das heruntergeladen " +"wird." #. type: <p></p> #: guide.sgml:524 @@ -10252,6 +10455,21 @@ msgid "" "regularly and reflects the time to complete everything at the shown transfer " "rate." msgstr "" +"Innerhalb von einzelnen Anführungszeichen folgt eine informative " +"Zeichenkette, die den Fortschritt der Übertragungsphase des Downloads " +"anzeigt. Normalerweise schreitet sie fort von <em>Verbinde</em> zu <em>Warte " +"auf Datei</em> zu <em>Lade herunter</em> oder <em>Nehme wieder auf</em>. " +"Der letzte Wert ist die Anzahl der von der fernen Site heruntergeladenen " +"Bytes. Sobald der Download beginnt, zeigt sich dies wie <tt>102/10.2k</tt> " +"was anzeigt, dass 102 Bytes heruntergeladen und 10,2 Kilobytes erwartet " +"werden. Die Gesamtgröße wird immer in vierstelliger Schreibweise " +"dargestellt, um Platz zu sparen. Nach der Größenanzeige ist eine " +"Prozentangabe für die Datei selbst. Das zweitletzte Element ist die " +"augenblickliche Fortschrittsgeschwindigkeit. Dieser Wert wird alle fünf " +"Sekunden aktualisiert und spiegelt die Datenübertragungsgeschwindigkeit in " +"dieser Periode wider. Am Ende wird die geschätzte Übertragungszeit " +"angezeigt. Dies wird regelmäßig aktualisiert und spiegelt die Zeit zum " +"Vervollständigen bei der angezeigten Datenübertragungsgeschwindigkeit wider." #. type: <p></p> #: guide.sgml:530 @@ -10262,11 +10480,17 @@ msgid "" "for logging to a file, use the <tt>-q</tt> option to remove the status " "display." msgstr "" +"Die Statusanzeige aktualisiert sich alle halbe Sekunde, um eine " +"gleichmäßige Rückmeldung über den Download-Fortschritt bereitzustellen, " +"während die »Hole«-Zeilen bei jeder gestarteten neuen Datei zurückscrollen. " +"Da die Statusanzeige ständig aktualisiert wird, ist sie für die " +"Protokollierung in eine Datei ungeeignet. Benutzen Sie die Option " +"<tt>-q</tt>, um die Statusanzeige zu entfernen." #. type: <heading></heading> #: guide.sgml:535 msgid "Dpkg" -msgstr "" +msgstr "Dpkg" #. type: <p></p> #: guide.sgml:542 @@ -10278,16 +10502,23 @@ msgid "" "each question there is usually a description of what it is asking and the " "questions are too varied to discuss completely here." msgstr "" +"APT benutzt <prgn>dpkg</prgn>, um die Archive zu installieren und wird " +"zu der <prgn>dpkg</prgn>-Schnittstelle herüberschalten, sobald der " +"Download vollständig ist. <prgn>dpkg</prgn> wird außerdem eine Reihe von " +"Fragen stellen, während es die Pakete abarbeitet und die Pakete können auch " +"mehrere Fragen stellen . Vor jeder Frage ist üblicherweise eine " +"Beschreibung des Gefragten und die Fragen sind zu vielfältig, um sie " +"vollständig hier zu besprechen." #. type: <title></title> #: offline.sgml:4 msgid "Using APT Offline" -msgstr "" +msgstr "APT offline verwenden" #. type: <version></version> #: offline.sgml:7 msgid "$Id: offline.sgml,v 1.8 2003/02/12 15:06:41 doogie Exp $" -msgstr "" +msgstr "$Id: offline.sgml,v 1.8 12.02.2003 15:06:41 doogie Exp $" #. type: <abstract></abstract> #: offline.sgml:12 @@ -10295,23 +10526,24 @@ msgid "" "This document describes how to use APT in a non-networked environment, " "specifically a 'sneaker-net' approach for performing upgrades." msgstr "" +"Dieses Dokument beschreibt, wie APT in einer Umgebung ohne Netzwerk, " +"speziell einem »Turnschuhnetzwerk«, an die Durchführung von Upgrades " +"herangeht." #. type: <copyrightsummary></copyrightsummary> #: offline.sgml:16 msgid "Copyright © Jason Gunthorpe, 1999." -msgstr "" +msgstr "Copyright © Jason Gunthorpe, 1999." #. type: <heading></heading> #: offline.sgml:32 msgid "Introduction" -msgstr "" +msgstr "Einleitung" #. type: <heading></heading> #: offline.sgml:34 offline.sgml:65 offline.sgml:180 -#, fuzzy -#| msgid "OverrideDir" msgid "Overview" -msgstr "OverrideDir" +msgstr "Übersicht" #. type: <p></p> #: offline.sgml:40 @@ -10321,6 +10553,11 @@ msgid "" "machine is on a slow link, such as a modem and another machine has a very " "fast connection but they are physically distant." msgstr "" +"Normalerweise benötigt APT direkten Zugang zu einem Debian-Archiv, entweder " +"von einem lokalen Medium oder über ein Netz. Eine andere häufige " +"Beanstandung ist, dass eine Debian-Maschine an einer langsamen Anbindung, " +"wie einem Modem, hängt und eine andere Maschine eine sehr schnelle " +"Verbindung hat, sie jedoch physisch fern sind." #. type: <p></p> #: offline.sgml:51 @@ -10335,6 +10572,17 @@ msgid "" "the machine downloading the packages, and <em>target host</em> the one with " "bad or no connection." msgstr "" +"Die Lösung dazu besteht darin, große Wechselmedien, wie eine Zip-Platte " +"oder eine SuperDisk zu benutzen. Diese Platten sind nicht groß genug, um " +"ein ganzes Debian-Archiv zu speichern, können aber leicht eine Untermenge " +"aufnehmen, die für die meisten Anwender groß genug ist. Die Idee besteht " +"darin, APT zu benutzen, um eine Liste benötigter Pakete zu generieren und " +"diese dann mit einer anderen Maschine mit guter Verbindung auf die Platte " +"herunterzuladen. Es ist sogar möglich, eine andere Debian-Maschine mit APT " +"oder ein komplett unterschiedliches Betriebssystem und ein " +"Download-Werkzeug wie Wget zu benutzen. Nennen wir die Maschine, die die " +"Pakete herunterlädt <em>ferner Rechner</em> und die mit der schlechten oder " +"fehlenden Verbindung <em>Zielrechner</em>." #. type: <p></p> #: offline.sgml:57 @@ -10344,11 +10592,16 @@ msgid "" "that the disc should be formated with a filesystem that can handle long file " "names such as ext2, fat32 or vfat." msgstr "" +"Dies wird durch kreatives Manipulieren der APT-Konfigurationsdatei " +"erreicht. Die wesentliche Voraussetzung besteht darin, APT mitzuteilen, " +"dass es für seine Archivdateien auf einer Platte nachsieht. Beachten Sie, " +"dass diese Platte mit einem Dateisystem formatiert sein sollte, das mit " +"langen Dateinamen umgehen kann, so wie ext2, fat32 oder vfat." #. type: <heading></heading> #: offline.sgml:63 msgid "Using APT on both machines" -msgstr "" +msgstr "APT auf beiden Maschinen benutzen" #. type: <p><example> #: offline.sgml:71 @@ -10358,6 +10611,11 @@ msgid "" "remote machine to fetch the latest package files and decide which packages " "to download. The disk directory structure should look like:" msgstr "" +"Ein verfügbares APT auf beiden Maschinen stellt die einfachste Konfiguration " +"dar. Die Grundidee besteht darin, eine Kopie der Statusdatei auf der Platte " +"zu platzieren und die ferne Maschine zu benutzen, um die neusten " +"Paketdateien herunterzuladen und zu entscheiden, welche Pakete " +"heruntergeladen werden. Die Plattenverzeichnisstruktur sollte so aussehen:" #. type: <example></example> #: offline.sgml:80 @@ -10372,13 +10630,19 @@ msgid "" " sources.list\n" " apt.conf" msgstr "" +" /Platte/\n" +" Archive/\n" +" partial/\n" +" lists/\n" +" partial/\n" +" status\n" +" sources.list\n" +" apt.conf" #. type: <heading></heading> #: offline.sgml:88 -#, fuzzy -#| msgid "User configuration" msgid "The configuration file" -msgstr "Benutzerkonfiguration" +msgstr "Die Konfigurationsdatei" #. type: <p></p> #: offline.sgml:96 @@ -10390,6 +10654,13 @@ msgid "" "<em>target host</em>. Please note, if you are using a local archive you must " "use copy URIs, the syntax is identical to file URIs." msgstr "" +"Die Konfigurationsdatei sollte APT mitteilen, dass es seine Dateien auf der " +"Platte speichert und obendrein die Konfigurationsdateien auf der Platte " +"benutzt. Die »sources.list« sollte genau die Sites enthalten, die Sie " +"auf der fernen Maschine benutzen möchten und die Statusdatei sollte eine " +"Kopie von <em>/var/lib/dpkg/status</em> vom <em>Zielrechner</em> sein. " +"Bitte beachten Sie, falls Sie lokale Archive benutzen, dass Sie »copy«-URIs " +"benutzen müssen. Die Syntax entspricht der von »file«-URIs." #. type: <p><example> #: offline.sgml:100 @@ -10397,6 +10668,8 @@ msgid "" "<em>apt.conf</em> must contain the necessary information to make APT use the " "disc:" msgstr "" +"<em>apt.conf</em> muss die nötigen Informationen enthalten, damit APT die " +"Platte benutzt:" #. type: <example></example> #: offline.sgml:124 @@ -10426,6 +10699,30 @@ msgid "" " Etc \"/disc/\";\n" " };" msgstr "" +" APT\n" +" {\n" +" /* Dies ist nicht nötig, falls die beiden Maschinen die gleiche\n" +" Architektur haben. Es teilt dem fernen APT mit, welche Architektur " +" die Zielmaschine hat */\n" +" Architecture \"i386\";\n" +" \n" +" Get::Download-Only \"true\";\n" +" };\n" +" \n" +" Dir\n" +" {\n" +" /* Die Platte für Statusinformationen benutzen und die Statusdatei\n" +" umleiten von /var/lib/dpkg default */\n" +" State \"/disc/\";\n" +" State::status \"status\";\n" +"\n" +" // Programmzwischenspeicher werden lokal gespeichert\n" +" Cache::archives \"/disc/archives/\";\n" +" Cache \"/tmp/\";\n" +" \n" +" // Ort der Quellenliste.\n" +" Etc \"/disc/\";\n" +" };" #. type: </example></p> #: offline.sgml:129 @@ -10433,6 +10730,8 @@ msgid "" "More details can be seen by examining the apt.conf man page and the sample " "configuration file in <em>/usr/share/doc/apt/examples/apt.conf</em>." msgstr "" +"Weitere Details finden sich in der apt.conf-Handbuchseite und der " +"Musterkonfigurationsdatei in <em>/usr/share/doc/apt/examples/apt.conf</em>." #. type: <p><example> #: offline.sgml:136 @@ -10443,6 +10742,12 @@ msgid "" "em> Then take the disc to the remote machine and configure the sources.list. " "On the remote machine execute the following:" msgstr "" +"Das Erste, was auf der Zielmaschine getan werden muss, ist das Einhängen " +"der Platte und das Kopieren von <em>/var/lib/dpkg/status</em> dorthin. Sie " +"werden außerdem die in der Übersicht umrissenen Verzeichnisse " +"<em>archives/partial/</em> und <em>lists/partial/</em> erstellen müssen. " +"Dann bringen Sie die Platte zu der fernen Maschine und konfigurieren Sie " +"die »sources.list«. Führen Sie das folgende aus:" #. type: <example></example> #: offline.sgml:142 @@ -10451,9 +10756,15 @@ msgid "" " # export APT_CONFIG=\"/disc/apt.conf\"\n" " # apt-get update\n" " [ APT fetches the package files ]\n" -" # apt-get dist-upgrade\n" +" apt-get dist-upgrade\n" " [ APT fetches all the packages needed to upgrade the target machine ]" msgstr "" +" # export APT_CONFIG=\"/disc/apt.conf\"\n" +" # apt-get update\n" +" [ APT lädt die Paketdateien herunter ]\n" +" # apt-get dist-upgrade\n" +" [ APT lädt all die Pakete herunter, die die Zielmaschine benötigt, um ein\n" +" Upgrade durchzuführen ]" #. type: </example></p> #: offline.sgml:149 @@ -10463,6 +10774,10 @@ msgid "" "such as <em>dselect</em> However this presents a problem in communicating " "your selections back to the local computer." msgstr "" +"Der Befehl »dist-upgrade« kann durch alle anderen Standard-APT-Befehle " +"ersetzt werden, insbesondere »dselect-upgrade«. Sie können sogar eine " +"APT-Oberfläche, wie <em>dselect</em>, benutzen. Jedoch stellt dies ein " +"Problem dar, Ihre Auswahl zurück an den lokalen Rechner zu kommunizieren." #. type: <p><example> #: offline.sgml:153 @@ -10470,6 +10785,9 @@ msgid "" "Now the disc contains all of the index files and archives needed to upgrade " "the target machine. Take the disc back and run:" msgstr "" +"Nun enthält die Platte alle Indexdateien und Archive, die nötig sind, um " +"ein Upgrade der Zielmaschine druchzuführen. Bringen Sie die Platte zurück " +"und starten Sie:" #. type: <example></example> #: offline.sgml:159 @@ -10481,6 +10799,11 @@ msgid "" " # apt-get --no-d -o dir::state::status=/var/lib/dpkg/status dist-upgrade\n" " [ Or any other APT command ]" msgstr "" +" # export APT_CONFIG=\"/disc/apt.conf\"\n" +" # apt-get check\n" +" [ APT generiert eine lokale Kopie der Zwischenspeicherdateien ]\n" +" # apt-get --no-d -o dir::state::status=/var/lib/dpkg/status dist-upgrade\n" +" [ Oder irgendeinen anderen APT-Befehl ]" #. type: <p></p> #: offline.sgml:165 @@ -10488,6 +10811,8 @@ msgid "" "It is necessary for proper function to re-specify the status file to be the " "local one. This is very important!" msgstr "" +"Es ist für ordentliches Funktionieren notwendig, die Statusdatei erneut als " +"die lokale anzugeben. Dies ist sehr wichtig!" #. type: <p></p> #: offline.sgml:172 @@ -10498,11 +10823,18 @@ msgid "" "the local machine - but this may not always be possible. DO NOT copy the " "status file if dpkg or APT have been run in the mean time!!" msgstr "" +"Wenn Sie Dselect benutzen, können Sie die sehr riskante Operation " +"durchführen, disc/status auf /var/lib/dpkg/status zu kopieren, so dass die " +"von Ihnen gemachte Auswahl auf der fernen Maschine aktualisiert wird. Es " +"wird in höchstem Maße empfohlen, dass Leute nur auf der lokalen Maschine " +"Auswahlen treffen – aber dies könnte manchmal unmöglich sein. Kopieren Sie " +"die Statusdatei NICHT, falls Dpkg oder APT in der Zwischenzeit benutzt " +"wurden!" #. type: <heading></heading> #: offline.sgml:178 msgid "Using APT and wget" -msgstr "" +msgstr "APT und Wget benutzen" #. type: <p></p> #: offline.sgml:185 @@ -10511,6 +10843,10 @@ msgid "" "any machine. Unlike the method above this requires that the Debian machine " "already has a list of available packages." msgstr "" +"<em>wget</em> ist eine populäres und portierbares Download-Werkzeug, das " +"auf nahezu jeder Maschine laufen kann. Anders als die Methode oben wird " +"hierfür benötigt, dass die Debian-Maschine bereits eine Liste verfügbarer " +"Pakete hat." #. type: <p></p> #: offline.sgml:190 @@ -10520,13 +10856,16 @@ msgid "" "option to apt-get and then preparing a wget script to actually fetch the " "packages." msgstr "" +"Die Grundidee besteht darin, eine Platte zu erzeugen, die nur die " +"heruntergeladenen Archivdateien von der fernen Site enthält. Die wird durch " +"Benutzen der apt-get-Option »--print-uris« und dem anschließenden " +"Vorbereiten eines Wget-Skripts getan, um die eigentlichen Pakete " +"herunterzuladen." #. type: <heading></heading> #: offline.sgml:196 -#, fuzzy -#| msgid "Options" msgid "Operation" -msgstr "Optionen" +msgstr "Betrieb" #. type: <p><example> #: offline.sgml:200 @@ -10534,6 +10873,9 @@ msgid "" "Unlike the previous technique no special configuration files are required. " "We merely use the standard APT commands to generate the file list." msgstr "" +"Anders als bei der vorherigen Technik werden keine speziellen " +"Konfigurationsdateien benötigt. Es werden lediglich die Standard-APT-Befehle " +"benutzt, um die Dateiliste zu erstellen." #. type: <example></example> #: offline.sgml:205 @@ -10544,6 +10886,11 @@ msgid "" " # apt-get -qq --print-uris dist-upgrade > uris\n" " # awk '{print \"wget -O \" $2 \" \" $1}' < uris > /disc/wget-script" msgstr "" +" # apt-get dist-upgrade \n" +" [ Antworten Sie »nein« auf gestellte Fragen, wenn Sie mit den Aktionen\n" +" zufrieden sind ]\n" +" # apt-get -qq --print-uris dist-upgrade > uris\n" +" # awk '{print \"wget -O \" $2 \" \" $1}' < uris > /Platte/wget-script" #. type: </example></p> #: offline.sgml:210 @@ -10551,6 +10898,8 @@ msgid "" "Any command other than dist-upgrade could be used here, including dselect-" "upgrade." msgstr "" +"Jeder andere Befehl als »dist-upgrade« könnte hier benutzt werden, " +"einschließlich »upgrade«." #. type: <p></p> #: offline.sgml:216 @@ -10560,11 +10909,15 @@ msgid "" "with the current directory as the disc's mount point so as to save the " "output on the disc." msgstr "" +"Die Datei /Platte/wget-script wird nun eine Liste der Wget-Befehle enthalten, " +"um die erforderlichen Archive herunterzuladen. Dieses Skript sollte mit dem " +"aktuellen Verzeichnis als Platteneinhängepunkt ausgeführt werden, so dass " +"die Ausgabe auf die Platte gespeichert wird." #. type: <p><example> #: offline.sgml:219 msgid "The remote machine would do something like" -msgstr "" +msgstr "Die ferne Maschine würde etwas wie das folgende tun" #. type: <example></example> #: offline.sgml:223 @@ -10574,6 +10927,9 @@ msgid "" " # sh -x ./wget-script\n" " [ wait.. ]" msgstr "" +" # cd /Platte\n" +" # sh -x ./wget-script\n" +" [ warten ... ]" #. type: </example><example> #: offline.sgml:228 @@ -10581,28 +10937,17 @@ msgid "" "Once the archives are downloaded and the disc returned to the Debian machine " "installation can proceed using," msgstr "" +"Sobald die Archive heruntergeladen und die Platte zur Debian-Maschine " +"zurückgekehrt ist, kann die Installation fortfahren durch Benutzung von " #. type: <example></example> #: offline.sgml:230 #, no-wrap msgid " # apt-get -o dir::cache::archives=\"/disc/\" dist-upgrade" -msgstr "" +msgstr " # apt-get -o dir::cache::archives=\"/Platte/\" dist-upgrade" #. type: </example></p> #: offline.sgml:234 msgid "Which will use the already fetched archives on the disc." msgstr "" - -#~ msgid "" -#~ "Disable Immediate Configuration; This dangerous option disables some of " -#~ "APT's ordering code to cause it to make fewer dpkg calls. Doing so may be " -#~ "necessary on some extremely slow single user systems but is very " -#~ "dangerous and may cause package install scripts to fail or worse. Use at " -#~ "your own risk." -#~ msgstr "" -#~ "Sofortkonfiguration ausschalten; Diese gefährliche Option schaltet " -#~ "einigen Befehlscode von APT aus, um es zu veranlassen, Dpkg seltener " -#~ "aufzurufen. Dies zu tun, könnte auf besonders langsamen " -#~ "Einzelbenutzersystemen nötig sein, ist aber gefährlich und könnte " -#~ "Paketinstallationsskripte zum Scheitern oder schlimmeren veranlassen. " -#~ "Benutzen Sie es auf eigene Gefahr." +"Es wird die bereits auf die Platte heruntergeladenen Archive benutzen."
\ No newline at end of file diff --git a/doc/po/es.po b/doc/po/es.po index ed7ca3d8f..65456e495 100644 --- a/doc/po/es.po +++ b/doc/po/es.po @@ -9867,6 +9867,10 @@ msgid "Which will use the already fetched archives on the disc." msgstr "" #, fuzzy +#~ msgid "<option>APT::FTPArchive::AlwaysStat</option>" +#~ msgstr "<option>--all-versions</option>" + +#, fuzzy #~ msgid "/usr/share/doc/apt/" #~ msgstr "/usr/share/doc/apt/" diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml index e2993db2c..c71ae6bdd 100644 --- a/doc/sources.list.5.xml +++ b/doc/sources.list.5.xml @@ -180,7 +180,7 @@ deb http://http.us.debian.org/debian dists/stable-updates/ APT can be extended with more methods shipped in other optional packages which should follow the nameing scheme <literal>apt-transport-<replaceable>method</replaceable></literal>. The APT team e.g. maintains also the <literal>apt-transport-https</literal> package which - provides access methods for https-URIs with features similiar to the http method, but other + provides access methods for https-URIs with features similar to the http method, but other methods for using e.g. debtorrent are also available, see <citerefentry> <refentrytitle><filename>apt-transport-debtorrent</filename></refentrytitle> <manvolnum>1</manvolnum></citerefentry>. diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc index e02f0e1b6..b04244347 100644 --- a/ftparchive/cachedb.cc +++ b/ftparchive/cachedb.cc @@ -26,7 +26,7 @@ // CacheDB::ReadyDB - Ready the DB2 /*{{{*/ // --------------------------------------------------------------------- /* This opens the DB2 file for caching package information */ -bool CacheDB::ReadyDB(string DB) +bool CacheDB::ReadyDB(string const &DB) { int err; @@ -102,9 +102,9 @@ bool CacheDB::OpenFile() // --------------------------------------------------------------------- /* This gets the size from the database if it's there. If we need * to look at the file, also get the mtime from the file. */ -bool CacheDB::GetFileStat() +bool CacheDB::GetFileStat(bool const &doStat) { - if ((CurStat.Flags & FlSize) == FlSize) + if ((CurStat.Flags & FlSize) == FlSize && doStat == false) { /* Already worked out the file size */ } @@ -160,9 +160,9 @@ bool CacheDB::GetCurStat() /*}}}*/ // CacheDB::GetFileInfo - Get all the info about the file /*{{{*/ // --------------------------------------------------------------------- -bool CacheDB::GetFileInfo(string FileName, bool DoControl, bool DoContents, - bool GenContentsOnly, - bool DoMD5, bool DoSHA1, bool DoSHA256) +bool CacheDB::GetFileInfo(string const &FileName, bool const &DoControl, bool const &DoContents, + bool const &GenContentsOnly, bool const &DoMD5, bool const &DoSHA1, + bool const &DoSHA256, bool const &checkMtime) { this->FileName = FileName; @@ -171,14 +171,18 @@ bool CacheDB::GetFileInfo(string FileName, bool DoControl, bool DoContents, return false; } OldStat = CurStat; - - if (GetFileStat() == false) + + if (GetFileStat(checkMtime) == false) { delete Fd; Fd = NULL; return false; } + /* if mtime changed, update CurStat from disk */ + if (checkMtime == true && OldStat.mtime != CurStat.mtime) + CurStat.Flags = FlSize; + Stats.Bytes += CurStat.FileSize; Stats.Packages++; @@ -247,7 +251,7 @@ bool CacheDB::LoadControl() // CacheDB::LoadContents - Load the File Listing /*{{{*/ // --------------------------------------------------------------------- /* */ -bool CacheDB::LoadContents(bool GenOnly) +bool CacheDB::LoadContents(bool const &GenOnly) { // Try to read the control information out of the DB. if ((CurStat.Flags & FlContents) == FlContents) @@ -297,7 +301,7 @@ static string bytes2hex(uint8_t *bytes, size_t length) { return string(space); } -static inline unsigned char xdig2num(char dig) { +static inline unsigned char xdig2num(char const &dig) { if (isdigit(dig)) return dig - '0'; if ('a' <= dig && dig <= 'f') return dig - 'a' + 10; if ('A' <= dig && dig <= 'F') return dig - 'A' + 10; @@ -318,7 +322,7 @@ static void hex2bytes(uint8_t *bytes, const char *hex, int length) { // CacheDB::GetMD5 - Get the MD5 hash /*{{{*/ // --------------------------------------------------------------------- /* */ -bool CacheDB::GetMD5(bool GenOnly) +bool CacheDB::GetMD5(bool const &GenOnly) { // Try to read the control information out of the DB. if ((CurStat.Flags & FlMD5) == FlMD5) @@ -349,7 +353,7 @@ bool CacheDB::GetMD5(bool GenOnly) // CacheDB::GetSHA1 - Get the SHA1 hash /*{{{*/ // --------------------------------------------------------------------- /* */ -bool CacheDB::GetSHA1(bool GenOnly) +bool CacheDB::GetSHA1(bool const &GenOnly) { // Try to read the control information out of the DB. if ((CurStat.Flags & FlSHA1) == FlSHA1) @@ -380,7 +384,7 @@ bool CacheDB::GetSHA1(bool GenOnly) // CacheDB::GetSHA256 - Get the SHA256 hash /*{{{*/ // --------------------------------------------------------------------- /* */ -bool CacheDB::GetSHA256(bool GenOnly) +bool CacheDB::GetSHA256(bool const &GenOnly) { // Try to read the control information out of the DB. if ((CurStat.Flags & FlSHA256) == FlSHA256) diff --git a/ftparchive/cachedb.h b/ftparchive/cachedb.h index c10f41ecc..0ba80909a 100644 --- a/ftparchive/cachedb.h +++ b/ftparchive/cachedb.h @@ -49,7 +49,7 @@ class CacheDB { return Dbp->get(Dbp,0,&Key,&Data,0) == 0; }; - inline bool Put(const void *In,unsigned long Length) + inline bool Put(const void *In,unsigned long const &Length) { if (ReadOnly == true) return true; @@ -63,13 +63,13 @@ class CacheDB return true; } bool OpenFile(); - bool GetFileStat(); + bool GetFileStat(bool const &doStat = false); bool GetCurStat(); bool LoadControl(); - bool LoadContents(bool GenOnly); - bool GetMD5(bool GenOnly); - bool GetSHA1(bool GenOnly); - bool GetSHA256(bool GenOnly); + bool LoadContents(bool const &GenOnly); + bool GetMD5(bool const &GenOnly); + bool GetSHA1(bool const &GenOnly); + bool GetSHA256(bool const &GenOnly); // Stat info stored in the DB, Fixed types since it is written to disk. enum FlagList {FlControl = (1<<0),FlMD5=(1<<1),FlContents=(1<<2), @@ -117,20 +117,20 @@ class CacheDB Stats() : Bytes(0), MD5Bytes(0), SHA1Bytes(0), SHA256Bytes(0), Packages(0), Misses(0), DeLinkBytes(0) {}; } Stats; - bool ReadyDB(string DB); + bool ReadyDB(string const &DB); inline bool DBFailed() {return Dbp != 0 && DBLoaded == false;}; inline bool Loaded() {return DBLoaded == true;}; inline off_t GetFileSize(void) {return CurStat.FileSize;} - bool SetFile(string FileName,struct stat St,FileFd *Fd); - bool GetFileInfo(string FileName, bool DoControl, bool DoContents, - bool GenContentsOnly, bool DoMD5, bool DoSHA1, bool DoSHA256); + bool SetFile(string const &FileName,struct stat St,FileFd *Fd); + bool GetFileInfo(string const &FileName, bool const &DoControl, bool const &DoContents, bool const &GenContentsOnly, + bool const &DoMD5, bool const &DoSHA1, bool const &DoSHA256, bool const &checkMtime = false); bool Finish(); bool Clean(); - CacheDB(string DB) : Dbp(0), Fd(NULL), DebFile(0) {ReadyDB(DB);}; + CacheDB(string const &DB) : Dbp(0), Fd(NULL), DebFile(0) {ReadyDB(DB);}; ~CacheDB() {ReadyDB(string()); delete DebFile;}; }; diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc index fb1438f74..b761d9204 100644 --- a/ftparchive/contents.cc +++ b/ftparchive/contents.cc @@ -399,7 +399,7 @@ bool ContentsExtract::TakeContents(const void *NewData,unsigned long Length) // ContentsExtract::Add - Read the contents data into the sorter /*{{{*/ // --------------------------------------------------------------------- /* */ -void ContentsExtract::Add(GenContents &Contents,string Package) +void ContentsExtract::Add(GenContents &Contents,string const &Package) { const char *Start = Data; char *Pkg = Contents.Mystrdup(Package.c_str()); diff --git a/ftparchive/contents.h b/ftparchive/contents.h index d8457cd45..5b5092b66 100644 --- a/ftparchive/contents.h +++ b/ftparchive/contents.h @@ -80,7 +80,7 @@ class ContentsExtract : public pkgDirStream virtual bool DoItem(Item &Itm,int &Fd); void Reset() {CurSize = 0;}; bool TakeContents(const void *Data,unsigned long Length); - void Add(GenContents &Contents,string Package); + void Add(GenContents &Contents,string const &Package); ContentsExtract() : Data(0), MaxSize(0), CurSize(0) {}; virtual ~ContentsExtract() {delete [] Data;}; diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc index 16cef9769..bb4beedf9 100644 --- a/ftparchive/multicompress.cc +++ b/ftparchive/multicompress.cc @@ -40,14 +40,14 @@ const MultiCompress::CompType MultiCompress::Compressors[] = // MultiCompress::MultiCompress - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Setup the file outputs, compression modes and fork the writer child */ -MultiCompress::MultiCompress(string Output,string Compress, - mode_t Permissions,bool Write) +MultiCompress::MultiCompress(string const &Output,string const &Compress, + mode_t const &Permissions,bool const &Write) : + Permissions(Permissions) { Outputs = 0; Outputter = -1; Input = 0; UpdateMTime = 0; - this->Permissions = Permissions; /* Parse the compression string, a space separated lists of compresison types */ @@ -126,7 +126,7 @@ MultiCompress::~MultiCompress() /* This checks each compressed file to make sure it exists and returns stat information for a random file from the collection. False means one or more of the files is missing. */ -bool MultiCompress::GetStat(string Output,string Compress,struct stat &St) +bool MultiCompress::GetStat(string const &Output,string const &Compress,struct stat &St) { /* Parse the compression string, a space separated lists of compresison types */ @@ -268,8 +268,8 @@ bool MultiCompress::Finalize(unsigned long &OutSize) /* This opens the compressor, either in compress mode or decompress mode. FileFd is always the compressor input/output file, OutFd is the created pipe, Input for Compress, Output for Decompress. */ -bool MultiCompress::OpenCompress(const CompType *Prog,pid_t &Pid,int FileFd, - int &OutFd,bool Comp) +bool MultiCompress::OpenCompress(const CompType *Prog,pid_t &Pid,int const &FileFd, + int &OutFd,bool const &Comp) { Pid = -1; @@ -369,7 +369,7 @@ bool MultiCompress::CloseOld(int Fd,pid_t Proc) computes the MD5 of the raw data. After this the raw data in the original files is compared to see if this data is new. If the data is new then the temp files are renamed, otherwise they are erased. */ -bool MultiCompress::Child(int FD) +bool MultiCompress::Child(int const &FD) { // Start the compression children. for (Files *I = Outputs; I != 0; I = I->Next) diff --git a/ftparchive/multicompress.h b/ftparchive/multicompress.h index a65077e73..3ac3b8fb2 100644 --- a/ftparchive/multicompress.h +++ b/ftparchive/multicompress.h @@ -53,9 +53,9 @@ class MultiCompress mode_t Permissions; static const CompType Compressors[]; - bool OpenCompress(const CompType *Prog,pid_t &Pid,int FileFd, - int &OutFd,bool Comp); - bool Child(int Fd); + bool OpenCompress(const CompType *Prog,pid_t &Pid,int const &FileFd, + int &OutFd,bool const &Comp); + bool Child(int const &Fd); bool Start(); bool Die(); @@ -68,10 +68,10 @@ class MultiCompress bool Finalize(unsigned long &OutSize); bool OpenOld(int &Fd,pid_t &Proc); bool CloseOld(int Fd,pid_t Proc); - static bool GetStat(string Output,string Compress,struct stat &St); + static bool GetStat(string const &Output,string const &Compress,struct stat &St); - MultiCompress(string Output,string Compress,mode_t Permissions, - bool Write = true); + MultiCompress(string const &Output,string const &Compress, + mode_t const &Permissions, bool const &Write = true); ~MultiCompress(); }; diff --git a/ftparchive/override.cc b/ftparchive/override.cc index 6f40bc865..3cf10b89b 100644 --- a/ftparchive/override.cc +++ b/ftparchive/override.cc @@ -24,7 +24,7 @@ // Override::ReadOverride - Read the override file /*{{{*/ // --------------------------------------------------------------------- /* This parses the override file and reads it into the map */ -bool Override::ReadOverride(string File,bool Source) +bool Override::ReadOverride(string const &File,bool const &Source) { if (File.empty() == true) return true; @@ -132,7 +132,7 @@ bool Override::ReadOverride(string File,bool Source) // Override::ReadExtraOverride - Read the extra override file /*{{{*/ // --------------------------------------------------------------------- /* This parses the extra override file and reads it into the map */ -bool Override::ReadExtraOverride(string File,bool Source) +bool Override::ReadExtraOverride(string const &File,bool const &Source) { if (File.empty() == true) return true; @@ -209,9 +209,9 @@ bool Override::ReadExtraOverride(string File,bool Source) /* Returns a override item for the given package and the given architecture. * Treats "all" special */ -Override::Item* Override::GetItem(string Package, string Architecture) +Override::Item* Override::GetItem(string const &Package, string const &Architecture) { - map<string,Item>::iterator I = Mapping.find(Package); + map<string,Item>::const_iterator I = Mapping.find(Package); map<string,Item>::iterator J = Mapping.find(Package + "/" + Architecture); if (I == Mapping.end() && J == Mapping.end()) @@ -230,7 +230,7 @@ Override::Item* Override::GetItem(string Package, string Architecture) if (R->Priority != "") result->Priority = R->Priority; if (R->OldMaint != "") result->OldMaint = R->OldMaint; if (R->NewMaint != "") result->NewMaint = R->NewMaint; - for (map<string,string>::iterator foI = R->FieldOverride.begin(); + for (map<string,string>::const_iterator foI = R->FieldOverride.begin(); foI != R->FieldOverride.end(); foI++) { result->FieldOverride[foI->first] = foI->second; @@ -247,7 +247,7 @@ Override::Item* Override::GetItem(string Package, string Architecture) there is a rule but it does not match then the empty string is returned, also if there was no rewrite rule the empty string is returned. Failed indicates if there was some kind of problem while rewriting. */ -string Override::Item::SwapMaint(string Orig,bool &Failed) +string Override::Item::SwapMaint(string const &Orig,bool &Failed) { Failed = false; @@ -262,10 +262,10 @@ string Override::Item::SwapMaint(string Orig,bool &Failed) override file. Thus it persists.*/ #if 1 // Break OldMaint up into little bits on double slash boundaries. - string::iterator End = OldMaint.begin(); + string::const_iterator End = OldMaint.begin(); while (1) { - string::iterator Start = End; + string::const_iterator Start = End; for (; End < OldMaint.end() && (End + 3 >= OldMaint.end() || End[0] != ' ' || End[1] != '/' || End[2] != '/'); End++); diff --git a/ftparchive/override.h b/ftparchive/override.h index f270556eb..c5cacc2b4 100644 --- a/ftparchive/override.h +++ b/ftparchive/override.h @@ -31,20 +31,20 @@ class Override string NewMaint; map<string,string> FieldOverride; - string SwapMaint(string Orig,bool &Failed); + string SwapMaint(string const &Orig,bool &Failed); ~Item() {}; }; map<string,Item> Mapping; - inline Item *GetItem(string Package) + inline Item *GetItem(string const &Package) { return GetItem(Package, ""); } - Item *GetItem(string Package, string Architecture); + Item *GetItem(string const &Package, string const &Architecture); - bool ReadOverride(string File,bool Source = false); - bool ReadExtraOverride(string File,bool Source = false); + bool ReadOverride(string const &File,bool const &Source = false); + bool ReadExtraOverride(string const &File,bool const &Source = false); }; #endif diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 4e6c9a77d..5547c6aa5 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -89,7 +89,7 @@ int FTWScanner::ScannerFTW(const char *File,const struct stat *sb,int Flag) // 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, '/'); if (LastComponent == NULL) @@ -97,7 +97,7 @@ int FTWScanner::ScannerFile(const char *File, bool ReadLink) else LastComponent++; - vector<string>::iterator I; + vector<string>::const_iterator I; for(I = Owner->Patterns.begin(); I != Owner->Patterns.end(); ++I) { if (fnmatch((*I).c_str(), LastComponent, 0) == 0) @@ -127,7 +127,7 @@ int FTWScanner::ScannerFile(const char *File, bool ReadLink) { Owner->NewLine(1); - bool Type = _error->PopMessage(Err); + bool const Type = _error->PopMessage(Err); if (Type == true) cerr << _("E: ") << Err << endl; else @@ -148,7 +148,7 @@ int FTWScanner::ScannerFile(const char *File, bool ReadLink) // FTWScanner::RecursiveScan - Just scan a directory tree /*{{{*/ // --------------------------------------------------------------------- /* */ -bool FTWScanner::RecursiveScan(string Dir) +bool FTWScanner::RecursiveScan(string const &Dir) { /* If noprefix is set then jam the scan root in, so we don't generate link followed paths out of control */ @@ -161,7 +161,7 @@ bool FTWScanner::RecursiveScan(string Dir) // 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,7 +178,7 @@ bool FTWScanner::RecursiveScan(string Dir) // --------------------------------------------------------------------- /* 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) { /* If noprefix is set then jam the scan root in, so we don't generate link followed paths out of control */ @@ -236,7 +236,7 @@ bool FTWScanner::LoadFileList(string Dir,string File) /* */ 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 +293,8 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath, // 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,6 +306,7 @@ PackagesWriter::PackagesWriter(string DB,string Overrides,string ExtOverrides, 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); @@ -328,7 +329,7 @@ PackagesWriter::PackagesWriter(string DB,string Overrides,string ExtOverrides, // FTWScanner::SetExts - Set extensions to support /*{{{*/ // --------------------------------------------------------------------- /* */ -bool FTWScanner::SetExts(string Vals) +bool FTWScanner::SetExts(string const &Vals) { ClearPatterns(); string::size_type Start = 0; @@ -360,7 +361,7 @@ bool FTWScanner::SetExts(string Vals) 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; @@ -475,7 +476,7 @@ bool PackagesWriter::DoPackage(string FileName) SetTFRewriteData(Changes[End++], "Suggests", OptionalStr.c_str()); } - for (map<string,string>::iterator I = OverItem->FieldOverride.begin(); + for (map<string,string>::const_iterator I = OverItem->FieldOverride.begin(); I != OverItem->FieldOverride.end(); I++) SetTFRewriteData(Changes[End++],I->first.c_str(),I->second.c_str()); @@ -493,8 +494,8 @@ bool PackagesWriter::DoPackage(string FileName) // 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"); @@ -719,7 +720,7 @@ bool SourcesWriter::DoPackage(string FileName) if (NewMaint.empty() == false) SetTFRewriteData(Changes[End++], "Maintainer", NewMaint.c_str()); - for (map<string,string>::iterator I = SOverItem->FieldOverride.begin(); + for (map<string,string>::const_iterator I = SOverItem->FieldOverride.begin(); I != SOverItem->FieldOverride.end(); I++) SetTFRewriteData(Changes[End++],I->first.c_str(),I->second.c_str()); @@ -739,7 +740,7 @@ bool SourcesWriter::DoPackage(string FileName) // ContentsWriter::ContentsWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -ContentsWriter::ContentsWriter(string DB) : +ContentsWriter::ContentsWriter(string const &DB) : Db(DB), Stats(Db.Stats) { @@ -751,9 +752,9 @@ ContentsWriter::ContentsWriter(string DB) : // --------------------------------------------------------------------- /* 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; } @@ -772,7 +773,7 @@ bool ContentsWriter::DoPackage(string FileName,string Package) // 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) @@ -827,7 +828,7 @@ bool ContentsWriter::ReadFromPkgs(string PkgFile,string PkgCompress) // ReleaseWriter::ReleaseWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -ReleaseWriter::ReleaseWriter(string DB) +ReleaseWriter::ReleaseWriter(string const &DB) { AddPattern("Packages"); AddPattern("Packages.gz"); @@ -841,7 +842,7 @@ ReleaseWriter::ReleaseWriter(string DB) 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) @@ -928,7 +929,7 @@ bool ReleaseWriter::DoPackage(string FileName) void ReleaseWriter::Finish() { fprintf(Output, "MD5Sum:\n"); - for(map<string,struct CheckSum>::iterator I = CheckSums.begin(); + for(map<string,struct CheckSum>::const_iterator I = CheckSums.begin(); I != CheckSums.end(); ++I) { @@ -939,7 +940,7 @@ void ReleaseWriter::Finish() } fprintf(Output, "SHA1:\n"); - for(map<string,struct CheckSum>::iterator I = CheckSums.begin(); + for(map<string,struct CheckSum>::const_iterator I = CheckSums.begin(); I != CheckSums.end(); ++I) { @@ -950,7 +951,7 @@ void ReleaseWriter::Finish() } fprintf(Output, "SHA256:\n"); - for(map<string,struct CheckSum>::iterator I = CheckSums.begin(); + for(map<string,struct CheckSum>::const_iterator I = CheckSums.begin(); I != CheckSums.end(); ++I) { diff --git a/ftparchive/writer.h b/ftparchive/writer.h index e76438900..ad58dee0a 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -43,12 +43,12 @@ class FTWScanner 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,11 +63,11 @@ class FTWScanner 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;}; @@ -84,6 +84,7 @@ class PackagesWriter : public FTWScanner bool DoMD5; bool DoSHA1; bool DoSHA256; + bool DoAlwaysStat; bool NoOverride; bool DoContents; bool LongDescription; @@ -95,13 +96,13 @@ class PackagesWriter : public FTWScanner 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() {}; }; @@ -121,12 +122,12 @@ class ContentsWriter : public FTWScanner 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() {}; }; @@ -149,15 +150,15 @@ class SourcesWriter : public FTWScanner 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(); diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 150c1d315..e3e849827 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -1,10 +1,9 @@ #include <apt-pkg/error.h> #include <apt-pkg/acquire-method.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> #include <apti18n.h> -#include <sys/stat.h> -#include <unistd.h> #include <utime.h> #include <stdio.h> #include <fcntl.h> @@ -45,42 +44,47 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, vector<string> &WorthlessSigners, vector<string> &NoPubKeySigners) { + bool const Debug = _config->FindB("Debug::Acquire::gpgv", false); // setup a (empty) stringstream for formating the return value std::stringstream ret; ret.str(""); - if (_config->FindB("Debug::Acquire::gpgv", false)) - { - std::cerr << "inside VerifyGetSigners" << std::endl; - } + if (Debug == true) + std::clog << "inside VerifyGetSigners" << std::endl; + pid_t pid; int fd[2]; FILE *pipein; int status; - struct stat buff; - string gpgvpath = _config->Find("Dir::Bin::gpg", "/usr/bin/gpgv"); - string pubringpath = _config->Find("APT::GPGV::TrustedKeyring", "/etc/apt/trusted.gpg"); - if (_config->FindB("Debug::Acquire::gpgv", false)) + string const gpgvpath = _config->Find("Dir::Bin::gpg", "/usr/bin/gpgv"); + // FIXME: remove support for deprecated APT::GPGV setting + string const trustedFile = _config->FindFile("Dir::Etc::Trusted", + _config->Find("APT::GPGV::TrustedKeyring", "/etc/apt/trusted.gpg").c_str()); + string const trustedPath = _config->FindDir("Dir::Etc::TrustedParts", "/etc/apt/trusted.gpg.d"); + if (Debug == true) { - std::cerr << "gpgv path: " << gpgvpath << std::endl; - std::cerr << "Keyring path: " << pubringpath << std::endl; + std::clog << "gpgv path: " << gpgvpath << std::endl; + std::clog << "Keyring file: " << trustedFile << std::endl; + std::clog << "Keyring path: " << trustedPath << std::endl; } - if (stat(pubringpath.c_str(), &buff) != 0) + vector<string> keyrings = GetListOfFilesInDir(trustedPath, "gpg", false); + if (FileExists(trustedFile) == true) + keyrings.push_back(trustedFile); + + if (keyrings.empty() == true) { - ioprintf(ret, _("Couldn't access keyring: '%s'"), strerror(errno)); + // TRANSLATOR: %s is the trusted keyring parts directory + ioprintf(ret, _("No keyring installed in %s."), trustedPath.c_str()); return ret.str(); } + if (pipe(fd) < 0) - { return "Couldn't create pipe"; - } pid = fork(); if (pid < 0) - { return string("Couldn't spawn new process") + strerror(errno); - } else if (pid == 0) { const char *Args[400]; @@ -90,8 +94,16 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, Args[i++] = "--status-fd"; Args[i++] = "3"; Args[i++] = "--ignore-time-conflict"; - Args[i++] = "--keyring"; - Args[i++] = pubringpath.c_str(); + for (vector<string>::const_iterator K = keyrings.begin(); + K != keyrings.end(); ++K) + { + Args[i++] = "--keyring"; + Args[i++] = K->c_str(); + if(i >= 395) { + std::clog << _("E: Too many keyrings should be passed to gpgv. Exiting.") << std::endl; + exit(111); + } + } Configuration::Item const *Opts; Opts = _config->Tree("Acquire::gpgv::Options"); @@ -104,7 +116,7 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, continue; Args[i++] = Opts->Value.c_str(); if(i >= 395) { - std::cerr << _("E: Argument list from Acquire::gpgv::Options too long. Exiting.") << std::endl; + std::clog << _("E: Argument list from Acquire::gpgv::Options too long. Exiting.") << std::endl; exit(111); } } @@ -113,14 +125,14 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, Args[i++] = outfile; Args[i++] = NULL; - if (_config->FindB("Debug::Acquire::gpgv", false)) + if (Debug == true) { - std::cerr << "Preparing to exec: " << gpgvpath; + std::clog << "Preparing to exec: " << gpgvpath; for(unsigned int j=0;Args[j] != NULL; j++) - std::cerr << " " << Args[j]; - std::cerr << std::endl; + std::clog << " " << Args[j]; + std::clog << std::endl; } - int nullfd = open("/dev/null", O_RDONLY); + int const nullfd = open("/dev/null", O_RDONLY); close(fd[0]); // Redirect output to /dev/null; we read from the status fd dup2(nullfd, STDOUT_FILENO); @@ -159,8 +171,8 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, break; *(buffer+bufferoff) = '\0'; bufferoff = 0; - if (_config->FindB("Debug::Acquire::gpgv", false)) - std::cerr << "Read: " << buffer << std::endl; + if (Debug == true) + std::clog << "Read: " << buffer << std::endl; // Push the data into three separate vectors, which // we later concatenate. They're kept separate so @@ -168,33 +180,33 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, // it will be better. if (strncmp(buffer, GNUPGBADSIG, sizeof(GNUPGBADSIG)-1) == 0) { - if (_config->FindB("Debug::Acquire::gpgv", false)) - std::cerr << "Got BADSIG! " << std::endl; + if (Debug == true) + std::clog << "Got BADSIG! " << std::endl; BadSigners.push_back(string(buffer+sizeof(GNUPGPREFIX))); } if (strncmp(buffer, GNUPGNOPUBKEY, sizeof(GNUPGNOPUBKEY)-1) == 0) { - if (_config->FindB("Debug::Acquire::gpgv", false)) - std::cerr << "Got NO_PUBKEY " << std::endl; + if (Debug == true) + std::clog << "Got NO_PUBKEY " << std::endl; NoPubKeySigners.push_back(string(buffer+sizeof(GNUPGPREFIX))); } if (strncmp(buffer, GNUPGNODATA, sizeof(GNUPGBADSIG)-1) == 0) { - if (_config->FindB("Debug::Acquire::gpgv", false)) - std::cerr << "Got NODATA! " << std::endl; + if (Debug == true) + std::clog << "Got NODATA! " << std::endl; BadSigners.push_back(string(buffer+sizeof(GNUPGPREFIX))); } if (strncmp(buffer, GNUPGKEYEXPIRED, sizeof(GNUPGKEYEXPIRED)-1) == 0) { - if (_config->FindB("Debug::Acquire::gpgv", false)) - std::cerr << "Got KEYEXPIRED! " << std::endl; + if (Debug == true) + std::clog << "Got KEYEXPIRED! " << std::endl; WorthlessSigners.push_back(string(buffer+sizeof(GNUPGPREFIX))); } if (strncmp(buffer, GNUPGREVKEYSIG, sizeof(GNUPGREVKEYSIG)-1) == 0) { - if (_config->FindB("Debug::Acquire::gpgv", false)) - std::cerr << "Got REVKEYSIG! " << std::endl; + if (Debug == true) + std::clog << "Got REVKEYSIG! " << std::endl; WorthlessSigners.push_back(string(buffer+sizeof(GNUPGPREFIX))); } if (strncmp(buffer, GNUPGGOODSIG, sizeof(GNUPGGOODSIG)-1) == 0) @@ -204,17 +216,17 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, while (*p && isxdigit(*p)) p++; *p = 0; - if (_config->FindB("Debug::Acquire::gpgv", false)) - std::cerr << "Got GOODSIG, key ID:" << sig << std::endl; + if (Debug == true) + std::clog << "Got GOODSIG, key ID:" << sig << std::endl; GoodSigners.push_back(string(sig)); } } fclose(pipein); waitpid(pid, &status, 0); - if (_config->FindB("Debug::Acquire::gpgv", false)) + if (Debug == true) { - std::cerr << "gpgv exited\n"; + std::clog << "gpgv exited\n"; } if (WEXITSTATUS(status) == 0) @@ -305,7 +317,7 @@ bool GPGVMethod::Fetch(FetchItem *Itm) if (_config->FindB("Debug::Acquire::gpgv", false)) { - std::cerr << "gpgv succeeded\n"; + std::clog << "gpgv succeeded\n"; } return true; diff --git a/methods/https.cc b/methods/https.cc index 5d8e63f47..aa6786aa8 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -133,7 +133,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) string cainfo = _config->Find("Acquire::https::CaInfo",""); string knob = "Acquire::https::"+remotehost+"::CaInfo"; cainfo = _config->Find(knob.c_str(),cainfo.c_str()); - if(cainfo != "") + if(cainfo.empty() == false) curl_easy_setopt(curl, CURLOPT_CAINFO,cainfo.c_str()); // Check server certificate against previous CA list ... @@ -151,18 +151,25 @@ bool HttpsMethod::Fetch(FetchItem *Itm) default_verify = 0; curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, verify); + // Also enforce issuer of server certificate using its cert + string issuercert = _config->Find("Acquire::https::IssuerCert",""); + knob = "Acquire::https::"+remotehost+"::IssuerCert"; + issuercert = _config->Find(knob.c_str(),issuercert.c_str()); + if(issuercert.empty() == false) + curl_easy_setopt(curl, CURLOPT_ISSUERCERT,issuercert.c_str()); + // For client authentication, certificate file ... string pem = _config->Find("Acquire::https::SslCert",""); knob = "Acquire::https::"+remotehost+"::SslCert"; pem = _config->Find(knob.c_str(),pem.c_str()); - if(pem != "") + if(pem.empty() == false) curl_easy_setopt(curl, CURLOPT_SSLCERT, pem.c_str()); // ... and associated key. string key = _config->Find("Acquire::https::SslKey",""); knob = "Acquire::https::"+remotehost+"::SslKey"; key = _config->Find(knob.c_str(),key.c_str()); - if(key != "") + if(key.empty() == false) curl_easy_setopt(curl, CURLOPT_SSLKEY, key.c_str()); // Allow forcing SSL version to SSLv3 or TLSv1 (SSLv2 is not @@ -177,6 +184,13 @@ bool HttpsMethod::Fetch(FetchItem *Itm) final_version = CURL_SSLVERSION_SSLv3; curl_easy_setopt(curl, CURLOPT_SSLVERSION, final_version); + // CRL file + string crlfile = _config->Find("Acquire::https::CrlFile",""); + knob = "Acquire::https::"+remotehost+"::CrlFile"; + crlfile = _config->Find(knob.c_str(),crlfile.c_str()); + if(crlfile.empty() == false) + curl_easy_setopt(curl, CURLOPT_CRLFILE, crlfile.c_str()); + // cache-control if(_config->FindB("Acquire::https::No-Cache", _config->FindB("Acquire::http::No-Cache",false)) == false) @@ -196,7 +210,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); // speed limit - int dlLimit = _config->FindI("Acquire::https::Dl-Limit", + int const dlLimit = _config->FindI("Acquire::https::Dl-Limit", _config->FindI("Acquire::http::Dl-Limit",0))*1024; if (dlLimit > 0) curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, dlLimit); @@ -208,7 +222,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) "Debian APT-CURL/1.0 ("VERSION")").c_str()).c_str()); // set timeout - int timeout = _config->FindI("Acquire::https::Timeout", + int const timeout = _config->FindI("Acquire::https::Timeout", _config->FindI("Acquire::http::Timeout",120)); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout); //set really low lowspeed timeout (see #497983) @@ -216,7 +230,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, timeout); // set redirect options and default to 10 redirects - bool AllowRedirect = _config->FindB("Acquire::https::AllowRedirect", + bool const AllowRedirect = _config->FindB("Acquire::https::AllowRedirect", _config->FindB("Acquire::http::AllowRedirect",true)); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, AllowRedirect); curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 10); diff --git a/po/apt-all.pot b/po/apt-all.pot index ac231dff9..c17a2e9e9 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-10 22:06+0100\n" +"POT-Creation-Date: 2010-01-01 19:13+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -144,11 +144,6 @@ msgstr "" msgid " Version table:" msgstr "" -#: cmdline/apt-cache.cc:1623 -#, c-format -msgid " %4i %s\n" -msgstr "" - #: cmdline/apt-cache.cc:1718 cmdline/apt-cdrom.cc:134 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547 #: cmdline/apt-get.cc:2665 cmdline/apt-sortpkgs.cc:144 @@ -342,7 +337,7 @@ msgstr "" #: ftparchive/cachedb.cc:72 msgid "" -"DB format is invalid. If you upgraded from a older version of apt, please " +"DB format is invalid. If you upgraded from an older version of apt, please " "remove and re-create the database." msgstr "" @@ -357,11 +352,11 @@ msgstr "" msgid "Failed to stat %s" msgstr "" -#: ftparchive/cachedb.cc:238 +#: ftparchive/cachedb.cc:242 msgid "Archive has no control record" msgstr "" -#: ftparchive/cachedb.cc:444 +#: ftparchive/cachedb.cc:448 msgid "Unable to get a cursor" msgstr "" @@ -426,26 +421,26 @@ msgstr "" msgid " DeLink limit of %sB hit.\n" msgstr "" -#: ftparchive/writer.cc:388 +#: ftparchive/writer.cc:389 msgid "Archive had no package field" msgstr "" -#: ftparchive/writer.cc:396 ftparchive/writer.cc:627 +#: ftparchive/writer.cc:397 ftparchive/writer.cc:628 #, c-format msgid " %s has no override entry\n" msgstr "" -#: ftparchive/writer.cc:457 ftparchive/writer.cc:715 +#: ftparchive/writer.cc:458 ftparchive/writer.cc:716 #, c-format msgid " %s maintainer is %s not %s\n" msgstr "" -#: ftparchive/writer.cc:637 +#: ftparchive/writer.cc:638 #, c-format msgid " %s has no source override entry\n" msgstr "" -#: ftparchive/writer.cc:641 +#: ftparchive/writer.cc:642 #, c-format msgid " %s has no binary override entry either\n" msgstr "" @@ -1570,11 +1565,11 @@ msgid "File not found" msgstr "" #: methods/copy.cc:43 methods/gzip.cc:141 methods/gzip.cc:150 -#: methods/rred.cc:234 methods/rred.cc:243 +#: methods/rred.cc:483 methods/rred.cc:492 msgid "Failed to stat" msgstr "" -#: methods/copy.cc:80 methods/gzip.cc:147 methods/rred.cc:240 +#: methods/copy.cc:80 methods/gzip.cc:147 methods/rred.cc:489 msgid "Failed to set modification time" msgstr "" @@ -1700,7 +1695,7 @@ msgstr "" msgid "Unable to accept connection" msgstr "" -#: methods/ftp.cc:870 methods/http.cc:999 methods/rsh.cc:303 +#: methods/ftp.cc:870 methods/http.cc:1000 methods/rsh.cc:303 msgid "Problem hashing file" msgstr "" @@ -1764,22 +1759,22 @@ msgstr "" msgid "Connecting to %s" msgstr "" -#: methods/connect.cc:165 methods/connect.cc:184 +#: methods/connect.cc:166 methods/connect.cc:185 #, c-format msgid "Could not resolve '%s'" msgstr "" -#: methods/connect.cc:190 +#: methods/connect.cc:191 #, c-format msgid "Temporary failure resolving '%s'" msgstr "" -#: methods/connect.cc:193 +#: methods/connect.cc:194 #, c-format msgid "Something wicked happened resolving '%s:%s' (%i - %s)" msgstr "" -#: methods/connect.cc:240 +#: methods/connect.cc:241 #, c-format msgid "Unable to connect to %s:%s:" msgstr "" @@ -1864,47 +1859,47 @@ msgstr "" msgid "Unknown date format" msgstr "" -#: methods/http.cc:790 +#: methods/http.cc:791 msgid "Select failed" msgstr "" -#: methods/http.cc:795 +#: methods/http.cc:796 msgid "Connection timed out" msgstr "" -#: methods/http.cc:818 +#: methods/http.cc:819 msgid "Error writing to output file" msgstr "" -#: methods/http.cc:849 +#: methods/http.cc:850 msgid "Error writing to file" msgstr "" -#: methods/http.cc:877 +#: methods/http.cc:878 msgid "Error writing to the file" msgstr "" -#: methods/http.cc:891 +#: methods/http.cc:892 msgid "Error reading from server. Remote end closed connection" msgstr "" -#: methods/http.cc:893 +#: methods/http.cc:894 msgid "Error reading from server" msgstr "" -#: methods/http.cc:984 apt-pkg/contrib/mmap.cc:215 +#: methods/http.cc:985 apt-pkg/contrib/mmap.cc:233 msgid "Failed to truncate file" msgstr "" -#: methods/http.cc:1149 +#: methods/http.cc:1150 msgid "Bad header data" msgstr "" -#: methods/http.cc:1166 methods/http.cc:1221 +#: methods/http.cc:1167 methods/http.cc:1222 msgid "Connection failed" msgstr "" -#: methods/http.cc:1313 +#: methods/http.cc:1314 msgid "Internal error" msgstr "" @@ -1912,18 +1907,25 @@ msgstr "" msgid "Can't mmap an empty file" msgstr "" -#: apt-pkg/contrib/mmap.cc:81 apt-pkg/contrib/mmap.cc:187 +#: apt-pkg/contrib/mmap.cc:81 apt-pkg/contrib/mmap.cc:202 #, c-format msgid "Couldn't make mmap of %lu bytes" msgstr "" -#: apt-pkg/contrib/mmap.cc:234 +#: apt-pkg/contrib/mmap.cc:252 #, c-format msgid "" "Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. " "Current value: %lu. (man 5 apt.conf)" msgstr "" +#: apt-pkg/contrib/mmap.cc:347 +#, c-format +msgid "" +"The size of a MMap has already reached the defined limit of %lu bytes,abort " +"the try to grow the MMap." +msgstr "" + #. d means days, h means hours, min means minutes, s means seconds #: apt-pkg/contrib/strutl.cc:346 #, c-format @@ -2533,39 +2535,39 @@ msgstr "" msgid "rename failed, %s (%s -> %s)." msgstr "" -#: apt-pkg/acquire-item.cc:395 +#: apt-pkg/acquire-item.cc:396 msgid "MD5Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:649 apt-pkg/acquire-item.cc:1411 +#: apt-pkg/acquire-item.cc:657 apt-pkg/acquire-item.cc:1419 msgid "Hash Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:1106 +#: apt-pkg/acquire-item.cc:1114 msgid "There is no public key available for the following key IDs:\n" msgstr "" -#: apt-pkg/acquire-item.cc:1216 +#: apt-pkg/acquire-item.cc:1224 #, c-format msgid "" "I wasn't able to locate a file for the %s package. This might mean you need " "to manually fix this package. (due to missing arch)" msgstr "" -#: apt-pkg/acquire-item.cc:1275 +#: apt-pkg/acquire-item.cc:1283 #, c-format msgid "" "I wasn't able to locate file for the %s package. This might mean you need to " "manually fix this package." msgstr "" -#: apt-pkg/acquire-item.cc:1316 +#: apt-pkg/acquire-item.cc:1324 #, c-format msgid "" "The package index files are corrupted. No Filename: field for package %s." msgstr "" -#: apt-pkg/acquire-item.cc:1403 +#: apt-pkg/acquire-item.cc:1411 msgid "Size mismatch" msgstr "" @@ -2781,7 +2783,7 @@ msgstr "" msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:908 +#: apt-pkg/deb/dpkgpm.cc:909 msgid "Running dpkg" msgstr "" @@ -2807,8 +2809,18 @@ msgstr "" msgid "Not locked" msgstr "" -#: methods/rred.cc:219 -msgid "Could not patch file" +#: methods/rred.cc:465 +#, c-format +msgid "" +"Could not patch %s with mmap and with file operation usage - the patch seems " +"to be corrupt." +msgstr "" + +#: methods/rred.cc:470 +#, c-format +msgid "" +"Could not patch %s with mmap (but no mmap specific fail) - the patch seems " +"to be corrupt." msgstr "" #: methods/rsh.cc:330 diff --git a/share/debian-archive.gpg b/share/debian-archive.gpg Binary files differdeleted file mode 100644 index da1aa5e97..000000000 --- a/share/debian-archive.gpg +++ /dev/null diff --git a/share/ubuntu-archive.gpg b/share/ubuntu-archive.gpg Binary files differdeleted file mode 100644 index 2ce60d454..000000000 --- a/share/ubuntu-archive.gpg +++ /dev/null diff --git a/test/libapt/assert.h b/test/libapt/assert.h new file mode 100644 index 000000000..5da76ae0a --- /dev/null +++ b/test/libapt/assert.h @@ -0,0 +1,21 @@ +#include <iostream> + +#define equals(x,y) assertEquals(x, y, __LINE__) + +template < typename X, typename Y > +void OutputAssert(X expect, char const* compare, Y get, unsigned long const &line) { + std::cerr << "Test FAILED: »" << expect << "« " << compare << " »" << get << "« at line " << line << std::endl; +} + +template < typename X, typename Y > +void assertEquals(X expect, Y get, unsigned long const &line) { + if (expect == get) + return; + OutputAssert(expect, "==", get, line); +} + +void assertEquals(unsigned int const &expect, int const &get, unsigned long const &line) { + if (get < 0) + OutputAssert(expect, "==", get, line); + assertEquals<unsigned int const&, unsigned int const&>(expect, get, line); +} diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc new file mode 100644 index 000000000..fd3c8269f --- /dev/null +++ b/test/libapt/getlanguages_test.cc @@ -0,0 +1,91 @@ +#include <apt-pkg/aptconfiguration.h> +#include <apt-pkg/configuration.h> + +#include "assert.h" +#include <string> +#include <vector> + +#include <iostream> + +// simple helper to quickly output a vector of strings +void dumpVector(std::vector<std::string> vec) { + for (std::vector<std::string>::const_iterator v = vec.begin(); + v != vec.end(); v++) + std::cout << *v << std::endl; +} + +int main(int argc,char *argv[]) +{ + std::vector<std::string> vec = APT::Configuration::getLanguages(false, false, "de_DE.UTF-8"); + equals(vec.size(), 2); + equals(vec[0], "de"); + equals(vec[1], "en"); + + // Special: Check if the cache is actually in use + vec = APT::Configuration::getLanguages(false, true, "en_GB.UTF-8"); + equals(vec.size(), 2); + equals(vec[0], "de"); + equals(vec[1], "en"); + + vec = APT::Configuration::getLanguages(false, false, "en_GB.UTF-8"); + equals(vec.size(), 2); + equals(vec[0], "en_GB"); + equals(vec[1], "en"); + + vec = APT::Configuration::getLanguages(false, false, "pt_PR.UTF-8"); + equals(vec.size(), 3); + equals(vec[0], "pt_PR"); + equals(vec[1], "pt"); + equals(vec[2], "en"); + + vec = APT::Configuration::getLanguages(false, false, "ast_DE.UTF-8"); // bogus, but syntactical correct + equals(vec.size(), 2); + equals(vec[0], "ast"); + equals(vec[1], "en"); + + vec = APT::Configuration::getLanguages(false, false, "C"); + equals(vec.size(), 1); + equals(vec[0], "en"); + + _config->Set("Acquire::Languages::1", "environment"); + _config->Set("Acquire::Languages::2", "en"); + vec = APT::Configuration::getLanguages(false, false, "de_DE.UTF-8"); + equals(vec.size(), 2); + equals(vec[0], "de"); + equals(vec[1], "en"); + + _config->Set("Acquire::Languages::3", "de"); + vec = APT::Configuration::getLanguages(false, false, "de_DE.UTF-8"); + equals(vec.size(), 2); + equals(vec[0], "de"); + equals(vec[1], "en"); + + _config->Set("Acquire::Languages::1", "none"); + vec = APT::Configuration::getLanguages(false, false, "de_DE.UTF-8"); + equals(vec.size(), 0); + vec = APT::Configuration::getLanguages(true, false, "de_DE.UTF-8"); + equals(vec[0], "en"); + equals(vec[1], "de"); + + _config->Set("Acquire::Languages::1", "fr"); + _config->Set("Acquire::Languages", "de_DE"); + vec = APT::Configuration::getLanguages(false, false, "de_DE.UTF-8"); + equals(vec.size(), 1); + equals(vec[0], "de_DE"); + + _config->Set("Acquire::Languages", "none"); + vec = APT::Configuration::getLanguages(true, false, "de_DE.UTF-8"); + equals(vec.size(), 0); + + _config->Set("Acquire::Languages", ""); + //FIXME: Remove support for this deprecated setting + _config->Set("APT::Acquire::Translation", "ast_DE"); + vec = APT::Configuration::getLanguages(true, false, "de_DE.UTF-8"); + equals(vec.size(), 1); + equals(vec[0], "ast_DE"); + _config->Set("APT::Acquire::Translation", "none"); + vec = APT::Configuration::getLanguages(true, false, "de_DE.UTF-8"); + equals(vec.size(), 0); + + return 0; +} diff --git a/test/libapt/makefile b/test/libapt/makefile new file mode 100644 index 000000000..5712c025a --- /dev/null +++ b/test/libapt/makefile @@ -0,0 +1,19 @@ +# -*- make -*- +BASE=../.. +SUBDIR=test/libapt +BASENAME=_libapt_test + +# Bring in the default rules +include ../../buildlib/defaults.mak + +# Program for testing getLanguageCode +PROGRAM = getLanguages${BASENAME} +SLIBS = -lapt-pkg +SOURCE = getlanguages_test.cc +include $(PROGRAM_H) + +# Program for testing ParseDepends +PROGRAM = ParseDepends${BASENAME} +SLIBS = -lapt-pkg +SOURCE = parsedepends_test.cc +include $(PROGRAM_H) diff --git a/test/libapt/parsedepends_test.cc b/test/libapt/parsedepends_test.cc new file mode 100644 index 000000000..b7befa561 --- /dev/null +++ b/test/libapt/parsedepends_test.cc @@ -0,0 +1,128 @@ +#include <apt-pkg/deblistparser.h> +#include <apt-pkg/configuration.h> + +#include "assert.h" + +int main(int argc,char *argv[]) { + string Package; + string Version; + unsigned int Op = 5; + unsigned int Null = 0; + bool StripMultiArch = true; + bool ParseArchFlags = false; + _config->Set("APT::Architecture","dsk"); + + const char* Depends = + "debhelper:any (>= 5.0), " + "libdb-dev:any, " + "gettext:native (<= 0.12), " + "libcurl4-gnutls-dev:native | libcurl3-gnutls-dev (>> 7.15.5), " + "debiandoc-sgml, " + "apt (>= 0.7.25), " + "not-for-me [ !dsk ], " + "only-for-me [ dsk ], " + "overlord-dev:any (= 7.15.3~) | overlord-dev:native (>> 7.15.5), " + ; + + unsigned short runner = 0; +test: +// std::clog << (StripMultiArch ? "NO-Multi" : "Multi") << " " << (ParseArchFlags ? "Flags" : "NO-Flags") << std::endl; + + // Stripping MultiArch is currently the default setting to not confuse + // non-MultiArch capable users of the library with "strange" extensions. + const char* Start = Depends; + const char* End = Depends + strlen(Depends); + + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + if (StripMultiArch == true) + equals("debhelper", Package); + else + equals("debhelper:any", Package); + equals("5.0", Version); + equals(Null | pkgCache::Dep::GreaterEq, Op); + + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + if (StripMultiArch == true) + equals("libdb-dev", Package); + else + equals("libdb-dev:any", Package); + equals("", Version); + equals(Null | pkgCache::Dep::NoOp, Op); + + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + if (StripMultiArch == true) + equals("gettext", Package); + else + equals("gettext:native", Package); + equals("0.12", Version); + equals(Null | pkgCache::Dep::LessEq, Op); + + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + if (StripMultiArch == true) + equals("libcurl4-gnutls-dev", Package); + else + equals("libcurl4-gnutls-dev:native", Package); + equals("", Version); + equals(Null | pkgCache::Dep::Or, Op); + + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + equals("libcurl3-gnutls-dev", Package); + equals("7.15.5", Version); + equals(Null | pkgCache::Dep::Greater, Op); + + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + equals("debiandoc-sgml", Package); + equals("", Version); + equals(Null | pkgCache::Dep::NoOp, Op); + + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + equals("apt", Package); + equals("0.7.25", Version); + equals(Null | pkgCache::Dep::GreaterEq, Op); + + if (ParseArchFlags == true) { + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + equals("", Package); // not-for-me + } else { + equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch)); + Start = strstr(Start, ","); + Start++; + } + + if (ParseArchFlags == true) { + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + equals("only-for-me", Package); + equals("", Version); + equals(Null | pkgCache::Dep::NoOp, Op); + } else { + equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch)); + Start = strstr(Start, ","); + Start++; + } + + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + if (StripMultiArch == true) + equals("overlord-dev", Package); + else + equals("overlord-dev:any", Package); + equals("7.15.3~", Version); + equals(Null | pkgCache::Dep::Equals | pkgCache::Dep::Or, Op); + + Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch); + if (StripMultiArch == true) + equals("overlord-dev", Package); + else + equals("overlord-dev:native", Package); + equals("7.15.5", Version); + equals(Null | pkgCache::Dep::Greater, Op); + + if (StripMultiArch == false) + ParseArchFlags = true; + StripMultiArch = !StripMultiArch; + + runner++; + if (runner < 4) + goto test; // this is the prove: tests are really evil ;) + + return 0; +} |