diff options
114 files changed, 1209 insertions, 522 deletions
diff --git a/.travis.yml b/.travis.yml index 3c4b59319..424172e04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ before_script: - ( mkdir build && cd build && cmake .. ) - make -C build -j4 script: - - make -C build test + - CTEST_OUTPUT_ON_FAILURE=1 make -C build test - ./test/integration/run-tests -q - sudo adduser --force-badname --system --home /nonexistent --no-create-home --quiet _apt || true - sudo ./test/integration/run-tests -q diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cb3dbeeb..2ed87b34b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,7 +113,7 @@ endif() # Configure some variables like package, version and architecture. set(PACKAGE ${PROJECT_NAME}) set(PACKAGE_MAIL "APT Development Team <deity@lists.debian.org>") -set(PACKAGE_VERSION "1.3~rc1ubuntu1") +set(PACKAGE_VERSION "1.3~rc2") if (NOT DEFINED COMMON_ARCH) execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH @@ -133,6 +133,7 @@ add_subdirectory(apt-pkg) add_subdirectory(apt-private) add_subdirectory(apt-inst) add_subdirectory(cmdline) +add_subdirectory(completions) add_subdirectory(doc) add_subdirectory(dselect) add_subdirectory(ftparchive) @@ -35,7 +35,7 @@ Our bugtracker as well as a general overview can be found at the [Debian Tracker Contributing ------------ APT is maintained in git, the official repository being located at -`git://anonscm.debian.org/apt/apt.git` ([webgit](http://anonscm.debian.org/gitweb/?p=apt/apt.git)), +`git://anonscm.debian.org/apt/apt.git` ([webgit](https://anonscm.debian.org/git/apt/apt.git)), but also available at other locations like [GitHub](https://github.com/Debian/apt). The default branch is `master`, other branches targeted at different @@ -62,7 +62,7 @@ You can also use the Ninja generator of cmake, to do that pass to the cmake invocation, and then use ninja instead of make. The source code uses in most parts a relatively uncommon indent convention, -namely 3 spaces with 8 space tab (see [doc/style.txt](http://anonscm.debian.org/gitweb/?p=apt/apt.git;a=blob;f=doc/style.txt) for more on this). +namely 3 spaces with 8 space tab (see [doc/style.txt](https://anonscm.debian.org/git/apt/apt.git/tree/doc/style.txt) for more on this). Adhering to it avoids unnecessary code-churn destroying history (aka: `git blame`) and you are therefore encouraged to write patches in this style. Your editor can surely help you with this, for vim the settings would be @@ -115,8 +115,10 @@ itself as well as in conjunction with dpkg and other tools while working with pa ### Unit tests -These tests are gtest-dev based, reside in `./test/libapt` and can be run with `make test`. -They are executed at package build-time, but not by `make`. +These tests are gtest-dev based, executed by ctest, reside in `./test/libapt` +and can be run with `make test`. They are executed at package build-time, but +not by `make`. CTest by default does not show the output of tests, even if they +failed, so to see more details you can also run them with `ctest --verbose`. Debugging --------- diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index f13d2f6ae..7abb7b206 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -410,7 +410,7 @@ bool pkgAcqTransactionItem::QueueURI(pkgAcquire::ItemDesc &Item) return false; } // If we got the InRelease file via a mirror, pick all indexes directly from this mirror, too - if (TransactionManager->BaseURI.empty() == false && + if (TransactionManager->BaseURI.empty() == false && UsedMirror.empty() && URI::SiteOnly(Item.URI) != URI::SiteOnly(TransactionManager->BaseURI)) { // this ensures we rewrite only once and only the first step @@ -451,7 +451,11 @@ std::string pkgAcquire::Item::GetFinalFilename() const } std::string pkgAcqDiffIndex::GetFinalFilename() const { - return GetFinalFileNameFromURI(GetDiffIndexURI(Target)); + std::string const FinalFile = GetFinalFileNameFromURI(GetDiffIndexURI(Target)); + // we don't want recompress, so lets keep whatever we got + if (CurrentCompressionExtension == "uncompressed") + return FinalFile; + return FinalFile + "." + CurrentCompressionExtension; } std::string pkgAcqIndex::GetFinalFilename() const { @@ -488,7 +492,10 @@ std::string pkgAcqIndex::GetMetaKey() const } std::string pkgAcqDiffIndex::GetMetaKey() const { - return GetDiffIndexFileName(Target.MetaKey); + auto const metakey = GetDiffIndexFileName(Target.MetaKey); + if (CurrentCompressionExtension == "uncompressed") + return metakey; + return metakey + "." + CurrentCompressionExtension; } /*}}}*/ //pkgAcqTransactionItem::TransactionState and specialisations for child classes /*{{{*/ @@ -991,6 +998,9 @@ std::string pkgAcquire::Item::HashSum() const /*{{{*/ /*}}}*/ bool pkgAcquire::Item::IsRedirectionLoop(std::string const &NewURI) /*{{{*/ { + // store can fail due to permission errors and the item will "loop" then + if (APT::String::Startswith(NewURI, "store:")) + return false; if (d->PastRedirections.empty()) { d->PastRedirections.push_back(NewURI); @@ -1223,9 +1233,15 @@ bool pkgAcqMetaBase::CheckDownloadDone(pkgAcqTransactionItem * const I, const st if (I->UsedMirror.empty() == false && _config->FindB("Acquire::SameMirrorForAllIndexes", true)) { if (APT::String::Endswith(I->Desc.URI, "InRelease")) + { TransactionManager->BaseURI = I->Desc.URI.substr(0, I->Desc.URI.length() - strlen("InRelease")); + TransactionManager->UsedMirror = I->UsedMirror; + } else if (APT::String::Endswith(I->Desc.URI, "Release")) + { TransactionManager->BaseURI = I->Desc.URI.substr(0, I->Desc.URI.length() - strlen("Release")); + TransactionManager->UsedMirror = I->UsedMirror; + } } std::string const FileName = LookupTag(Message,"Filename"); @@ -1962,44 +1978,33 @@ pkgAcqBaseIndex::~pkgAcqBaseIndex() {} pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager, IndexTarget const &Target) - : pkgAcqBaseIndex(Owner, TransactionManager, Target), d(NULL), diffs(NULL) + : pkgAcqIndex(Owner, TransactionManager, Target, true), d(NULL), diffs(NULL) { // FIXME: Magic number as an upper bound on pdiffs we will reasonably acquire ExpectedAdditionalItems = 40; - Debug = _config->FindB("Debug::pkgAcquire::Diffs",false); - Desc.Owner = this; - Desc.Description = GetDiffIndexFileName(Target.Description); - Desc.ShortDesc = Target.ShortDesc; - Desc.URI = GetDiffIndexURI(Target); - - DestFile = GetPartialFileNameFromURI(Desc.URI); + CompressionExtensions.clear(); + { + std::vector<std::string> types = APT::Configuration::getCompressionTypes(); + if (types.empty() == false) + { + std::ostringstream os; + std::copy_if(types.begin(), types.end()-1, std::ostream_iterator<std::string>(os, " "), [&](std::string const type) { + if (type == "uncompressed") + return true; + return TransactionManager->MetaIndexParser->Exists(GetDiffIndexFileName(Target.MetaKey) + '.' + type); + }); + os << *types.rbegin(); + CompressionExtensions = os.str(); + } + } + if (Target.Option(IndexTarget::COMPRESSIONTYPES).find("by-hash") != std::string::npos) + CompressionExtensions = "by-hash " + CompressionExtensions; + Init(GetDiffIndexURI(Target), GetDiffIndexFileName(Target.Description), Target.ShortDesc); if(Debug) std::clog << "pkgAcqDiffIndex: " << Desc.URI << std::endl; - - QueueURI(Desc); -} - /*}}}*/ -// AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/ -// --------------------------------------------------------------------- -/* The only header we use is the last-modified header. */ -string pkgAcqDiffIndex::Custom600Headers() const -{ - if (TransactionManager->LastMetaIndexParser != NULL) - return "\nIndex-File: true"; - - string const Final = GetFinalFilename(); - - if(Debug) - std::clog << "Custom600Header-IMS: " << Final << std::endl; - - struct stat Buf; - if (stat(Final.c_str(),&Buf) != 0) - return "\nIndex-File: true"; - - return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime, false); } /*}}}*/ void pkgAcqDiffIndex::QueueOnIMSHit() const /*{{{*/ @@ -2030,7 +2035,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ std::clog << "pkgAcqDiffIndex::ParseIndexDiff() " << IndexDiffFile << std::endl; - FileFd Fd(IndexDiffFile,FileFd::ReadOnly); + FileFd Fd(IndexDiffFile, FileFd::ReadOnly, FileFd::Extension); pkgTagFile TF(&Fd); if (Fd.IsOpen() == false || Fd.Failed()) return false; @@ -2402,7 +2407,9 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ /*}}}*/ void pkgAcqDiffIndex::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf)/*{{{*/ { - pkgAcqBaseIndex::Failed(Message,Cnf); + if (CommonFailed(GetDiffIndexURI(Target), GetDiffIndexFileName(Target.Description), Message, Cnf)) + return; + Status = StatDone; ExpectedAdditionalItems = 0; @@ -2820,10 +2827,12 @@ pkgAcqIndexMergeDiffs::~pkgAcqIndexMergeDiffs() {} // AcqIndex::AcqIndex - Constructor /*{{{*/ pkgAcqIndex::pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager, - IndexTarget const &Target) + IndexTarget const &Target, bool const Derived) : pkgAcqBaseIndex(Owner, TransactionManager, Target), d(NULL), Stage(STAGE_DOWNLOAD), CompressionExtensions(Target.Option(IndexTarget::COMPRESSIONTYPES)) { + if (Derived) + return; Init(Target.URI, Target.Description, Target.ShortDesc); if(_config->FindB("Debug::Acquire::Transaction", false) == true) @@ -2856,10 +2865,6 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, DestFile = GetPartialFileNameFromURI(URI); NextCompressionExtension(CurrentCompressionExtension, CompressionExtensions, false); - // store file size of the download to ensure the fetcher gives - // accurate progress reporting - FileSize = GetExpectedHashes().FileSize(); - if (CurrentCompressionExtension == "uncompressed") { Desc.URI = URI; @@ -2874,6 +2879,8 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, Desc.URI = URI + '.' + CurrentCompressionExtension; DestFile = DestFile + '.' + CurrentCompressionExtension; } + else + Desc.URI = URI; HashStringList const Hashes = GetExpectedHashes(); HashString const * const TargetHash = Hashes.find(NULL); @@ -2896,6 +2903,9 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, DestFile = DestFile + '.' + CurrentCompressionExtension; } + // store file size of the download to ensure the fetcher gives + // accurate progress reporting + FileSize = GetExpectedHashes().FileSize(); Desc.Description = URIDesc; Desc.Owner = this; @@ -2928,20 +2938,40 @@ string pkgAcqIndex::Custom600Headers() const } /*}}}*/ // AcqIndex::Failed - getting the indexfile failed /*{{{*/ -void pkgAcqIndex::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf) +bool pkgAcqIndex::CommonFailed(std::string const &TargetURI, std::string const TargetDesc, + std::string const &Message, pkgAcquire::MethodConfig const * const Cnf) { pkgAcqBaseIndex::Failed(Message,Cnf); + if (UsedMirror.empty() == false && UsedMirror != "DIRECT" && + LookupTag(Message, "FailReason") == "HttpError404") + { + UsedMirror = "DIRECT"; + if (Desc.URI.find("/by-hash/") != std::string::npos) + CompressionExtensions = "by-hash " + CompressionExtensions; + else + CompressionExtensions = CurrentCompressionExtension + ' ' + CompressionExtensions; + Init(TargetURI, TargetDesc, Desc.ShortDesc); + Status = StatIdle; + return true; + } + // authorisation matches will not be fixed by other compression types if (Status != StatAuthError) { if (CompressionExtensions.empty() == false) { - Init(Target.URI, Desc.Description, Desc.ShortDesc); + Init(TargetURI, Desc.Description, Desc.ShortDesc); Status = StatIdle; - return; + return true; } } + return false; +} +void pkgAcqIndex::Failed(string const &Message,pkgAcquire::MethodConfig const * const Cnf) +{ + if (CommonFailed(Target.URI, Target.Description, Message, Cnf)) + return; if(Target.IsOptional && GetExpectedHashes().empty() && Stage == STAGE_DOWNLOAD) Status = StatDone; diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index e6e5ea12b..71a11bcde 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -611,6 +611,79 @@ class APT_HIDDEN pkgAcqBaseIndex : public pkgAcqTransactionItem virtual ~pkgAcqBaseIndex(); }; /*}}}*/ +/** \brief An acquire item that is responsible for fetching an index {{{ + * file (e.g., Packages or Sources). + * + * \sa pkgAcqDiffIndex, pkgAcqIndexDiffs, pkgAcqIndexTrans + * + * \todo Why does pkgAcqIndex have protected members? + */ +class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex +{ + void * const d; + + protected: + + /** \brief The stages the method goes through + * + * The method first downloads the indexfile, then its decompressed (or + * copied) and verified + */ + enum AllStages { + STAGE_DOWNLOAD, + STAGE_DECOMPRESS_AND_VERIFY, + }; + AllStages Stage; + + /** \brief Handle what needs to be done when the download is done */ + void StageDownloadDone(std::string const &Message); + + /** \brief Handle what needs to be done when the decompression/copy is + * done + */ + void StageDecompressDone(); + + /** \brief If \b set, this partially downloaded file will be + * removed when the download completes. + */ + std::string EraseFileName; + + /** \brief The compression-related file extensions that are being + * added to the downloaded file one by one if first fails (e.g., "gz bz2"). + */ + std::string CompressionExtensions; + + /** \brief The actual compression extension currently used */ + std::string CurrentCompressionExtension; + + /** \brief Do the changes needed to fetch via AptByHash (if needed) */ + void InitByHashIfNeeded(); + + /** \brief Get the full pathname of the final file for the current URI */ + virtual std::string GetFinalFilename() const APT_OVERRIDE; + + virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE; + + public: + // Specialized action members + virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE; + virtual void Done(std::string const &Message, HashStringList const &Hashes, + pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE; + virtual std::string Custom600Headers() const APT_OVERRIDE; + virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;}; + virtual std::string GetMetaKey() const APT_OVERRIDE; + + pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager, + IndexTarget const &Target, bool const Derived = false) APT_NONNULL(2, 3); + virtual ~pkgAcqIndex(); + + protected: + APT_HIDDEN void Init(std::string const &URI, std::string const &URIDesc, + std::string const &ShortDesc); + APT_HIDDEN bool CommonFailed(std::string const &TargetURI, std::string const TargetDesc, + std::string const &Message, pkgAcquire::MethodConfig const * const Cnf); +}; + /*}}}*/ /** \brief An item that is responsible for fetching an index file of {{{ * package list diffs and starting the package list's download. * @@ -620,7 +693,7 @@ class APT_HIDDEN pkgAcqBaseIndex : public pkgAcqTransactionItem * * \sa pkgAcqIndexDiffs, pkgAcqIndex */ -class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex +class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqIndex { void * const d; std::vector<pkgAcqIndexMergeDiffs*> * diffs; @@ -646,7 +719,6 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex virtual void Done(std::string const &Message, HashStringList const &Hashes, pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE; virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "Index";}; - virtual std::string Custom600Headers() const APT_OVERRIDE; virtual std::string GetMetaKey() const APT_OVERRIDE; /** \brief Parse the Index file for a set of Packages diffs. @@ -887,77 +959,6 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex virtual ~pkgAcqIndexDiffs(); }; /*}}}*/ -/** \brief An acquire item that is responsible for fetching an index {{{ - * file (e.g., Packages or Sources). - * - * \sa pkgAcqDiffIndex, pkgAcqIndexDiffs, pkgAcqIndexTrans - * - * \todo Why does pkgAcqIndex have protected members? - */ -class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex -{ - void * const d; - - protected: - - /** \brief The stages the method goes through - * - * The method first downloads the indexfile, then its decompressed (or - * copied) and verified - */ - enum AllStages { - STAGE_DOWNLOAD, - STAGE_DECOMPRESS_AND_VERIFY, - }; - AllStages Stage; - - /** \brief Handle what needs to be done when the download is done */ - void StageDownloadDone(std::string const &Message); - - /** \brief Handle what needs to be done when the decompression/copy is - * done - */ - void StageDecompressDone(); - - /** \brief If \b set, this partially downloaded file will be - * removed when the download completes. - */ - std::string EraseFileName; - - /** \brief The compression-related file extensions that are being - * added to the downloaded file one by one if first fails (e.g., "gz bz2"). - */ - std::string CompressionExtensions; - - /** \brief The actual compression extension currently used */ - std::string CurrentCompressionExtension; - - /** \brief Do the changes needed to fetch via AptByHash (if needed) */ - void InitByHashIfNeeded(); - - /** \brief Get the full pathname of the final file for the current URI */ - virtual std::string GetFinalFilename() const APT_OVERRIDE; - - virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE; - - public: - // Specialized action members - virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE; - virtual void Done(std::string const &Message, HashStringList const &Hashes, - pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE; - virtual std::string Custom600Headers() const APT_OVERRIDE; - virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;}; - virtual std::string GetMetaKey() const APT_OVERRIDE; - - pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager, - IndexTarget const &Target) APT_NONNULL(2, 3); - virtual ~pkgAcqIndex(); - - private: - APT_HIDDEN void Init(std::string const &URI, std::string const &URIDesc, - std::string const &ShortDesc); -}; - /*}}}*/ /** \brief An item that is responsible for fetching a package file. {{{ * * If the package file already exists in the cache, nothing will be diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index 7a4f8177f..a4fbc7651 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -464,6 +464,7 @@ bool pkgAcquire::Worker::RunMessages() } else { + auto SavedDesc = Owner->GetItemDesc(); if (isDoomedItem(Owner) == false) { if (Message.find("\nFailReason:") == std::string::npos) @@ -476,7 +477,7 @@ bool pkgAcquire::Worker::RunMessages() Owner->Failed(Message,Config); } if (Log != nullptr) - Log->Fail(Owner->GetItemDesc()); + Log->Fail(SavedDesc); } } ItemDone(); @@ -524,11 +525,11 @@ bool pkgAcquire::Worker::RunMessages() Owner->Status = pkgAcquire::Item::StatAuthError; else if (errTransient) Owner->Status = pkgAcquire::Item::StatTransientNetworkError; - + auto SavedDesc = Owner->GetItemDesc(); if (isDoomedItem(Owner) == false) Owner->Failed(Message,Config); if (Log != nullptr) - Log->Fail(Owner->GetItemDesc()); + Log->Fail(SavedDesc); } ItemDone(); @@ -685,6 +686,25 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item) return true; } + if (Item->Owner->IsRedirectionLoop(Item->URI)) + { + std::string const Message = "400 URI Failure" + "\nURI: " + Item->URI + + "\nFilename: " + Item->Owner->DestFile + + "\nFailReason: RedirectionLoop"; + + auto const ItmOwners = Item->Owners; + for (auto &O: ItmOwners) + { + O->Status = pkgAcquire::Item::StatError; + O->Failed(Message, Config); + if (Log != nullptr) + Log->Fail(O->GetItemDesc()); + } + // "queued" successfully, the item just instantly failed + return true; + } + string Message = "600 URI Acquire\n"; Message.reserve(300); Message += "URI: " + Item->URI; diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index a9d51a6bf..fd13b45dc 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1908,11 +1908,12 @@ public: " but was forced to ignore it in favor of an external binary – which isn't installed.", compressor.Name.c_str()); bool const Comp = (Mode & FileFd::WriteOnly) == FileFd::WriteOnly; - if (Comp == false) + if (Comp == false && filefd->iFd != -1) { // Handle 'decompression' of empty files struct stat Buf; - fstat(filefd->iFd, &Buf); + if (fstat(filefd->iFd, &Buf) != 0) + return filefd->FileFdErrno("fstat", "Could not stat fd %d for file %s", filefd->iFd, filefd->FileName.c_str()); if (Buf.st_size == 0 && S_ISFIFO(Buf.st_mode) == false) return true; diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 4a1676dc2..15665f8b5 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -164,7 +164,7 @@ bool RemoveFile(char const * const Function, std::string const &FileName); int GetLock(std::string File,bool Errors = true); bool FileExists(std::string File); bool RealFileExists(std::string File); -bool DirectoryExists(std::string const &Path) APT_CONST; +bool DirectoryExists(std::string const &Path); bool CreateDirectory(std::string const &Parent, std::string const &Path); time_t GetModificationTime(std::string const &Path); bool Rename(std::string From, std::string To); diff --git a/apt-pkg/contrib/srvrec.cc b/apt-pkg/contrib/srvrec.cc index be159bad9..327e59937 100644 --- a/apt-pkg/contrib/srvrec.cc +++ b/apt-pkg/contrib/srvrec.cc @@ -185,7 +185,7 @@ SrvRec PopFromSrvRecs(std::vector<SrvRec> &Recs) [&I](SrvRec const &J) { return I->priority != J.priority; }); // clock seems random enough. - I += clock() % std::distance(I, J); + I += std::max(static_cast<clock_t>(0), clock()) % std::distance(I, J); SrvRec const selected = std::move(*I); Recs.erase(I); diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 6a23b2c00..65bd3e6ee 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -80,7 +80,11 @@ debPackagesIndex::debPackagesIndex(IndexTarget const &Target, bool const Trusted std::string debPackagesIndex::ArchiveInfo(pkgCache::VerIterator const &Ver) const { std::string Res = Target.Description; - Res.erase(Target.Description.rfind(' ')); + { + auto const space = Target.Description.rfind(' '); + if (space != std::string::npos) + Res.erase(space); + } Res += " "; Res += Ver.ParentPkg().Name(); diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index fd702b3c6..f7968ec47 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -184,26 +184,24 @@ pkgPackageManager *debSystem::CreatePM(pkgDepCache *Cache) const // System::Initialize - Setup the configuration space.. /*{{{*/ // --------------------------------------------------------------------- /* These are the Debian specific configuration variables.. */ -static std::string getDpkgStatusLocation(Configuration &Cnf) { +static std::string getDpkgStatusLocation(Configuration const &Cnf) { + Configuration PathCnf; + PathCnf.Set("Dir", Cnf.Find("Dir", "/")); + PathCnf.Set("Dir::State::status", "status"); auto const cnfstatedir = Cnf.Find("Dir::State", "var/lib/apt/"); + // if the state dir ends in apt, replace it with dpkg - + // for the default this gives us the same as the fallback below. + // This can't be a ../dpkg as that would play bad with symlinks std::string statedir; if (APT::String::Endswith(cnfstatedir, "/apt/")) statedir.assign(cnfstatedir, 0, cnfstatedir.length() - 5); else if (APT::String::Endswith(cnfstatedir, "/apt")) statedir.assign(cnfstatedir, 0, cnfstatedir.length() - 4); if (statedir.empty()) - Cnf.Set("Dir::State", "var/lib/dpkg"); + PathCnf.Set("Dir::State", "var/lib/dpkg"); else - Cnf.Set("Dir::State", flCombine(statedir, "dpkg")); - auto const cnfrootdir = Cnf.Find("RootDir"); - if (Cnf.Exists("RootDir") == true) - Cnf.Set("RootDir", ""); - Cnf.Set("Dir::State::status", "status"); - auto const statusfile = Cnf.FindFile("Dir::State::status"); - if (cnfrootdir.empty() == false) - Cnf.Set("RootDir", cnfrootdir); - Cnf.Set("Dir::State", cnfstatedir); - return statusfile; + PathCnf.Set("Dir::State", flCombine(statedir, "dpkg")); + return PathCnf.FindFile("Dir::State::status"); } bool debSystem::Initialize(Configuration &Cnf) { diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc index b1435d32c..934943205 100644 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@ -151,7 +151,13 @@ std::string IndexTarget::Option(OptionKeys const EnumKey) const /*{{{*/ APT_CASE(ALLOW_WEAK); APT_CASE(ALLOW_DOWNGRADE_TO_INSECURE); #undef APT_CASE - case FILENAME: return _config->FindDir("Dir::State::lists") + URItoFileName(URI); + case FILENAME: + { + auto const M = Options.find("FILENAME"); + if (M == Options.end()) + return _config->FindDir("Dir::State::lists") + URItoFileName(URI); + return M->second; + } case EXISTING_FILENAME: std::string const filename = Option(FILENAME); std::vector<std::string> const types = VectorizeString(Option(COMPRESSIONTYPES), ' '); diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc index c77c240c3..be5b8b5c7 100644 --- a/apt-pkg/install-progress.cc +++ b/apt-pkg/install-progress.cc @@ -14,6 +14,7 @@ #include <algorithm> #include <stdio.h> #include <sstream> +#include <cmath> #include <apti18n.h> @@ -321,19 +322,14 @@ std::string PackageManagerFancy::GetTextProgressStr(float Percent, int OutputSize) { std::string output; - int i; - - // should we raise a exception here instead? - if (Percent < 0.0 || Percent > 1.0 || OutputSize < 3) + if (unlikely(OutputSize < 3)) return output; - - int BarSize = OutputSize - 2; // bar without the leading "[" and trailing "]" - output += "["; - for(i=0; i < BarSize*Percent; i++) - output += "#"; - for (/*nothing*/; i < BarSize; i++) - output += "."; - output += "]"; + + int const BarSize = OutputSize - 2; // bar without the leading "[" and trailing "]" + int const BarDone = std::max(0, std::min(BarSize, static_cast<int>(std::floor(Percent * BarSize)))); + output.append("["); + std::fill_n(std::fill_n(std::back_inserter(output), BarDone, '#'), BarSize - BarDone, '.'); + output.append("]"); return output; } diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 000539582..cfd824978 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -328,6 +328,9 @@ bool pkgSourceList::ReadMainList() // Only warn if there is no sources.list file. _error->WarningE("RealFileExists", _("Unable to read %s"), Main.c_str()); + for (auto && file: _config->FindVector("APT::Sources::With")) + Res &= AddVolatileFile(file, nullptr); + return Res; } /*}}}*/ @@ -420,18 +423,18 @@ bool pkgSourceList::ParseFileOldStyle(std::string const &File) /* Returns: the number of stanzas parsed*/ bool pkgSourceList::ParseFileDeb822(string const &File) { - unsigned int i = 1; - // see if we can read the file FileFd Fd(File, FileFd::ReadOnly); pkgTagFile Sources(&Fd, pkgTagFile::SUPPORT_COMMENTS); if (Fd.IsOpen() == false || Fd.Failed()) - return _error->Error(_("Malformed stanza %u in source list %s (type)"),i,File.c_str()); + return _error->Error(_("Malformed stanza %u in source list %s (type)"),0,File.c_str()); // read step by step pkgTagSection Tags; + unsigned int i = 0; while (Sources.Step(Tags) == true) { + ++i; if(Tags.Exists("Types") == false) return _error->Error(_("Malformed stanza %u in source list %s (type)"),i,File.c_str()); @@ -449,8 +452,6 @@ bool pkgSourceList::ParseFileDeb822(string const &File) if (!Parse->ParseStanza(SrcList, Tags, i, Fd)) return false; - - ++i; } } return true; @@ -544,6 +545,22 @@ void pkgSourceList::AddVolatileFile(pkgIndexFile * const File) /*{{{*/ VolatileFiles.push_back(File); } /*}}}*/ +static bool fileNameMatches(std::string const &filename, std::string const &idxtype)/*{{{*/ +{ + for (auto && type: APT::Configuration::getCompressionTypes()) + { + if (type == "uncompressed") + { + if (filename == idxtype || APT::String::Endswith(filename, '_' + idxtype)) + return true; + } + else if (filename == idxtype + '.' + type || + APT::String::Endswith(filename, '_' + idxtype + '.' + type)) + return true; + } + return false; +} + /*}}}*/ bool pkgSourceList::AddVolatileFile(std::string const &File, std::vector<std::string> * const VolatileCmdL)/*{{{*/ { // Note: FileExists matches directories and links, too! @@ -574,7 +591,20 @@ bool pkgSourceList::AddVolatileFile(std::string const &File, std::vector<std::st return true; } else - return false; + { + auto const filename = flNotDir(File); + auto const Target = IndexTarget(File, filename, File, "file:" + File, false, true, { + { "FILENAME", File }, + { "REPO_URI", "file:" + flAbsPath(flNotFile(File)) + '/' }, + { "COMPONENT", "volatile-packages-file" }, + }); + if (fileNameMatches(filename, "Packages")) + AddVolatileFile(new debPackagesIndex(Target, true)); + else if (fileNameMatches(filename, "Sources")) + AddVolatileFile(new debSourcesIndex(Target, true)); + else + return false; + } if (VolatileCmdL != nullptr) VolatileCmdL->push_back(File); diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index feb8d67a9..a890aafab 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -96,6 +96,7 @@ static bool addArgumentsAPTCache(std::vector<CommandLine::Args> &Args, char cons addArg('p', "pkg-cache", "Dir::Cache::pkgcache", CommandLine::HasArg); addArg('s', "src-cache", "Dir::Cache::srcpkgcache", CommandLine::HasArg); + addArg(0, "with-source", "APT::Sources::With::", CommandLine::HasArg); return found_something; } @@ -275,6 +276,7 @@ static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const addArg(0,"install-recommends","APT::Install-Recommends",CommandLine::Boolean); addArg(0,"install-suggests","APT::Install-Suggests",CommandLine::Boolean); addArg(0,"fix-policy","APT::Get::Fix-Policy-Broken",0); + addArg(0, "with-source", "APT::Sources::With::", CommandLine::HasArg); return found_something; } @@ -307,6 +309,7 @@ static bool addArgumentsAPTMark(std::vector<CommandLine::Args> &Args, char const addArg('s',"dry-run","APT::Mark::Simulate",0); addArg('s',"no-act","APT::Mark::Simulate",0); } + addArg(0, "with-source", "APT::Sources::With::", CommandLine::HasArg); return true; } @@ -340,6 +343,8 @@ static bool addArgumentsAPT(std::vector<CommandLine::Args> &Args, char const * c else return false; + addArg(0, "with-source", "APT::Sources::With::", CommandLine::HasArg); + return true; } /*}}}*/ diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in index 0f9118492..81314c7f5 100644 --- a/cmdline/apt-key.in +++ b/cmdline/apt-key.in @@ -200,8 +200,8 @@ remove_key_from_keyring() { local FINGERPRINTS="${GPGHOMEDIR}/keyringfile.keylst" get_fingerprints_of_keyring "$KEYRINGFILE" > "$FINGERPRINTS" - # strip leading 0x, if present: - KEY="${KEY#0x}" + # strip leading 0x, if present: + KEY="$(echo "${KEY#0x}" | tr -d ' ')" # check if the key is in this keyring if ! grep -iq "^[0-9A-F]*${KEY}$" "$FINGERPRINTS"; then @@ -530,9 +530,11 @@ EOF GPG_EXE="gpg" elif command_available 'gpg2'; then GPG_EXE="gpg2" + elif command_available 'gpg1'; then + GPG_EXE="gpg1" else - echo >&2 "Error: gnupg or gnupg2 do not seem to be installed," - echo >&2 "Error: but apt-key requires gnupg or gnupg2 for this operation." + echo >&2 "Error: gnupg, gnupg2 and gnupg1 do not seem to be installed," + echo >&2 "Error: but apt-key requires gnupg, gnupg2 or gnupg1 for this operation." echo >&2 exit 255 fi @@ -639,8 +641,9 @@ case "$command" in if [ -n "$GPGV" ] && command_available "$GPGV"; then true; elif command_available 'gpgv'; then GPGV='gpgv'; elif command_available 'gpgv2'; then GPGV='gpgv2'; + elif command_available 'gpgv1'; then GPGV='gpgv1'; else - echo >&2 'ERROR: gpgv or gpgv2 required for verification' + echo >&2 'ERROR: gpgv, gpgv2 or gpgv1 required for verification' exit 29 fi # for a forced keyid we need gpg --export, so full wrapping required diff --git a/completions/CMakeLists.txt b/completions/CMakeLists.txt new file mode 100644 index 000000000..4ef62a892 --- /dev/null +++ b/completions/CMakeLists.txt @@ -0,0 +1,4 @@ +set(BASH_COMPLETION_DIR "${CMAKE_INSTALL_DATAROOTDIR}/bash-completion/completions" + CACHE PATH "Path to the bash-completion completions directory") + +install(FILES bash/apt DESTINATION ${BASH_COMPLETION_DIR}) diff --git a/debian/apt.install b/debian/apt.install index 82b9ec6f4..a8a56c925 100644 --- a/debian/apt.install +++ b/debian/apt.install @@ -29,7 +29,7 @@ usr/share/man/*/*/apt-mark.* usr/share/man/*/*/apt-secure.* usr/share/man/*/*/sources.list.* usr/share/man/*/*/apt_preferences.* -completions/bash/* /usr/share/bash-completion/completions/ +usr/share/bash-completion/completions/ debian/*.service /lib/systemd/system/ debian/*.timer /lib/systemd/system/ usr/lib/apt/apt-helper diff --git a/debian/changelog b/debian/changelog index a69ebff45..8d2289a21 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,32 @@ +apt (1.3~rc2) unstable; urgency=medium + + [ Julian Andres Klode ] + * debian/NEWS: Get rid of 1.3~pre3+cmake1 entry. + Thanks to Axel Beckert for reporting + * CMake: Use COPYONLY instead of @ONLY + * fileutl: empty file support: Avoid fstat() on -1 fd and check result + * Change anonscm.d.o links to /git/apt/apt.git and https + + [ David Kalnischkies ] + * don't perform int<float in progress bar drawing + * ensure a good clock() value for usage and tests + * drop incorrect const attribute from DirectoryExists (LP: 1473674) + * http(s): allow empty values for header fields (Closes: 834048) + * don't sent Range requests if we know its not accepted + * don't try pipelining if server closes connections (Closes: #832113) + * log with the failed item description, not with next try + * retry without same redirection mirror on 404 errors + * support getting only-uncompressed files via by-hash + * support compression and by-hash for .diff/Index files (Closes: #824926) + * default to Dir=/ in dpkg/status file finding magic + * add the gpg-classic variant to the gpgv/gnupg or-group + * allow spaces in fingerprints for 'apt-key del' + * add --with-source option and Packages/Sources support + * don't count each Type as an individual deb822-sources stanza + * methods: read config in most to least specific order (Closes: 834642) + + -- Julian Andres Klode <jak@debian.org> Wed, 17 Aug 2016 23:31:07 +0200 + apt (1.3~rc1ubuntu2) yakkety; urgency=medium * Don't build with -O3. See LP: #1473674. diff --git a/debian/control b/debian/control index 4d4dd97e5..535d3693d 100644 --- a/debian/control +++ b/debian/control @@ -15,15 +15,15 @@ Build-Depends: dpkg-dev (>= 1.17.14), debhelper (>= 9.20141010), libdb-dev, Build-Depends-Indep: doxygen, w3m, graphviz Build-Conflicts: autoconf2.13, automake1.4 Vcs-Git: https://anonscm.debian.org/git/apt/apt.git -Vcs-Browser: https://anonscm.debian.org/cgit/apt/apt.git +Vcs-Browser: https://anonscm.debian.org/git/apt/apt.git Testsuite: autopkgtest Package: apt Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${apt:keyring}, gpgv | gpgv2, adduser +Depends: ${shlibs:Depends}, ${misc:Depends}, ${apt:keyring}, gpgv | gpgv2 | gpgv1, adduser Replaces: manpages-pl (<< 20060617-3~), manpages-it (<< 2.80-4~), sun-java6-jdk (>> 0), sun-java5-jdk (>> 0), openjdk-6-jdk (<< 6b24-1.11-0ubuntu1~), bash-completion (<< 1:2.1-4.2+fakesync1), apt-utils (<< 1.3~exp2~) Breaks: manpages-pl (<< 20060617-3~), manpages-it (<< 2.80-4~), sun-java6-jdk (>> 0), sun-java5-jdk (>> 0), openjdk-6-jdk (<< 6b24-1.11-0ubuntu1~), apt-utils (<< 1.3~exp2~) -Recommends: gnupg | gnupg2 +Recommends: gnupg | gnupg2 | gnupg1 Suggests: aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), apt-doc, python-apt, powermgmt-base Description: commandline package manager This package provides commandline tools for searching and diff --git a/debian/rules b/debian/rules index b36db7cb8..f662944f5 100755 --- a/debian/rules +++ b/debian/rules @@ -13,6 +13,8 @@ export DEB_CFLAGS_MAINT_APPEND := -O2 # do not fail as we are just experimenting with symbol files for now export DPKG_GENSYMBOLS_CHECK_LEVEL=0 +export CTEST_OUTPUT_ON_FAILURE=1 + %: dh $@ --with systemd --parallel --buildsystem=cmake diff --git a/debian/tests/control b/debian/tests/control index 406679d37..b7555dc2e 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,4 +1,5 @@ Tests: run-tests Restrictions: allow-stderr -Depends: @, @builddeps@, fakeroot, wget, stunnel4, lsof, db-util, gnupg, gnupg2, +Depends: @, @builddeps@, fakeroot, wget, stunnel4, lsof, db-util, + gnupg, gnupg1, gpgv, gpgv1, libfile-fcntllock-perl, python3-apt diff --git a/doc/apt-cache.8.xml b/doc/apt-cache.8.xml index 4e2de26bc..b8c6aa989 100644 --- a/doc/apt-cache.8.xml +++ b/doc/apt-cache.8.xml @@ -14,7 +14,7 @@ &apt-email; &apt-product; <!-- The last update date --> - <date>2015-10-27T00:00:00Z</date> + <date>2016-08-16T00:00:00Z</date> </refentryinfo> <refmeta> @@ -350,6 +350,21 @@ Reverse Provides: Configuration Item: <literal>APT::Cache::Installed</literal>.</para></listitem> </varlistentry> + <varlistentry><term><option>--with-source</option> <option>&synopsis-param-filename;</option></term> + <listitem><para> + Adds the given file as a source for metadata. Can be repeated to add multiple files. + Supported are currently <literal>*.deb</literal>, <literal>*.dsc</literal>, + <literal>*.changes</literal>, <literal>Sources</literal> and + <literal>Packages</literal> files as well as source package directories. + Files are matched based on their name only, not their content!</para> + <para><literal>Sources</literal> and <literal>Packages</literal> can be compressed in any + format apt supports as long as they have the correct extension. If you need to store + multiple of these files in one directory you can prefix a name of your choice with the + last character being an underscore ("<literal>_</literal>"). Example: my.example_Packages.xz</para> + <para>Note that these sources are treated as trusted (see &apt-secure;). + Configuration Item: <literal>APT::Sources::With</literal>.</para></listitem> + </varlistentry> + &apt-commonoptions; </variablelist> diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index 20555b77e..4c34b298b 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -14,7 +14,7 @@ &apt-email; &apt-product; <!-- The last update date --> - <date>2016-08-06T00:00:00Z</date> + <date>2016-08-16T00:00:00Z</date> </refentryinfo> <refmeta> @@ -577,7 +577,13 @@ README.progress-reporting in the apt doc directory. Configuration Item: <literal>Dpkg::Progress</literal> and <literal>Dpkg::Progress-Fancy</literal>.</para></listitem> </varlistentry> - + + <varlistentry><term><option>--with-source</option> <option>&synopsis-param-filename;</option></term> + <listitem><para> + Adds the given file as a source for metadata. Can be repeated to add multiple files. + See <option>--with-source</option> description in &apt-cache; for further details. + </para></listitem> + </varlistentry> &apt-commonoptions; diff --git a/doc/apt-verbatim.ent b/doc/apt-verbatim.ent index 11622bbc8..2ffb4f54d 100644 --- a/doc/apt-verbatim.ent +++ b/doc/apt-verbatim.ent @@ -239,7 +239,7 @@ "> <!-- this will be updated by 'prepare-release' --> -<!ENTITY apt-product-version "1.3~rc1ubuntu1"> +<!ENTITY apt-product-version "1.3~rc2"> <!-- (Code)names for various things used all over the place --> <!ENTITY debian-oldstable-codename "wheezy"> diff --git a/doc/po/apt-doc.pot b/doc/po/apt-doc.pot index eab634042..fa084c504 100644 --- a/doc/po/apt-doc.pot +++ b/doc/po/apt-doc.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: apt-doc 1.3~rc1ubuntu1\n" +"Project-Id-Version: apt-doc 1.3~rc2\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 02:18+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\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" @@ -1414,6 +1414,14 @@ msgid "" "<literal>Dpkg::Progress-Fancy</literal>." msgstr "" +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:1 +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. See <option>--with-source</option> description in " +"&apt-cache; for further details." +msgstr "" + #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml:1 apt-cache.8.xml:1 apt-key.8.xml:1 apt-mark.8.xml:1 #: apt.conf.5.xml:1 apt_preferences.5.xml:1 @@ -1862,6 +1870,34 @@ msgid "" "Configuration Item: <literal>APT::Cache::Installed</literal>." msgstr "" +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:1 +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. Supported are currently <literal>*.deb</literal>, " +"<literal>*.dsc</literal>, <literal>*.changes</literal>, " +"<literal>Sources</literal> and <literal>Packages</literal> files as well as " +"source package directories. Files are matched based on their name only, not " +"their content!" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:1 +msgid "" +"<literal>Sources</literal> and <literal>Packages</literal> can be compressed " +"in any format apt supports as long as they have the correct extension. If " +"you need to store multiple of these files in one directory you can prefix a " +"name of your choice with the last character being an underscore " +"(\"<literal>_</literal>\"). Example: my.example_Packages.xz" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:1 +msgid "" +"Note that these sources are treated as trusted (see &apt-secure;). " +"Configuration Item: <literal>APT::Sources::With</literal>." +msgstr "" + #. type: Content of: <refentry><refsect1><para> #: apt-cache.8.xml:1 msgid "&apt-conf;, &sources-list;, &apt-get;" diff --git a/doc/po/de.po b/doc/po/de.po index e4b15a43d..3284f8199 100644 --- a/doc/po/de.po +++ b/doc/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.8\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 02:18+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2014-09-14 14:46+0200\n" "Last-Translator: Chris Leick <c.leick@vollbio.de>\n" "Language-Team: German <debian-l10n-german@lists.debian.org>\n" @@ -1982,6 +1982,14 @@ msgstr "" "Konfigurationselemente: <literal>Dpkg::Progress</literal> und <literal>Dpkg::" "Progress-Fancy</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. See <option>--with-source</option> description in &apt-" +"cache; for further details." +msgstr "" + #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml #: apt_preferences.5.xml @@ -2654,6 +2662,39 @@ msgstr "" "literal> auf Pakete, die aktuell installiert sind. Konfigurationselement: " "<literal>APT::Cache::Installed</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. Supported are currently <literal>*.deb</literal>, " +"<literal>*.dsc</literal>, <literal>*.changes</literal>, <literal>Sources</" +"literal> and <literal>Packages</literal> files as well as source package " +"directories. Files are matched based on their name only, not their content!" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"<literal>Sources</literal> and <literal>Packages</literal> can be compressed " +"in any format apt supports as long as they have the correct extension. If " +"you need to store multiple of these files in one directory you can prefix a " +"name of your choice with the last character being an underscore " +"(\"<literal>_</literal>\"). Example: my.example_Packages.xz" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +#, fuzzy +#| msgid "" +#| "Use source index field ordering. Configuration Item: <literal>APT::" +#| "SortPkgs::Source</literal>." +msgid "" +"Note that these sources are treated as trusted (see &apt-secure;). " +"Configuration Item: <literal>APT::Sources::With</literal>." +msgstr "" +"Quellindexfeldanordnung benutzen. Konfigurationselement: <literal>APT::" +"SortPkgs::Source</literal>." + #. type: Content of: <refentry><refsect1><para> #: apt-cache.8.xml msgid "&apt-conf;, &sources-list;, &apt-get;" diff --git a/doc/po/es.po b/doc/po/es.po index fd5e1edf2..0c1b02e27 100644 --- a/doc/po/es.po +++ b/doc/po/es.po @@ -38,7 +38,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 02:18+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2014-07-04 01:31+0200\n" "Last-Translator: Omar Campagne <ocampagne@gmail.com>\n" "Language-Team: Debian l10n Spanish <debian-l10n-spanish@lists.debian.org>\n" @@ -2055,6 +2055,14 @@ msgid "" "literal>." msgstr "" +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. See <option>--with-source</option> description in &apt-" +"cache; for further details." +msgstr "" + #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml #: apt_preferences.5.xml @@ -2727,6 +2735,39 @@ msgstr "" "a paquetes actualmente instalados. Opción de configuración: <literal>APT::" "Cache::Installed</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. Supported are currently <literal>*.deb</literal>, " +"<literal>*.dsc</literal>, <literal>*.changes</literal>, <literal>Sources</" +"literal> and <literal>Packages</literal> files as well as source package " +"directories. Files are matched based on their name only, not their content!" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"<literal>Sources</literal> and <literal>Packages</literal> can be compressed " +"in any format apt supports as long as they have the correct extension. If " +"you need to store multiple of these files in one directory you can prefix a " +"name of your choice with the last character being an underscore " +"(\"<literal>_</literal>\"). Example: my.example_Packages.xz" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +#, fuzzy +#| msgid "" +#| "Use source index field ordering. Configuration Item: <literal>APT::" +#| "SortPkgs::Source</literal>." +msgid "" +"Note that these sources are treated as trusted (see &apt-secure;). " +"Configuration Item: <literal>APT::Sources::With</literal>." +msgstr "" +"Utililza el orden por el campo de índice de fuentes. Opción de " +"configuración: <literal>APT::SortPkgs::Source</literal>." + #. type: Content of: <refentry><refsect1><para> #: apt-cache.8.xml msgid "&apt-conf;, &sources-list;, &apt-get;" diff --git a/doc/po/fr.po b/doc/po/fr.po index 0a7e69323..f53d1a73a 100644 --- a/doc/po/fr.po +++ b/doc/po/fr.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 02:18+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2014-11-15 17:26+0100\n" "Last-Translator: Jean-Pierre Giraud <jean-pierregiraud@neuf.fr>\n" "Language-Team: French <debian-l10n-french@lists.debian.org>\n" @@ -1977,6 +1977,14 @@ msgstr "" "configuration : <literal>Dpkg::Progress</literal> et <literal>Dpkg::Progress-" "Fancy</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. See <option>--with-source</option> description in &apt-" +"cache; for further details." +msgstr "" + #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml #: apt_preferences.5.xml @@ -2653,6 +2661,39 @@ msgstr "" "<literal>rdepends</literal> aux paquets qui sont actuellement installés. " "Élément de configuration : <literal>APT::Cache::Installed</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. Supported are currently <literal>*.deb</literal>, " +"<literal>*.dsc</literal>, <literal>*.changes</literal>, <literal>Sources</" +"literal> and <literal>Packages</literal> files as well as source package " +"directories. Files are matched based on their name only, not their content!" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"<literal>Sources</literal> and <literal>Packages</literal> can be compressed " +"in any format apt supports as long as they have the correct extension. If " +"you need to store multiple of these files in one directory you can prefix a " +"name of your choice with the last character being an underscore " +"(\"<literal>_</literal>\"). Example: my.example_Packages.xz" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +#, fuzzy +#| msgid "" +#| "Use source index field ordering. Configuration Item: <literal>APT::" +#| "SortPkgs::Source</literal>." +msgid "" +"Note that these sources are treated as trusted (see &apt-secure;). " +"Configuration Item: <literal>APT::Sources::With</literal>." +msgstr "" +"Utiliser un index de sources pour le tri des champs. Élément de " +"configuration : <literal>APT::SortPkgs::Source</literal>." + #. type: Content of: <refentry><refsect1><para> #: apt-cache.8.xml msgid "&apt-conf;, &sources-list;, &apt-get;" diff --git a/doc/po/it.po b/doc/po/it.po index ce6badd69..7cdca80a4 100644 --- a/doc/po/it.po +++ b/doc/po/it.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 02:18+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2015-12-27 21:26+0200\n" "Last-Translator: Beatrice Torracca <beatricet@libero.it>\n" "Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n" @@ -2039,6 +2039,14 @@ msgstr "" "configurazione: <literal>Dpkg::Progress</literal> e <literal>Dpkg::Progress-" "Fancy</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. See <option>--with-source</option> description in &apt-" +"cache; for further details." +msgstr "" + #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml #: apt_preferences.5.xml @@ -2682,6 +2690,39 @@ msgstr "" "ai pacchetti attualmente installati. Voce di configurazione: <literal>APT::" "Cache::Installed</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. Supported are currently <literal>*.deb</literal>, " +"<literal>*.dsc</literal>, <literal>*.changes</literal>, <literal>Sources</" +"literal> and <literal>Packages</literal> files as well as source package " +"directories. Files are matched based on their name only, not their content!" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"<literal>Sources</literal> and <literal>Packages</literal> can be compressed " +"in any format apt supports as long as they have the correct extension. If " +"you need to store multiple of these files in one directory you can prefix a " +"name of your choice with the last character being an underscore " +"(\"<literal>_</literal>\"). Example: my.example_Packages.xz" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +#, fuzzy +#| msgid "" +#| "Use source index field ordering. Configuration Item: <literal>APT::" +#| "SortPkgs::Source</literal>." +msgid "" +"Note that these sources are treated as trusted (see &apt-secure;). " +"Configuration Item: <literal>APT::Sources::With</literal>." +msgstr "" +"Usa l'ordinamento dei campi dell'indice dei sorgenti. Voce di " +"configurazione: <literal>APT::SortPkgs::Source</literal>." + #. type: Content of: <refentry><refsect1><para> #: apt-cache.8.xml msgid "&apt-conf;, &sources-list;, &apt-get;" diff --git a/doc/po/ja.po b/doc/po/ja.po index 732c0f49d..0a8e54720 100644 --- a/doc/po/ja.po +++ b/doc/po/ja.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.6\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 02:18+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2016-03-23 09:39+0900\n" "Last-Translator: Takuma Yamada <tyamada@takumayamada.com>\n" "Language-Team: Japanese <debian-japanese@lists.debian.org>\n" @@ -1973,6 +1973,14 @@ msgstr "" "reporting を見てください。設定項目: <literal>Dpkg::Progress</literal>、 " "<literal>Dpkg::Progress-Fancy</literal>" +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. See <option>--with-source</option> description in &apt-" +"cache; for further details." +msgstr "" + #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml #: apt_preferences.5.xml @@ -2585,6 +2593,39 @@ msgstr "" "ストールされているパッケージに限定します。設定項目: <literal>APT::Cache::" "Installed</literal>" +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. Supported are currently <literal>*.deb</literal>, " +"<literal>*.dsc</literal>, <literal>*.changes</literal>, <literal>Sources</" +"literal> and <literal>Packages</literal> files as well as source package " +"directories. Files are matched based on their name only, not their content!" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"<literal>Sources</literal> and <literal>Packages</literal> can be compressed " +"in any format apt supports as long as they have the correct extension. If " +"you need to store multiple of these files in one directory you can prefix a " +"name of your choice with the last character being an underscore " +"(\"<literal>_</literal>\"). Example: my.example_Packages.xz" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +#, fuzzy +#| msgid "" +#| "Use source index field ordering. Configuration Item: <literal>APT::" +#| "SortPkgs::Source</literal>." +msgid "" +"Note that these sources are treated as trusted (see &apt-secure;). " +"Configuration Item: <literal>APT::Sources::With</literal>." +msgstr "" +"ソースインデックスフィールド順に並べ替えに使用します。設定項目: " +"<literal>APT::SortPkgs::Source</literal>" + #. type: Content of: <refentry><refsect1><para> #: apt-cache.8.xml msgid "&apt-conf;, &sources-list;, &apt-get;" diff --git a/doc/po/nl.po b/doc/po/nl.po index 72db264f0..23ee68f2b 100644 --- a/doc/po/nl.po +++ b/doc/po/nl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.1.10-nl\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 02:18+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2016-02-01 16:17+0100\n" "Last-Translator: Frans Spiesschaert <Frans.Spiesschaert@yucom.be>\n" "Language-Team: Debian Dutch l10n Team <debian-l10n-dutch@lists.debian.org>\n" @@ -2072,6 +2072,14 @@ msgstr "" "u README.progress-reporting raadplegen in apt's doc-map. Configuratie-item: " "<literal>Dpkg::Progress</literal> en <literal>Dpkg::Progress-Fancy</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. See <option>--with-source</option> description in &apt-" +"cache; for further details." +msgstr "" + #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml #: apt_preferences.5.xml @@ -2723,6 +2731,39 @@ msgstr "" "beperken tot pakketten die momenteel geïnstalleerd zijn. Configuratie-item: " "<literal>APT::Cache::Installed</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. Supported are currently <literal>*.deb</literal>, " +"<literal>*.dsc</literal>, <literal>*.changes</literal>, <literal>Sources</" +"literal> and <literal>Packages</literal> files as well as source package " +"directories. Files are matched based on their name only, not their content!" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"<literal>Sources</literal> and <literal>Packages</literal> can be compressed " +"in any format apt supports as long as they have the correct extension. If " +"you need to store multiple of these files in one directory you can prefix a " +"name of your choice with the last character being an underscore " +"(\"<literal>_</literal>\"). Example: my.example_Packages.xz" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +#, fuzzy +#| msgid "" +#| "Use source index field ordering. Configuration Item: <literal>APT::" +#| "SortPkgs::Source</literal>." +msgid "" +"Note that these sources are treated as trusted (see &apt-secure;). " +"Configuration Item: <literal>APT::Sources::With</literal>." +msgstr "" +"Veldordening gebruiken bij een broncode-index. Configuratie-item: " +"<literal>APT::SortPkgs::Source</literal>." + #. type: Content of: <refentry><refsect1><para> #: apt-cache.8.xml msgid "&apt-conf;, &sources-list;, &apt-get;" diff --git a/doc/po/pl.po b/doc/po/pl.po index 30826bb39..a5f1c3f3b 100644 --- a/doc/po/pl.po +++ b/doc/po/pl.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 02:18+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2014-07-04 02:13+0200\n" "Last-Translator: Robert Luberda <robert@debian.org>\n" "Language-Team: Polish <manpages-pl-list@lists.sourceforge.net>\n" @@ -2053,6 +2053,14 @@ msgid "" "literal>." msgstr "" +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. See <option>--with-source</option> description in &apt-" +"cache; for further details." +msgstr "" + #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml #: apt_preferences.5.xml @@ -2759,6 +2767,40 @@ msgstr "" "literal> tylko do pakietów, które są obecnie zainstalowane. Pozycja w pliku " "konfiguracyjnym: <literal>APT::Cache::Installed</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. Supported are currently <literal>*.deb</literal>, " +"<literal>*.dsc</literal>, <literal>*.changes</literal>, <literal>Sources</" +"literal> and <literal>Packages</literal> files as well as source package " +"directories. Files are matched based on their name only, not their content!" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"<literal>Sources</literal> and <literal>Packages</literal> can be compressed " +"in any format apt supports as long as they have the correct extension. If " +"you need to store multiple of these files in one directory you can prefix a " +"name of your choice with the last character being an underscore " +"(\"<literal>_</literal>\"). Example: my.example_Packages.xz" +msgstr "" + +# +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +#, fuzzy +#| msgid "" +#| "Use source index field ordering. Configuration Item: <literal>APT::" +#| "SortPkgs::Source</literal>." +msgid "" +"Note that these sources are treated as trusted (see &apt-secure;). " +"Configuration Item: <literal>APT::Sources::With</literal>." +msgstr "" +"Używa kolejności pól indeksu pliku Source. Pozycja w pliku konfiguracji: " +"<literal>APT::SortPkgs::Source</literal>." + # #. type: Content of: <refentry><refsect1><para> #: apt-cache.8.xml diff --git a/doc/po/pt.po b/doc/po/pt.po index b85863b17..35a004286 100644 --- a/doc/po/pt.po +++ b/doc/po/pt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.7\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 02:18+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2014-08-29 00:34+0100\n" "Last-Translator: Américo Monteiro <a_monteiro@gmx.com>\n" "Language-Team: Portuguese <traduz@debianpt.org>\n" @@ -1999,6 +1999,14 @@ msgstr "" "reporting no directório doc do apt. Item de Configuração: <literal>Dpkg::" "Progress</literal> e <literal>Dpkg::Progress-Fancy</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. See <option>--with-source</option> description in &apt-" +"cache; for further details." +msgstr "" + #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml #: apt_preferences.5.xml @@ -2665,6 +2673,39 @@ msgstr "" "aos pacotes que estão actualmente instalados. Item de Configuração: " "<literal>APT::Cache::Installed</literal>." +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. Supported are currently <literal>*.deb</literal>, " +"<literal>*.dsc</literal>, <literal>*.changes</literal>, <literal>Sources</" +"literal> and <literal>Packages</literal> files as well as source package " +"directories. Files are matched based on their name only, not their content!" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"<literal>Sources</literal> and <literal>Packages</literal> can be compressed " +"in any format apt supports as long as they have the correct extension. If " +"you need to store multiple of these files in one directory you can prefix a " +"name of your choice with the last character being an underscore " +"(\"<literal>_</literal>\"). Example: my.example_Packages.xz" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +#, fuzzy +#| msgid "" +#| "Use source index field ordering. Configuration Item: <literal>APT::" +#| "SortPkgs::Source</literal>." +msgid "" +"Note that these sources are treated as trusted (see &apt-secure;). " +"Configuration Item: <literal>APT::Sources::With</literal>." +msgstr "" +"Usa ordenação de campo de índice Source. Item de Configuração: <literal>APT::" +"SortPkgs::Source</literal>." + #. type: Content of: <refentry><refsect1><para> #: apt-cache.8.xml msgid "&apt-conf;, &sources-list;, &apt-get;" diff --git a/doc/po/pt_BR.po b/doc/po/pt_BR.po index ee7547557..9d3ea426b 100644 --- a/doc/po/pt_BR.po +++ b/doc/po/pt_BR.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 02:18+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2004-09-20 17:02+0000\n" "Last-Translator: André Luís Lopes <andrelop@debian.org>\n" "Language-Team: <debian-l10n-portuguese@lists.debian.org>\n" @@ -1392,6 +1392,14 @@ msgid "" "literal>." msgstr "" +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. See <option>--with-source</option> description in &apt-" +"cache; for further details." +msgstr "" + #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml apt-cache.8.xml apt-key.8.xml apt-mark.8.xml apt.conf.5.xml #: apt_preferences.5.xml @@ -1841,6 +1849,33 @@ msgid "" "<literal>APT::Cache::Installed</literal>." msgstr "" +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"Adds the given file as a source for metadata. Can be repeated to add " +"multiple files. Supported are currently <literal>*.deb</literal>, " +"<literal>*.dsc</literal>, <literal>*.changes</literal>, <literal>Sources</" +"literal> and <literal>Packages</literal> files as well as source package " +"directories. Files are matched based on their name only, not their content!" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"<literal>Sources</literal> and <literal>Packages</literal> can be compressed " +"in any format apt supports as long as they have the correct extension. If " +"you need to store multiple of these files in one directory you can prefix a " +"name of your choice with the last character being an underscore " +"(\"<literal>_</literal>\"). Example: my.example_Packages.xz" +msgstr "" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml +msgid "" +"Note that these sources are treated as trusted (see &apt-secure;). " +"Configuration Item: <literal>APT::Sources::With</literal>." +msgstr "" + #. type: Content of: <refentry><refsect1><para> #: apt-cache.8.xml msgid "&apt-conf;, &sources-list;, &apt-get;" diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index c34a04d1a..018cf0052 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -992,6 +992,7 @@ ReleaseWriter::ReleaseWriter(FileFd * const GivenOutput, string const &/*DB*/) : AddPattern("Release"); AddPattern("Contents-*"); AddPattern("Index"); + AddPattern("Index.*"); AddPattern("icons-*.tar"); AddPattern("icons-*.tar.*"); AddPattern("Components-*.yml"); diff --git a/methods/aptmethod.h b/methods/aptmethod.h index 38f451708..04c4fa99b 100644 --- a/methods/aptmethod.h +++ b/methods/aptmethod.h @@ -86,10 +86,10 @@ public: } std::string ConfigFind(char const * const postfix, std::string const &defValue) const APT_NONNULL(2) { - for (auto && name: methodNames) + for (auto name = methodNames.rbegin(); name != methodNames.rend(); ++name) { std::string conf; - strprintf(conf, "Acquire::%s::%s", name.c_str(), postfix); + strprintf(conf, "Acquire::%s::%s", name->c_str(), postfix); auto const value = _config->Find(conf); if (value.empty() == false) return value; diff --git a/methods/http.cc b/methods/http.cc index 0358b50cd..11136bb9a 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -647,6 +647,13 @@ bool HttpServerState::InitHashes(HashStringList const &ExpectedHashes) /*{{{*/ return true; } /*}}}*/ +void HttpServerState::Reset(bool const Everything) /*{{{*/ +{ + ServerState::Reset(Everything); + if (Everything) + ServerFd = -1; +} + /*}}}*/ APT_PURE Hashes * HttpServerState::GetHashes() /*{{{*/ { @@ -899,7 +906,7 @@ void HttpMethod::SendReq(FetchItem *Itm) // Check for a partial file and send if-queries accordingly struct stat SBuf; - if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0) + if (Server->RangesAllowed && stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0) Req << "Range: bytes=" << std::to_string(SBuf.st_size) << "-\r\n" << "If-Range: " << TimeRFC1123(SBuf.st_mtime, false) << "\r\n"; else if (Itm->LastModified != 0) diff --git a/methods/http.h b/methods/http.h index 644e576f0..b7341f5f8 100644 --- a/methods/http.h +++ b/methods/http.h @@ -103,7 +103,7 @@ struct HttpServerState: public ServerState virtual bool WriteResponse(std::string const &Data) APT_OVERRIDE; public: - virtual void Reset() APT_OVERRIDE { ServerState::Reset(); ServerFd = -1; }; + virtual void Reset(bool const Everything = true) APT_OVERRIDE; virtual bool RunData(FileFd * const File) APT_OVERRIDE; virtual bool RunDataToDevNull() APT_OVERRIDE; diff --git a/methods/https.cc b/methods/https.cc index 283126f6b..b2d05136c 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -382,8 +382,15 @@ bool HttpsMethod::Fetch(FetchItem *Itm) headers = curl_slist_append(headers, "Accept: text/*"); } + // go for it - if the file exists, append on it + File = new FileFd(Itm->DestFile, FileFd::WriteAny); + if (Server == nullptr || Server->Comp(Itm->Uri) == false) + Server = CreateServerState(Itm->Uri); + else + Server->Reset(false); + // if we have the file send an if-range query with a range header - if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0) + if (Server->RangesAllowed && stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0) { std::string Buf; strprintf(Buf, "Range: bytes=%lli-", (long long) SBuf.st_size); @@ -397,9 +404,6 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_TIMEVALUE, Itm->LastModified); } - // go for it - if the file exists, append on it - File = new FileFd(Itm->DestFile, FileFd::WriteAny); - Server = CreateServerState(Itm->Uri); if (Server->InitHashes(Itm->ExpectedHashes) == false) return false; diff --git a/methods/server.cc b/methods/server.cc index 0888617b1..af7276bad 100644 --- a/methods/server.cc +++ b/methods/server.cc @@ -46,20 +46,9 @@ time_t ServerMethod::FailTime = 0; ServerState::RunHeadersResult ServerState::RunHeaders(FileFd * const File, const std::string &Uri) { - State = Header; - + Reset(false); Owner->Status(_("Waiting for headers")); - Major = 0; - Minor = 0; - Result = 0; - TotalFileSize = 0; - JunkSize = 0; - StartPos = 0; - Encoding = Closes; - HaveContent = false; - time(&Date); - do { string Data; @@ -101,25 +90,7 @@ bool ServerState::HeaderLine(string Line) if (Line.empty() == true) return true; - string::size_type Pos = Line.find(' '); - if (Pos == string::npos || Pos+1 > Line.length()) - { - // Blah, some servers use "connection:closes", evil. - Pos = Line.find(':'); - if (Pos == string::npos || Pos + 2 > Line.length()) - return _error->Error(_("Bad header line")); - Pos++; - } - - // Parse off any trailing spaces between the : and the next word. - string::size_type Pos2 = Pos; - while (Pos2 < Line.length() && isspace_ascii(Line[Pos2]) != 0) - Pos2++; - - string Tag = string(Line,0,Pos); - string Val = string(Line,Pos2); - - if (stringcasecmp(Tag.c_str(),Tag.c_str()+4,"HTTP") == 0) + if (Line.size() > 4 && stringcasecmp(Line.data(), Line.data()+4, "HTTP") == 0) { // Evil servers return no version if (Line[4] == '/') @@ -163,6 +134,21 @@ bool ServerState::HeaderLine(string Line) return true; } + // Blah, some servers use "connection:closes", evil. + // and some even send empty header fields… + string::size_type Pos = Line.find(':'); + if (Pos == string::npos) + return _error->Error(_("Bad header line")); + ++Pos; + + // Parse off any trailing spaces between the : and the next word. + string::size_type Pos2 = Pos; + while (Pos2 < Line.length() && isspace_ascii(Line[Pos2]) != 0) + Pos2++; + + string const Tag(Line,0,Pos); + string const Val(Line,Pos2); + if (stringcasecmp(Tag,"Content-Length:") == 0) { if (Encoding == Closes) @@ -222,8 +208,16 @@ bool ServerState::HeaderLine(string Line) if (stringcasecmp(Tag,"Connection:") == 0) { if (stringcasecmp(Val,"close") == 0) + { Persistent = false; - if (stringcasecmp(Val,"keep-alive") == 0) + Pipeline = false; + /* Some servers send error pages (as they are dynamically generated) + for simplicity via a connection close instead of e.g. chunked, + so assuming an always closing server only if we get a file + close */ + if (Result >= 200 && Result < 300) + PipelineAllowed = false; + } + else if (stringcasecmp(Val,"keep-alive") == 0) Persistent = true; return true; } @@ -241,6 +235,15 @@ bool ServerState::HeaderLine(string Line) return true; } + if (stringcasecmp(Tag, "Accept-Ranges:") == 0) + { + std::string ranges = ',' + Val + ','; + ranges.erase(std::remove(ranges.begin(), ranges.end(), ' '), ranges.end()); + if (ranges.find(",bytes,") == std::string::npos) + RangesAllowed = false; + return true; + } + return true; } /*}}}*/ @@ -257,6 +260,19 @@ bool ServerState::AddPartialFileToHashes(FileFd &File) /*{{{*/ return GetHashes()->AddFD(File, StartPos); } /*}}}*/ +void ServerState::Reset(bool const Everything) /*{{{*/ +{ + Major = 0; Minor = 0; Result = 0; Code[0] = '\0'; + TotalFileSize = 0; JunkSize = 0; StartPos = 0; + Encoding = Closes; time(&Date); HaveContent = false; + State = Header; MaximumSize = 0; + if (Everything) + { + Persistent = false; Pipeline = false; PipelineAllowed = true; + RangesAllowed = true; + } +} + /*}}}*/ // ServerMethod::DealWithHeaders - Handle the retrieved header data /*{{{*/ // --------------------------------------------------------------------- diff --git a/methods/server.h b/methods/server.h index 1d114354f..c3adba87a 100644 --- a/methods/server.h +++ b/methods/server.h @@ -51,6 +51,7 @@ struct ServerState enum {Header, Data} State; bool Persistent; bool PipelineAllowed; + bool RangesAllowed; std::string Location; // This is a Persistent attribute of the server itself. @@ -84,9 +85,7 @@ struct ServerState bool AddPartialFileToHashes(FileFd &File); bool Comp(URI Other) const {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;}; - virtual void Reset() {Major = 0; Minor = 0; Result = 0; Code[0] = '\0'; TotalFileSize = 0; JunkSize = 0; - StartPos = 0; Encoding = Closes; time(&Date); HaveContent = false; - State = Header; Persistent = false; Pipeline = false; MaximumSize = 0; PipelineAllowed = true;}; + virtual void Reset(bool const Everything = true); virtual bool WriteResponse(std::string const &Data) = 0; /** \brief Transfer the data from the socket */ diff --git a/po/apt-all.pot b/po/apt-all.pot index 6c1ace15f..3246191cf 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: apt 1.3~rc1ubuntu1\n" +"Project-Id-Version: apt 1.3~rc2\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-12 01:40+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\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" @@ -3511,11 +3511,11 @@ msgid "Waiting for headers" msgstr "" #: methods/server.cc -msgid "Bad header line" +msgid "The HTTP server sent an invalid reply header" msgstr "" #: methods/server.cc -msgid "The HTTP server sent an invalid reply header" +msgid "Bad header line" msgstr "" #: methods/server.cc @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2006-10-20 21:28+0300\n" "Last-Translator: Ossama M. Khayat <okhayat@yahoo.com>\n" "Language-Team: Arabic <support@arabeyes.org>\n" @@ -3573,14 +3573,14 @@ msgid "Waiting for headers" msgstr "بانتظار الترويسات" #: methods/server.cc -msgid "Bad header line" -msgstr "سطر ترويسة سيء" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "أرسل خادم http ترويسة ردّ غير صالحة" #: methods/server.cc +msgid "Bad header line" +msgstr "سطر ترويسة سيء" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "أرسل خادم http ترويسة طول محتويات (ِContent-Length) غير صالحة" @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.7.18\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2010-10-02 23:35+0100\n" "Last-Translator: Iñigo Varela <ivarela@softastur.org>\n" "Language-Team: Asturian (ast)\n" @@ -3739,14 +3739,14 @@ msgid "Waiting for headers" msgstr "Esperando les testeres" #: methods/server.cc -msgid "Bad header line" -msgstr "Fallu na llinia testera" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "El sirvidor HTTP mandó una testera incorreuta de rempuesta" #: methods/server.cc +msgid "Bad header line" +msgstr "Fallu na llinia testera" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "El sirvidor HTTP mandó una testera incorreuta de Content-Length" @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.7.21\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2012-06-25 17:23+0300\n" "Last-Translator: Damyan Ivanov <dmn@debian.org>\n" "Language-Team: Bulgarian <dict@fsa-bg.org>\n" @@ -3788,14 +3788,14 @@ msgid "Waiting for headers" msgstr "Чакане на заглавни части" #: methods/server.cc -msgid "Bad header line" -msgstr "Невалиден ред на заглавна част" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP сървърът изпрати невалидна заглавна част като отговор" #: methods/server.cc +msgid "Bad header line" +msgstr "Невалиден ред на заглавна част" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP сървърът изпрати невалидна заглавна част „Content-Length“" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.5.26\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2004-05-06 15:25+0100\n" "Last-Translator: Safir Šećerović <sapphire@linux.org.ba>\n" "Language-Team: Bosnian <lokal@lugbih.org>\n" @@ -3556,11 +3556,11 @@ msgid "Waiting for headers" msgstr "Čekam na zaglavlja" #: methods/server.cc -msgid "Bad header line" +msgid "The HTTP server sent an invalid reply header" msgstr "" #: methods/server.cc -msgid "The HTTP server sent an invalid reply header" +msgid "Bad header line" msgstr "" #: methods/server.cc @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.9.7.6\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2012-10-19 13:30+0200\n" "Last-Translator: Jordi Mallach <jordi@debian.org>\n" "Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n" @@ -3788,14 +3788,14 @@ msgid "Waiting for headers" msgstr "S'estan esperant les capçaleres" #: methods/server.cc -msgid "Bad header line" -msgstr "Línia de capçalera incorrecta" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "El servidor HTTP ha enviat una capçalera de resposta no vàlida" #: methods/server.cc +msgid "Bad header line" +msgstr "Línia de capçalera incorrecta" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "El servidor HTTP ha enviat una capçalera de Content-Length no vàlida" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2015-08-29 15:24+0200\n" "Last-Translator: Miroslav Kure <kurem@debian.cz>\n" "Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n" @@ -3741,14 +3741,14 @@ msgid "Waiting for headers" msgstr "Čeká se na hlavičky" #: methods/server.cc -msgid "Bad header line" -msgstr "Chybná hlavička" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Http server poslal neplatnou hlavičku odpovědi" #: methods/server.cc +msgid "Bad header line" +msgstr "Chybná hlavička" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Http server poslal neplatnou hlavičku Content-Length" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2005-06-06 13:46+0100\n" "Last-Translator: Dafydd Harries <daf@muse.19inch.net>\n" "Language-Team: Welsh <cy@pengwyn.linux.org.uk>\n" @@ -3764,15 +3764,15 @@ msgid "Waiting for headers" msgstr "Yn aros am benawdau" #: methods/server.cc -msgid "Bad header line" -msgstr "Llinell pennawd gwael" - -#: methods/server.cc #, fuzzy msgid "The HTTP server sent an invalid reply header" msgstr "Danfonodd y gweinydd HTTP bennawd ateb annilys" #: methods/server.cc +msgid "Bad header line" +msgstr "Llinell pennawd gwael" + +#: methods/server.cc #, fuzzy msgid "The HTTP server sent an invalid Content-Length header" msgstr "Danfonodd y gweinydd HTTP bennawd Content-Length annilys" @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2014-07-06 23:51+0200\n" "Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n" "Language-Team: Danish <debian-l10n-danish@lists.debian.org>\n" @@ -3757,14 +3757,14 @@ msgid "Waiting for headers" msgstr "Afventer hoveder" #: methods/server.cc -msgid "Bad header line" -msgstr "Ugyldig linje i hovedet" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Http-serveren sendte et ugyldigt svarhovede" #: methods/server.cc +msgid "Bad header line" +msgstr "Ugyldig linje i hovedet" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Http-serveren sendte et ugyldigt Content-Length-hovede" @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.8\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2014-09-19 13:04+0100\n" "Last-Translator: Holger Wansing <linux@wansing-online.de>\n" "Language-Team: Debian German <debian-l10n-german@lists.debian.org>\n" @@ -3866,14 +3866,14 @@ msgid "Waiting for headers" msgstr "Warten auf Kopfzeilen" #: methods/server.cc -msgid "Bad header line" -msgstr "Ungültige Kopfzeile" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Vom HTTP-Server wurde eine ungültige Antwort-Kopfzeile gesandt." #: methods/server.cc +msgid "Bad header line" +msgstr "Ungültige Kopfzeile" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "" "Vom HTTP-Server wurde eine ungültige »Content-Length«-Kopfzeile gesandt." @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2006-09-19 09:49+0530\n" "Last-Translator: Kinley Tshering <gasepkuenden2k3@hotmail.com>\n" "Language-Team: Dzongkha <pgeyleg@dit.gov.bt>\n" @@ -3712,14 +3712,14 @@ msgid "Waiting for headers" msgstr "མགོ་ཡིག་ཚུ་གི་དོན་ལུ་བསྒ྄ག་དོ།" #: methods/server.cc -msgid "Bad header line" -msgstr "མགོ་ཡིག་གི་གྲལ་ཐིག་བྱང་ཉེས།" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "ཨེཆི་ཊི་ཊི་པི་ སར་བར་འདི་གིས་ནུས་མེད་ལན་གསལ་གི་མགོ་ཡིག་ཅིག་བཏང་ཡོད།" #: methods/server.cc +msgid "Bad header line" +msgstr "མགོ་ཡིག་གི་གྲལ་ཐིག་བྱང་ཉེས།" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "ཨེཆི་ཊི་ཊི་པི་སར་བར་འདི་གིས་ནུས་མེད་ནང་དོན་རིང་-ཚད་ཀྱི་མགོ་ཡིག་ཅིག་བཏང་ཡོད།" @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2008-08-26 18:25+0300\n" "Last-Translator: Θανάσης Νάτσης <natsisthanasis@gmail.com>\n" "Language-Team: Greek <debian-l10n-greek@lists.debian.org>\n" @@ -3741,14 +3741,14 @@ msgid "Waiting for headers" msgstr "Αναμονή επικεφαλίδων" #: methods/server.cc -msgid "Bad header line" -msgstr "Ελαττωματική γραμμή επικεφαλίδας" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Ο διακομιστής http έστειλε μια άκυρη επικεφαλίδα απάντησης" #: methods/server.cc +msgid "Bad header line" +msgstr "Ελαττωματική γραμμή επικεφαλίδας" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Ο διακομιστής http έστειλε μια άκυρη επικεφαλίδα Content-Length" @@ -34,7 +34,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.8.10\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2016-01-26 01:51+0100\n" "Last-Translator: Manuel \"Venturi\" Porras Peralta <venturi@openmailbox." "org>\n" @@ -3922,14 +3922,14 @@ msgid "Waiting for headers" msgstr "Esperando las cabeceras" #: methods/server.cc -msgid "Bad header line" -msgstr "Línea de cabecera incorrecta" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "El servidor de http envió una cabecera de respuesta inválida" #: methods/server.cc +msgid "Bad header line" +msgstr "Línea de cabecera incorrecta" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "El servidor de http envió una cabecera de «Content-Length» inválida" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2009-05-17 00:41+0200\n" "Last-Translator: Piarres Beobide <pi@beobide.net>\n" "Language-Team: Euskara <debian-l10n-basque@lists.debian.org>\n" @@ -3708,14 +3708,14 @@ msgid "Waiting for headers" msgstr "Goiburuen zain" #: methods/server.cc -msgid "Bad header line" -msgstr "Okerreko goiburu-lerroa" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "http zerbitzariak erantzun goiburu baliogabe bat bidali du." #: methods/server.cc +msgid "Bad header line" +msgstr "Okerreko goiburu-lerroa" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "http zerbitzariak Content-Length buru baliogabe bat bidali du" @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.5.26\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2008-12-11 14:52+0200\n" "Last-Translator: Tapio Lehtonen <tale@debian.org>\n" "Language-Team: Finnish <debian-l10n-finnish@lists.debian.org>\n" @@ -3700,14 +3700,14 @@ msgid "Waiting for headers" msgstr "Odotetaan otsikoita" #: methods/server.cc -msgid "Bad header line" -msgstr "Virheellinen otsikkorivi" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP-palvelin lähetti virheellisen vastausotsikon" #: methods/server.cc +msgid "Bad header line" +msgstr "Virheellinen otsikkorivi" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP-palvelin lähetti virheellisen Content-Length-otsikon" @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2013-12-15 16:45+0100\n" "Last-Translator: Julien Patriarca <leatherface@debian.org>\n" "Language-Team: French <debian-l10n-french@lists.debian.org>\n" @@ -3854,14 +3854,14 @@ msgid "Waiting for headers" msgstr "Attente des fichiers d'en-tête" #: methods/server.cc -msgid "Bad header line" -msgstr "Mauvaise ligne d'en-tête" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Le serveur http a envoyé une réponse dont l'en-tête est invalide" #: methods/server.cc +msgid "Bad header line" +msgstr "Mauvaise ligne d'en-tête" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Le serveur http a envoyé un en-tête « Content-Length » invalide" @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2011-05-12 15:28+0100\n" "Last-Translator: Miguel Anxo Bouzada <mbouzada@gmail.com>\n" "Language-Team: galician <proxecto@trasno.net>\n" @@ -3775,14 +3775,14 @@ msgid "Waiting for headers" msgstr "Agardando polas cabeceiras" #: methods/server.cc -msgid "Bad header line" -msgstr "Liña de cabeceira incorrecta" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "O servidor HTTP enviou unha cabeceira de resposta incorrecta" #: methods/server.cc +msgid "Bad header line" +msgstr "Liña de cabeceira incorrecta" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "" "O servidor HTTP enviou unha cabeceira cunha lonxitude de contido incorrecta" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2016-04-10 19:46+0200\n" "Last-Translator: Gabor Kelemen <kelemeng@ubuntu.com>\n" "Language-Team: Hungarian <gnome-hu-list@gnome.org>\n" @@ -3820,14 +3820,14 @@ msgid "Waiting for headers" msgstr "Várakozás a fejlécekre" #: methods/server.cc -msgid "Bad header line" -msgstr "Rossz fejlécsor" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "A HTTP-kiszolgáló érvénytelen válaszfejlécet küldött" #: methods/server.cc +msgid "Bad header line" +msgstr "Rossz fejlécsor" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "A HTTP-kiszolgáló érvénytelen Content-Length fejlécet küldött" @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2015-04-07 16:51+0100\n" "Last-Translator: Milo Casagrande <milo@milo.name>\n" "Language-Team: Italian <tp@lists.linux.it>\n" @@ -3828,14 +3828,14 @@ msgid "Waiting for headers" msgstr "In attesa degli header" #: methods/server.cc -msgid "Bad header line" -msgstr "Riga header non corretta" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Il server HTTP ha inviato un header di risposta non valido" #: methods/server.cc +msgid "Bad header line" +msgstr "Riga header non corretta" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Il server HTTP ha inviato un header Content-Length non valido" @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.9.3\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2016-05-18 15:31+0900\n" "Last-Translator: Takuma Yamada <tyamada@takumayamada.com>\n" "Language-Team: Japanese <debian-japanese@lists.debian.org>\n" @@ -3811,14 +3811,14 @@ msgid "Waiting for headers" msgstr "ヘッダの待機中です" #: methods/server.cc -msgid "Bad header line" -msgstr "不正なヘッダ行です" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP サーバが不正なリプライヘッダを送信してきました" #: methods/server.cc +msgid "Bad header line" +msgstr "不正なヘッダ行です" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP サーバが不正な Content-Length ヘッダを送信してきました" @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2006-10-10 09:48+0700\n" "Last-Translator: Khoem Sokhem <khoemsokhem@khmeros.info>\n" "Language-Team: Khmer <support@khmeros.info>\n" @@ -3681,14 +3681,14 @@ msgid "Waiting for headers" msgstr "កំពុងរង់ចាំបឋមកថា" #: methods/server.cc -msgid "Bad header line" -msgstr "ជួរបឋមកថាខូច" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "ម៉ាស៊ីនបម្រើ HTTP បានផ្ញើបឋមកថាចម្លើយតបមិនត្រឹមត្រូវ" #: methods/server.cc +msgid "Bad header line" +msgstr "ជួរបឋមកថាខូច" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "ម៉ាស៊ីនបម្រើ HTTP បានផ្ញើបឋមកថាប្រវែងមាតិកាមិនត្រឹមត្រូវ" @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2010-08-30 02:31+0900\n" "Last-Translator: Changwoo Ryu <cwryu@debian.org>\n" "Language-Team: Korean <debian-l10n-korean@lists.debian.org>\n" @@ -3696,14 +3696,14 @@ msgid "Waiting for headers" msgstr "헤더를 기다리는 중입니다" #: methods/server.cc -msgid "Bad header line" -msgstr "헤더 줄이 잘못되었습니다" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP 서버에서 잘못된 응답 헤더를 보냈습니다" #: methods/server.cc +msgid "Bad header line" +msgstr "헤더 줄이 잘못되었습니다" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP 서버에서 잘못된 Content-Length 헤더를 보냈습니다" @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2008-05-08 12:48+0200\n" "Last-Translator: Erdal Ronahi <erdal.ronahi@gmail.com>\n" "Language-Team: ku <ubuntu-l10n-kur@lists.ubuntu.com>\n" @@ -3582,11 +3582,11 @@ msgid "Waiting for headers" msgstr "" #: methods/server.cc -msgid "Bad header line" +msgid "The HTTP server sent an invalid reply header" msgstr "" #: methods/server.cc -msgid "The HTTP server sent an invalid reply header" +msgid "Bad header line" msgstr "" #: methods/server.cc @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2008-08-02 01:47-0400\n" "Last-Translator: Gintautas Miliauskas <gintas@akl.lt>\n" "Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n" @@ -3675,11 +3675,11 @@ msgid "Waiting for headers" msgstr "Laukiama antraščių" #: methods/server.cc -msgid "Bad header line" +msgid "The HTTP server sent an invalid reply header" msgstr "" #: methods/server.cc -msgid "The HTTP server sent an invalid reply header" +msgid "Bad header line" msgstr "" #: methods/server.cc @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2008-11-20 23:27+0530\n" "Last-Translator: Sampada <sampadanakhare@gmail.com>\n" "Language-Team: Marathi, janabhaaratii, C-DAC, Mumbai, India " @@ -3684,14 +3684,14 @@ msgid "Waiting for headers" msgstr "शीर्षकासाठी थांबले आहे...." #: methods/server.cc -msgid "Bad header line" -msgstr "वाईट शीर्षक ओळ" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP सर्व्हरने अवैध प्रत्त्युत्तर शीर्षक पाठविले" #: methods/server.cc +msgid "Bad header line" +msgstr "वाईट शीर्षक ओळ" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP सर्व्हरने अवैध मजकूर-लांबी शीर्षक पाठविले " @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2016-06-11 22:38+0200\n" "Last-Translator: Petter Reinholdtsen <pere@hungry.com>\n" "Language-Team: Norwegian Bokmål <i18n-no@lister.ping.uio.no>\n" @@ -3754,14 +3754,14 @@ msgid "Waiting for headers" msgstr "Venter på hoder" #: methods/server.cc -msgid "Bad header line" -msgstr "Ødelagt hodelinje" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP-tjeneren sendte et ugyldig svarhode" #: methods/server.cc +msgid "Bad header line" +msgstr "Ødelagt hodelinje" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP-tjeneren sendte et ugyldig «Content-Length»-hode" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2006-06-12 14:35+0545\n" "Last-Translator: Shiva Pokharel <pokharelshiva@hotmail.com>\n" "Language-Team: Nepali <info@mpp.org.np>\n" @@ -3681,14 +3681,14 @@ msgid "Waiting for headers" msgstr "हेडरहरुको लागि पर्खिदैछ" #: methods/server.cc -msgid "Bad header line" -msgstr "खराब हेडर लाइन" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP सर्भरले अवैध जवाफ हेडर पठायो" #: methods/server.cc +msgid "Bad header line" +msgstr "खराब हेडर लाइन" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP सर्भरले अवैध सामग्री-लम्बाई हेडर पठायो" @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.2.11\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2016-04-27 18:12+0200\n" "Last-Translator: Frans Spiesschaert <Frans.Spiesschaert@yucom.be>\n" "Language-Team: Debian Dutch l10n Team <debian-l10n-dutch@lists.debian.org>\n" @@ -3879,14 +3879,14 @@ msgid "Waiting for headers" msgstr "Wachten op de kopteksten" #: methods/server.cc -msgid "Bad header line" -msgstr "Foute koptekstregel" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "De HTTP-server verstuurde een ongeldige 'reply'-koptekst" #: methods/server.cc +msgid "Bad header line" +msgstr "Foute koptekstregel" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "De HTTP-server verstuurde een ongeldige 'Content-Length'-koptekst" @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2005-02-14 23:30+0100\n" "Last-Translator: Havard Korsvoll <korsvoll@skulelinux.no>\n" "Language-Team: Norwegian nynorsk <i18n-nn@lister.ping.uio.no>\n" @@ -3697,14 +3697,14 @@ msgid "Waiting for headers" msgstr "Ventar p hovud" #: methods/server.cc -msgid "Bad header line" -msgstr "ydelagd hovudlinje" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP-tenaren sende eit ugyldig svarhovud" #: methods/server.cc +msgid "Bad header line" +msgstr "ydelagd hovudlinje" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP-tenaren sende eit ugyldig Content-Length-hovud" @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.9.7.3\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2012-07-28 21:53+0200\n" "Last-Translator: Michał Kułach <michal.kulach@gmail.com>\n" "Language-Team: Polish <debian-l10n-polish@lists.debian.org>\n" @@ -3816,14 +3816,14 @@ msgid "Waiting for headers" msgstr "Oczekiwanie na nagłówki" #: methods/server.cc -msgid "Bad header line" -msgstr "Nieprawidłowa linia nagłówka" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Serwer HTTP przysłał nieprawidłowy nagłówek odpowiedzi" #: methods/server.cc +msgid "Bad header line" +msgstr "Nieprawidłowa linia nagłówka" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Serwer HTTP przysłał nieprawidłowy nagłówek Content-Length" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2012-06-29 15:45+0100\n" "Last-Translator: Miguel Figueiredo <elmig@debianpt.org>\n" "Language-Team: Portuguese <traduz@debianpt.org>\n" @@ -3792,14 +3792,14 @@ msgid "Waiting for headers" msgstr "A aguardar por cabeçalhos" #: methods/server.cc -msgid "Bad header line" -msgstr "Linha de cabeçalho errada" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "O servidor HTTP enviou um cabeçalho de resposta inválido" #: methods/server.cc +msgid "Bad header line" +msgstr "Linha de cabeçalho errada" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "O servidor HTTP enviou um cabeçalho Content-Length inválido" diff --git a/po/pt_BR.po b/po/pt_BR.po index c642c43ef..ff99e113d 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2008-11-17 02:33-0200\n" "Last-Translator: Felipe Augusto van de Wiel (faw) <faw@debian.org>\n" "Language-Team: Brazilian Portuguese <debian-l10n-portuguese@lists.debian." @@ -3727,14 +3727,14 @@ msgid "Waiting for headers" msgstr "Aguardando por cabeçalhos" #: methods/server.cc -msgid "Bad header line" -msgstr "Linha de cabeçalho ruim" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "O servidor HTTP enviou um cabeçalho de resposta inválido" #: methods/server.cc +msgid "Bad header line" +msgstr "Linha de cabeçalho ruim" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "O servidor HTTP enviou um cabeçalho \"Content-Length\" inválido" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2008-11-15 02:21+0200\n" "Last-Translator: Eddy Petrișor <eddy.petrisor@gmail.com>\n" "Language-Team: Romanian <debian-l10n-romanian@lists.debian.org>\n" @@ -3739,14 +3739,14 @@ msgid "Waiting for headers" msgstr "În așteptarea antetelor" #: methods/server.cc -msgid "Bad header line" -msgstr "Linie de antet necorespunzătoare" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Serverul HTTP a trimis un antet de răspuns necorespunzător" #: methods/server.cc +msgid "Bad header line" +msgstr "Linie de antet necorespunzătoare" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Serverul HTTP a trimis un antet Content-Length necorespunzător" @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.2.12\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2016-05-19 20:50+0300\n" "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n" "Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n" @@ -3855,14 +3855,14 @@ msgid "Waiting for headers" msgstr "Ожидание заголовков" #: methods/server.cc -msgid "Bad header line" -msgstr "Неверный заголовок" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Http-сервер послал неверный заголовок" #: methods/server.cc +msgid "Bad header line" +msgstr "Неверный заголовок" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Http сервер послал неверный заголовок Content-Length" @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2012-06-28 20:49+0100\n" "Last-Translator: Ivan Masár <helix84@centrum.sk>\n" "Language-Team: Slovak <sk-i18n@lists.linux.sk>\n" @@ -3754,14 +3754,14 @@ msgid "Waiting for headers" msgstr "Čaká sa na hlavičky" #: methods/server.cc -msgid "Bad header line" -msgstr "Chybná hlavička" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP server poslal neplatnú hlavičku odpovede" #: methods/server.cc +msgid "Bad header line" +msgstr "Chybná hlavička" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP server poslal neplatnú hlavičku Content-Length" @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.5.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2012-06-27 21:29+0000\n" "Last-Translator: Andrej Znidarsic <andrej.znidarsic@gmail.com>\n" "Language-Team: Slovenian <sl@li.org>\n" @@ -3760,14 +3760,14 @@ msgid "Waiting for headers" msgstr "Čakanje na glave" #: methods/server.cc -msgid "Bad header line" -msgstr "Neveljavna vrstica glave" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Strežnik HTTP je poslal neveljavno glavo odgovora" #: methods/server.cc +msgid "Bad header line" +msgstr "Neveljavna vrstica glave" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Strežnik HTTP je poslal glavo z neveljavno dolžino vsebine" @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2015-08-19 21:33+0200\n" "Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n" "Language-Team: Swedish <debian-l10n-swedish@debian.org>\n" @@ -3789,14 +3789,14 @@ msgid "Waiting for headers" msgstr "Väntar på rubriker" #: methods/server.cc -msgid "Bad header line" -msgstr "Felaktig rubrikrad" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Http-servern sände ett ogiltigt svarshuvud" #: methods/server.cc +msgid "Bad header line" +msgstr "Felaktig rubrikrad" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Http-servern sände en ogiltig Content-Length-rubrik" @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2014-12-12 13:00+0700\n" "Last-Translator: Theppitak Karoonboonyanan <thep@debian.org>\n" "Language-Team: Thai <thai-l10n@googlegroups.com>\n" @@ -3675,14 +3675,14 @@ msgid "Waiting for headers" msgstr "รอหัวข้อมูล" #: methods/server.cc -msgid "Bad header line" -msgstr "บรรทัดข้อมูลส่วนหัวผิดพลาด" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "เซิร์ฟเวอร์ HTTP ส่งข้อมูลส่วนหัวตอบมาไม่ถูกต้อง" #: methods/server.cc +msgid "Bad header line" +msgstr "บรรทัดข้อมูลส่วนหัวผิดพลาด" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "เซิร์ฟเวอร์ HTTP ส่งข้อมูลส่วนหัว Content-Length มาไม่ถูกต้อง" @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2007-03-29 21:36+0800\n" "Last-Translator: Eric Pareja <xenos@upm.edu.ph>\n" "Language-Team: Tagalog <debian-tl@banwa.upm.edu.ph>\n" @@ -3720,14 +3720,14 @@ msgid "Waiting for headers" msgstr "Naghihintay ng panimula" #: methods/server.cc -msgid "Bad header line" -msgstr "Maling linyang panimula" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Nagpadala ang HTTP server ng di tanggap na reply header" #: methods/server.cc +msgid "Bad header line" +msgstr "Maling linyang panimula" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "Nagpadala ang HTTP server ng di tanggap na Content-Length header" @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2016-07-21 18:43+0300\n" "Last-Translator: Mert Dirik <mertdirik@gmail.com>\n" "Language-Team: Debian l10n Turkish <debian-l10n-turkish@lists.debian.org>\n" @@ -3814,14 +3814,14 @@ msgid "Waiting for headers" msgstr "Başlıklar bekleniyor" #: methods/server.cc -msgid "Bad header line" -msgstr "Kötü başlık satırı" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP sunucusu geçersiz bir cevap başlığı gönderdi" #: methods/server.cc +msgid "Bad header line" +msgstr "Kötü başlık satırı" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP sunucusu geçersiz bir Content-Length başlığı gönderdi" @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.5\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2012-09-25 20:19+0300\n" "Last-Translator: A. Bondarenko <artem.brz@gmail.com>\n" "Language-Team: Українська <uk@li.org>\n" @@ -3817,14 +3817,14 @@ msgid "Waiting for headers" msgstr "Очікування на заголовки" #: methods/server.cc -msgid "Bad header line" -msgstr "Невірний рядок заголовку" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP сервер відіслав невірний заголовок 'reply'" #: methods/server.cc +msgid "Bad header line" +msgstr "Невірний рядок заголовку" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP сервер відіслав невірний заголовок 'Content-Length'" @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.0.8\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2014-09-12 13:48+0700\n" "Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n" "Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n" @@ -3781,14 +3781,14 @@ msgid "Waiting for headers" msgstr "Đang đợi phần đầu dữ liệu..." #: methods/server.cc -msgid "Bad header line" -msgstr "Dòng đầu sai" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "Máy phục vụ HTTP đã gửi một dòng đầu trả lời không hợp lệ" #: methods/server.cc +msgid "Bad header line" +msgstr "Dòng đầu sai" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "" "Máy phục vụ HTTP đã gửi một dòng đầu Content-Length (độ dài nội dung) không " diff --git a/po/zh_CN.po b/po/zh_CN.po index e9c2b0856..03acbe108 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.2.x\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2016-06-27 08:00+0000\n" "Last-Translator: Zhou Mo <cdluminate@gmail.com>\n" "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" @@ -3677,14 +3677,14 @@ msgid "Waiting for headers" msgstr "正在等待报头" #: methods/server.cc -msgid "Bad header line" -msgstr "错误的报头行" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "该 HTTP 服务器发送了一个无效的应答报头" #: methods/server.cc +msgid "Bad header line" +msgstr "错误的报头行" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "该 HTTP 服务器发送了一个无效的 Content-Length 报头" diff --git a/po/zh_TW.po b/po/zh_TW.po index 14abf54f9..eb85a1a42 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.2.X\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2016-08-11 13:57+0200\n" +"POT-Creation-Date: 2016-08-17 23:47+0200\n" "PO-Revision-Date: 2009-01-28 10:41+0800\n" "Last-Translator: Tetralet <tetralet@gmail.com>\n" "Language-Team: Debian-user in Chinese [Big5] <debian-chinese-big5@lists." @@ -3660,14 +3660,14 @@ msgid "Waiting for headers" msgstr "等待標頭" #: methods/server.cc -msgid "Bad header line" -msgstr "標頭行錯誤" - -#: methods/server.cc msgid "The HTTP server sent an invalid reply header" msgstr "HTTP 伺服器傳送了一個無效的回覆標頭" #: methods/server.cc +msgid "Bad header line" +msgstr "標頭行錯誤" + +#: methods/server.cc msgid "The HTTP server sent an invalid Content-Length header" msgstr "HTTP 伺服器傳送了一個無效的 Content-Length 標頭" diff --git a/prepare-release b/prepare-release index df1b0a2cf..1e434a305 100755 --- a/prepare-release +++ b/prepare-release @@ -158,8 +158,9 @@ elif [ "$1" = 'buildlog' ]; then shift done elif [ "$1" = 'travis-ci' ]; then - apt-get install -qy --no-install-recommends $(sed -n -e '/^Build-Depends: /,/^Build-Depends-Indep: / {p}' debian/control | sed -e 's#([^)]*)##g' -e 's#^Build-Depends\(-Indep\)\?: ##' -e 's#<.*>##g' | tr -d ',') - apt-get install -qy --no-install-recommends $(sed -n 's#^Depends: .*@, \(.*\)$#\1#p' debian/tests/control | tr -d ',') + apt-get install -qy --no-install-recommends dctrl-tools + apt-get install -qy --no-install-recommends $(grep-dctrl -S -s Build-Depends,Build-Depends-Indep,Build-Depends-Arch apt ./debian/control | sed -e 's#([^)]*)##g' -e 's#^Build-Depends\(-Indep\|-Arch\)\?: ##' -e 's#<.*>##g' | tr -s '\n,' ' ') + apt-get install -qy --no-install-recommends $(grep-dctrl -F Tests -s Depends run-tests ./debian/tests/control | tr -s '\n,' ' ' | cut -d'@' -f 4- | sed -e 's#gnupg1#gnupg2#' -e 's#gpgv1#gpgv2#') elif [ "$1" = 'coverage' ]; then DIR="${2:-./coverage}" git clean -dfX # remove ignored build artefacts for a clean start diff --git a/test/integration/framework b/test/integration/framework index 8a95d79bb..1e356ffaf 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -216,7 +216,7 @@ gdb() { if [ "${CMD##*/}" = "$CMD" ]; then CMD="${BUILDDIRECTORY}/${CMD}" fi - runapt command gdb --quiet -ex run "$CMD" --args "$CMD" "$@" + runapt command gdb --quiet -ex "directory '$SOURCEDIRECTORY'" -ex run "$CMD" --args "$CMD" "$@" } lastmodification() { date -u -d "@$(stat -c '%Y' "${TMPWORKINGDIRECTORY}/$1")" -R @@ -1856,49 +1856,24 @@ testwebserverlaststatuscode() { msggroup } -createlistofkeys() { - local OUTPUT="$1" - shift +mapkeynametokeyid() { while [ -n "$1" ]; do - # gpg 2.1.something starts printing [SC] at some point - if grep -q ' rsa2048/' "$OUTPUT" && grep -qF '[SC]' "$OUTPUT"; then - case "$1" in - *Joe*|*Sixpack*) echo 'pub rsa2048/DBAC8DAE 2010-08-18 [SC]';; - *Rex*|*Expired*) echo 'pub rsa2048/27CE74F9 2013-07-12 [SC] [expired: 2013-07-13]';; - *Marvin*|*Paranoid*) echo 'pub rsa2048/528144E2 2011-01-16 [SC]';; - oldarchive) echo 'pub rsa1024/F68C85A3 2013-12-19 [SC]';; - newarchive) echo 'pub rsa2048/DBAC8DAE 2010-08-18 [SC]';; - *) echo 'UNKNOWN KEY';; - esac - # gpg 2.1 has a slightly different output format - elif grep -q ' rsa2048/' "$OUTPUT"; then - case "$1" in - *Joe*|*Sixpack*) echo 'pub rsa2048/DBAC8DAE 2010-08-18';; - *Rex*|*Expired*) echo 'pub rsa2048/27CE74F9 2013-07-12 [expired: 2013-07-13]';; - *Marvin*|*Paranoid*) echo 'pub rsa2048/528144E2 2011-01-16';; - oldarchive) echo 'pub rsa1024/F68C85A3 2013-12-19';; - newarchive) echo 'pub rsa2048/DBAC8DAE 2010-08-18';; - *) echo 'UNKNOWN KEY';; - esac - else - case "$1" in - *Joe*|*Sixpack*) echo 'pub 2048R/DBAC8DAE 2010-08-18';; - *Rex*|*Expired*) echo 'pub 2048R/27CE74F9 2013-07-12 [expired: 2013-07-13]';; - *Marvin*|*Paranoid*) echo 'pub 2048R/528144E2 2011-01-16';; - oldarchive) echo 'pub 1024R/F68C85A3 2013-12-19';; - newarchive) echo 'pub 2048R/DBAC8DAE 2010-08-18';; - *) echo 'UNKNOWN KEY';; - esac - fi + case "$1" in + *Joe*|*Sixpack*|newarchive) echo '5A90D141DBAC8DAE';; + *Rex*|*Expired*) echo '4BC0A39C27CE74F9';; + *Marvin*|*Paranoid*) echo 'E8525D47528144E2';; + oldarchive) echo 'FDD2DB85F68C85A3';; + *) echo 'UNKNOWN KEY';; + esac shift done } testaptkeys() { local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/aptkeylist.output" - if ! aptkey list | grep '^pub' > "$OUTPUT"; then + if ! aptkey list --with-colon | grep '^pub' | cut -d':' -f 5 > "$OUTPUT"; then echo -n > "$OUTPUT" fi - testfileequal "$OUTPUT" "$(createlistofkeys "$OUTPUT" "$@")" + testfileequal "$OUTPUT" "$(mapkeynametokeyid "$@")" } pause() { diff --git a/test/integration/joesixpack.pub b/test/integration/joesixpack.pub Binary files differindex 2b40b97b6..cad056104 100644 --- a/test/integration/joesixpack.pub +++ b/test/integration/joesixpack.pub diff --git a/test/integration/joesixpack.sec b/test/integration/joesixpack.sec Binary files differindex 92aaada76..0dc5cd8f6 100644 --- a/test/integration/joesixpack.sec +++ b/test/integration/joesixpack.sec diff --git a/test/integration/keyrings/test-archive-keyring.pub b/test/integration/keyrings/test-archive-keyring.pub Binary files differindex d8d9d472b..325174086 100644 --- a/test/integration/keyrings/test-archive-keyring.pub +++ b/test/integration/keyrings/test-archive-keyring.pub diff --git a/test/integration/keyrings/test-archive-keyring.sec b/test/integration/keyrings/test-archive-keyring.sec Binary files differindex aece750e8..001f79569 100644 --- a/test/integration/keyrings/test-archive-keyring.sec +++ b/test/integration/keyrings/test-archive-keyring.sec diff --git a/test/integration/keyrings/test-master-keyring.pub b/test/integration/keyrings/test-master-keyring.pub Binary files differindex 33aa16796..9809d3259 100644 --- a/test/integration/keyrings/test-master-keyring.pub +++ b/test/integration/keyrings/test-master-keyring.pub diff --git a/test/integration/keyrings/test-master-keyring.sec b/test/integration/keyrings/test-master-keyring.sec Binary files differindex 9cb33176c..c5c5bfd5f 100644 --- a/test/integration/keyrings/test-master-keyring.sec +++ b/test/integration/keyrings/test-master-keyring.sec diff --git a/test/integration/marvinparanoid.pub b/test/integration/marvinparanoid.pub Binary files differindex 9a59c2e40..866dc1492 100644 --- a/test/integration/marvinparanoid.pub +++ b/test/integration/marvinparanoid.pub diff --git a/test/integration/marvinparanoid.sec b/test/integration/marvinparanoid.sec Binary files differindex ff54e8680..ace09f735 100644 --- a/test/integration/marvinparanoid.sec +++ b/test/integration/marvinparanoid.sec diff --git a/test/integration/rexexpired.pub b/test/integration/rexexpired.pub Binary files differindex 5ab2e489a..2d2c81c83 100644 --- a/test/integration/rexexpired.pub +++ b/test/integration/rexexpired.pub diff --git a/test/integration/rexexpired.sec b/test/integration/rexexpired.sec Binary files differindex dc00168cd..c431fd908 100644 --- a/test/integration/rexexpired.sec +++ b/test/integration/rexexpired.sec diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb index 3aacc301d..5f2877dfd 100755 --- a/test/integration/test-apt-get-install-deb +++ b/test/integration/test-apt-get-install-deb @@ -64,6 +64,23 @@ Remv foo:i386 [1.0] Inst foo (1.0 local-deb [amd64]) Conf foo (1.0 local-deb [amd64])" aptget install ./incoming/foo_1.0_amd64.deb -s +testsuccessequal 'Reading package lists... +Building dependency tree... +Reading state information... +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install --with-source ./incoming/foo_1.0_amd64.deb -s + +testsuccessequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + foo:i386 +The following NEW packages will be installed: + foo +0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. +Remv foo:i386 [1.0] +Inst foo (1.0 local-deb [amd64]) +Conf foo (1.0 local-deb [amd64])' aptget install --with-source ./incoming/foo_1.0_amd64.deb foo -s + # Check that installing the local deb works if it is not the candidate echo "Package: foo Pin: version 1.0 @@ -133,3 +150,21 @@ fi sed -i -e '/^Depends: foo/ d' rootdir/var/lib/dpkg/status testsuccess aptget install -y ./incoming/pkg-as-it-should-be_0_all.deb testfailure grep 'is already the newest version' rootdir/tmp/testsuccess.output +testsuccess apt purge -y pkg-as-it-should-be + +echo "Package: pkg-as-it-should-be +Architecture: all +Version: 0 +Installed-Size: 2903 +Filename: incoming/pkg-as-it-should-be_0_all.deb +Size: $(stat -c %s incoming/pkg-as-it-should-be_0_all.deb) +SHA256: $(sha256sum incoming/pkg-as-it-should-be_0_all.deb | cut -d' ' -f 1) +" > Packages +testdpkgnotinstalled 'pkg-as-it-should-be' +testnopackage pkg-as-it-should-be +testsuccess apt install --with-source ./Packages pkg-as-it-should-be -s +testsuccess apt install --with-source ./Packages pkg-as-it-should-be --print-uris +testsuccess apt show --with-source ./Packages pkg-as-it-should-be +testequal 'Package: pkg-as-it-should-be' head -n1 rootdir/tmp/testsuccess.output +testsuccess apt install -y --with-source ./Packages pkg-as-it-should-be +testdpkginstalled 'pkg-as-it-should-be' diff --git a/test/integration/test-apt-key b/test/integration/test-apt-key index e777de1a4..759ce1487 100755 --- a/test/integration/test-apt-key +++ b/test/integration/test-apt-key @@ -41,7 +41,9 @@ APT::Key::RemovedKeys \"${KEYDIR}/rexexpired.pub\";" > "${ROOTDIR}/etc/apt/apt.c msgtest 'Check that paths in finger output are not' 'double-slashed' testfailure --nomsg grep '//' "${ROOTDIR}/tmp/testsuccess.output" - testsuccessequal 'gpg: key DBAC8DAE: "Joe Sixpack (APT Testcases Dummy) <joe@example.org>" not changed + testequalor2 'gpg: key DBAC8DAE: "Joe Sixpack (APT Testcases Dummy) <joe@example.org>" not changed +gpg: Total number processed: 1 +gpg: unchanged: 1' 'gpg: key 5A90D141DBAC8DAE: "Joe Sixpack (APT Testcases Dummy) <joe@example.org>" not changed gpg: Total number processed: 1 gpg: unchanged: 1' aptkey --fakeroot update @@ -114,6 +116,14 @@ gpg: unchanged: 1' aptkey --fakeroot update testfailure test -e "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg" testsuccess cmp "${KEYDIR}/joesixpack.pub" "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg~" + msgtest 'Test key removal with' 'spaced fingerprint' + cleanplate + cp -a "${KEYDIR}/joesixpack.pub" "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg" + testsuccess --nomsg aptkey --fakeroot del '34A8 E9D1 8DB3 20F3 67E8 EAA0 5A90 D141 DBAC 8DAE' + testempty aptkey list + testfailure test -e "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg" + testsuccess cmp "${KEYDIR}/joesixpack.pub" "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg~" + msgtest 'Test key removal with' 'single key in softlink' cleanplate ln -s "$(readlink -f "${KEYDIR}/joesixpack.pub")" "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg" @@ -185,8 +195,9 @@ gpg: unchanged: 1' aptkey --fakeroot update msgtest 'Test verify a file' 'with no sig' testfailure --nomsg aptkey --quiet --readonly --keyring "${KEYDIR}/testcase-multikey.pub" verify "${SIGNATURE}" "${SIGNATURE}2" - for GPGV in '' 'gpgv' 'gpgv2'; do + for GPGV in '' 'gpgv' 'gpgv1' 'gpgv2'; do echo "APT::Key::GPGVCommand \"$GPGV\";" > "${ROOTDIR}/etc/apt/apt.conf.d/00gpgvcmd" + if [ -n "$GPGV" ] && ! command dpkg -l gnupg1 2>&1 | grep -q '^ii'; then continue; fi msgtest 'Test verify a file' 'with all keys' testsuccess --nomsg aptkey --quiet --readonly verify "${SIGNATURE}.gpg" "${SIGNATURE}" @@ -229,8 +240,9 @@ gpg: unchanged: 1' aptkey --fakeroot update adv --batch --yes -u 'Marvin' -u 'Joe' --armor --detach-sign --sign --output "${SIGNATURE}.gpg" "${SIGNATURE}" testsuccess test -s "${SIGNATURE}.gpg" -a -s "${SIGNATURE}" - for GPGV in '' 'gpgv' 'gpgv2'; do + for GPGV in '' 'gpgv' 'gpgv1' 'gpgv2'; do echo "APT::Key::GPGVCommand \"$GPGV\";" > "${ROOTDIR}/etc/apt/apt.conf.d/00gpgvcmd" + if [ -n "$GPGV" ] && ! command dpkg -l gnupg1 2>&1 | grep -q '^ii'; then continue; fi msgtest 'Test verify a doublesigned file' 'with all keys' testsuccess --nomsg aptkey --quiet --readonly verify "${SIGNATURE}.gpg" "${SIGNATURE}" @@ -265,11 +277,25 @@ gpg: unchanged: 1' aptkey --fakeroot update } setupgpgcommand() { - echo "APT::Key::GPGCommand \"$1\";" > "${ROOTDIR}/etc/apt/apt.conf.d/00gpgcmd" - msgmsg 'Force tests to be run with' "$1" + local GPGEXE; + if command dpkg -l gnupg1 2>&1 | grep -q '^ii'; then + if [ "$1" = '1' ]; then + GPGEXE='gpg1' + else + GPGEXE='gpg' + fi + else + if [ "$1" = '1' ]; then + GPGEXE='gpg' + else + GPGEXE='gpg2' + fi + fi + msgmsg 'Force tests to be run with' "$GPGEXE" + echo "APT::Key::GPGCommand \"$GPGEXE\";" > "${ROOTDIR}/etc/apt/apt.conf.d/00gpgcmd" testsuccess aptkey --readonly adv --version cp "${ROOTDIR}/tmp/testsuccess.output" "${TMPWORKINGDIRECTORY}/aptkey.version" - testsuccess grep "^gpg (GnuPG) $2\." "${TMPWORKINGDIRECTORY}/aptkey.version" + testsuccess grep "^gpg (GnuPG) $1\." "${TMPWORKINGDIRECTORY}/aptkey.version" } # run with default (whatever this is) in current CWD with relative paths @@ -285,7 +311,7 @@ cd inaccessible chmod 600 ../inaccessible testfilestats "${TMPWORKINGDIRECTORY}/inaccessible" '%a' '=' '600' -setupgpgcommand 'gpg' '1' +setupgpgcommand '1' testrun -setupgpgcommand 'gpg2' '2' +setupgpgcommand '2' testrun diff --git a/test/integration/test-apt-key-net-update b/test/integration/test-apt-key-net-update index 990fb5ad2..b9f716e10 100755 --- a/test/integration/test-apt-key-net-update +++ b/test/integration/test-apt-key-net-update @@ -24,14 +24,7 @@ echo 'APT::Key::Net-Update-Enabled "1";' >> ./aptconfig.conf # test against the "real" webserver testsuccess aptkey --fakeroot net-update -testequalor2 'Checking for new archive signing keys now -gpg: key F68C85A3: public key "Test Automatic Archive Signing Key <ftpmaster@example.com>" imported -gpg: Total number processed: 1 -gpg: imported: 1 (RSA: 1)' 'Checking for new archive signing keys now -gpg: key F68C85A3: public key "Test Automatic Archive Signing Key <ftpmaster@example.com>" imported -gpg: Total number processed: 1 -gpg: imported: 1' cat rootdir/tmp/testsuccess.output - +testfailure grep 'not added' rootdir/tmp/testsuccess.output testaptkeys 'oldarchive' 'newarchive' # now try a different one diff --git a/test/integration/test-apt-key-used-in-maintainerscript b/test/integration/test-apt-key-used-in-maintainerscript index f7008084f..b5ed3279f 100755 --- a/test/integration/test-apt-key-used-in-maintainerscript +++ b/test/integration/test-apt-key-used-in-maintainerscript @@ -32,7 +32,7 @@ testdpkginstalled 'aptkeyuser-depends' testfailure grep '^Warning: This will BREAK' apt.output testsuccess grep '^Warning: apt-key' apt.output -testsuccess apt install ./incoming/aptkeyuser-nodepends_*.changes -y +testsuccess apt install --with-source ./incoming/aptkeyuser-nodepends_*.changes aptkeyuser-nodepends -y cp rootdir/tmp/testsuccess.output apt.output testdpkginstalled 'aptkeyuser-nodepends' testsuccess grep '^Warning: This will BREAK' apt.output diff --git a/test/integration/test-apt-update-transactions b/test/integration/test-apt-update-transactions index d8154b283..ab678c133 100755 --- a/test/integration/test-apt-update-transactions +++ b/test/integration/test-apt-update-transactions @@ -82,7 +82,7 @@ testsetup 'file' changetowebserver webserverconfig 'aptwebserver::support::modified-since' 'false' "$1" webserverconfig 'aptwebserver::support::last-modified' 'false' "$1" # curl is clever and sees hits here also -webserverconfig 'aptwebserver::support::range' 'false' "$1" +webserverconfig 'aptwebserver::response-header::Accept-Ranges' 'none' "$1" testsetup 'http' diff --git a/test/integration/test-bug-623443-fail-on-bad-proxies b/test/integration/test-bug-623443-fail-on-bad-proxies index 04542e0cd..d91a3ab8b 100755 --- a/test/integration/test-bug-623443-fail-on-bad-proxies +++ b/test/integration/test-bug-623443-fail-on-bad-proxies @@ -29,5 +29,6 @@ testfailure apt update unset http_proxy testsuccess grep 'Unsupported proxy configured' rootdir/tmp/testfailure.output - - +echo 'Acquire::http::Proxy "foo://example.org"; +Acquire::https::Proxy "DIRECT";' > rootdir/etc/apt/apt.conf.d/proxy.conf +testsuccess apt update diff --git a/test/integration/test-bug-778375-server-has-no-reason-phrase b/test/integration/test-bug-778375-server-has-no-reason-phrase index bce41235f..28e31e069 100755 --- a/test/integration/test-bug-778375-server-has-no-reason-phrase +++ b/test/integration/test-bug-778375-server-has-no-reason-phrase @@ -11,6 +11,7 @@ echo 'found' > aptarchive/working changetohttpswebserver -o 'aptwebserver::redirect::replace::/redirectme/=/' \ -o 'aptwebserver::httpcode::200=200' -o 'aptwebserver::httpcode::404=404' \ -o 'aptwebserver::httpcode::301=301' +webserverconfig 'aptwebserver::empty-response-header::' 'foobar' testdownload() { rm -f downfile diff --git a/test/integration/test-bug-lp1445239-download-loop b/test/integration/test-bug-lp1445239-download-loop index a12d5252d..6802840a5 100755 --- a/test/integration/test-bug-lp1445239-download-loop +++ b/test/integration/test-bug-lp1445239-download-loop @@ -12,7 +12,6 @@ setupenvironment configarchitecture 'amd64' changetowebserver -webserverconfig 'aptwebserver::support::range' 'true' TESTFILE='aptarchive/testfile' dd if=/dev/zero of=$TESTFILE bs=100k count=1 2>/dev/null diff --git a/test/integration/test-handle-redirect-as-used-mirror-change b/test/integration/test-handle-redirect-as-used-mirror-change index 2f6431e66..2e8fbeff6 100755 --- a/test/integration/test-handle-redirect-as-used-mirror-change +++ b/test/integration/test-handle-redirect-as-used-mirror-change @@ -44,10 +44,28 @@ testsuccess apthelper download-file "http://localhost:${APTHTTPPORT}/redirectme/ testsuccess test -s inrelease cd - >/dev/null +webserverconfig "aptwebserver::redirect::replace::http://0.0.0.0:${APTHTTPPORT}/dists/unstable/InRelease" "http://0.0.0.0:${APTHTTPPORT}/storage/dists/unstable/InRelease" +mkdir -p aptarchive/storage/dists/unstable +mv aptarchive/dists/unstable/InRelease aptarchive/storage/dists/unstable +rm -rf rootdir/var/lib/apt/lists +testsuccessequal "Get:1 http://0.0.0.0:${APTHTTPPORT}/storage unstable InRelease [$(stat -c %s aptarchive/storage/dists/unstable/InRelease) B] +Ign:2 http://0.0.0.0:${APTHTTPPORT}/storage unstable/main Sources + 404 Not Found +Ign:3 http://0.0.0.0:${APTHTTPPORT}/storage unstable/main all Packages + 404 Not Found +Ign:4 http://0.0.0.0:${APTHTTPPORT}/storage unstable/main Translation-en + 404 Not Found +Get:2 http://0.0.0.0:${APTHTTPPORT} unstable/main Sources [$(stat -c %s aptarchive/dists/unstable/main/source/Sources.gz) B] +Get:3 http://0.0.0.0:${APTHTTPPORT} unstable/main all Packages [$(stat -c %s aptarchive/dists/unstable/main/binary-all/Packages.gz) B] +Get:4 http://0.0.0.0:${APTHTTPPORT} unstable/main Translation-en [$(stat -c %s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B] +Reading package lists... +Building dependency tree... +All packages are up to date." apt update + find aptarchive -name 'InRelease' -delete rm -rf rootdir/var/lib/apt/lists -testsuccessequal "Ign:1 http://0.0.0.0:${APTHTTPPORT} unstable InRelease +testsuccessequal "Ign:1 http://0.0.0.0:${APTHTTPPORT}/storage unstable InRelease 404 Not Found Get:2 http://0.0.0.0:${APTHTTPPORT} unstable Release [$(stat -c %s aptarchive/dists/unstable/Release) B] Get:3 http://0.0.0.0:${APTHTTPPORT} unstable Release.gpg [$(stat -c %s aptarchive/dists/unstable/Release.gpg) B] @@ -56,9 +74,7 @@ Get:5 http://0.0.0.0:${APTHTTPPORT} unstable/main all Packages [$(stat -c %s apt Get:6 http://0.0.0.0:${APTHTTPPORT} unstable/main Translation-en [$(stat -c %s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B] Reading package lists..." aptget update -testsuccessequal "Ign:1 http://0.0.0.0:${APTHTTPPORT} unstable InRelease +testsuccessequal "Ign:1 http://0.0.0.0:${APTHTTPPORT}/storage unstable InRelease 404 Not Found Hit:2 http://0.0.0.0:${APTHTTPPORT} unstable Release Reading package lists..." aptget update - - diff --git a/test/integration/test-partial-file-support b/test/integration/test-partial-file-support index 1c5d120d8..9b5eed1e5 100755 --- a/test/integration/test-partial-file-support +++ b/test/integration/test-partial-file-support @@ -96,6 +96,7 @@ followuprequest() { testrun() { webserverconfig 'aptwebserver::support::range' 'true' + webserverconfig 'aptwebserver::response-header::Accept-Ranges' 'bytes' local DOWN='./downloaded/testfile' copysource $TESTFILE 0 $DOWN @@ -125,7 +126,11 @@ testrun() { testdownloadfile 'old data' "${1}/testfile" "$DOWN" '=' testwebserverlaststatuscode '200' "$DOWNLOADLOG" - webserverconfig 'aptwebserver::support::range' 'false' + if [ "${1%%:*}" = 'https' ] && expr match "$1" "^.*/redirectme$" >/dev/null; then + webserverconfig 'aptwebserver::response-header::Accept-Ranges' 'none' + else + webserverconfig 'aptwebserver::support::range' 'false' + fi copysource $TESTFILE 20 $DOWN testdownloadfile 'no server support' "${1}/testfile" "$DOWN" '=' @@ -148,4 +153,5 @@ changetohttpswebserver serverconfigs "https://localhost:${APTHTTPSPORT}" webserverconfig 'aptwebserver::redirect::replace::/redirectme/' "https://localhost:${APTHTTPSPORT}/" +serverconfigs "https://localhost:${APTHTTPSPORT}/redirectme" serverconfigs "http://localhost:${APTHTTPPORT}/redirectme" diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index 39d847203..59a3fd8af 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -35,6 +35,7 @@ wasmergeused() { fi testsuccess apt update "$@" + #apt update "$@" 2>&1 | tee rootdir/tmp/testsuccess.output msgtest 'No intermediate patch files' 'still exist' local EDS="$(find rootdir/var/lib/apt/lists -name '*.ed' -o -name '*.ed.*')" @@ -116,6 +117,34 @@ SHA256-Download: testsuccessequal "$(cat "${PKGFILE}-new") " aptcache show apt newstuff + msgmsg "Testcase: apply with compressed Index and one patch: $*" + cp "${PKGFILE}-new" aptarchive/Packages + compressfile 'aptarchive/Packages' + cat "$PATCHINDEX" | gzip > "${PATCHINDEX}.gz" + generatereleasefiles '+1hour' + signreleasefiles + find aptarchive -name 'Packages*' -type f -delete + rm "$PATCHINDEX" + rm -rf rootdir/var/lib/apt/lists + cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists + wasmergeused "$@" + testnopackage oldstuff + testsuccessequal "$(cat "${PKGFILE}-new") +" aptcache show apt newstuff + + msgmsg "Testcase: apply with by-hash compressed Index and one patch: $*" + local NORMAL="$(readlink -f "./aptarchive/Packages.diff")" + local BYHASH="${NORMAL}/by-hash/SHA256" + mkdir -p "${BYHASH}" + find "${NORMAL}/" -maxdepth 1 -name "Index*" -exec mv '{}' "$BYHASH" \; + ln -s "${BYHASH}/Index.gz" "${BYHASH}/$(sha256sum "${BYHASH}/Index.gz" | cut -f1 -d' ')" + rm -rf rootdir/var/lib/apt/lists + cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists + wasmergeused "$@" -o Acquire::By-Hash=force + testnopackage oldstuff + testsuccessequal "$(cat "${PKGFILE}-new") +" aptcache show apt newstuff + msgmsg "Testcase: SHA1-only patches are not used: $*" find aptarchive -name 'Packages*' -type f -delete cp "${PKGFILE}-new" aptarchive/Packages diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification index 82e48ffa8..20ca613da 100755 --- a/test/integration/test-releasefile-verification +++ b/test/integration/test-releasefile-verification @@ -12,8 +12,6 @@ buildaptarchive setupflataptarchive changetowebserver -webserverconfig 'aptwebserver::support::range' 'false' - prepare() { local DATE="${2:-now}" if [ "$DATE" = 'now' ]; then @@ -239,7 +237,7 @@ runtest() { updatewithwarnings '^W: .* NO_PUBKEY' sed -i "s#^\(deb\(-src\)\?\) \[signed-by=$MARVIN\] #\1 #" rootdir/etc/apt/sources.list.d/* - local MARVIN="$(aptkey --keyring $MARVIN finger | grep 'Key fingerprint' | cut -d'=' -f 2 | tr -d ' ')" + local MARVIN="$(aptkey --keyring $MARVIN finger --with-colons | grep '^fpr' | cut -d':' -f 10)" msgmsg 'Cold archive signed by bad keyid' 'Joe Sixpack' rm -rf rootdir/var/lib/apt/lists signreleasefiles 'Joe Sixpack' @@ -263,7 +261,7 @@ runtest() { " aptcache show apt installaptold - local SIXPACK="$(aptkey --keyring keys/joesixpack.pub finger | grep 'Key fingerprint' | cut -d'=' -f 2 | tr -d ' ')" + local SIXPACK="$(aptkey --keyring keys/joesixpack.pub finger --with-colons | grep '^fpr' | cut -d':' -f 10)" msgmsg 'Cold archive signed by good keyids' 'Joe Sixpack' rm -rf rootdir/var/lib/apt/lists signreleasefiles 'Joe Sixpack' @@ -273,7 +271,6 @@ runtest() { " aptcache show apt installaptold - local SIXPACK="$(aptkey --keyring keys/joesixpack.pub finger | grep 'Key fingerprint' | cut -d'=' -f 2 | tr -d ' ')" msgmsg 'Cold archive signed by good keyids' 'Joe Sixpack' rm -rf rootdir/var/lib/apt/lists sed -i "s#^\(deb\(-src\)\?\) \[signed-by=${SIXPACK},${MARVIN}\] #\1 [signed-by=${MARVIN},${SIXPACK}] #" rootdir/etc/apt/sources.list.d/* diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc index 817760ec3..950a17bc1 100644 --- a/test/interactive-helper/aptwebserver.cc +++ b/test/interactive-helper/aptwebserver.cc @@ -122,6 +122,9 @@ static bool sendHead(int const client, int const httpcode, std::list<std::string _config->Set("APTWebserver::Last-Status-Code", httpcode); std::stringstream buffer; + auto const empties = _config->FindVector("aptwebserver::empty-response-header"); + for (auto && e: empties) + buffer << e << ":" << std::endl; _config->Dump(buffer, "aptwebserver::response-header", "%t: %v%n", false); std::vector<std::string> addheaders = VectorizeString(buffer.str(), '\n'); for (std::vector<std::string>::const_iterator h = addheaders.begin(); h != addheaders.end(); ++h) @@ -714,6 +717,15 @@ static void * handleClient(void * voidclient) /*{{{*/ condition.clear(); if (condition.empty() == false && strncmp(condition.c_str(), "bytes=", 6) == 0) { + std::string ranges = ',' + _config->Find("aptwebserver::response-header::Accept-Ranges") + ','; + ranges.erase(std::remove(ranges.begin(), ranges.end(), ' '), ranges.end()); + if (ranges.find(",bytes,") == std::string::npos) + { + // we handle it as an error here because we are a test server - a real one should just ignore it + sendError(client, 400, *m, sendContent, "Client does range requests we don't support", headers); + continue; + } + time_t cache; std::string ifrange; if (_config->FindB("aptwebserver::support::if-range", true) == true) diff --git a/test/libapt/install_progress_test.cc b/test/libapt/install_progress_test.cc index a70fc9261..b63b4716f 100644 --- a/test/libapt/install_progress_test.cc +++ b/test/libapt/install_progress_test.cc @@ -12,9 +12,14 @@ TEST(InstallProgressTest, FancyGetTextProgressStr) EXPECT_EQ(60, p.GetTextProgressStr(0.5, 60).size()); EXPECT_EQ("[#.]", p.GetTextProgressStr(0.5, 4)); + EXPECT_EQ("[..........]", p.GetTextProgressStr(0.0, 12)); EXPECT_EQ("[#.........]", p.GetTextProgressStr(0.1, 12)); + EXPECT_EQ("[####......]", p.GetTextProgressStr(0.4999, 12)); + EXPECT_EQ("[#####.....]", p.GetTextProgressStr(0.5001, 12)); EXPECT_EQ("[#########.]", p.GetTextProgressStr(0.9, 12)); + EXPECT_EQ("[##########]", p.GetTextProgressStr(1.0, 12)); // deal with incorrect inputs gracefully (or should we die instead?) - EXPECT_EQ("", p.GetTextProgressStr(-999, 12)); + EXPECT_EQ("[..........]", p.GetTextProgressStr(-1.0, 12)); + EXPECT_EQ("[##########]", p.GetTextProgressStr(2.0, 12)); } diff --git a/test/libapt/srvrecs_test.cc b/test/libapt/srvrecs_test.cc index b3fa8102d..5253b1c34 100644 --- a/test/libapt/srvrecs_test.cc +++ b/test/libapt/srvrecs_test.cc @@ -53,12 +53,19 @@ TEST(SrvRecTest,Randomness) EXPECT_EQ(testLength*2, base2.size()); std::vector<SrvRec> first_pull; + auto const startingClock = clock(); for (unsigned int i = 0; i < testLength; ++i) first_pull.push_back(PopFromSrvRecs(base1)); EXPECT_TRUE(base1.empty()); EXPECT_FALSE(first_pull.empty()); EXPECT_EQ(testLength, first_pull.size()); + // busy-wait for a cpu-clock change as we use it as "random" value + if (startingClock != -1) + for (int i = 0; i < 100000; ++i) + if (startingClock != clock()) + break; + std::vector<SrvRec> second_pull; for (unsigned int i = 0; i < testLength; ++i) second_pull.push_back(PopFromSrvRecs(base2)); @@ -69,7 +76,8 @@ TEST(SrvRecTest,Randomness) EXPECT_EQ(first_pull.size(), second_pull.size()); EXPECT_TRUE(std::all_of(first_pull.begin(), first_pull.end(), [](SrvRec const &R) { return R.priority == 20; })); EXPECT_TRUE(std::all_of(second_pull.begin(), second_pull.end(), [](SrvRec const &R) { return R.priority == 20; })); - EXPECT_FALSE(std::equal(first_pull.begin(), first_pull.end(), second_pull.begin())); + if (startingClock != -1 && startingClock != clock()) + EXPECT_FALSE(std::equal(first_pull.begin(), first_pull.end(), second_pull.begin())); EXPECT_TRUE(std::all_of(base2.begin(), base2.end(), [](SrvRec const &R) { return R.priority == 30; })); } diff --git a/test/libapt/stringview_test.cc b/test/libapt/stringview_test.cc index a4b7d77e3..f215287d9 100644 --- a/test/libapt/stringview_test.cc +++ b/test/libapt/stringview_test.cc @@ -34,26 +34,28 @@ TEST(StringViewTest,EmptyString) TEST(StringViewTest,FooString) { - constexpr APT::StringView defString("foo", 3); + constexpr APT::StringView defString("fooGARBAGE", 3); static_assert( 3 == defString.length(), "def right size"); - EXPECT_EQ(defString.to_string(), defString.data()); + EXPECT_EQ(0, defString.to_string().compare(0, defString.length(), defString.data(), 3)); APT::StringView strString{std::string{"foo"}}; EXPECT_EQ(3, strString.length()); - EXPECT_EQ(strString.to_string(), strString.data()); + EXPECT_EQ(0, strString.to_string().compare(0, strString.length(), strString.data(), 3)); - constexpr char const * const charp = "foo"; + constexpr char const * const charp = "fooGARBAGE"; constexpr APT::StringView charpString{charp, 3}; - EXPECT_EQ( 3, charpString.length()); - EXPECT_EQ(charpString.to_string(), charpString.data()); + EXPECT_EQ(3, charpString.length()); + EXPECT_EQ(0, charpString.to_string().compare(0, charpString.length(), charpString.data(), 3)); - APT::StringView charp2String{charp}; + char * charp2 = strdup("foo"); + APT::StringView charp2String{charp2}; EXPECT_EQ(3, charp2String.length()); - EXPECT_EQ(charp2String.to_string(), charp2String.data()); + EXPECT_EQ(0, charp2String.to_string().compare(0, charp2String.length(), charp2String.data(), 3)); + free(charp2); const APT::StringView charaString{"foo"}; EXPECT_EQ(3, charaString.length()); - EXPECT_EQ(charaString.to_string(), charaString.data()); + EXPECT_EQ(0, charaString.to_string().compare(0, charaString.length(), charaString.data(), 3)); EXPECT_TRUE(APT::StringView("foo") == "foo"); EXPECT_FALSE(APT::StringView("foo") != "foo"); |