From 773e2c1fe5fd1a315ffaaf79f2f2e4a9e975649a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 9 Dec 2009 19:24:03 +0100 Subject: Refactor the cache iterators by using a common base class This should not change the public interface, but it removes the friend connection between the iterators and pkgcache as it is unused. --- apt-pkg/cacheiterators.h | 673 +++++++++++++++++++++-------------------------- apt-pkg/pkgcache.cc | 56 ++-- apt-pkg/pkgcache.h | 9 +- 3 files changed, 320 insertions(+), 418 deletions(-) diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 28466cd40..1da5c6f02 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -1,6 +1,5 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cacheiterators.h,v 1.18.2.1 2004/05/08 22:44:27 mdz Exp $ /* ###################################################################### Cache Iterators - Iterators for navigating the cache structure @@ -30,417 +29,333 @@ /*}}}*/ #ifndef PKGLIB_CACHEITERATORS_H #define PKGLIB_CACHEITERATORS_H - - +// abstract Iterator template /*{{{*/ +/* This template provides the very basic iterator methods we + need to have for doing some walk-over-the-cache magic, */ +template class pkgCache::Iterator { + __attribute__ ((deprecated)) void _dummy(); // FIXME: Who on earth uses this method ??? + + protected: + Str *S; + pkgCache *Owner; + + /** \brief Returns the Pointer for this struct in the owner + * The implementation of this method should be pretty short + * as it will only return the Pointer into the mmap stored + * in the owner but the name of this pointer is different for + * each stucture and we want to abstract here at least for the + * basic methods from the actual structure. + * \return Pointer to the first structure of this type + */ + virtual Str* OwnerPointer() const = 0; + + public: + // Iteration + virtual void operator ++(int) = 0; + virtual void operator ++() = 0; // Should be {operator ++(0);}; + inline bool end() const {return Owner == 0 || S == OwnerPointer();}; + + // Comparison + inline bool operator ==(const Itr &B) const {return S == B.S;}; + inline bool operator !=(const Itr &B) const {return S != B.S;}; + + // Accessors + inline Str *operator ->() {return S;}; + inline Str const *operator ->() const {return S;}; + inline operator Str *() {return S == OwnerPointer() ? 0 : S;}; + inline operator Str const *() const {return S == OwnerPointer() ? 0 : S;}; + inline Str const &operator *() const {return *S;}; + inline pkgCache *Cache() {return Owner;}; + + // Mixed stuff + inline void operator =(const Itr &B) {S = B.S; Owner = B.Owner;}; + inline bool IsGood() const { return S && Owner && ! end();}; + inline unsigned long Index() const {return S - OwnerPointer();}; + + // Constructors - look out for the variable assigning + inline Iterator() : S(0), Owner(0) {}; + inline Iterator(pkgCache &Owner,Str *T = 0) : S(T), Owner(&Owner) {}; +}; + /*}}}*/ // Package Iterator /*{{{*/ -class pkgCache::PkgIterator -{ - friend class pkgCache; - Package *Pkg; - pkgCache *Owner; - long HashIndex; - - protected: - - // This constructor is the 'begin' constructor, never use it. - inline PkgIterator(pkgCache &Owner) : Owner(&Owner), HashIndex(-1) - { - Pkg = Owner.PkgP; - operator ++(0); - }; - - public: - - enum OkState {NeedsNothing,NeedsUnpack,NeedsConfigure}; - - // Iteration - void operator ++(int); - inline void operator ++() {operator ++(0);}; - inline bool end() const {return Owner == 0 || Pkg == Owner->PkgP?true:false;}; - - // Comparison - inline bool operator ==(const PkgIterator &B) const {return Pkg == B.Pkg;}; - inline bool operator !=(const PkgIterator &B) const {return Pkg != B.Pkg;}; - - // Accessors - inline Package *operator ->() {return Pkg;}; - inline Package const *operator ->() const {return Pkg;}; - inline Package const &operator *() const {return *Pkg;}; - inline operator Package *() {return Pkg == Owner->PkgP?0:Pkg;}; - inline operator Package const *() const {return Pkg == Owner->PkgP?0:Pkg;}; - inline pkgCache *Cache() {return Owner;}; - - inline const char *Name() const {return Pkg->Name == 0?0:Owner->StrP + Pkg->Name;}; - inline const char *Section() const {return Pkg->Section == 0?0:Owner->StrP + Pkg->Section;}; - inline bool Purge() const {return Pkg->CurrentState == pkgCache::State::Purge || - (Pkg->CurrentVer == 0 && Pkg->CurrentState == pkgCache::State::NotInstalled);}; - inline VerIterator VersionList() const; - inline VerIterator CurrentVer() const; - inline DepIterator RevDependsList() const; - inline PrvIterator ProvidesList() const; - inline unsigned long Index() const {return Pkg - Owner->PkgP;}; - OkState State() const; - - //Nice printable representation - friend std::ostream& operator<<(std::ostream& out, pkgCache::PkgIterator Pkg); - - const char *CandVersion() const; - const char *CurVersion() const; - - // Constructors - inline PkgIterator(pkgCache &Owner,Package *Trg) : Pkg(Trg), Owner(&Owner), - HashIndex(0) - { - if (Pkg == 0) - Pkg = Owner.PkgP; - }; - inline PkgIterator() : Pkg(0), Owner(0), HashIndex(0) {}; +class pkgCache::PkgIterator: public Iterator { + long HashIndex; + + protected: + inline Package* OwnerPointer() const { + return Owner->PkgP; + }; + + public: + // This constructor is the 'begin' constructor, never use it. + inline PkgIterator(pkgCache &Owner) : Iterator(Owner), HashIndex(-1) { + S = OwnerPointer(); + operator ++(0); + }; + + virtual void operator ++(int); + virtual void operator ++() {operator ++(0);}; + + enum OkState {NeedsNothing,NeedsUnpack,NeedsConfigure}; + + // Accessors + inline const char *Name() const {return S->Name == 0?0:Owner->StrP + S->Name;}; + inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;}; + inline bool Purge() const {return S->CurrentState == pkgCache::State::Purge || + (S->CurrentVer == 0 && S->CurrentState == pkgCache::State::NotInstalled);}; + + inline VerIterator VersionList() const; + inline VerIterator CurrentVer() const; + inline DepIterator RevDependsList() const; + inline PrvIterator ProvidesList() const; + OkState State() const; + const char *CandVersion() const; + const char *CurVersion() const; + + //Nice printable representation + friend std::ostream& operator <<(std::ostream& out, PkgIterator i); + + // Constructors + inline PkgIterator(pkgCache &Owner,Package *Trg) : Iterator(Owner, Trg), HashIndex(0) { + if (S == 0) + S = OwnerPointer(); + }; + inline PkgIterator() : Iterator(), HashIndex(0) {}; }; /*}}}*/ // Version Iterator /*{{{*/ -class pkgCache::VerIterator -{ - Version *Ver; - pkgCache *Owner; - - void _dummy(); - - public: - - // Iteration - void operator ++(int) {if (Ver != Owner->VerP) Ver = Owner->VerP + Ver->NextVer;}; - inline void operator ++() {operator ++(0);}; - inline bool end() const {return Owner == 0 || (Ver == Owner->VerP?true:false);}; - inline void operator =(const VerIterator &B) {Ver = B.Ver; Owner = B.Owner;}; - - // Comparison - inline bool operator ==(const VerIterator &B) const {return Ver == B.Ver;}; - inline bool operator !=(const VerIterator &B) const {return Ver != B.Ver;}; - int CompareVer(const VerIterator &B) const; - - // Testing - inline bool IsGood() const { return Ver && Owner && ! end();}; - - // Accessors - inline Version *operator ->() {return Ver;}; - inline Version const *operator ->() const {return Ver;}; - inline Version &operator *() {return *Ver;}; - inline Version const &operator *() const {return *Ver;}; - inline operator Version *() {return Ver == Owner->VerP?0:Ver;}; - inline operator Version const *() const {return Ver == Owner->VerP?0:Ver;}; - inline pkgCache *Cache() {return Owner;}; - - inline const char *VerStr() const {return Ver->VerStr == 0?0:Owner->StrP + Ver->VerStr;}; - inline const char *Section() const {return Ver->Section == 0?0:Owner->StrP + Ver->Section;}; - inline const char *Arch() const {return Ver->Arch == 0?0:Owner->StrP + Ver->Arch;}; - inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + Ver->ParentPkg);}; - inline DescIterator DescriptionList() const; - DescIterator TranslatedDescription() const; - inline DepIterator DependsList() const; - inline PrvIterator ProvidesList() const; - inline VerFileIterator FileList() const; - inline unsigned long Index() const {return Ver - Owner->VerP;}; - bool Downloadable() const; - inline const char *PriorityType() {return Owner->Priority(Ver->Priority);}; - string RelStr(); - - bool Automatic() const; - VerFileIterator NewestFile() const; - - inline VerIterator() : Ver(0), Owner(0) {}; - inline VerIterator(pkgCache &Owner,Version *Trg = 0) : Ver(Trg), - Owner(&Owner) - { - if (Ver == 0) - Ver = Owner.VerP; - }; +class pkgCache::VerIterator : public Iterator { + protected: + inline Version* OwnerPointer() const { + return Owner->VerP; + }; + + public: + // Iteration + void operator ++(int) {if (S != Owner->VerP) S = Owner->VerP + S->NextVer;}; + inline void operator ++() {operator ++(0);}; + + // Comparison + int CompareVer(const VerIterator &B) const; + + // Accessors + inline const char *VerStr() const {return S->VerStr == 0?0:Owner->StrP + S->VerStr;}; + inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;}; + inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;}; + inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + S->ParentPkg);}; + + inline DescIterator DescriptionList() const; + DescIterator TranslatedDescription() const; + inline DepIterator DependsList() const; + inline PrvIterator ProvidesList() const; + inline VerFileIterator FileList() const; + bool Downloadable() const; + inline const char *PriorityType() {return Owner->Priority(S->Priority);}; + string RelStr(); + + bool Automatic() const; + VerFileIterator NewestFile() const; + + inline VerIterator(pkgCache &Owner,Version *Trg = 0) : Iterator(Owner, Trg) { + if (S == 0) + S = OwnerPointer(); + }; + inline VerIterator() : Iterator() {}; }; /*}}}*/ // Description Iterator /*{{{*/ -class pkgCache::DescIterator -{ - Description *Desc; - pkgCache *Owner; - - void _dummy(); - - public: - - // Iteration - void operator ++(int) {if (Desc != Owner->DescP) Desc = Owner->DescP + Desc->NextDesc;}; - inline void operator ++() {operator ++(0);}; - inline bool end() const {return Owner == 0 || Desc == Owner->DescP?true:false;}; - inline void operator =(const DescIterator &B) {Desc = B.Desc; Owner = B.Owner;}; - - // Comparison - inline bool operator ==(const DescIterator &B) const {return Desc == B.Desc;}; - inline bool operator !=(const DescIterator &B) const {return Desc != B.Desc;}; - int CompareDesc(const DescIterator &B) const; - - // Accessors - inline Description *operator ->() {return Desc;}; - inline Description const *operator ->() const {return Desc;}; - inline Description &operator *() {return *Desc;}; - inline Description const &operator *() const {return *Desc;}; - inline operator Description *() {return Desc == Owner->DescP?0:Desc;}; - inline operator Description const *() const {return Desc == Owner->DescP?0:Desc;}; - inline pkgCache *Cache() {return Owner;}; - - inline const char *LanguageCode() const {return Owner->StrP + Desc->language_code;}; - inline const char *md5() const {return Owner->StrP + Desc->md5sum;}; - inline DescFileIterator FileList() const; - inline unsigned long Index() const {return Desc - Owner->DescP;}; - - inline DescIterator() : Desc(0), Owner(0) {}; - inline DescIterator(pkgCache &Owner,Description *Trg = 0) : Desc(Trg), - Owner(&Owner) - { - if (Desc == 0) - Desc = Owner.DescP; - }; +class pkgCache::DescIterator : public Iterator { + protected: + inline Description* OwnerPointer() const { + return Owner->DescP; + }; + + public: + // Iteration + void operator ++(int) {if (S != Owner->DescP) S = Owner->DescP + S->NextDesc;}; + inline void operator ++() {operator ++(0);}; + + // Comparison + int CompareDesc(const DescIterator &B) const; + + // Accessors + inline const char *LanguageCode() const {return Owner->StrP + S->language_code;}; + inline const char *md5() const {return Owner->StrP + S->md5sum;}; + inline DescFileIterator FileList() const; + + inline DescIterator() : Iterator() {}; + inline DescIterator(pkgCache &Owner,Description *Trg = 0) : Iterator(Owner, Trg) { + if (S == 0) + S = Owner.DescP; + }; }; /*}}}*/ // Dependency iterator /*{{{*/ -class pkgCache::DepIterator -{ - Dependency *Dep; - enum {DepVer, DepRev} Type; - pkgCache *Owner; - - void _dummy(); - - public: - - // Iteration - void operator ++(int) {if (Dep != Owner->DepP) Dep = Owner->DepP + - (Type == DepVer?Dep->NextDepends:Dep->NextRevDepends);}; - inline void operator ++() {operator ++(0);}; - inline bool end() const {return Owner == 0 || Dep == Owner->DepP?true:false;}; - - // Comparison - inline bool operator ==(const DepIterator &B) const {return Dep == B.Dep;}; - inline bool operator !=(const DepIterator &B) const {return Dep != B.Dep;}; - - // Accessors - inline Dependency *operator ->() {return Dep;}; - inline Dependency const *operator ->() const {return Dep;}; - inline Dependency &operator *() {return *Dep;}; - inline Dependency const &operator *() const {return *Dep;}; - inline operator Dependency *() {return Dep == Owner->DepP?0:Dep;}; - inline operator Dependency const *() const {return Dep == Owner->DepP?0:Dep;}; - inline pkgCache *Cache() {return Owner;}; - - inline const char *TargetVer() const {return Dep->Version == 0?0:Owner->StrP + Dep->Version;}; - inline PkgIterator TargetPkg() {return PkgIterator(*Owner,Owner->PkgP + Dep->Package);}; - inline PkgIterator SmartTargetPkg() {PkgIterator R(*Owner,0);SmartTargetPkg(R);return R;}; - inline VerIterator ParentVer() {return VerIterator(*Owner,Owner->VerP + Dep->ParentVer);}; - inline PkgIterator ParentPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[Dep->ParentVer].ParentPkg);}; - inline bool Reverse() {return Type == DepRev;}; - inline unsigned long Index() const {return Dep - Owner->DepP;}; - bool IsCritical(); - void GlobOr(DepIterator &Start,DepIterator &End); - Version **AllTargets(); - bool SmartTargetPkg(PkgIterator &Result); - inline const char *CompType() {return Owner->CompType(Dep->CompareOp);}; - inline const char *DepType() {return Owner->DepType(Dep->Type);}; - - inline DepIterator(pkgCache &Owner,Dependency *Trg,Version * = 0) : - Dep(Trg), Type(DepVer), Owner(&Owner) - { - if (Dep == 0) - Dep = Owner.DepP; - }; - inline DepIterator(pkgCache &Owner,Dependency *Trg,Package *) : - Dep(Trg), Type(DepRev), Owner(&Owner) - { - if (Dep == 0) - Dep = Owner.DepP; - }; - inline DepIterator() : Dep(0), Type(DepVer), Owner(0) {}; +class pkgCache::DepIterator : public Iterator { + enum {DepVer, DepRev} Type; + + protected: + inline Dependency* OwnerPointer() const { + return Owner->DepP; + }; + + public: + // Iteration + void operator ++(int) {if (S != Owner->DepP) S = Owner->DepP + + (Type == DepVer ? S->NextDepends : S->NextRevDepends);}; + inline void operator ++() {operator ++(0);}; + + // Accessors + inline const char *TargetVer() const {return S->Version == 0?0:Owner->StrP + S->Version;}; + inline PkgIterator TargetPkg() {return PkgIterator(*Owner,Owner->PkgP + S->Package);}; + inline PkgIterator SmartTargetPkg() {PkgIterator R(*Owner,0);SmartTargetPkg(R);return R;}; + inline VerIterator ParentVer() {return VerIterator(*Owner,Owner->VerP + S->ParentVer);}; + inline PkgIterator ParentPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[S->ParentVer].ParentPkg);}; + inline bool Reverse() {return Type == DepRev;}; + bool IsCritical(); + void GlobOr(DepIterator &Start,DepIterator &End); + Version **AllTargets(); + bool SmartTargetPkg(PkgIterator &Result); + inline const char *CompType() {return Owner->CompType(S->CompareOp);}; + inline const char *DepType() {return Owner->DepType(S->Type);}; + + inline DepIterator(pkgCache &Owner, Dependency *Trg, Version* = 0) : + Iterator(Owner, Trg), Type(DepVer) { + if (S == 0) + S = Owner.DepP; + }; + inline DepIterator(pkgCache &Owner, Dependency *Trg, Package*) : + Iterator(Owner, Trg), Type(DepRev) { + if (S == 0) + S = Owner.DepP; + }; + inline DepIterator() : Iterator(), Type(DepVer) {}; }; /*}}}*/ // Provides iterator /*{{{*/ -class pkgCache::PrvIterator -{ - Provides *Prv; - enum {PrvVer, PrvPkg} Type; - pkgCache *Owner; - - void _dummy(); - - public: - - // Iteration - void operator ++(int) {if (Prv != Owner->ProvideP) Prv = Owner->ProvideP + - (Type == PrvVer?Prv->NextPkgProv:Prv->NextProvides);}; - inline void operator ++() {operator ++(0);}; - inline bool end() const {return Owner == 0 || Prv == Owner->ProvideP?true:false;}; - - // Comparison - inline bool operator ==(const PrvIterator &B) const {return Prv == B.Prv;}; - inline bool operator !=(const PrvIterator &B) const {return Prv != B.Prv;}; - - // Accessors - inline Provides *operator ->() {return Prv;}; - inline Provides const *operator ->() const {return Prv;}; - inline Provides &operator *() {return *Prv;}; - inline Provides const &operator *() const {return *Prv;}; - inline operator Provides *() {return Prv == Owner->ProvideP?0:Prv;}; - inline operator Provides const *() const {return Prv == Owner->ProvideP?0:Prv;}; - inline pkgCache *Cache() {return Owner;}; - - inline const char *Name() const {return Owner->StrP + Owner->PkgP[Prv->ParentPkg].Name;}; - inline const char *ProvideVersion() const {return Prv->ProvideVersion == 0?0:Owner->StrP + Prv->ProvideVersion;}; - inline PkgIterator ParentPkg() {return PkgIterator(*Owner,Owner->PkgP + Prv->ParentPkg);}; - inline VerIterator OwnerVer() {return VerIterator(*Owner,Owner->VerP + Prv->Version);}; - inline PkgIterator OwnerPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[Prv->Version].ParentPkg);}; - inline unsigned long Index() const {return Prv - Owner->ProvideP;}; - - inline PrvIterator() : Prv(0), Type(PrvVer), Owner(0) {}; - - inline PrvIterator(pkgCache &Owner,Provides *Trg,Version *) : - Prv(Trg), Type(PrvVer), Owner(&Owner) - { - if (Prv == 0) - Prv = Owner.ProvideP; - }; - inline PrvIterator(pkgCache &Owner,Provides *Trg,Package *) : - Prv(Trg), Type(PrvPkg), Owner(&Owner) - { - if (Prv == 0) - Prv = Owner.ProvideP; - }; +class pkgCache::PrvIterator : public Iterator { + enum {PrvVer, PrvPkg} Type; + + protected: + inline Provides* OwnerPointer() const { + return Owner->ProvideP; + }; + + public: + // Iteration + void operator ++(int) {if (S != Owner->ProvideP) S = Owner->ProvideP + + (Type == PrvVer?S->NextPkgProv:S->NextProvides);}; + inline void operator ++() {operator ++(0);}; + + // Accessors + inline const char *Name() const {return Owner->StrP + Owner->PkgP[S->ParentPkg].Name;}; + inline const char *ProvideVersion() const {return S->ProvideVersion == 0?0:Owner->StrP + S->ProvideVersion;}; + inline PkgIterator ParentPkg() {return PkgIterator(*Owner,Owner->PkgP + S->ParentPkg);}; + inline VerIterator OwnerVer() {return VerIterator(*Owner,Owner->VerP + S->Version);}; + inline PkgIterator OwnerPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[S->Version].ParentPkg);}; + + inline PrvIterator() : Iterator(), Type(PrvVer) {}; + + inline PrvIterator(pkgCache &Owner, Provides *Trg, Version*) : + Iterator(Owner, Trg), Type(PrvVer) { + if (S == 0) + S = Owner.ProvideP; + }; + inline PrvIterator(pkgCache &Owner, Provides *Trg, Package*) : + Iterator(Owner, Trg), Type(PrvPkg) { + if (S == 0) + S = Owner.ProvideP; + }; }; /*}}}*/ // Package file /*{{{*/ -class pkgCache::PkgFileIterator -{ - pkgCache *Owner; - PackageFile *File; - - public: - - // Iteration - void operator ++(int) {if (File!= Owner->PkgFileP) File = Owner->PkgFileP + File->NextFile;}; - inline void operator ++() {operator ++(0);}; - inline bool end() const {return Owner == 0 || File == Owner->PkgFileP?true:false;}; - - // Comparison - inline bool operator ==(const PkgFileIterator &B) const {return File == B.File;}; - inline bool operator !=(const PkgFileIterator &B) const {return File != B.File;}; - - // Accessors - inline PackageFile *operator ->() {return File;}; - inline PackageFile const *operator ->() const {return File;}; - inline PackageFile const &operator *() const {return *File;}; - inline operator PackageFile *() {return File == Owner->PkgFileP?0:File;}; - inline operator PackageFile const *() const {return File == Owner->PkgFileP?0:File;}; - inline pkgCache *Cache() {return Owner;}; - - inline const char *FileName() const {return File->FileName == 0?0:Owner->StrP + File->FileName;}; - inline const char *Archive() const {return File->Archive == 0?0:Owner->StrP + File->Archive;}; - inline const char *Component() const {return File->Component == 0?0:Owner->StrP + File->Component;}; - inline const char *Version() const {return File->Version == 0?0:Owner->StrP + File->Version;}; - inline const char *Origin() const {return File->Origin == 0?0:Owner->StrP + File->Origin;}; - inline const char *Codename() const {return File->Codename ==0?0:Owner->StrP + File->Codename;}; - inline const char *Label() const {return File->Label == 0?0:Owner->StrP + File->Label;}; - inline const char *Site() const {return File->Site == 0?0:Owner->StrP + File->Site;}; - inline const char *Architecture() const {return File->Architecture == 0?0:Owner->StrP + File->Architecture;}; - inline const char *IndexType() const {return File->IndexType == 0?0:Owner->StrP + File->IndexType;}; - - inline unsigned long Index() const {return File - Owner->PkgFileP;}; - - bool IsOk(); - string RelStr(); - - // Constructors - inline PkgFileIterator() : Owner(0), File(0) {}; - inline PkgFileIterator(pkgCache &Owner) : Owner(&Owner), File(Owner.PkgFileP) {}; - inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Owner(&Owner), File(Trg) {}; +class pkgCache::PkgFileIterator : public Iterator { + protected: + inline PackageFile* OwnerPointer() const { + return Owner->PkgFileP; + }; + + public: + // Iteration + void operator ++(int) {if (S != Owner->PkgFileP) S = Owner->PkgFileP + S->NextFile;}; + inline void operator ++() {operator ++(0);}; + + // Accessors + inline const char *FileName() const {return S->FileName == 0?0:Owner->StrP + S->FileName;}; + inline const char *Archive() const {return S->Archive == 0?0:Owner->StrP + S->Archive;}; + inline const char *Component() const {return S->Component == 0?0:Owner->StrP + S->Component;}; + inline const char *Version() const {return S->Version == 0?0:Owner->StrP + S->Version;}; + inline const char *Origin() const {return S->Origin == 0?0:Owner->StrP + S->Origin;}; + inline const char *Codename() const {return S->Codename ==0?0:Owner->StrP + S->Codename;}; + inline const char *Label() const {return S->Label == 0?0:Owner->StrP + S->Label;}; + inline const char *Site() const {return S->Site == 0?0:Owner->StrP + S->Site;}; + inline const char *Architecture() const {return S->Architecture == 0?0:Owner->StrP + S->Architecture;}; + inline const char *IndexType() const {return S->IndexType == 0?0:Owner->StrP + S->IndexType;}; + + bool IsOk(); + string RelStr(); + + // Constructors + inline PkgFileIterator() : Iterator() {}; + inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg = 0) : Iterator(Owner, Trg) {}; }; /*}}}*/ // Version File /*{{{*/ -class pkgCache::VerFileIterator -{ - pkgCache *Owner; - VerFile *FileP; - - public: - - // Iteration - void operator ++(int) {if (FileP != Owner->VerFileP) FileP = Owner->VerFileP + FileP->NextFile;}; - inline void operator ++() {operator ++(0);}; - inline bool end() const {return Owner == 0 || FileP == Owner->VerFileP?true:false;}; - - // Comparison - inline bool operator ==(const VerFileIterator &B) const {return FileP == B.FileP;}; - inline bool operator !=(const VerFileIterator &B) const {return FileP != B.FileP;}; - - // Accessors - inline VerFile *operator ->() {return FileP;}; - inline VerFile const *operator ->() const {return FileP;}; - inline VerFile const &operator *() const {return *FileP;}; - inline operator VerFile *() {return FileP == Owner->VerFileP?0:FileP;}; - inline operator VerFile const *() const {return FileP == Owner->VerFileP?0:FileP;}; - inline pkgCache *Cache() {return Owner;}; - - inline PkgFileIterator File() const {return PkgFileIterator(*Owner,FileP->File + Owner->PkgFileP);}; - inline unsigned long Index() const {return FileP - Owner->VerFileP;}; - - inline VerFileIterator() : Owner(0), FileP(0) {}; - inline VerFileIterator(pkgCache &Owner,VerFile *Trg) : Owner(&Owner), FileP(Trg) {}; +class pkgCache::VerFileIterator : public pkgCache::Iterator { + protected: + inline VerFile* OwnerPointer() const { + return Owner->VerFileP; + }; + + public: + // Iteration + void operator ++(int) {if (S != Owner->VerFileP) S = Owner->VerFileP + S->NextFile;}; + inline void operator ++() {operator ++(0);}; + + // Accessors + inline PkgFileIterator File() const {return PkgFileIterator(*Owner,S->File + Owner->PkgFileP);}; + + inline VerFileIterator() : Iterator() {}; + inline VerFileIterator(pkgCache &Owner,VerFile *Trg) : Iterator(Owner, Trg) {}; }; /*}}}*/ // Description File /*{{{*/ -class pkgCache::DescFileIterator -{ - pkgCache *Owner; - DescFile *FileP; - - public: - - // Iteration - void operator ++(int) {if (FileP != Owner->DescFileP) FileP = Owner->DescFileP + FileP->NextFile;}; - inline void operator ++() {operator ++(0);}; - inline bool end() const {return Owner == 0 || FileP == Owner->DescFileP?true:false;}; - - // Comparison - inline bool operator ==(const DescFileIterator &B) const {return FileP == B.FileP;}; - inline bool operator !=(const DescFileIterator &B) const {return FileP != B.FileP;}; - - // Accessors - inline DescFile *operator ->() {return FileP;}; - inline DescFile const *operator ->() const {return FileP;}; - inline DescFile const &operator *() const {return *FileP;}; - inline operator DescFile *() {return FileP == Owner->DescFileP?0:FileP;}; - inline operator DescFile const *() const {return FileP == Owner->DescFileP?0:FileP;}; - inline pkgCache *Cache() {return Owner;}; - - inline PkgFileIterator File() const {return PkgFileIterator(*Owner,FileP->File + Owner->PkgFileP);}; - inline unsigned long Index() const {return FileP - Owner->DescFileP;}; - - inline DescFileIterator() : Owner(0), FileP(0) {}; - inline DescFileIterator(pkgCache &Owner,DescFile *Trg) : Owner(&Owner), FileP(Trg) {}; +class pkgCache::DescFileIterator : public Iterator { + protected: + inline DescFile* OwnerPointer() const { + return Owner->DescFileP; + }; + + public: + // Iteration + void operator ++(int) {if (S != Owner->DescFileP) S = Owner->DescFileP + S->NextFile;}; + inline void operator ++() {operator ++(0);}; + + // Accessors + inline PkgFileIterator File() const {return PkgFileIterator(*Owner,S->File + Owner->PkgFileP);}; + + inline DescFileIterator() : Iterator() {}; + inline DescFileIterator(pkgCache &Owner,DescFile *Trg) : Iterator(Owner, Trg) {}; }; /*}}}*/ // Inlined Begin functions cant be in the class because of order problems /*{{{*/ inline pkgCache::VerIterator pkgCache::PkgIterator::VersionList() const - {return VerIterator(*Owner,Owner->VerP + Pkg->VersionList);}; + {return VerIterator(*Owner,Owner->VerP + S->VersionList);}; inline pkgCache::VerIterator pkgCache::PkgIterator::CurrentVer() const - {return VerIterator(*Owner,Owner->VerP + Pkg->CurrentVer);}; + {return VerIterator(*Owner,Owner->VerP + S->CurrentVer);}; inline pkgCache::DepIterator pkgCache::PkgIterator::RevDependsList() const - {return DepIterator(*Owner,Owner->DepP + Pkg->RevDepends,Pkg);}; + {return DepIterator(*Owner,Owner->DepP + S->RevDepends,S);}; inline pkgCache::PrvIterator pkgCache::PkgIterator::ProvidesList() const - {return PrvIterator(*Owner,Owner->ProvideP + Pkg->ProvidesList,Pkg);}; + {return PrvIterator(*Owner,Owner->ProvideP + S->ProvidesList,S);}; inline pkgCache::DescIterator pkgCache::VerIterator::DescriptionList() const - {return DescIterator(*Owner,Owner->DescP + Ver->DescriptionList);}; + {return DescIterator(*Owner,Owner->DescP + S->DescriptionList);}; inline pkgCache::PrvIterator pkgCache::VerIterator::ProvidesList() const - {return PrvIterator(*Owner,Owner->ProvideP + Ver->ProvidesList,Ver);}; + {return PrvIterator(*Owner,Owner->ProvideP + S->ProvidesList,S);}; inline pkgCache::DepIterator pkgCache::VerIterator::DependsList() const - {return DepIterator(*Owner,Owner->DepP + Ver->DependsList,Ver);}; + {return DepIterator(*Owner,Owner->DepP + S->DependsList,S);}; inline pkgCache::VerFileIterator pkgCache::VerIterator::FileList() const - {return VerFileIterator(*Owner,Owner->VerFileP + Ver->FileList);}; + {return VerFileIterator(*Owner,Owner->VerFileP + S->FileList);}; inline pkgCache::DescFileIterator pkgCache::DescIterator::FileList() const - {return DescFileIterator(*Owner,Owner->DescFileP + Desc->FileList);}; + {return DescFileIterator(*Owner,Owner->DescFileP + S->FileList);}; /*}}}*/ #endif diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 997ff51fe..2f8bde6f7 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -242,26 +242,20 @@ const char *pkgCache::Priority(unsigned char Prio) return 0; } /*}}}*/ -// Bases for iterator classes /*{{{*/ -void pkgCache::VerIterator::_dummy() {} -void pkgCache::DepIterator::_dummy() {} -void pkgCache::PrvIterator::_dummy() {} -void pkgCache::DescIterator::_dummy() {} - /*}}}*/ // PkgIterator::operator ++ - Postfix incr /*{{{*/ // --------------------------------------------------------------------- /* This will advance to the next logical package in the hash table. */ void pkgCache::PkgIterator::operator ++(int) { // Follow the current links - if (Pkg != Owner->PkgP) - Pkg = Owner->PkgP + Pkg->NextPackage; + if (S != Owner->PkgP) + S = Owner->PkgP + S->NextPackage; // Follow the hash table - while (Pkg == Owner->PkgP && (HashIndex+1) < (signed)_count(Owner->HeaderP->HashTable)) + while (S == Owner->PkgP && (HashIndex+1) < (signed)_count(Owner->HeaderP->HashTable)) { HashIndex++; - Pkg = Owner->PkgP + Owner->HeaderP->HashTable[HashIndex]; + S = Owner->PkgP + Owner->HeaderP->HashTable[HashIndex]; } }; /*}}}*/ @@ -270,12 +264,12 @@ void pkgCache::PkgIterator::operator ++(int) /* By this we mean if it is either cleanly installed or cleanly removed. */ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const { - if (Pkg->InstState == pkgCache::State::ReInstReq || - Pkg->InstState == pkgCache::State::HoldReInstReq) + if (S->InstState == pkgCache::State::ReInstReq || + S->InstState == pkgCache::State::HoldReInstReq) return NeedsUnpack; - if (Pkg->CurrentState == pkgCache::State::UnPacked || - Pkg->CurrentState == pkgCache::State::HalfConfigured) + if (S->CurrentState == pkgCache::State::UnPacked || + S->CurrentState == pkgCache::State::HalfConfigured) // we leave triggers alone complettely. dpkg deals with // them in a hard-to-predict manner and if they get // resolved by dpkg before apt run dpkg --configure on @@ -284,8 +278,8 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const //Pkg->CurrentState == pkgCache::State::TriggersPending) return NeedsConfigure; - if (Pkg->CurrentState == pkgCache::State::HalfInstalled || - Pkg->InstState != pkgCache::State::Ok) + if (S->CurrentState == pkgCache::State::HalfInstalled || + S->InstState != pkgCache::State::Ok) return NeedsUnpack; return NeedsNothing; @@ -347,11 +341,11 @@ operator<<(ostream& out, pkgCache::PkgIterator Pkg) conflicts (including dpkg's Breaks fields). */ bool pkgCache::DepIterator::IsCritical() { - if (Dep->Type == pkgCache::Dep::Conflicts || - Dep->Type == pkgCache::Dep::DpkgBreaks || - Dep->Type == pkgCache::Dep::Obsoletes || - Dep->Type == pkgCache::Dep::Depends || - Dep->Type == pkgCache::Dep::PreDepends) + if (S->Type == pkgCache::Dep::Conflicts || + S->Type == pkgCache::Dep::DpkgBreaks || + S->Type == pkgCache::Dep::Obsoletes || + S->Type == pkgCache::Dep::Depends || + S->Type == pkgCache::Dep::PreDepends) return true; return false; } @@ -430,12 +424,12 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() // Walk along the actual package providing versions for (VerIterator I = DPkg.VersionList(); I.end() == false; I++) { - if (Owner->VS->CheckDep(I.VerStr(),Dep->CompareOp,TargetVer()) == false) + if (Owner->VS->CheckDep(I.VerStr(),S->CompareOp,TargetVer()) == false) continue; - if ((Dep->Type == pkgCache::Dep::Conflicts || - Dep->Type == pkgCache::Dep::DpkgBreaks || - Dep->Type == pkgCache::Dep::Obsoletes) && + if ((S->Type == pkgCache::Dep::Conflicts || + S->Type == pkgCache::Dep::DpkgBreaks || + S->Type == pkgCache::Dep::Obsoletes) && ParentPkg() == I.ParentPkg()) continue; @@ -447,12 +441,12 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() // Follow all provides for (PrvIterator I = DPkg.ProvidesList(); I.end() == false; I++) { - if (Owner->VS->CheckDep(I.ProvideVersion(),Dep->CompareOp,TargetVer()) == false) + if (Owner->VS->CheckDep(I.ProvideVersion(),S->CompareOp,TargetVer()) == false) continue; - if ((Dep->Type == pkgCache::Dep::Conflicts || - Dep->Type == pkgCache::Dep::DpkgBreaks || - Dep->Type == pkgCache::Dep::Obsoletes) && + if ((S->Type == pkgCache::Dep::Conflicts || + S->Type == pkgCache::Dep::DpkgBreaks || + S->Type == pkgCache::Dep::Obsoletes) && ParentPkg() == I.OwnerPkg()) continue; @@ -490,7 +484,7 @@ void pkgCache::DepIterator::GlobOr(DepIterator &Start,DepIterator &End) End = *this; for (bool LastOR = true; end() == false && LastOR == true;) { - LastOR = (Dep->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or; + LastOR = (S->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or; (*this)++; if (LastOR == true) End = (*this); @@ -640,7 +634,7 @@ bool pkgCache::PkgFileIterator::IsOk() if (stat(FileName(),&Buf) != 0) return false; - if (Buf.st_size != (signed)File->Size || Buf.st_mtime != File->mtime) + if (Buf.st_size != (signed)S->Size || Buf.st_mtime != S->mtime) return false; return true; diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index e8a3e1064..359f8a590 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -43,6 +43,7 @@ class pkgCache /*{{{*/ struct DescFile; // Iterators + template class Iterator; class PkgIterator; class VerIterator; class DescIterator; @@ -51,14 +52,6 @@ class pkgCache /*{{{*/ class PkgFileIterator; class VerFileIterator; class DescFileIterator; - friend class PkgIterator; - friend class VerIterator; - friend class DescInterator; - friend class DepIterator; - friend class PrvIterator; - friend class PkgFileIterator; - friend class VerFileIterator; - friend class DescFileIterator; class Namespace; -- cgit v1.2.3 From 7d15572bc3124b15c043e38bdc3d90bcc94f108a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 19 Dec 2009 14:25:20 +0100 Subject: add optional gcc features as deprecated, unused and (un)likely --- apt-pkg/contrib/system.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/apt-pkg/contrib/system.h b/apt-pkg/contrib/system.h index 7ec3d7feb..f68df6265 100644 --- a/apt-pkg/contrib/system.h +++ b/apt-pkg/contrib/system.h @@ -55,4 +55,26 @@ #define CLRFLAG(v,f) ((v) &=~FLAG(f)) #define CHKFLAG(v,f) ((v) & FLAG(f) ? true : false) +// some nice optional GNUC features +#if __GNUC__ >= 3 + #define __must_check __attribute__ ((warn_unused_result)) + #define __deprecated __attribute__ ((deprecated)) + /* likely() and unlikely() can be used to mark boolean expressions + as (not) likely true which will help the compiler to optimise */ + #define likely(x) __builtin_expect (!!(x), 1) + #define unlikely(x) __builtin_expect (!!(x), 0) +#else + #define __must_check /* no warn_unused_result */ + #define __deprecated /* no deprecated */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif + +// cold functions are unlikely() to be called +#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4 + #define __cold __attribute__ ((__cold__)) +#else + #define __cold /* no cold marker */ +#endif + #endif -- cgit v1.2.3 From 201d1fa0d25deeda77c2570ee5342eaf18499699 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 19 Dec 2009 14:27:21 +0100 Subject: mark the Error/Warning method as __cold --- apt-pkg/contrib/error.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h index a3be6a575..d92e40e9c 100644 --- a/apt-pkg/contrib/error.h +++ b/apt-pkg/contrib/error.h @@ -52,6 +52,7 @@ #endif #include +#include using std::string; @@ -71,13 +72,13 @@ class GlobalError public: // Call to generate an error from a library call. - bool Errno(const char *Function,const char *Description,...) APT_MFORMAT2; - bool WarningE(const char *Function,const char *Description,...) APT_MFORMAT2; + bool Errno(const char *Function,const char *Description,...) APT_MFORMAT2 __cold; + bool WarningE(const char *Function,const char *Description,...) APT_MFORMAT2 __cold; /* A warning should be considered less severe than an error, and may be ignored by the client. */ - bool Error(const char *Description,...) APT_MFORMAT1; - bool Warning(const char *Description,...) APT_MFORMAT1; + bool Error(const char *Description,...) APT_MFORMAT1 __cold; + bool Warning(const char *Description,...) APT_MFORMAT1 __cold; // Simple accessors inline bool PendingError() {return PendingFlag;}; -- cgit v1.2.3 From 5bf15716398fdb767ca6249a0155219b88d7ae60 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 19 Dec 2009 16:25:56 +0100 Subject: Implement the first step toward Multi-Arch by setting up a Group infrastructor for packages. APT is now aware of the fact that a package A in architecture X can't satisfy a dependency on package A in architecture Y - to handle these packages are now identified by name and architecture, so different architectures of the same package are handled internally as completly different packages. This is great for pinning, dependency checking and in many other situations, but sometimes we need to know which archs are available for a given package: Here Groups come to our rescue! --- apt-pkg/cacheiterators.h | 37 ++++++++++++-- apt-pkg/deb/deblistparser.cc | 40 +++++++++++----- apt-pkg/deb/deblistparser.h | 1 + apt-pkg/pkgcache.cc | 112 ++++++++++++++++++++++++++++++++++++------- apt-pkg/pkgcache.h | 30 ++++++++++-- apt-pkg/pkgcachegen.cc | 111 +++++++++++++++++++++++++++++------------- apt-pkg/pkgcachegen.h | 6 ++- 7 files changed, 267 insertions(+), 70 deletions(-) diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 1da5c6f02..35d3aa228 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -31,10 +31,8 @@ #define PKGLIB_CACHEITERATORS_H // abstract Iterator template /*{{{*/ /* This template provides the very basic iterator methods we - need to have for doing some walk-over-the-cache magic, */ + need to have for doing some walk-over-the-cache magic */ template class pkgCache::Iterator { - __attribute__ ((deprecated)) void _dummy(); // FIXME: Who on earth uses this method ??? - protected: Str *S; pkgCache *Owner; @@ -75,6 +73,35 @@ template class pkgCache::Iterator { // Constructors - look out for the variable assigning inline Iterator() : S(0), Owner(0) {}; inline Iterator(pkgCache &Owner,Str *T = 0) : S(T), Owner(&Owner) {}; +}; + /*}}}*/ +// Group Iterator /*{{{*/ +/* Packages with the same name are collected in a Group so someone only + interest in package names can iterate easily over the names, so the + different architectures can be treated as of the "same" package + (apt internally treat them as totally different packages) */ +class pkgCache::GrpIterator: public Iterator { + protected: + inline Group* OwnerPointer() const { + return Owner->GrpP; + }; + + public: + void operator ++(int) {if (S != Owner->GrpP) S = Owner->GrpP + S->Next;}; + virtual void operator ++() {operator ++(0);}; + + inline const char *Name() const {return S->Name == 0?0:Owner->StrP + S->Name;}; + inline PkgIterator PackageList() const; + PkgIterator FindPkg(string Arch = "any"); + PkgIterator NextPkg(PkgIterator const &Pkg); + + // Constructors + inline GrpIterator(pkgCache &Owner, Group *Trg) : Iterator(Owner, Trg) { + if (S == 0) + S = OwnerPointer(); + }; + inline GrpIterator() : Iterator() {}; + }; /*}}}*/ // Package Iterator /*{{{*/ @@ -103,6 +130,8 @@ class pkgCache::PkgIterator: public Iterator { inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;}; inline bool Purge() const {return S->CurrentState == pkgCache::State::Purge || (S->CurrentVer == 0 && S->CurrentState == pkgCache::State::NotInstalled);}; + inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;}; + inline GrpIterator Group() const { return GrpIterator(*Owner, Owner->GrpP + S->Group);}; inline VerIterator VersionList() const; inline VerIterator CurrentVer() const; @@ -339,6 +368,8 @@ class pkgCache::DescFileIterator : public Iterator { }; /*}}}*/ // Inlined Begin functions cant be in the class because of order problems /*{{{*/ +inline pkgCache::PkgIterator pkgCache::GrpIterator::PackageList() const + {return PkgIterator(*Owner,Owner->PkgP + S->FirstPackage);}; inline pkgCache::VerIterator pkgCache::PkgIterator::VersionList() const {return VerIterator(*Owner,Owner->VerP + S->VersionList);}; inline pkgCache::VerIterator pkgCache::PkgIterator::CurrentVer() const diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 25a1df3f9..fe68aec0b 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -53,12 +53,25 @@ unsigned long debListParser::UniqFindTagWrite(const char *Tag) // ListParser::Package - Return the package name /*{{{*/ // --------------------------------------------------------------------- /* This is to return the name of the package this section describes */ -string debListParser::Package() -{ - string Result = Section.FindS("Package"); - if (Result.empty() == true) - _error->Error("Encountered a section with no Package: header"); - return Result; +string debListParser::Package() { + string const Result = Section.FindS("Package"); + if(unlikely(Result.empty() == true)) + _error->Error("Encountered a section with no Package: header"); + return Result; +} + /*}}}*/ +// ListParser::Architecture - Return the package arch /*{{{*/ +// --------------------------------------------------------------------- +/* This will return the Architecture of the package this section describes + Note that architecture "all" packages will get the architecture of the + Packages file parsed here */ +string debListParser::Architecture() { + string const Result = Section.FindS("Architecture"); + if (Result.empty() == true) + return Arch; + if (Result == "all") + return Arch; + return Result; } /*}}}*/ // ListParser::Version - Return the version string /*{{{*/ @@ -78,8 +91,10 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) { // Parse the section Ver->Section = UniqFindTagWrite("Section"); - Ver->Arch = UniqFindTagWrite("Architecture"); - + + // Parse the architecture + Ver->Arch = WriteUniqString(Architecture()); + // Archive Size Ver->Size = (unsigned)Section.FindI("Size"); @@ -537,6 +552,7 @@ bool debListParser::ParseDepends(pkgCache::VerIterator Ver, return true; string Package; + string const pkgArch = Ver.Arch(); string Version; unsigned int Op; @@ -546,7 +562,7 @@ bool debListParser::ParseDepends(pkgCache::VerIterator Ver, if (Start == 0) return _error->Error("Problem parsing dependency %s",Tag); - if (NewDepends(Ver,Package,Version,Op,Type) == false) + if (NewDepends(Ver,Package,pkgArch,Version,Op,Type) == false) return false; if (Start == Stop) break; @@ -619,6 +635,7 @@ bool debListParser::Step() if (Section.Find("Architecture",Start,Stop) == false) return true; + //FIXME: Accept different Architectures here if (stringcmp(Arch,Start,Stop) == 0) return true; @@ -641,8 +658,9 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI, if (Tags.Step(Section) == false) return false; - //mvo: I don't think we need to fill that in (it's unused since apt-0.6) - //FileI->Architecture = WriteUniqString(Arch); + // FIXME: Do we need it now for multi-arch? + // mvo: I don't think we need to fill that in (it's unused since apt-0.6) +// FileI->Architecture = WriteUniqString(Arch); // apt-secure does no longer download individual (per-section) Release // file. to provide Component pinning we use the section name now diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 1c709229f..5f91e073e 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -46,6 +46,7 @@ class debListParser : public pkgCacheGenerator::ListParser // These all operate against the current section virtual string Package(); + virtual string Architecture(); virtual string Version(); virtual bool NewVersion(pkgCache::VerIterator Ver); virtual string Description(); diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 2f8bde6f7..2b5f53f6f 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -79,7 +79,8 @@ pkgCache::Header::Header() StringList = 0; VerSysName = 0; Architecture = 0; - memset(HashTable,0,sizeof(HashTable)); + memset(PkgHashTable,0,sizeof(PkgHashTable)); + memset(GrpHashTable,0,sizeof(GrpHashTable)); memset(Pools,0,sizeof(Pools)); } /*}}}*/ @@ -118,6 +119,7 @@ bool pkgCache::ReMap() { // Apply the typecasts. HeaderP = (Header *)Map.Data(); + GrpP = (Group *)Map.Data(); PkgP = (Package *)Map.Data(); VerFileP = (VerFile *)Map.Data(); DescFileP = (DescFile *)Map.Data(); @@ -165,7 +167,7 @@ unsigned long pkgCache::sHash(const string &Str) const unsigned long Hash = 0; for (string::const_iterator I = Str.begin(); I != Str.end(); I++) Hash = 5*Hash + tolower_ascii(*I); - return Hash % _count(HeaderP->HashTable); + return Hash % _count(HeaderP->PkgHashTable); } unsigned long pkgCache::sHash(const char *Str) const @@ -173,24 +175,40 @@ unsigned long pkgCache::sHash(const char *Str) const unsigned long Hash = 0; for (const char *I = Str; *I != 0; I++) Hash = 5*Hash + tolower_ascii(*I); - return Hash % _count(HeaderP->HashTable); + return Hash % _count(HeaderP->PkgHashTable); } /*}}}*/ // Cache::FindPkg - Locate a package by name /*{{{*/ // --------------------------------------------------------------------- /* Returns 0 on error, pointer to the package otherwise */ -pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) -{ - // Look at the hash bucket - Package *Pkg = PkgP + HeaderP->HashTable[Hash(Name)]; - for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage) - { - if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] && - stringcasecmp(Name,StrP + Pkg->Name) == 0) - return PkgIterator(*this,Pkg); - } - return PkgIterator(*this,0); +pkgCache::PkgIterator pkgCache::FindPkg(const string &Name, string Arch) { + /* We make a detour via the GrpIterator here as + on a multi-arch environment a group is easier to + find than a package (less entries in the buckets) */ + pkgCache::GrpIterator Grp = FindGrp(Name); + if (Grp.end() == true) + return PkgIterator(*this,0); + + return Grp.FindPkg(Arch); +} + /*}}}*/ +// Cache::FindGrp - Locate a group by name /*{{{*/ +// --------------------------------------------------------------------- +/* Returns End-Pointer on error, pointer to the group otherwise */ +pkgCache::GrpIterator pkgCache::FindGrp(const string &Name) { + if (unlikely(Name.empty() == true)) + return GrpIterator(*this,0); + + // Look at the hash bucket for the group + Group *Grp = GrpP + HeaderP->GrpHashTable[sHash(Name)]; + for (; Grp != GrpP; Grp = GrpP + Grp->Next) { + if (Grp->Name != 0 && StrP[Grp->Name] == Name[0] && + stringcasecmp(Name, StrP + Grp->Name) == 0) + return GrpIterator(*this, Grp); + } + + return GrpIterator(*this,0); } /*}}}*/ // Cache::CompTypeDeb - Return a string describing the compare type /*{{{*/ @@ -242,6 +260,68 @@ const char *pkgCache::Priority(unsigned char Prio) return 0; } /*}}}*/ +// GrpIterator::FindPkg - Locate a package by arch /*{{{*/ +// --------------------------------------------------------------------- +/* Returns an End-Pointer on error, pointer to the package otherwise */ +pkgCache::PkgIterator pkgCache::GrpIterator::FindPkg(string Arch) { + if (unlikely(IsGood() == false || S->FirstPackage == 0)) + return PkgIterator(*Owner, 0); + + static string const myArch = _config->Find("APT::Architecture"); + /* Most of the time the package for our native architecture is + the one we add at first to the cache, but this would be the + last one we check, so we do it now. */ + if (Arch == "native" || Arch == myArch) { + Arch = myArch; + pkgCache::Package *Pkg = Owner->PkgP + S->LastPackage; + if (stringcasecmp(Arch, Owner->StrP + Pkg->Arch) == 0) + return PkgIterator(*Owner, Pkg); + } + + /* If we accept any package we simply return the "first" + package in this group (the last one added). */ + if (Arch == "any") + return PkgIterator(*Owner, Owner->PkgP + S->FirstPackage); + + /* Iterate over the list to find the matching arch + unfortunately this list includes "package noise" + (= different packages with same calculated hash), + so we need to check the name also */ + for (pkgCache::Package *Pkg = PackageList(); Pkg != Owner->PkgP; + Pkg = Owner->PkgP + Pkg->NextPackage) { + if (S->Name == Pkg->Name && + stringcasecmp(Arch, Owner->StrP + Pkg->Arch) == 0) + return PkgIterator(*Owner, Pkg); + if ((Owner->PkgP + S->LastPackage) == Pkg) + break; + } + + return PkgIterator(*Owner, 0); +} + /*}}}*/ +// GrpIterator::NextPkg - Locate the next package in the group /*{{{*/ +// --------------------------------------------------------------------- +/* Returns an End-Pointer on error, pointer to the package otherwise. + We can't simply ++ to the next as the list of packages includes + "package noise" (= packages with the same hash value but different name) */ +pkgCache::PkgIterator pkgCache::GrpIterator::NextPkg(pkgCache::PkgIterator const &LastPkg) { + if (unlikely(IsGood() == false || S->FirstPackage == 0 || + LastPkg.end() == true)) + return PkgIterator(*Owner, 0); + + // Iterate over the list to find the next package + pkgCache::Package *Pkg = Owner->PkgP + LastPkg.Index(); + Pkg = Owner->PkgP + Pkg->NextPackage; + for (; Pkg != Owner->PkgP; Pkg = Owner->PkgP + Pkg->NextPackage) { + if (S->Name == Pkg->Name) + return PkgIterator(*Owner, Pkg); + if ((Owner->PkgP + S->LastPackage) == Pkg) + break; + } + + return PkgIterator(*Owner, 0); +} + /*}}}*/ // PkgIterator::operator ++ - Postfix incr /*{{{*/ // --------------------------------------------------------------------- /* This will advance to the next logical package in the hash table. */ @@ -252,10 +332,10 @@ void pkgCache::PkgIterator::operator ++(int) S = Owner->PkgP + S->NextPackage; // Follow the hash table - while (S == Owner->PkgP && (HashIndex+1) < (signed)_count(Owner->HeaderP->HashTable)) + while (S == Owner->PkgP && (HashIndex+1) < (signed)_count(Owner->HeaderP->PkgHashTable)) { HashIndex++; - S = Owner->PkgP + Owner->HeaderP->HashTable[HashIndex]; + S = Owner->PkgP + Owner->HeaderP->PkgHashTable[HashIndex]; } }; /*}}}*/ diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 359f8a590..b3d2752d2 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -32,6 +32,7 @@ class pkgCache /*{{{*/ public: // Cache element predeclarations struct Header; + struct Group; struct Package; struct PackageFile; struct Version; @@ -44,6 +45,7 @@ class pkgCache /*{{{*/ // Iterators template class Iterator; + class GrpIterator; class PkgIterator; class VerIterator; class DescIterator; @@ -97,6 +99,7 @@ class pkgCache /*{{{*/ // Pointers to the arrays of items Header *HeaderP; + Group *GrpP; Package *PkgP; VerFile *VerFileP; DescFile *DescFileP; @@ -121,7 +124,9 @@ class pkgCache /*{{{*/ const char *Priority(unsigned char Priority); // Accessors - PkgIterator FindPkg(const string &Name); + GrpIterator FindGrp(const string &Name); + PkgIterator FindPkg(const string &Name, string Arch = "native"); + Header &Head() {return *HeaderP;}; inline PkgIterator PkgBegin(); inline PkgIterator PkgEnd(); @@ -161,6 +166,7 @@ struct pkgCache::Header unsigned short DescFileSz; // Structure counts + unsigned long GroupCount; unsigned long PackageCount; unsigned long VersionCount; unsigned long DescriptionCount; @@ -180,22 +186,36 @@ struct pkgCache::Header /* Allocation pools, there should be one of these for each structure excluding the header */ - DynamicMMap::Pool Pools[8]; + DynamicMMap::Pool Pools[9]; - // Rapid package name lookup - map_ptrloc HashTable[2*1048]; + // Rapid package and group name lookup + // Notice: Increase only both table sizes as the + // hashmethod assume the size of the Pkg one + map_ptrloc PkgHashTable[2*1048]; + map_ptrloc GrpHashTable[2*1048]; bool CheckSizes(Header &Against) const; Header(); }; /*}}}*/ +struct pkgCache::Group { /*{{{*/ + map_ptrloc Name; // Stringtable + + // Linked List + map_ptrloc FirstPackage;// Package + map_ptrloc LastPackage; // Package + map_ptrloc Next; // Group +}; + /*}}}*/ struct pkgCache::Package /*{{{*/ { // Pointers map_ptrloc Name; // Stringtable + map_ptrloc Arch; // StringTable (StringItem) map_ptrloc VersionList; // Version map_ptrloc CurrentVer; // Version map_ptrloc Section; // StringTable (StringItem) + map_ptrloc Group; // Group the Package belongs to // Linked list map_ptrloc NextPackage; // Package @@ -254,7 +274,7 @@ struct pkgCache::Version /*{{{*/ map_ptrloc VerStr; // Stringtable map_ptrloc Section; // StringTable (StringItem) map_ptrloc Arch; // StringTable - + // Lists map_ptrloc FileList; // VerFile map_ptrloc NextVer; // Version diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 68180c702..c37f6f48e 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -108,12 +108,12 @@ bool pkgCacheGenerator::MergeList(ListParser &List, while (List.Step() == true) { // Get a pointer to the package structure - string PackageName = List.Package(); + string const PackageName = List.Package(); if (PackageName.empty() == true) return false; - + pkgCache::PkgIterator Pkg; - if (NewPackage(Pkg,PackageName) == false) + if (NewPackage(Pkg, PackageName, List.Architecture()) == false) return _error->Error(_("Error occurred while processing %s (NewPackage)"),PackageName.c_str()); Counter++; if (Counter % 100 == 0 && Progress != 0) @@ -323,33 +323,71 @@ bool pkgCacheGenerator::MergeFileProvides(ListParser &List) return true; } /*}}}*/ +// CacheGenerator::NewGroup - Add a new group /*{{{*/ +// --------------------------------------------------------------------- +/* This creates a new group structure and adds it to the hash table */ +bool pkgCacheGenerator::NewGroup(pkgCache::GrpIterator &Grp, const string &Name) { + Grp = Cache.FindGrp(Name); + if (Grp.end() == false) + return true; + + // Get a structure + unsigned long const Group = Map.Allocate(sizeof(pkgCache::Group)); + if (unlikely(Group == 0)) + return false; + + Grp = pkgCache::GrpIterator(Cache, Cache.GrpP + Group); + Grp->Name = Map.WriteString(Name); + if (unlikely(Grp->Name == 0)) + return false; + + // Insert it into the hash table + unsigned long const Hash = Cache.Hash(Name); + Grp->Next = Cache.HeaderP->GrpHashTable[Hash]; + Cache.HeaderP->GrpHashTable[Hash] = Group; + + Cache.HeaderP->GroupCount++; + + return true; +} + /*}}}*/ // CacheGenerator::NewPackage - Add a new package /*{{{*/ // --------------------------------------------------------------------- /* This creates a new package structure and adds it to the hash table */ -bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg,const string &Name) -{ - Pkg = Cache.FindPkg(Name); - if (Pkg.end() == false) - return true; +bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg,const string &Name, + const string &Arch) { + pkgCache::GrpIterator Grp; + if (unlikely(NewGroup(Grp, Name) == false)) + return false; + + Pkg = Grp.FindPkg(Arch); + if (Pkg.end() == false) + return true; // Get a structure - unsigned long Package = Map.Allocate(sizeof(pkgCache::Package)); - if (Package == 0) + unsigned long const Package = Map.Allocate(sizeof(pkgCache::Package)); + if (unlikely(Package == 0)) return false; - Pkg = pkgCache::PkgIterator(Cache,Cache.PkgP + Package); - + // Insert it into the hash table - unsigned long Hash = Cache.Hash(Name); - Pkg->NextPackage = Cache.HeaderP->HashTable[Hash]; - Cache.HeaderP->HashTable[Hash] = Package; - - // Set the name and the ID - Pkg->Name = Map.WriteString(Name); - if (Pkg->Name == 0) + unsigned long const Hash = Cache.Hash(Name); + Pkg->NextPackage = Cache.HeaderP->PkgHashTable[Hash]; + Cache.HeaderP->PkgHashTable[Hash] = Package; + + // remember the packages in the group + Grp->FirstPackage = Package; + if (Grp->LastPackage == 0) + Grp->LastPackage = Package; + + // Set the name, arch and the ID + Pkg->Name = Grp->Name; + Pkg->Group = Grp.Index(); + Pkg->Arch = WriteUniqString(Arch.c_str()); + if (unlikely(Pkg->Arch == 0)) return false; Pkg->ID = Cache.HeaderP->PackageCount++; - + return true; } /*}}}*/ @@ -474,6 +512,7 @@ map_ptrloc pkgCacheGenerator::NewDescription(pkgCache::DescIterator &Desc, version and to the package that it is pointing to. */ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, const string &PackageName, + const string &Arch, const string &Version, unsigned int Op, unsigned int Type) @@ -481,8 +520,8 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, pkgCache &Cache = Owner->Cache; // Get a structure - unsigned long Dependency = Owner->Map.Allocate(sizeof(pkgCache::Dependency)); - if (Dependency == 0) + unsigned long const Dependency = Owner->Map.Allocate(sizeof(pkgCache::Dependency)); + if (unlikely(Dependency == 0)) return false; // Fill it in @@ -492,11 +531,17 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, Dep->CompareOp = Op; Dep->ID = Cache.HeaderP->DependsCount++; - // Locate the target package - pkgCache::PkgIterator Pkg; - if (Owner->NewPackage(Pkg,PackageName) == false) + pkgCache::GrpIterator Grp; + if (unlikely(Owner->NewGroup(Grp, PackageName) == false)) return false; - + + // Locate the target package + pkgCache::PkgIterator Pkg = Grp.FindPkg(Arch); + if (Pkg.end() == true) { + if (unlikely(Owner->NewPackage(Pkg, PackageName, Arch) == false)) + return false; + } + // Probe the reverse dependency list for a version string that matches if (Version.empty() == false) { @@ -504,7 +549,7 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, if (I->Version != 0 && I.TargetVer() == Version) Dep->Version = I->Version;*/ if (Dep->Version == 0) - if ((Dep->Version = WriteString(Version)) == 0) + if (unlikely((Dep->Version = WriteString(Version)) == 0)) return false; } @@ -524,7 +569,7 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, } // Is it a file dependency? - if (PackageName[0] == '/') + if (unlikely(PackageName[0] == '/')) FoundFileDeps = true; Dep->NextDepends = *OldDepLast; @@ -544,12 +589,12 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator Ver, pkgCache &Cache = Owner->Cache; // We do not add self referencing provides - if (Ver.ParentPkg().Name() == PackageName) + if (unlikely(Ver.ParentPkg().Name() == PackageName)) return true; // Get a structure - unsigned long Provides = Owner->Map.Allocate(sizeof(pkgCache::Provides)); - if (Provides == 0) + unsigned long const Provides = Owner->Map.Allocate(sizeof(pkgCache::Provides)); + if (unlikely(Provides == 0)) return false; Cache.HeaderP->ProvidesCount++; @@ -558,12 +603,12 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator Ver, Prv->Version = Ver.Index(); Prv->NextPkgProv = Ver->ProvidesList; Ver->ProvidesList = Prv.Index(); - if (Version.empty() == false && (Prv->ProvideVersion = WriteString(Version)) == 0) + if (Version.empty() == false && unlikely((Prv->ProvideVersion = WriteString(Version)) == 0)) return false; // Locate the target package pkgCache::PkgIterator Pkg; - if (Owner->NewPackage(Pkg,PackageName) == false) + if (unlikely(Owner->NewPackage(Pkg,PackageName,string(Ver.Arch())) == false)) return false; // Link it to the package diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index 108b34207..4a2419b24 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -51,7 +51,8 @@ class pkgCacheGenerator /*{{{*/ // Flag file dependencies bool FoundFileDeps; - bool NewPackage(pkgCache::PkgIterator &Pkg,const string &PkgName); + bool NewGroup(pkgCache::GrpIterator &Grp,const string &Name); + bool NewPackage(pkgCache::PkgIterator &Pkg,const string &Name, const string &Arch); bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List); bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List); unsigned long NewVersion(pkgCache::VerIterator &Ver,const string &VerStr,unsigned long Next); @@ -96,7 +97,7 @@ class pkgCacheGenerator::ListParser inline unsigned long WriteUniqString(const char *S,unsigned int Size) {return Owner->WriteUniqString(S,Size);}; inline unsigned long WriteString(const string &S) {return Owner->Map.WriteString(S);}; inline unsigned long WriteString(const char *S,unsigned int Size) {return Owner->Map.WriteString(S,Size);}; - bool NewDepends(pkgCache::VerIterator Ver,const string &Package, + bool NewDepends(pkgCache::VerIterator Ver,const string &Package, const string &Arch, const string &Version,unsigned int Op, unsigned int Type); bool NewProvides(pkgCache::VerIterator Ver,const string &Package, @@ -106,6 +107,7 @@ class pkgCacheGenerator::ListParser // These all operate against the current section virtual string Package() = 0; + virtual string Architecture() = 0; virtual string Version() = 0; virtual bool NewVersion(pkgCache::VerIterator Ver) = 0; virtual string Description() = 0; -- cgit v1.2.3 From 5dd4c8b811d9c7bc33e50254811f5bc0fc37f872 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 23 Dec 2009 12:38:19 +0100 Subject: merge Goswin Brederlow "support download of index files for different archs" patch which includes the following big changes: - Declare the unused [vendor] field in sources.list as option field, e.g. deb [arch=amd64,i386 lang=en_GB have=fun] http://example.org - When fetching index files download them for all APT::Architectures (overrideable with the options field above) - Allow all architectures of APT::Architectures to be in the Cache - Add the architecture to status and progress informations - Add b= (Binary architecture) to policy This commit doesn't incude the "pin-hack" as the Group structure will take care of this (and does it already to some extend). --- apt-pkg/aptconfiguration.cc | 25 ++++ apt-pkg/aptconfiguration.h | 16 +++ apt-pkg/cdrom.cc | 34 ++--- apt-pkg/clean.cc | 6 +- apt-pkg/contrib/strutl.cc | 17 +++ apt-pkg/contrib/strutl.h | 1 + apt-pkg/deb/debindexfile.cc | 15 ++- apt-pkg/deb/debindexfile.h | 4 +- apt-pkg/deb/deblistparser.cc | 57 ++++++--- apt-pkg/deb/deblistparser.h | 2 +- apt-pkg/deb/debmetaindex.cc | 292 +++++++++++++++++++++++++++---------------- apt-pkg/deb/debmetaindex.h | 28 +++-- apt-pkg/metaindex.h | 4 +- apt-pkg/pkgcache.cc | 8 +- apt-pkg/sourcelist.cc | 81 ++++++------ apt-pkg/sourcelist.h | 8 +- apt-pkg/versionmatch.cc | 8 +- apt-pkg/versionmatch.h | 2 + 18 files changed, 394 insertions(+), 214 deletions(-) diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 899004d9f..1ec526646 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -223,4 +224,28 @@ std::vector const Configuration::getLanguages(bool const &All, return codes; } /*}}}*/ +// getArchitectures - Return Vector of prefered Architectures /*{{{*/ +std::vector const Configuration::getArchitectures(bool const &Cached) { + using std::string; + + std::vector static archs; + if (likely(Cached == true) && archs.empty() == false) + return archs; + + string const arch = _config->Find("APT::Architecture"); + archs = _config->FindVector("APT::Architectures"); + if (archs.empty() == true || + std::find(archs.begin(), archs.end(), arch) == archs.end()) + archs.push_back(arch); + return archs; +} + /*}}}*/ +// checkArchitecture - are we interested in the given Architecture? /*{{{*/ +bool const Configuration::checkArchitecture(std::string const &Arch) { + if (Arch == "all") + return true; + std::vector const archs = getArchitectures(true); + return (std::find(archs.begin(), archs.end(), Arch) != archs.end()); +} + /*}}}*/ } diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h index f2f04a39b..b6650e20c 100644 --- a/apt-pkg/aptconfiguration.h +++ b/apt-pkg/aptconfiguration.h @@ -66,6 +66,22 @@ public: /*{{{*/ std::vector static const getLanguages(bool const &All = false, bool const &Cached = true, char const * const Locale = 0); + /** \brief Returns a vector of Architectures we support + * + * \param Cached saves the result so we need to calculated it only once + * this parameter should ony be used for testing purposes. + * + * \return a vector of Architectures in prefered order + */ + std::vector static const getArchitectures(bool const &Cached = true); + + /** \brief Are we interested in the given Architecture? + * + * \param Arch we want to check + * \return true if we are interested, false otherwise + */ + bool static const checkArchitecture(std::string const &Arch); + /*}}}*/ }; /*}}}*/ diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 72d8e4d41..271bca409 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -6,6 +6,8 @@ #include #include #include +#include + #include #include #include @@ -216,33 +218,23 @@ int pkgCdrom::Score(string Path) /* Here we drop everything that is not this machines arch */ bool pkgCdrom::DropBinaryArch(vector &List) { - char S[300]; - snprintf(S,sizeof(S),"/binary-%s/", - _config->Find("Apt::Architecture").c_str()); - + for (unsigned int I = 0; I < List.size(); I++) { const char *Str = List[I].c_str(); - - const char *Res; - if ((Res = strstr(Str,"/binary-")) == 0) + const char *Start, *End; + if ((Start = strstr(Str,"/binary-")) == 0) continue; - // Weird, remove it. - if (strlen(Res) < strlen(S)) - { - List.erase(List.begin() + I); - I--; - continue; - } - - // See if it is our arch - if (stringcmp(Res,Res + strlen(S),S) == 0) - continue; - - // Erase it + // Between Start and End is the architecture + Start += 8; + if ((End = strstr(Start,"/")) != 0 && Start != End && + APT::Configuration::checkArchitecture(string(Start, --End)) == true) + continue; // okay, architecture is accepted + + // not accepted -> Erase it List.erase(List.begin() + I); - I--; + --I; // the next entry is at the same index after the erase } return true; diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 0d1dfbf74..629afd7cf 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -26,7 +27,6 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) { bool CleanInstalled = _config->FindB("APT::Clean-Installed",true); - string MyArch = _config->Find("APT::Architecture"); DIR *D = opendir(Dir.c_str()); if (D == 0) @@ -75,9 +75,9 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) for (I = Start; *I != 0 && *I != '.' ;I++); if (*I != '.') continue; - string Arch = DeQuoteString(string(Start,I-Start)); + string const Arch = DeQuoteString(string(Start,I-Start)); - if (Arch != "all" && Arch != MyArch) + if (APT::Configuration::checkArchitecture(Arch) == false) continue; // Lookup the package diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 4c05f2df8..bed51881f 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -983,6 +983,23 @@ bool TokSplitString(char Tok,char *Input,char **List, return true; } /*}}}*/ +// ExplodeString - Split a string up into a vector /*{{{*/ +// --------------------------------------------------------------------- +/* This can be used to split a given string up into a vector, so the + propose is the same as in the method above and this one is a bit slower + also, but the advantage is that we an iteratable vector */ +vector ExplodeString(string const &haystack, char const &split) { + string::const_iterator start = haystack.begin(); + string::const_iterator end = start; + vector exploded; + do { + for (; end != haystack.end() && *end != split; ++end); + exploded.push_back(string(start, end)); + start = end; + } while (end != haystack.end() && (++end) != haystack.end()); + return exploded; +} + /*}}}*/ // RegexChoice - Simple regex list/list matcher /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 2b2e147fb..3bdb65b4d 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -59,6 +59,7 @@ bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0) bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length); bool TokSplitString(char Tok,char *Input,char **List, unsigned long ListMax); +vector ExplodeString(string const &haystack, char const &split=','); void ioprintf(ostream &out,const char *format,...) APT_FORMAT2; void strprintf(string &out,const char *format,...) APT_FORMAT2; char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_FORMAT3; diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 5beb83665..73d72c729 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -149,9 +149,12 @@ unsigned long debSourcesIndex::Size() const // PackagesIndex::debPackagesIndex - Contructor /*{{{*/ // --------------------------------------------------------------------- /* */ -debPackagesIndex::debPackagesIndex(string URI,string Dist,string Section,bool Trusted) : - pkgIndexFile(Trusted), URI(URI), Dist(Dist), Section(Section) +debPackagesIndex::debPackagesIndex(string const &URI, string const &Dist, string const &Section, + bool const &Trusted, string const &Arch) : + pkgIndexFile(Trusted), URI(URI), Dist(Dist), Section(Section), Architecture(Arch) { + if (Architecture == "native") + Architecture = _config->Find("APT::Architecture"); } /*}}}*/ // PackagesIndex::ArchiveInfo - Short version of the archive url /*{{{*/ @@ -171,6 +174,8 @@ string debPackagesIndex::ArchiveInfo(pkgCache::VerIterator Ver) const Res += " "; Res += Ver.ParentPkg().Name(); Res += " "; + Res += Ver.Arch(); + Res += " "; Res += Ver.VerStr(); return Res; } @@ -204,6 +209,8 @@ string debPackagesIndex::Info(const char *Type) const else Info += Dist + '/' + Section; Info += " "; + Info += Architecture; + Info += " "; Info += Type; return Info; } @@ -227,7 +234,7 @@ string debPackagesIndex::IndexURI(const char *Type) const } else Res = URI + "dists/" + Dist + '/' + Section + - "/binary-" + _config->Find("APT::Architecture") + '/'; + "/binary-" + Architecture + '/'; Res += Type; return Res; @@ -259,7 +266,7 @@ bool debPackagesIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const { string PackageFile = IndexFile("Packages"); FileFd Pkg(PackageFile,FileFd::ReadOnly); - debListParser Parser(&Pkg); + debListParser Parser(&Pkg, Architecture); if (_error->PendingError() == true) return _error->Error("Problem opening %s",PackageFile.c_str()); diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h index c0e8d7d8e..766e8b214 100644 --- a/apt-pkg/deb/debindexfile.h +++ b/apt-pkg/deb/debindexfile.h @@ -46,6 +46,7 @@ class debPackagesIndex : public pkgIndexFile string URI; string Dist; string Section; + string Architecture; string Info(const char *Type) const; string IndexFile(const char *Type) const; @@ -69,7 +70,8 @@ class debPackagesIndex : public pkgIndexFile virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const; virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; - debPackagesIndex(string URI,string Dist,string Section,bool Trusted); + debPackagesIndex(string const &URI, string const &Dist, string const &Section, + bool const &Trusted, string const &Arch = "native"); }; class debTranslationsIndex : public pkgIndexFile diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index fe68aec0b..b57eca813 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -32,10 +32,13 @@ static debListParser::WordList PrioList[] = {{"important",pkgCache::State::Impor // ListParser::debListParser - Constructor /*{{{*/ // --------------------------------------------------------------------- -/* */ -debListParser::debListParser(FileFd *File) : Tags(File) -{ - Arch = _config->Find("APT::architecture"); +/* Provide an architecture and only this one and "all" will be accepted + in Step(), if no Architecture is given we will accept every arch + we would accept in general with checkArchitecture() */ +debListParser::debListParser(FileFd *File, string const &Arch) : Tags(File), + Arch(Arch) { + if (Arch == "native") + this->Arch = _config->Find("APT::Architecture"); } /*}}}*/ // ListParser::UniqFindTagWrite - Find the tag and write a unq string /*{{{*/ @@ -64,13 +67,19 @@ string debListParser::Package() { // --------------------------------------------------------------------- /* This will return the Architecture of the package this section describes Note that architecture "all" packages will get the architecture of the - Packages file parsed here */ + Packages file parsed here. */ string debListParser::Architecture() { string const Result = Section.FindS("Architecture"); - if (Result.empty() == true) - return Arch; - if (Result == "all") - return Arch; + if (Result.empty() == true || Result == "all") { + if (Arch.empty() == true) + /* FIXME: this is a problem for installed arch all + packages as we don't know from which arch this + package was installed - and therefore which + dependency this package resolves. */ + return _config->Find("APT::Architecture"); + else + return Arch; + } return Result; } /*}}}*/ @@ -199,8 +208,12 @@ bool debListParser::UsePackage(pkgCache::PkgIterator Pkg, { if (Pkg->Section == 0) Pkg->Section = UniqFindTagWrite("Section"); - if (Section.FindFlag("Essential",Pkg->Flags,pkgCache::Flag::Essential) == false) - return false; + + // Packages which are not from "our" arch doesn't get the essential flag + string const static myArch = _config->Find("APT::Architecture"); + if (Pkg->Arch != 0 && myArch == Pkg.Arch()) + if (Section.FindFlag("Essential",Pkg->Flags,pkgCache::Flag::Essential) == false) + return false; if (Section.FindFlag("Important",Pkg->Flags,pkgCache::Flag::Important) == false) return false; @@ -630,17 +643,23 @@ bool debListParser::Step() /* See if this is the correct Architecture, if it isn't then we drop the whole section. A missing arch tag only happens (in theory) inside the Status file, so that is a positive return */ - const char *Start; - const char *Stop; - if (Section.Find("Architecture",Start,Stop) == false) + string const Architecture = Section.FindS("Architecture"); + if (Architecture.empty() == true) return true; - //FIXME: Accept different Architectures here - if (stringcmp(Arch,Start,Stop) == 0) - return true; + if (Arch.empty() == true) + { + if (APT::Configuration::checkArchitecture(Architecture) == true) + return true; + } + else + { + if (Architecture == Arch) + return true; - if (stringcmp(Start,Stop,"all") == 0) - return true; + if (Architecture == "all") + return true; + } iOffset = Tags.Offset(); } diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 5f91e073e..cba4f8e5d 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -69,7 +69,7 @@ class debListParser : public pkgCacheGenerator::ListParser bool const &StripMultiArch = false); static const char *ConvertRelation(const char *I,unsigned int &Op); - debListParser(FileFd *File); + debListParser(FileFd *File, string const &Arch = ""); }; #endif diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 8f28f053b..eb01a0156 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -8,9 +8,11 @@ #include #include +#include + using namespace std; -string debReleaseIndex::Info(const char *Type, const string Section) const +string debReleaseIndex::Info(const char *Type, string const &Section, string const &Arch) const { string Info = ::URI::SiteOnly(URI) + ' '; if (Dist[Dist.size() - 1] == '/') @@ -19,7 +21,11 @@ string debReleaseIndex::Info(const char *Type, const string Section) const Info += Dist; } else - Info += Dist + '/' + Section; + { + Info += Dist + '/' + Section; + if (Arch.empty() == true) + Info += " " + Arch; + } Info += " "; Info += Type; return Info; @@ -61,16 +67,21 @@ string debReleaseIndex::MetaIndexURI(const char *Type) const return Res; } -string debReleaseIndex::IndexURISuffix(const char *Type, const string Section) const +string debReleaseIndex::IndexURISuffix(const char *Type, string const &Section, string const &Arch) const { string Res =""; if (Dist[Dist.size() - 1] != '/') - Res += Section + "/binary-" + _config->Find("APT::Architecture") + '/'; + { + if (Arch == "native") + Res += Section + "/binary-" + _config->Find("APT::Architecture") + '/'; + else + Res += Section + "/binary-" + Arch + '/'; + } return Res + Type; } -string debReleaseIndex::IndexURI(const char *Type, const string Section) const +string debReleaseIndex::IndexURI(const char *Type, string const &Section, string const &Arch) const { if (Dist[Dist.size() - 1] == '/') { @@ -82,10 +93,10 @@ string debReleaseIndex::IndexURI(const char *Type, const string Section) const return Res + Type; } else - return URI + "dists/" + Dist + '/' + IndexURISuffix(Type, Section); + return URI + "dists/" + Dist + '/' + IndexURISuffix(Type, Section, Arch); } -string debReleaseIndex::SourceIndexURISuffix(const char *Type, const string Section) const +string debReleaseIndex::SourceIndexURISuffix(const char *Type, const string &Section) const { string Res =""; if (Dist[Dist.size() - 1] != '/') @@ -93,7 +104,7 @@ string debReleaseIndex::SourceIndexURISuffix(const char *Type, const string Sect return Res + Type; } -string debReleaseIndex::SourceIndexURI(const char *Type, const string Section) const +string debReleaseIndex::SourceIndexURI(const char *Type, const string &Section) const { string Res; if (Dist[Dist.size() - 1] == '/') @@ -108,44 +119,61 @@ string debReleaseIndex::SourceIndexURI(const char *Type, const string Section) c return URI + "dists/" + Dist + "/" + SourceIndexURISuffix(Type, Section); } -debReleaseIndex::debReleaseIndex(string URI,string Dist) -{ - this->URI = URI; - this->Dist = Dist; - this->Indexes = NULL; - this->Type = "deb"; +debReleaseIndex::debReleaseIndex(string const &URI, string const &Dist) { + this->URI = URI; + this->Dist = Dist; + this->Indexes = NULL; + this->Type = "deb"; } -debReleaseIndex::~debReleaseIndex() -{ - for (vector::const_iterator I = SectionEntries.begin(); - I != SectionEntries.end(); I++) - delete *I; +debReleaseIndex::~debReleaseIndex() { + for (map >::const_iterator A = ArchEntries.begin(); + A != ArchEntries.end(); ++A) + for (vector::const_iterator S = A->second.begin(); + S != A->second.end(); ++S) + delete *S; } -vector * debReleaseIndex::ComputeIndexTargets() const -{ - vector * IndexTargets = new vector ; - for (vector ::const_iterator I = SectionEntries.begin(); - I != SectionEntries.end(); - I++) - { - IndexTarget * Target = new IndexTarget(); - Target->ShortDesc = (*I)->IsSrc ? "Sources" : "Packages"; - Target->MetaKey - = (*I)->IsSrc ? SourceIndexURISuffix(Target->ShortDesc.c_str(), (*I)->Section) - : IndexURISuffix(Target->ShortDesc.c_str(), (*I)->Section); - Target->URI - = (*I)->IsSrc ? SourceIndexURI(Target->ShortDesc.c_str(), (*I)->Section) - : IndexURI(Target->ShortDesc.c_str(), (*I)->Section); - - Target->Description = Info (Target->ShortDesc.c_str(), (*I)->Section); - IndexTargets->push_back (Target); - } - return IndexTargets; +vector * debReleaseIndex::ComputeIndexTargets() const { + vector * IndexTargets = new vector ; + + map >::const_iterator const src = ArchEntries.find("source"); + if (src != ArchEntries.end()) { + vector const SectionEntries = src->second; + for (vector::const_iterator I = SectionEntries.begin(); + I != SectionEntries.end(); ++I) { + IndexTarget * Target = new IndexTarget(); + Target->ShortDesc = "Sources"; + Target->MetaKey = SourceIndexURISuffix(Target->ShortDesc.c_str(), (*I)->Section); + Target->URI = SourceIndexURI(Target->ShortDesc.c_str(), (*I)->Section); + Target->Description = Info (Target->ShortDesc.c_str(), (*I)->Section); + IndexTargets->push_back (Target); + } + } + + // Only source release + if (IndexTargets->empty() == false && ArchEntries.size() == 1) + return IndexTargets; + + for (map >::const_iterator a = ArchEntries.begin(); + a != ArchEntries.end(); ++a) { + if (a->first == "source") + continue; + for (vector ::const_iterator I = a->second.begin(); + I != a->second.end(); ++I) { + IndexTarget * Target = new IndexTarget(); + Target->ShortDesc = "Packages"; + Target->MetaKey = IndexURISuffix(Target->ShortDesc.c_str(), (*I)->Section, a->first); + Target->URI = IndexURI(Target->ShortDesc.c_str(), (*I)->Section, a->first); + Target->Description = Info (Target->ShortDesc.c_str(), (*I)->Section, a->first); + IndexTargets->push_back (Target); + } + } + + return IndexTargets; } /*}}}*/ -bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool GetAll) const +bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool const &GetAll) const { // special case for --print-uris if (GetAll) { @@ -170,23 +198,27 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool GetAll) const ComputeIndexTargets(), new indexRecords (Dist)); - // Queue the translations - std::vector const lang = APT::Configuration::getLanguages(true); - for (vector::const_iterator I = SectionEntries.begin(); - I != SectionEntries.end(); I++) { - - if((*I)->IsSrc) - continue; - - for (vector::const_iterator l = lang.begin(); - l != lang.end(); l++) - { - debTranslationsIndex i = debTranslationsIndex(URI,Dist,(*I)->Section,(*l).c_str()); - i.GetIndexes(Owner); - } - } - - return true; + // Queue the translations + std::vector const lang = APT::Configuration::getLanguages(true); + map > sections; + for (map >::const_iterator a = ArchEntries.begin(); + a != ArchEntries.end(); ++a) { + if (a->first == "source") + continue; + for (vector::const_iterator I = a->second.begin(); + I != a->second.end(); I++) + sections[(*I)->Section].insert(lang.begin(), lang.end()); + } + + for (map >::const_iterator s = sections.begin(); + s != sections.end(); ++s) + for (set::const_iterator l = s->second.begin(); + l != s->second.end(); l++) { + debTranslationsIndex i = debTranslationsIndex(URI,Dist,s->first,(*l).c_str()); + i.GetIndexes(Owner); + } + + return true; } bool debReleaseIndex::IsTrusted() const @@ -203,71 +235,111 @@ bool debReleaseIndex::IsTrusted() const return false; } -vector *debReleaseIndex::GetIndexFiles() -{ - if (Indexes != NULL) - return Indexes; - - Indexes = new vector ; - std::vector const lang = APT::Configuration::getLanguages(true); - for (vector::const_iterator I = SectionEntries.begin(); - I != SectionEntries.end(); I++) { - if ((*I)->IsSrc) - Indexes->push_back(new debSourcesIndex (URI, Dist, (*I)->Section, IsTrusted())); - else - { - Indexes->push_back(new debPackagesIndex (URI, Dist, (*I)->Section, IsTrusted())); - - for (vector::const_iterator l = lang.begin(); - l != lang.end(); l++) - Indexes->push_back(new debTranslationsIndex(URI,Dist,(*I)->Section,(*l).c_str())); - } - } +vector *debReleaseIndex::GetIndexFiles() { + if (Indexes != NULL) + return Indexes; + + Indexes = new vector ; + map >::const_iterator const src = ArchEntries.find("source"); + if (src != ArchEntries.end()) { + vector const SectionEntries = src->second; + for (vector::const_iterator I = SectionEntries.begin(); + I != SectionEntries.end(); I++) + Indexes->push_back(new debSourcesIndex (URI, Dist, (*I)->Section, IsTrusted())); + } + + // Only source release + if (Indexes->empty() == false && ArchEntries.size() == 1) + return Indexes; + + std::vector const lang = APT::Configuration::getLanguages(true); + map > sections; + for (map >::const_iterator a = ArchEntries.begin(); + a != ArchEntries.end(); ++a) { + if (a->first == "source") + continue; + for (vector::const_iterator I = a->second.begin(); + I != a->second.end(); I++) { + Indexes->push_back(new debPackagesIndex (URI, Dist, (*I)->Section, IsTrusted(), a->first)); + sections[(*I)->Section].insert(lang.begin(), lang.end()); + } + } + + for (map >::const_iterator s = sections.begin(); + s != sections.end(); ++s) + for (set::const_iterator l = s->second.begin(); + l != s->second.end(); l++) + Indexes->push_back(new debTranslationsIndex(URI,Dist,s->first,(*l).c_str())); + + return Indexes; +} - return Indexes; +void debReleaseIndex::PushSectionEntry(vector const &Archs, const debSectionEntry *Entry) { + for (vector::const_iterator a = Archs.begin(); + a != Archs.end(); ++a) + ArchEntries[*a].push_back(new debSectionEntry(Entry->Section, Entry->IsSrc)); + delete Entry; } -void debReleaseIndex::PushSectionEntry(const debSectionEntry *Entry) -{ - SectionEntries.push_back(Entry); +void debReleaseIndex::PushSectionEntry(string const &Arch, const debSectionEntry *Entry) { + ArchEntries[Arch].push_back(Entry); } -debReleaseIndex::debSectionEntry::debSectionEntry (string Section, bool IsSrc): Section(Section) -{ - this->IsSrc = IsSrc; +void debReleaseIndex::PushSectionEntry(const debSectionEntry *Entry) { + if (Entry->IsSrc == true) + PushSectionEntry("source", Entry); + else { + for (map >::iterator a = ArchEntries.begin(); + a != ArchEntries.end(); ++a) { + a->second.push_back(Entry); + } + } } +debReleaseIndex::debSectionEntry::debSectionEntry (string const &Section, + bool const &IsSrc): Section(Section), IsSrc(IsSrc) +{} + class debSLTypeDebian : public pkgSourceList::Type { protected: - bool CreateItemInternal(vector &List,string URI, - string Dist,string Section, - bool IsSrc) const + bool CreateItemInternal(vector &List, string const &URI, + string const &Dist, string const &Section, + bool const &IsSrc, map const &Options) const { - for (vector::const_iterator I = List.begin(); + map::const_iterator const arch = Options.find("arch"); + vector const Archs = + (arch != Options.end()) ? ExplodeString(arch->second) : + APT::Configuration::getArchitectures(); + + for (vector::const_iterator I = List.begin(); I != List.end(); I++) { - // This check insures that there will be only one Release file - // queued for all the Packages files and Sources files it - // corresponds to. - if (strcmp((*I)->GetType(), "deb") == 0) + // We only worry about debian entries here + if (strcmp((*I)->GetType(), "deb") != 0) + continue; + + debReleaseIndex *Deb = (debReleaseIndex *) (*I); + /* This check insures that there will be only one Release file + queued for all the Packages files and Sources files it + corresponds to. */ + if (Deb->GetURI() == URI && Deb->GetDist() == Dist) { - debReleaseIndex *Deb = (debReleaseIndex *) (*I); - // This check insures that there will be only one Release file - // queued for all the Packages files and Sources files it - // corresponds to. - if (Deb->GetURI() == URI && Deb->GetDist() == Dist) - { - Deb->PushSectionEntry(new debReleaseIndex::debSectionEntry(Section, IsSrc)); - return true; - } + if (IsSrc == true) + Deb->PushSectionEntry("source", new debReleaseIndex::debSectionEntry(Section, IsSrc)); + else + Deb->PushSectionEntry(Archs, new debReleaseIndex::debSectionEntry(Section, IsSrc)); + return true; } } // No currently created Release file indexes this entry, so we create a new one. // XXX determine whether this release is trusted or not - debReleaseIndex *Deb = new debReleaseIndex(URI,Dist); - Deb->PushSectionEntry (new debReleaseIndex::debSectionEntry(Section, IsSrc)); + debReleaseIndex *Deb = new debReleaseIndex(URI, Dist); + if (IsSrc == true) + Deb->PushSectionEntry ("source", new debReleaseIndex::debSectionEntry(Section, IsSrc)); + else + Deb->PushSectionEntry (Archs, new debReleaseIndex::debSectionEntry(Section, IsSrc)); List.push_back(Deb); return true; } @@ -277,10 +349,11 @@ class debSLTypeDeb : public debSLTypeDebian { public: - bool CreateItem(vector &List,string URI, - string Dist,string Section) const + bool CreateItem(vector &List, string const &URI, + string const &Dist, string const &Section, + std::map const &Options) const { - return CreateItemInternal(List, URI, Dist, Section, false); + return CreateItemInternal(List, URI, Dist, Section, false, Options); } debSLTypeDeb() @@ -294,10 +367,11 @@ class debSLTypeDebSrc : public debSLTypeDebian { public: - bool CreateItem(vector &List,string URI, - string Dist,string Section) const + bool CreateItem(vector &List, string const &URI, + string const &Dist, string const &Section, + std::map const &Options) const { - return CreateItemInternal(List, URI, Dist, Section, true); + return CreateItemInternal(List, URI, Dist, Section, true, Options); } debSLTypeDebSrc() diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 8e6a1463b..360fa5419 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -5,40 +5,44 @@ #include #include +#include + class debReleaseIndex : public metaIndex { public: class debSectionEntry { public: - debSectionEntry (string Section, bool IsSrc); - bool IsSrc; - string Section; + debSectionEntry (string const &Section, bool const &IsSrc); + string const Section; + bool const IsSrc; }; private: - vector SectionEntries; + std::map > ArchEntries; public: - debReleaseIndex(string URI, string Dist); + debReleaseIndex(string const &URI, string const &Dist); ~debReleaseIndex(); - virtual string ArchiveURI(string File) const {return URI + File;}; - virtual bool GetIndexes(pkgAcquire *Owner, bool GetAll=false) const; + virtual string ArchiveURI(string const &File) const {return URI + File;}; + virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const; vector * ComputeIndexTargets() const; - string Info(const char *Type, const string Section) const; + string Info(const char *Type, string const &Section, string const &Arch="") const; string MetaIndexInfo(const char *Type) const; string MetaIndexFile(const char *Types) const; string MetaIndexURI(const char *Type) const; - string IndexURI(const char *Type, const string Section) const; - string IndexURISuffix(const char *Type, const string Section) const; - string SourceIndexURI(const char *Type, const string Section) const; - string SourceIndexURISuffix(const char *Type, const string Section) const; + string IndexURI(const char *Type, string const &Section, string const &Arch="native") const; + string IndexURISuffix(const char *Type, string const &Section, string const &Arch="native") const; + string SourceIndexURI(const char *Type, const string &Section) const; + string SourceIndexURISuffix(const char *Type, const string &Section) const; virtual vector *GetIndexFiles(); virtual bool IsTrusted() const; + void PushSectionEntry(vector const &Archs, const debSectionEntry *Entry); + void PushSectionEntry(string const &Arch, const debSectionEntry *Entry); void PushSectionEntry(const debSectionEntry *Entry); }; diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h index 779b6ab14..1d2140799 100644 --- a/apt-pkg/metaindex.h +++ b/apt-pkg/metaindex.h @@ -33,8 +33,8 @@ class metaIndex virtual const char* GetType() const {return Type;} // Interface for acquire - virtual string ArchiveURI(string /*File*/) const = 0; - virtual bool GetIndexes(pkgAcquire *Owner, bool GetAll=false) const = 0; + virtual string ArchiveURI(string const& /*File*/) const = 0; + virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const = 0; virtual vector *GetIndexFiles() = 0; virtual bool IsTrusted() const = 0; diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 2b5f53f6f..c945c59bf 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -406,7 +406,7 @@ operator<<(ostream& out, pkgCache::PkgIterator Pkg) string candidate = string(Pkg.CandVersion() == 0 ? "none" : Pkg.CandVersion()); string newest = string(Pkg.VersionList().end() ? "none" : Pkg.VersionList().VerStr()); - out << Pkg.Name() << " < " << current; + out << Pkg.Name() << " [ " << Pkg.Arch() << " ] < " << current; if (current != candidate) out << " -> " << candidate; if ( newest != "none" && candidate != newest) @@ -699,7 +699,9 @@ string pkgCache::VerIterator::RelStr() else Res += File.Site(); } - } + } + if (S->Arch != 0) + Res.append(" [").append(Arch()).append("]"); return Res; } /*}}}*/ @@ -738,6 +740,8 @@ string pkgCache::PkgFileIterator::RelStr() Res = Res + (Res.empty() == true?"l=":",l=") + Label(); if (Component() != 0) Res = Res + (Res.empty() == true?"c=":",c=") + Component(); + if (Architecture() != 0) + Res = Res + (Res.empty() == true?"b=":",b=") + Architecture(); return Res; } /*}}}*/ diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 4b3abe918..6b7a299d6 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -79,13 +79,51 @@ bool pkgSourceList::Type::FixupURI(string &URI) const Weird types may override this. */ bool pkgSourceList::Type::ParseLine(vector &List, const char *Buffer, - unsigned long CurLine, - string File) const + unsigned long const &CurLine, + string const &File) const { + for (;Buffer != 0 && isspace(*Buffer); ++Buffer); // Skip whitespaces + + // Parse option field if it exists + // e.g.: [ option1=value1 option2=value2 ] + map Options; + if (Buffer != 0 && Buffer[0] == '[') + { + ++Buffer; // ignore the [ + for (;Buffer != 0 && isspace(*Buffer); ++Buffer); // Skip whitespaces + while (*Buffer != ']') + { + // get one option, e.g. option1=value1 + string option; + if (ParseQuoteWord(Buffer,option) == false) + return _error->Error(_("Malformed line %lu in source list %s ([option] unparseable)"),CurLine,File.c_str()); + + if (option.length() < 3) + return _error->Error(_("Malformed line %lu in source list %s ([option] too short)"),CurLine,File.c_str()); + + size_t const needle = option.find('='); + if (needle == string::npos) + return _error->Error(_("Malformed line %lu in source list %s ([%s] is not an assignment)"),CurLine,File.c_str(), option.c_str()); + + string const key = string(option, 0, needle); + string const value = string(option, needle + 1, option.length()); + + if (key.empty() == true) + return _error->Error(_("Malformed line %lu in source list %s ([%s] has no key)"),CurLine,File.c_str(), option.c_str()); + + if (value.empty() == true) + return _error->Error(_("Malformed line %lu in source list %s ([%s] key %s has no value)"),CurLine,File.c_str(),option.c_str(),key.c_str()); + + Options[key] = value; + } + ++Buffer; // ignore the ] + for (;Buffer != 0 && isspace(*Buffer); ++Buffer); // Skip whitespaces + } + string URI; string Dist; - string Section; - + string Section; + if (ParseQuoteWord(Buffer,URI) == false) return _error->Error(_("Malformed line %lu in source list %s (URI)"),CurLine,File.c_str()); if (ParseQuoteWord(Buffer,Dist) == false) @@ -100,7 +138,7 @@ bool pkgSourceList::Type::ParseLine(vector &List, if (ParseQuoteWord(Buffer,Section) == true) return _error->Error(_("Malformed line %lu in source list %s (absolute dist)"),CurLine,File.c_str()); Dist = SubstVar(Dist,"$(ARCH)",_config->Find("APT::Architecture")); - return CreateItem(List,URI,Dist,Section); + return CreateItem(List, URI, Dist, Section, Options); } // Grab the rest of the dists @@ -109,7 +147,7 @@ bool pkgSourceList::Type::ParseLine(vector &List, do { - if (CreateItem(List,URI,Dist,Section) == false) + if (CreateItem(List, URI, Dist, Section, Options) == false) return false; } while (ParseQuoteWord(Buffer,Section) == true); @@ -246,36 +284,7 @@ bool pkgSourceList::ReadAppend(string File) if (Parse == 0) return _error->Error(_("Type '%s' is not known on line %u in source list %s"),LineType.c_str(),CurLine,File.c_str()); - // Vendor name specified - if (C[0] == '[') - { - string VendorID; - - if (ParseQuoteWord(C,VendorID) == false) - return _error->Error(_("Malformed line %u in source list %s (vendor id)"),CurLine,File.c_str()); - - if (VendorID.length() < 2 || VendorID.end()[-1] != ']') - return _error->Error(_("Malformed line %u in source list %s (vendor id)"),CurLine,File.c_str()); - VendorID = string(VendorID,1,VendorID.size()-2); - -// for (vector::const_iterator iter = VendorList.begin(); -// iter != VendorList.end(); iter++) -// { -// if ((*iter)->GetVendorID() == VendorID) -// { -// if (_config->FindB("Debug::sourceList", false)) -// std::cerr << "Comparing VendorID \"" << VendorID << "\" with \"" << (*iter)->GetVendorID() << '"' << std::endl; -// Verifier = *iter; -// break; -// } -// } - -// if (Verifier == 0) -// return _error->Error(_("Unknown vendor ID '%s' in line %u of source list %s"), -// VendorID.c_str(),CurLine,File.c_str()); - } - - if (Parse->ParseLine(SrcList,C,CurLine,File) == false) + if (Parse->ParseLine(SrcList, C, CurLine, File) == false) return false; } return true; diff --git a/apt-pkg/sourcelist.h b/apt-pkg/sourcelist.h index b9e4389ed..e15314a5e 100644 --- a/apt-pkg/sourcelist.h +++ b/apt-pkg/sourcelist.h @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -57,9 +58,10 @@ class pkgSourceList bool FixupURI(string &URI) const; virtual bool ParseLine(vector &List, const char *Buffer, - unsigned long CurLine,string File) const; - virtual bool CreateItem(vector &List,string URI, - string Dist,string Section) const = 0; + unsigned long const &CurLine,string const &File) const; + virtual bool CreateItem(vector &List,string const &URI, + string const &Dist,string const &Section, + std::map const &Options) const = 0; Type(); virtual ~Type() {}; }; diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index b4d1d4696..e5f0fafd2 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -100,6 +100,8 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type) RelLabel = Fragments[J]+2; else if (stringcasecmp(Fragments[J],Fragments[J]+2,"c=") == 0) RelComponent = Fragments[J]+2; + else if (stringcasecmp(Fragments[J],Fragments[J]+2,"b=") == 0) + RelArchitecture = Fragments[J]+2; } if (RelVerStr.end()[-1] == '*') @@ -178,7 +180,7 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File) if (RelVerStr.empty() == true && RelOrigin.empty() == true && RelArchive.empty() == true && RelLabel.empty() == true && RelRelease.empty() == true && RelCodename.empty() == true && - RelComponent.empty() == true) + RelComponent.empty() == true && RelArchitecture.empty() == true) return false; if (RelVerStr.empty() == false) @@ -211,6 +213,10 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File) if (File->Component == 0 || stringcasecmp(RelComponent,File.Component()) != 0) return false; + if (RelArchitecture.empty() == false) + if (File->Architecture == 0 || + stringcasecmp(RelArchitecture,File.Architecture()) != 0) + return false; return true; } diff --git a/apt-pkg/versionmatch.h b/apt-pkg/versionmatch.h index a8f3c84ac..a8da072ae 100644 --- a/apt-pkg/versionmatch.h +++ b/apt-pkg/versionmatch.h @@ -23,6 +23,7 @@ Codename (n=) e.g. etch, lenny, squeeze, sid Label (l=) Component (c=) + Binary Architecture (b=) If there are no equals signs in the string then it is scanned in short form - if it starts with a number it is Version otherwise it is an Archive or a Codename. @@ -55,6 +56,7 @@ class pkgVersionMatch string RelArchive; string RelLabel; string RelComponent; + string RelArchitecture; bool MatchAll; // Origin Matching -- cgit v1.2.3 From 25396fb06350344996a20d05423562f08a4165db Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 27 Dec 2009 19:39:47 +0100 Subject: Split ListParser::NewDepends into two methods to use these new method for creating the dependencies needed for our groups: For now for all groups only one package can be installed at the same time which conflicts with each other packages in the group. The exceptions are architecture all package. Also, the Multi-Arch field is now parsed, but not used for now. --- apt-pkg/cacheiterators.h | 14 ++++- apt-pkg/deb/deblistparser.cc | 24 ++++++++ apt-pkg/pkgcache.cc | 27 +++++++++ apt-pkg/pkgcache.h | 12 +++- apt-pkg/pkgcachegen.cc | 133 ++++++++++++++++++++++++++++++++----------- apt-pkg/pkgcachegen.h | 6 +- 6 files changed, 176 insertions(+), 40 deletions(-) diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 35d3aa228..33d2ed6be 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -81,13 +81,21 @@ template class pkgCache::Iterator { different architectures can be treated as of the "same" package (apt internally treat them as totally different packages) */ class pkgCache::GrpIterator: public Iterator { + long HashIndex; + protected: inline Group* OwnerPointer() const { return Owner->GrpP; }; public: - void operator ++(int) {if (S != Owner->GrpP) S = Owner->GrpP + S->Next;}; + // This constructor is the 'begin' constructor, never use it. + inline GrpIterator(pkgCache &Owner) : Iterator(Owner), HashIndex(-1) { + S = OwnerPointer(); + operator ++(0); + }; + + virtual void operator ++(int); virtual void operator ++() {operator ++(0);}; inline const char *Name() const {return S->Name == 0?0:Owner->StrP + S->Name;}; @@ -96,11 +104,11 @@ class pkgCache::GrpIterator: public Iterator { PkgIterator NextPkg(PkgIterator const &Pkg); // Constructors - inline GrpIterator(pkgCache &Owner, Group *Trg) : Iterator(Owner, Trg) { + inline GrpIterator(pkgCache &Owner, Group *Trg) : Iterator(Owner, Trg), HashIndex(0) { if (S == 0) S = OwnerPointer(); }; - inline GrpIterator() : Iterator() {}; + inline GrpIterator() : Iterator(), HashIndex(0) {}; }; /*}}}*/ diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index b57eca813..f683de423 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -104,6 +104,30 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) // Parse the architecture Ver->Arch = WriteUniqString(Architecture()); + // Parse multi-arch + if (Section.FindS("Architecture") == "all") + /* Arch all packages can't have a Multi-Arch field, + but we need a special treatment for them nonetheless */ + Ver->MultiArch = pkgCache::Version::All; + else + { + string const MultiArch = Section.FindS("Multi-Arch"); + if (MultiArch.empty() == true) + Ver->MultiArch = pkgCache::Version::None; + else if (MultiArch == "same") + Ver->MultiArch = pkgCache::Version::Same; + else if (MultiArch == "foreign") + Ver->MultiArch = pkgCache::Version::Foreign; + else if (MultiArch == "allowed") + Ver->MultiArch = pkgCache::Version::Allowed; + else + { + _error->Warning("Unknown Multi-Arch type »%s« for package »%s«", + MultiArch.c_str(), Section.FindS("Package").c_str()); + Ver->MultiArch = pkgCache::Version::None; + } + } + // Archive Size Ver->Size = (unsigned)Section.FindI("Size"); diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index c945c59bf..1e4c7edb3 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -182,6 +182,16 @@ unsigned long pkgCache::sHash(const char *Str) const // Cache::FindPkg - Locate a package by name /*{{{*/ // --------------------------------------------------------------------- /* Returns 0 on error, pointer to the package otherwise */ +pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) { + size_t const found = Name.find(':'); + if (found == string::npos) + return FindPkg(Name, "native"); + return FindPkg(Name.substr(0, found), Name.substr(found+1, string::npos)); +} + /*}}}*/ +// Cache::FindPkg - Locate a package by name /*{{{*/ +// --------------------------------------------------------------------- +/* Returns 0 on error, pointer to the package otherwise */ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name, string Arch) { /* We make a detour via the GrpIterator here as on a multi-arch environment a group is easier to @@ -322,6 +332,23 @@ pkgCache::PkgIterator pkgCache::GrpIterator::NextPkg(pkgCache::PkgIterator const return PkgIterator(*Owner, 0); } /*}}}*/ +// GrpIterator::operator ++ - Postfix incr /*{{{*/ +// --------------------------------------------------------------------- +/* This will advance to the next logical group in the hash table. */ +void pkgCache::GrpIterator::operator ++(int) +{ + // Follow the current links + if (S != Owner->GrpP) + S = Owner->GrpP + S->Next; + + // Follow the hash table + while (S == Owner->GrpP && (HashIndex+1) < (signed)_count(Owner->HeaderP->GrpHashTable)) + { + HashIndex++; + S = Owner->GrpP + Owner->HeaderP->GrpHashTable[HashIndex]; + } +}; + /*}}}*/ // PkgIterator::operator ++ - Postfix incr /*{{{*/ // --------------------------------------------------------------------- /* This will advance to the next logical package in the hash table. */ diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index b3d2752d2..5f50001d0 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -125,9 +125,12 @@ class pkgCache /*{{{*/ // Accessors GrpIterator FindGrp(const string &Name); - PkgIterator FindPkg(const string &Name, string Arch = "native"); + PkgIterator FindPkg(const string &Name); + PkgIterator FindPkg(const string &Name, string Arch); Header &Head() {return *HeaderP;}; + inline GrpIterator GrpBegin(); + inline GrpIterator GrpEnd(); inline PkgIterator PkgBegin(); inline PkgIterator PkgEnd(); inline PkgFileIterator FileBegin(); @@ -274,7 +277,8 @@ struct pkgCache::Version /*{{{*/ map_ptrloc VerStr; // Stringtable map_ptrloc Section; // StringTable (StringItem) map_ptrloc Arch; // StringTable - + enum {None, All, Foreign, Same, Allowed} MultiArch; + // Lists map_ptrloc FileList; // VerFile map_ptrloc NextVer; // Version @@ -337,6 +341,10 @@ struct pkgCache::StringItem /*{{{*/ /*}}}*/ #include +inline pkgCache::GrpIterator pkgCache::GrpBegin() + {return GrpIterator(*this);}; +inline pkgCache::GrpIterator pkgCache::GrpEnd() + {return GrpIterator(*this,GrpP);}; inline pkgCache::PkgIterator pkgCache::PkgBegin() {return PkgIterator(*this);}; inline pkgCache::PkgIterator pkgCache::PkgEnd() diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index c37f6f48e..2a4a30349 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -38,7 +39,7 @@ typedef vector::iterator FileIterator; // CacheGenerator::pkgCacheGenerator - Constructor /*{{{*/ // --------------------------------------------------------------------- -/* We set the diry flag and make sure that is written to the disk */ +/* We set the dirty flag and make sure that is written to the disk */ pkgCacheGenerator::pkgCacheGenerator(DynamicMMap *pMap,OpProgress *Prog) : Map(*pMap), Cache(pMap,false), Progress(Prog), FoundFileDeps(0) @@ -506,21 +507,58 @@ map_ptrloc pkgCacheGenerator::NewDescription(pkgCache::DescIterator &Desc, return Description; } /*}}}*/ -// ListParser::NewDepends - Create a dependency element /*{{{*/ +// CacheGenerator::FinishCache - do various finish operations /*{{{*/ +// --------------------------------------------------------------------- +/* This prepares the Cache for delivery */ +bool pkgCacheGenerator::FinishCache(OpProgress &Progress) { + // FIXME: add progress reporting for this operation + // Do we have different architectures in your groups ? + vector archs = APT::Configuration::getArchitectures(); + if (archs.size() > 1) { + // Create Conflicts in between the group + for (pkgCache::GrpIterator G = GetCache().GrpBegin(); G.end() != true; G++) { + string const PkgName = G.Name(); + for (pkgCache::PkgIterator P = G.PackageList(); P.end() != true; P = G.NextPkg(P)) { + for (pkgCache::VerIterator V = P.VersionList(); V.end() != true; V++) { + // Arch all packages are "co-installable" + if (V->MultiArch == pkgCache::Version::All) + continue; + string const Arch = V.Arch(); + map_ptrloc *OldDepLast = NULL; + for (vector::const_iterator A = archs.begin(); A != archs.end(); ++A) { + if (*A == Arch) + continue; + /* We allow only one installed arch at the time + per group, therefore each group member conflicts + with all other group members */ + pkgCache::PkgIterator D = G.FindPkg(*A); + if (D.end() == true) + continue; + // Conflicts: ${self}:other + NewDepends(D, V, "", + pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts, + OldDepLast); + } + } + } + } + } + return true; +} + /*}}}*/ +// CacheGenerator::NewDepends - Create a dependency element /*{{{*/ // --------------------------------------------------------------------- /* This creates a dependency element in the tree. It is linked to the version and to the package that it is pointing to. */ -bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, - const string &PackageName, - const string &Arch, - const string &Version, - unsigned int Op, - unsigned int Type) +bool pkgCacheGenerator::NewDepends(pkgCache::PkgIterator &Pkg, + pkgCache::VerIterator &Ver, + string const &Version, + unsigned int const &Op, + unsigned int const &Type, + map_ptrloc *OldDepLast) { - pkgCache &Cache = Owner->Cache; - // Get a structure - unsigned long const Dependency = Owner->Map.Allocate(sizeof(pkgCache::Dependency)); + unsigned long const Dependency = Map.Allocate(sizeof(pkgCache::Dependency)); if (unlikely(Dependency == 0)) return false; @@ -530,17 +568,6 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, Dep->Type = Type; Dep->CompareOp = Op; Dep->ID = Cache.HeaderP->DependsCount++; - - pkgCache::GrpIterator Grp; - if (unlikely(Owner->NewGroup(Grp, PackageName) == false)) - return false; - - // Locate the target package - pkgCache::PkgIterator Pkg = Grp.FindPkg(Arch); - if (Pkg.end() == true) { - if (unlikely(Owner->NewPackage(Pkg, PackageName, Arch) == false)) - return false; - } // Probe the reverse dependency list for a version string that matches if (Version.empty() == false) @@ -549,29 +576,23 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, if (I->Version != 0 && I.TargetVer() == Version) Dep->Version = I->Version;*/ if (Dep->Version == 0) - if (unlikely((Dep->Version = WriteString(Version)) == 0)) + if (unlikely((Dep->Version = Map.WriteString(Version)) == 0)) return false; } - + // Link it to the package Dep->Package = Pkg.Index(); Dep->NextRevDepends = Pkg->RevDepends; Pkg->RevDepends = Dep.Index(); - - /* Link it to the version (at the end of the list) - Caching the old end point speeds up generation substantially */ - if (OldDepVer != Ver) + + // Do we know where to link the Dependency to? + if (OldDepLast == NULL) { OldDepLast = &Ver->DependsList; for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) OldDepLast = &D->NextDepends; - OldDepVer = Ver; } - // Is it a file dependency? - if (unlikely(PackageName[0] == '/')) - FoundFileDeps = true; - Dep->NextDepends = *OldDepLast; *OldDepLast = Dep.Index(); OldDepLast = &Dep->NextDepends; @@ -579,6 +600,41 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, return true; } /*}}}*/ +// ListParser::NewDepends - Create the environment for a new dependency /*{{{*/ +// --------------------------------------------------------------------- +/* This creates a Group and the Package to link this dependency to if + needed and handles also the caching of the old endpoint */ +bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, + const string &PackageName, + const string &Arch, + const string &Version, + unsigned int Op, + unsigned int Type) +{ + pkgCache::GrpIterator Grp; + if (unlikely(Owner->NewGroup(Grp, PackageName) == false)) + return false; + + // Locate the target package + pkgCache::PkgIterator Pkg = Grp.FindPkg(Arch); + if (Pkg.end() == true) { + if (unlikely(Owner->NewPackage(Pkg, PackageName, Arch) == false)) + return false; + } + + // Is it a file dependency? + if (unlikely(PackageName[0] == '/')) + FoundFileDeps = true; + + /* Caching the old end point speeds up generation substantially */ + if (OldDepVer != Ver) { + OldDepLast = NULL; + OldDepVer = Ver; + } + + return Owner->NewDepends(Pkg, Ver, Version, Op, Type, OldDepLast); +} + /*}}}*/ // ListParser::NewProvides - Create a Provides element /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -925,6 +981,9 @@ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, if (BuildCache(Gen,Progress,CurrentSize,TotalSize, Files.begin()+EndOfSource,Files.end()) == false) return false; + + // FIXME: move me to a better place + Gen.FinishCache(Progress); } else { @@ -965,6 +1024,9 @@ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, if (BuildCache(Gen,Progress,CurrentSize,TotalSize, Files.begin()+EndOfSource,Files.end()) == false) return false; + + // FIXME: move me to a better place + Gen.FinishCache(Progress); } if (_error->PendingError() == true) @@ -1010,7 +1072,10 @@ bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap) if (BuildCache(Gen,Progress,CurrentSize,TotalSize, Files.begin()+EndOfSource,Files.end()) == false) return false; - + + // FIXME: move me to a better place + Gen.FinishCache(Progress); + if (_error->PendingError() == true) return false; *OutMap = Map.UnGuard(); diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index 4a2419b24..53f09b991 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -55,6 +55,9 @@ class pkgCacheGenerator /*{{{*/ bool NewPackage(pkgCache::PkgIterator &Pkg,const string &Name, const string &Arch); bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List); bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List); + bool NewDepends(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver, + string const &Version, unsigned int const &Op, + unsigned int const &Type, map_ptrloc *OldDepLast); unsigned long NewVersion(pkgCache::VerIterator &Ver,const string &VerStr,unsigned long Next); map_ptrloc NewDescription(pkgCache::DescIterator &Desc,const string &Lang,const MD5SumValue &md5sum,map_ptrloc Next); @@ -73,7 +76,8 @@ class pkgCacheGenerator /*{{{*/ bool HasFileDeps() {return FoundFileDeps;}; bool MergeFileProvides(ListParser &List); - + bool FinishCache(OpProgress &Progress); + pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress); ~pkgCacheGenerator(); }; -- cgit v1.2.3 From 857e9c13d8d9808fcd1ac8ff3469f6c0b90b7fea Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 7 Feb 2010 12:38:13 +0100 Subject: Drop the Arch information from the Version structure as we can get the information from the parent package now --- apt-pkg/cacheiterators.h | 2 +- apt-pkg/deb/deblistparser.cc | 10 +++++++--- apt-pkg/deb/deblistparser.h | 1 + apt-pkg/pkgcache.cc | 4 ++-- apt-pkg/pkgcache.h | 1 - apt-pkg/pkgcachegen.h | 1 + 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 33d2ed6be..d8e044f88 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -178,7 +178,7 @@ class pkgCache::VerIterator : public Iterator { // Accessors inline const char *VerStr() const {return S->VerStr == 0?0:Owner->StrP + S->VerStr;}; inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;}; - inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;}; + inline const char *Arch() const {return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;}; inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + S->ParentPkg);}; inline DescIterator DescriptionList() const; diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index f683de423..26841d3d2 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -83,6 +83,13 @@ string debListParser::Architecture() { return Result; } /*}}}*/ +// ListParser::ArchitectureAll /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debListParser::ArchitectureAll() { + return Section.FindS("Architecture") == "all"; +} + /*}}}*/ // ListParser::Version - Return the version string /*{{{*/ // --------------------------------------------------------------------- /* This is to return the string describing the version in debian form, @@ -101,9 +108,6 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) // Parse the section Ver->Section = UniqFindTagWrite("Section"); - // Parse the architecture - Ver->Arch = WriteUniqString(Architecture()); - // Parse multi-arch if (Section.FindS("Architecture") == "all") /* Arch all packages can't have a Multi-Arch field, diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index cba4f8e5d..8da051530 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -47,6 +47,7 @@ class debListParser : public pkgCacheGenerator::ListParser // These all operate against the current section virtual string Package(); virtual string Architecture(); + virtual bool ArchitectureAll(); virtual string Version(); virtual bool NewVersion(pkgCache::VerIterator Ver); virtual string Description(); diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 1e4c7edb3..7d98869ea 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -399,7 +399,7 @@ const char * pkgCache::PkgIterator::CandVersion() const { //TargetVer is empty, so don't use it. - VerIterator version = pkgPolicy::pkgPolicy(Owner).GetCandidateVer(*this); + VerIterator version = pkgPolicy(Owner).GetCandidateVer(*this); if (version.IsGood()) return version.VerStr(); return 0; @@ -727,7 +727,7 @@ string pkgCache::VerIterator::RelStr() Res += File.Site(); } } - if (S->Arch != 0) + if (S->ParentPkg != 0) Res.append(" [").append(Arch()).append("]"); return Res; } diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 5f50001d0..5edeedfd1 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -276,7 +276,6 @@ struct pkgCache::Version /*{{{*/ { map_ptrloc VerStr; // Stringtable map_ptrloc Section; // StringTable (StringItem) - map_ptrloc Arch; // StringTable enum {None, All, Foreign, Same, Allowed} MultiArch; // Lists diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index 53f09b991..ca5d74a9f 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -112,6 +112,7 @@ class pkgCacheGenerator::ListParser // These all operate against the current section virtual string Package() = 0; virtual string Architecture() = 0; + virtual bool ArchitectureAll() = 0; virtual string Version() = 0; virtual bool NewVersion(pkgCache::VerIterator Ver) = 0; virtual string Description() = 0; -- cgit v1.2.3 From 8b32e9209ecfab776f064e3c4ccab249307ae49d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 10 Feb 2010 17:42:39 +0100 Subject: Pre-MultiArch a package which depends on a package with architecture "all" can be sure that a package comeing in as a dependency of this package will be of the same architecture as itself (or all). We don't want to break this, so internal an arch all package is represented as many arch depending packages. The only problem we have now is that we only know that a arch all package is installed or not - we don't know for which architecture it was installed: So we will look at all these broken arch all pseudo packages and "remove" them. --- apt-pkg/depcache.cc | 93 +++++++++++++++++++++++++++++++++++++++++++++++--- apt-pkg/depcache.h | 12 ++++--- apt-pkg/pkgcachegen.cc | 16 +++++++-- 3 files changed, 110 insertions(+), 11 deletions(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 228750b74..b04181d76 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -596,6 +597,57 @@ void pkgDepCache::UpdateVerState(PkgIterator Pkg) } } /*}}}*/ +// DepCache::RemovePseudoInstalledPkg - MultiArch helper for Update() /*{{{*/ +// --------------------------------------------------------------------- +/* We "install" arch all packages for all archs if it is installed. Many + of these will be broken. This method will look at these broken Pkg and + "remove" it. */ +bool pkgDepCache::RemovePseudoInstalledPkg(PkgIterator &Pkg, std::set &recheck) { + if (unlikely(Pkg->CurrentVer == 0)) + return false; + + VerIterator V = Pkg.CurrentVer(); + if (V->MultiArch != Version::All) + return false; + + unsigned char const DepState = VersionState(V.DependsList(),DepInstall,DepInstMin,DepInstPolicy); + if ((DepState & DepInstMin) == DepInstMin) + return false; + + // Dependencies for this arch all are not statisfied + // so we installed it only for our convenience: get right of it now. + RemoveSizes(Pkg); + RemoveStates(Pkg); + + Pkg->CurrentVer = 0; + PkgState[Pkg->ID].InstallVer = 0; + + AddStates(Pkg); + Update(Pkg); + AddSizes(Pkg); + + // After the remove previously satisfied pseudo pkg could be now + // no longer satisfied, so we need to recheck the reverse dependencies + for (DepIterator d = Pkg.RevDependsList(); d.end() != true; ++d) + { + PkgIterator const P = d.ParentPkg(); + if (P->CurrentVer != 0) + recheck.insert(P.Index()); + } + + if (V.end() != true) + for (PrvIterator Prv = V.ProvidesList(); Prv.end() != true; Prv++) + for (DepIterator d = Prv.ParentPkg().RevDependsList(); + d.end() != true; ++d) + { + PkgIterator const P = d.ParentPkg(); + if (P->CurrentVer != 0) + recheck.insert(P.Index()); + } + + return true; +} + /*}}}*/ // DepCache::Update - Figure out all the state information /*{{{*/ // --------------------------------------------------------------------- /* This will figure out the state of all the packages and all the @@ -609,9 +661,13 @@ void pkgDepCache::Update(OpProgress *Prog) iKeepCount = 0; iBrokenCount = 0; iBadCount = 0; - + + std::set recheck; + // Perform the depends pass int Done = 0; + bool const checkMultiArch = APT::Configuration::getArchitectures().size() > 1; + unsigned long killed = 0; for (PkgIterator I = PkgBegin(); I.end() != true; I++,Done++) { if (Prog != 0 && Done%20 == 0) @@ -619,7 +675,7 @@ void pkgDepCache::Update(OpProgress *Prog) for (VerIterator V = I.VersionList(); V.end() != true; V++) { unsigned char Group = 0; - + for (DepIterator D = V.DependsList(); D.end() != true; D++) { // Build the dependency state. @@ -637,16 +693,43 @@ void pkgDepCache::Update(OpProgress *Prog) D->Type == Dep::DpkgBreaks || D->Type == Dep::Obsoletes) State = ~State; - } + } } - // Compute the pacakge dependency state and size additions + // Compute the package dependency state and size additions AddSizes(I); UpdateVerState(I); AddStates(I); + + if (checkMultiArch != true || I->CurrentVer == 0) + continue; + + VerIterator const V = I.CurrentVer(); + if (V->MultiArch != Version::All) + continue; + + recheck.insert(I.Index()); + --Done; // no progress if we need to recheck the package } - if (Prog != 0) + if (checkMultiArch == true) { + /* FIXME: recheck breaks proper progress reporting as we don't know + how many packages we need to recheck. To lower the effect + a bit we increase with a kill, but we should do something more clever… */ + for(std::set::const_iterator p = recheck.begin(); + p != recheck.end(); ++p) { + if (Prog != 0 && Done%20 == 0) + Prog->Progress(Done); + PkgIterator P = PkgIterator(*Cache, Cache->PkgP + *p); + if (RemovePseudoInstalledPkg(P, recheck) == true) { + ++killed; + ++Done; + } + recheck.erase(p); + } + } + + if (Prog != 0) Prog->Progress(Done); readStateFile(Prog); diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 0306861a1..63cd954ad 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -46,6 +46,7 @@ #include #include +#include class pkgDepCache : protected pkgCache::Namespace { @@ -442,9 +443,6 @@ class pkgDepCache : protected pkgCache::Namespace virtual bool IsDeleteOk(const PkgIterator &Pkg,bool Purge = false, unsigned long Depth = 0, bool FromUser = true); - // This is for debuging - void Update(OpProgress *Prog = 0); - // read persistent states bool readStateFile(OpProgress *prog); bool writeStateFile(OpProgress *prog, bool InstalledOnly=false); @@ -460,9 +458,15 @@ class pkgDepCache : protected pkgCache::Namespace inline unsigned long BadCount() {return iBadCount;}; bool Init(OpProgress *Prog); - + // Generate all state information + void Update(OpProgress *Prog = 0); + pkgDepCache(pkgCache *Cache,Policy *Plcy = 0); virtual ~pkgDepCache(); + + private: + // Helper for Update(OpProgress) to remove pseudoinstalled arch all packages + bool RemovePseudoInstalledPkg(PkgIterator &Pkg, std::set &recheck); }; #endif diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 2a4a30349..a4ca9dfe4 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -108,13 +108,24 @@ bool pkgCacheGenerator::MergeList(ListParser &List, unsigned int Counter = 0; while (List.Step() == true) { - // Get a pointer to the package structure string const PackageName = List.Package(); if (PackageName.empty() == true) return false; + /* As we handle Arch all packages as architecture bounded + we add all information to every (simulated) arch package */ + std::vector genArch; + if (List.ArchitectureAll() == true) + genArch = APT::Configuration::getArchitectures(); + else + genArch.push_back(List.Architecture()); + + for (std::vector::const_iterator arch = genArch.begin(); + arch != genArch.end(); ++arch) + { + // Get a pointer to the package structure pkgCache::PkgIterator Pkg; - if (NewPackage(Pkg, PackageName, List.Architecture()) == false) + if (NewPackage(Pkg, PackageName, *arch) == false) return _error->Error(_("Error occurred while processing %s (NewPackage)"),PackageName.c_str()); Counter++; if (Counter % 100 == 0 && Progress != 0) @@ -257,6 +268,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false) return _error->Error(_("Error occurred while processing %s (NewFileDesc2)"),PackageName.c_str()); + } } FoundFileDeps |= List.HasFileDeps(); -- cgit v1.2.3 From 302578f3b286540a327c822d8be3ccbb4fa47d0a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 10 Feb 2010 21:23:39 +0100 Subject: Create implicit dependencies needed for Multi-Arch handling --- apt-pkg/pkgcachegen.cc | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index a4ca9dfe4..037c0cb63 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -532,11 +532,14 @@ bool pkgCacheGenerator::FinishCache(OpProgress &Progress) { string const PkgName = G.Name(); for (pkgCache::PkgIterator P = G.PackageList(); P.end() != true; P = G.NextPkg(P)) { for (pkgCache::VerIterator V = P.VersionList(); V.end() != true; V++) { - // Arch all packages are "co-installable" - if (V->MultiArch == pkgCache::Version::All) - continue; string const Arch = V.Arch(); map_ptrloc *OldDepLast = NULL; + /* MultiArch handling introduces a lot of implicit Dependencies: + - MultiArch: same → Co-Installable if they have the same version + - Architecture: all → Need to be Co-Installable for internal reasons + - All others conflict with all other group members */ + bool const coInstall = (V->MultiArch == pkgCache::Version::All || + V->MultiArch == pkgCache::Version::Same); for (vector::const_iterator A = archs.begin(); A != archs.end(); ++A) { if (*A == Arch) continue; @@ -546,10 +549,24 @@ bool pkgCacheGenerator::FinishCache(OpProgress &Progress) { pkgCache::PkgIterator D = G.FindPkg(*A); if (D.end() == true) continue; - // Conflicts: ${self}:other - NewDepends(D, V, "", - pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts, - OldDepLast); + if (coInstall == true) { + // Replaces: ${self}:other ( << ${binary:Version}) + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::Less, pkgCache::Dep::Replaces, + OldDepLast); + // Breaks: ${self}:other (!= ${binary:Version}) + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::Less, pkgCache::Dep::DpkgBreaks, + OldDepLast); + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::Greater, pkgCache::Dep::DpkgBreaks, + OldDepLast); + } else { + // Conflicts: ${self}:other + NewDepends(D, V, "", + pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts, + OldDepLast); + } } } } -- cgit v1.2.3 From 67e0766f0eab85ce1aeacee75fc6b200f36996c9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 10 Feb 2010 22:45:58 +0100 Subject: Foreign Versions add an implicit Provides to the other packages in the group --- apt-pkg/deb/deblistparser.cc | 55 +++++++++++++++++++++++++++++--------------- apt-pkg/pkgcachegen.cc | 7 +++--- apt-pkg/pkgcachegen.h | 4 ++-- 3 files changed, 42 insertions(+), 24 deletions(-) diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 26841d3d2..b6082cdd5 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -618,29 +618,46 @@ bool debListParser::ParseProvides(pkgCache::VerIterator Ver) { const char *Start; const char *Stop; - if (Section.Find("Provides",Start,Stop) == false) - return true; - - string Package; - string Version; - unsigned int Op; - - while (1) + if (Section.Find("Provides",Start,Stop) == true) { - Start = ParseDepends(Start,Stop,Package,Version,Op); - if (Start == 0) - return _error->Error("Problem parsing Provides line"); - if (Op != pkgCache::Dep::NoOp) { - _error->Warning("Ignoring Provides line with DepCompareOp for package %s", Package.c_str()); - } else { - if (NewProvides(Ver,Package,Version) == false) - return false; + string Package; + string Version; + string const Arch = Ver.Arch(); + unsigned int Op; + + while (1) + { + Start = ParseDepends(Start,Stop,Package,Version,Op); + if (Start == 0) + return _error->Error("Problem parsing Provides line"); + if (Op != pkgCache::Dep::NoOp) { + _error->Warning("Ignoring Provides line with DepCompareOp for package %s", Package.c_str()); + } else { + if (NewProvides(Ver, Package, Arch, Version) == false) + return false; + } + + if (Start == Stop) + break; } + } - if (Start == Stop) - break; + if (Ver->MultiArch != pkgCache::Version::Foreign) + return true; + + std::vector const archs = APT::Configuration::getArchitectures(); + if (archs.size() <= 1) + return true; + + string const Package = Ver.ParentPkg().Name(); + string const Version = Ver.VerStr(); + for (std::vector::const_iterator a = archs.begin(); + a != archs.end(); ++a) + { + if (NewProvides(Ver, Package, *a, Version) == false) + return false; } - + return true; } /*}}}*/ diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 037c0cb63..ebda325f7 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -668,13 +668,14 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, // --------------------------------------------------------------------- /* */ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator Ver, - const string &PackageName, + const string &PkgName, + const string &PkgArch, const string &Version) { pkgCache &Cache = Owner->Cache; // We do not add self referencing provides - if (unlikely(Ver.ParentPkg().Name() == PackageName)) + if (Ver.ParentPkg().Name() == PkgName && PkgArch == Ver.Arch()) return true; // Get a structure @@ -693,7 +694,7 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator Ver, // Locate the target package pkgCache::PkgIterator Pkg; - if (unlikely(Owner->NewPackage(Pkg,PackageName,string(Ver.Arch())) == false)) + if (unlikely(Owner->NewPackage(Pkg,PkgName, PkgArch) == false)) return false; // Link it to the package diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index ca5d74a9f..46d0cd893 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -104,8 +104,8 @@ class pkgCacheGenerator::ListParser bool NewDepends(pkgCache::VerIterator Ver,const string &Package, const string &Arch, const string &Version,unsigned int Op, unsigned int Type); - bool NewProvides(pkgCache::VerIterator Ver,const string &Package, - const string &Version); + bool NewProvides(pkgCache::VerIterator Ver,const string &PkgName, + const string &PkgArch, const string &Version); public: -- cgit v1.2.3 From 4d174dc84ea184b5afa81abb3b94e2ef3380ece8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 11 Feb 2010 12:19:48 +0100 Subject: Add Multi-Arch: allowed support by creating an implicit provide of name:any for such packages, so dependencies in this style can be easily resolved. --- apt-pkg/deb/deblistparser.cc | 6 ++++++ apt-pkg/pkgcache.cc | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index b6082cdd5..3726a6a04 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -642,6 +642,12 @@ bool debListParser::ParseProvides(pkgCache::VerIterator Ver) } } + if (Ver->MultiArch == pkgCache::Version::Allowed) + { + string const Package = string(Ver.ParentPkg().Name()).append(":").append("any"); + NewProvides(Ver, Package, "any", Ver.VerStr()); + } + if (Ver->MultiArch != pkgCache::Version::Foreign) return true; diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 7d98869ea..2d4ee1010 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -186,7 +186,10 @@ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) { size_t const found = Name.find(':'); if (found == string::npos) return FindPkg(Name, "native"); - return FindPkg(Name.substr(0, found), Name.substr(found+1, string::npos)); + string const Arch = Name.substr(found+1); + if (Arch == "any") + return FindPkg(Name, "any"); + return FindPkg(Name.substr(0, found), Arch); } /*}}}*/ // Cache::FindPkg - Locate a package by name /*{{{*/ -- cgit v1.2.3 From 6293e04ff36cd1cb4756fc30a4777ad6aaf8ffac Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 11 Feb 2010 15:41:04 +0100 Subject: display the architecture of the package if it is not the default architecture in apt-get, display policy for all available architectures and use GrpIterator in apt-cache pkgnames --- cmdline/apt-cache.cc | 46 +++++++++++++++++++++++++++++++--------------- cmdline/apt-get.cc | 33 ++++++++++++++++++++++----------- 2 files changed, 53 insertions(+), 26 deletions(-) diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 7d7f58a62..cd806286c 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1417,11 +1417,15 @@ bool ShowPackage(CommandLine &CmdL) for (const char **I = CmdL.FileList + 1; *I != 0; I++) { + // FIXME: Handle the case in which pkgname name:arch is not found pkgCache::PkgIterator Pkg = Cache.FindPkg(*I); if (Pkg.end() == true) { - _error->Warning(_("Unable to locate package %s"),*I); - continue; + Pkg = Cache.FindPkg(*I, "any"); + if (Pkg.end() == true) { + _error->Warning(_("Unable to locate package %s"),*I); + continue; + } } ++found; @@ -1457,16 +1461,17 @@ bool ShowPackage(CommandLine &CmdL) bool ShowPkgNames(CommandLine &CmdL) { pkgCache &Cache = *GCache; - pkgCache::PkgIterator I = Cache.PkgBegin(); - bool All = _config->FindB("APT::Cache::AllNames","false"); - + pkgCache::GrpIterator I = Cache.GrpBegin(); + bool const All = _config->FindB("APT::Cache::AllNames","false"); + if (CmdL.FileList[1] != 0) { for (;I.end() != true; I++) { - if (All == false && I->VersionList == 0) + if (All == false && I->FirstPackage == 0) + continue; + if (I.FindPkg("any")->VersionList == 0) continue; - if (strncmp(I.Name(),CmdL.FileList[1],strlen(CmdL.FileList[1])) == 0) cout << I.Name() << endl; } @@ -1477,7 +1482,9 @@ bool ShowPkgNames(CommandLine &CmdL) // Show all pkgs for (;I.end() != true; I++) { - if (All == false && I->VersionList == 0) + if (All == false && I->FirstPackage == 0) + continue; + if (I.FindPkg("any")->VersionList == 0) continue; cout << I.Name() << endl; } @@ -1565,19 +1572,27 @@ bool Policy(CommandLine &CmdL) return true; } - + + string const myArch = _config->Find("APT::Architecture"); + // Print out detailed information for each package for (const char **I = CmdL.FileList + 1; *I != 0; I++) { - pkgCache::PkgIterator Pkg = Cache.FindPkg(*I); + pkgCache::GrpIterator Grp = Cache.FindGrp(*I); + pkgCache::PkgIterator Pkg = Grp.FindPkg("any"); if (Pkg.end() == true) { _error->Warning(_("Unable to locate package %s"),*I); continue; } - - cout << Pkg.Name() << ":" << endl; - + + for (; Pkg.end() != true; Pkg = Grp.NextPkg(Pkg)) { + + if (myArch == Pkg.Arch()) + cout << Pkg.Name() << ":" << endl; + else + cout << Pkg.Name() << ": [" << Pkg.Arch() << "]" << endl; + // Installed version cout << _(" Installed: "); if (Pkg->CurrentVer == 0) @@ -1622,8 +1637,9 @@ bool Policy(CommandLine &CmdL) return _error->Error(_("Cache is out of sync, can't x-ref a package file")); printf(_(" %4i %s\n"),Plcy.GetPriority(VF.File()), Indx->Describe(true).c_str()); - } - } + } + } + } } return true; diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 7325bbf22..2597a6acb 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -227,6 +227,17 @@ bool ShowList(ostream &out,string Title,string List,string VersionsList) return false; } /*}}}*/ +// ShowPkg - display a package name /*{{{*/ +// --------------------------------------------------------------------- +/* Displays the package name and maybe also the architecture + if it is not the main architecture */ +string ShowPkg(pkgCache::PkgIterator const Pkg) { + string p = Pkg.Name(); + if (_config->Find("APT::Architecture") != Pkg.Arch()) + p.append(":").append(Pkg.Arch()); + return p; +} + /*}}}*/ // ShowBroken - Debugging aide /*{{{*/ // --------------------------------------------------------------------- /* This prints out the names of all the packages that are broken along @@ -258,8 +269,8 @@ void ShowBroken(ostream &out,CacheFile &Cache,bool Now) } // Print out each package and the failed dependencies - out <<" " << I.Name() << ":"; - unsigned Indent = strlen(I.Name()) + 3; + out << " " << ShowPkg(I) << " :"; + unsigned const Indent = ShowPkg(I).size() + 3; bool First = true; pkgCache::VerIterator Ver; @@ -312,7 +323,7 @@ void ShowBroken(ostream &out,CacheFile &Cache,bool Now) out << ' ' << End.DepType() << ": "; FirstOr = false; - out << Start.TargetPkg().Name(); + out << ShowPkg(Start.TargetPkg()); // Show a quick summary of the version requirements if (Start.TargetVer() != 0) @@ -374,7 +385,7 @@ void ShowNew(ostream &out,CacheFile &Cache) { pkgCache::PkgIterator I(Cache,Cache.List[J]); if (Cache[I].NewInstall() == true) { - List += string(I.Name()) + " "; + List += ShowPkg(I) + " "; VersionsList += string(Cache[I].CandVersion) + "\n"; } } @@ -397,9 +408,9 @@ void ShowDel(ostream &out,CacheFile &Cache) if (Cache[I].Delete() == true) { if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge) - List += string(I.Name()) + "* "; + List += ShowPkg(I) + "* "; else - List += string(I.Name()) + " "; + List += ShowPkg(I) + " "; VersionsList += string(Cache[I].CandVersion)+ "\n"; } @@ -424,7 +435,7 @@ void ShowKept(ostream &out,CacheFile &Cache) I->CurrentVer == 0 || Cache[I].Delete() == true) continue; - List += string(I.Name()) + " "; + List += ShowPkg(I) + " "; VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n"; } ShowList(out,_("The following packages have been kept back:"),List,VersionsList); @@ -445,7 +456,7 @@ void ShowUpgraded(ostream &out,CacheFile &Cache) if (Cache[I].Upgrade() == false || Cache[I].NewInstall() == true) continue; - List += string(I.Name()) + " "; + List += ShowPkg(I) + " "; VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n"; } ShowList(out,_("The following packages will be upgraded:"),List,VersionsList); @@ -466,7 +477,7 @@ bool ShowDowngraded(ostream &out,CacheFile &Cache) if (Cache[I].Downgrade() == false || Cache[I].NewInstall() == true) continue; - List += string(I.Name()) + " "; + List += ShowPkg(I) + " "; VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n"; } return ShowList(out,_("The following packages will be DOWNGRADED:"),List,VersionsList); @@ -484,7 +495,7 @@ bool ShowHold(ostream &out,CacheFile &Cache) pkgCache::PkgIterator I(Cache,Cache.List[J]); if (Cache[I].InstallVer != (pkgCache::Version *)I.CurrentVer() && I->SelectedState == pkgCache::State::Hold) { - List += string(I.Name()) + " "; + List += ShowPkg(I) + " "; VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n"; } } @@ -518,7 +529,7 @@ bool ShowEssential(ostream &out,CacheFile &Cache) if (Added[I->ID] == false) { Added[I->ID] = true; - List += string(I.Name()) + " "; + List += ShowPkg(I) + " "; //VersionsList += string(Cache[I].CurVersion) + "\n"; ??? } } -- cgit v1.2.3 From c5dac10c3dd6d8f54d97d3105803d07fa891fcd4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 11 Feb 2010 18:20:02 +0100 Subject: Arch() on a MultiArch:all version should return "all" to be compatible with previous usecases. You now need to requested with Arch(true) the return of the architecture this version (and pseudo package) was created for. --- apt-pkg/cacheiterators.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index d8e044f88..e8cf28496 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -178,7 +178,16 @@ class pkgCache::VerIterator : public Iterator { // Accessors inline const char *VerStr() const {return S->VerStr == 0?0:Owner->StrP + S->VerStr;}; inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;}; - inline const char *Arch() const {return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;}; + inline const char *Arch() const { + if(S->MultiArch == pkgCache::Version::All) + return "all"; + return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch; + }; + inline const char *Arch(bool const pseudo) const { + if(pseudo == false) + return Arch(); + return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch; + }; inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + S->ParentPkg);}; inline DescIterator DescriptionList() const; -- cgit v1.2.3 From 803ea2a87f81252b2c0d541b8502ed206ce57c84 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 12 Feb 2010 00:04:31 +0100 Subject: Add yet another pseudo package which isn't as pseudo as the others: Arch all packages are now represented by arch depending packages which all depend on a package with the same name and the special arch "all". This packages has NO dependencies, but beside this the same information. It is the only package which has a size, the arch depending ones all have a zero size. While the arch depending pseudo packages are used for dependency resolution the arch "all" package is used for downloading and ordering of the package. --- apt-pkg/algorithms.cc | 52 ++++++++++++++++++++++++++++++++++++++++---- apt-pkg/cacheiterators.h | 1 + apt-pkg/deb/deblistparser.cc | 22 +++++++++++++++++-- apt-pkg/depcache.cc | 4 ++++ apt-pkg/depcache.h | 1 + apt-pkg/orderlist.cc | 4 ++++ apt-pkg/packagemanager.cc | 23 +++++++++++++++----- apt-pkg/pkgcache.cc | 12 ++++++++++ apt-pkg/pkgcache.h | 2 +- apt-pkg/pkgcachegen.cc | 20 +++++++++++++---- cmdline/apt-cache.cc | 2 ++ cmdline/apt-get.cc | 14 +++++++++--- 12 files changed, 137 insertions(+), 20 deletions(-) diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 34da745de..c905cffa9 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -83,13 +83,28 @@ void pkgSimulate::Describe(PkgIterator Pkg,ostream &out,bool Current,bool Candid bool pkgSimulate::Install(PkgIterator iPkg,string /*File*/) { // Adapt the iterator - PkgIterator Pkg = Sim.FindPkg(iPkg.Name()); + PkgIterator Pkg = Sim.FindPkg(iPkg.Name(), iPkg.Arch()); Flags[Pkg->ID] = 1; cout << "Inst "; Describe(Pkg,cout,true,true); Sim.MarkInstall(Pkg,false); - + + if (strcmp(Pkg.Arch(),"all") == 0) + { + pkgCache::GrpIterator G = Pkg.Group(); + pkgCache::GrpIterator iG = iPkg.Group(); + for (pkgCache::PkgIterator P = G.FindPkg("any"); P.end() != true; P = G.NextPkg(P)) + { + if (strcmp(P.Arch(), "all") == 0) + continue; + if (iG.FindPkg(P.Arch())->CurrentVer == 0) + continue; + Flags[P->ID] = 1; + Sim.MarkInstall(P, false); + } + } + // Look for broken conflicts+predepends. for (PkgIterator I = Sim.PkgBegin(); I.end() == false; I++) { @@ -131,9 +146,22 @@ bool pkgSimulate::Install(PkgIterator iPkg,string /*File*/) bool pkgSimulate::Configure(PkgIterator iPkg) { // Adapt the iterator - PkgIterator Pkg = Sim.FindPkg(iPkg.Name()); + PkgIterator Pkg = Sim.FindPkg(iPkg.Name(), iPkg.Arch()); Flags[Pkg->ID] = 2; + + if (strcmp(Pkg.Arch(),"all") == 0) + { + pkgCache::GrpIterator G = Pkg.Group(); + for (pkgCache::PkgIterator P = G.FindPkg("any"); P.end() != true; P = G.NextPkg(P)) + { + if (strcmp(P.Arch(), "all") == 0) + continue; + if (Flags[P->ID] == 1) + Flags[P->ID] = 2; + } + } + // Sim.MarkInstall(Pkg,false); if (Sim[Pkg].InstBroken() == true) { @@ -181,10 +209,26 @@ bool pkgSimulate::Configure(PkgIterator iPkg) bool pkgSimulate::Remove(PkgIterator iPkg,bool Purge) { // Adapt the iterator - PkgIterator Pkg = Sim.FindPkg(iPkg.Name()); + PkgIterator Pkg = Sim.FindPkg(iPkg.Name(), iPkg.Arch()); Flags[Pkg->ID] = 3; Sim.MarkDelete(Pkg); + + if (strcmp(Pkg.Arch(),"all") == 0) + { + pkgCache::GrpIterator G = Pkg.Group(); + pkgCache::GrpIterator iG = iPkg.Group(); + for (pkgCache::PkgIterator P = G.FindPkg("any"); P.end() != true; P = G.NextPkg(P)) + { + if (strcmp(P.Arch(), "all") == 0) + continue; + if (iG.FindPkg(P.Arch())->CurrentVer == 0) + continue; + Flags[P->ID] = 3; + Sim.MarkDelete(P); + } + } + if (Purge == true) cout << "Purg "; else diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index e8cf28496..43cbe1377 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -200,6 +200,7 @@ class pkgCache::VerIterator : public Iterator { string RelStr(); bool Automatic() const; + bool Pseudo() const; VerFileIterator NewestFile() const; inline VerIterator(pkgCache &Owner,Version *Trg = 0) : Iterator(Owner, Trg) { diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 3726a6a04..b3d95164a 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -148,6 +148,24 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) Ver->Priority = pkgCache::State::Extra; } + if (Ver->MultiArch == pkgCache::Version::All) + { + /* We maintain a "pseudo" arch=all package for architecture all versions + on which these versions can depend on. This pseudo package is many used + for downloading/installing: The other pseudo-packages will degenerate + to a NOP in the download/install step - this package will ensure that + it is downloaded only one time and installed only one time -- even if + the architecture bound versions coming in and out on regular basis. */ + if (strcmp(Ver.Arch(true),"all") == 0) + return true; + else + { + // our pseudo packages have no size to not confuse the fetcher + Ver->Size = 0; + Ver->InstalledSize = 0; + } + } + if (ParseDepends(Ver,"Depends",pkgCache::Dep::Depends) == false) return false; if (ParseDepends(Ver,"Pre-Depends",pkgCache::Dep::PreDepends) == false) @@ -593,7 +611,7 @@ bool debListParser::ParseDepends(pkgCache::VerIterator Ver, return true; string Package; - string const pkgArch = Ver.Arch(); + string const pkgArch = Ver.Arch(true); string Version; unsigned int Op; @@ -622,7 +640,7 @@ bool debListParser::ParseProvides(pkgCache::VerIterator Ver) { string Package; string Version; - string const Arch = Ver.Arch(); + string const Arch = Ver.Arch(true); unsigned int Op; while (1) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index b04181d76..e817adb77 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -896,6 +896,10 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge, AddStates(Pkg); Update(Pkg); AddSizes(Pkg); + + // if we remove the pseudo package, we also need to remove the "real" + if (Pkg->CurrentVer != 0 && Pkg.CurrentVer().Pseudo() == true) + MarkDelete(Pkg.Group().FindPkg("all"), rPurge, Depth+1, FromUser); } /*}}}*/ // DepCache::IsDeleteOk - check if it is ok to remove this package /*{{{*/ diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 63cd954ad..ab1021a44 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -333,6 +333,7 @@ class pkgDepCache : protected pkgCache::Namespace inline Header &Head() {return *Cache->HeaderP;}; inline PkgIterator PkgBegin() {return Cache->PkgBegin();}; inline PkgIterator FindPkg(string const &Name) {return Cache->FindPkg(Name);}; + inline PkgIterator FindPkg(string const &Name, string const &Arch) {return Cache->FindPkg(Name, Arch);}; inline pkgCache &GetCache() {return *Cache;}; inline pkgVersioningSystem &VS() {return *Cache->VS;}; diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc index 0ee2e2bc8..2e7618b55 100644 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@ -126,6 +126,10 @@ bool pkgOrderList::IsMissing(PkgIterator Pkg) if (FileList[Pkg->ID].empty() == false) return false; + + if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == true) + return false; + return true; } /*}}}*/ diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 1ab3203a1..08e7fc00f 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -80,7 +80,10 @@ bool pkgPackageManager::GetArchives(pkgAcquire *Owner,pkgSourceList *Sources, // Skip already processed packages if (List->IsNow(Pkg) == false) continue; - + + if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == true) + continue; + new pkgAcqArchive(Owner,Sources,Recs,Cache[Pkg].InstVerIter(Cache), FileNames[Pkg->ID]); } @@ -277,8 +280,10 @@ bool pkgPackageManager::ConfigureAll() for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); I++) { PkgIterator Pkg(Cache,*I); - - if (ConfigurePkgs == true && Configure(Pkg) == false) + + if (ConfigurePkgs == true && + pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false && + Configure(Pkg) == false) return false; List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States); @@ -310,7 +315,9 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg) { PkgIterator Pkg(Cache,*I); - if (ConfigurePkgs == true && Configure(Pkg) == false) + if (ConfigurePkgs == true && + pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false && + Configure(Pkg) == false) return false; List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States); @@ -457,7 +464,10 @@ bool pkgPackageManager::SmartRemove(PkgIterator Pkg) return true; List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States); - return Remove(Pkg,(Cache[Pkg].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge); + + if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false) + return Remove(Pkg,(Cache[Pkg].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge); + return true; } /*}}}*/ // PM::SmartUnPack - Install helper /*{{{*/ @@ -565,7 +575,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) P.end() == false; P++) CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion()); - if (Install(Pkg,FileNames[Pkg->ID]) == false) + if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false && + Install(Pkg,FileNames[Pkg->ID]) == false) return false; List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States); diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 2d4ee1010..04a2c7234 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -649,6 +649,18 @@ bool pkgCache::VerIterator::Automatic() const return false; } /*}}}*/ +// VerIterator::Pseudo - Check if this version is a pseudo one /*{{{*/ +// --------------------------------------------------------------------- +/* Sometimes you have the need to express dependencies with versions + which doesn't really exist or exist multiply times for "different" + packages. We need these versions for dependency resolution but they + are a problem everytime we need to download/install something. */ +bool pkgCache::VerIterator::Pseudo() const +{ + return (S->MultiArch == pkgCache::Version::All && + strcmp(Arch(true),"all") != 0); +} + /*}}}*/ // VerIterator::NewestFile - Return the newest file version relation /*{{{*/ // --------------------------------------------------------------------- /* This looks at the version numbers associated with all of the sources diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 5edeedfd1..012caac76 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -357,7 +357,7 @@ inline pkgCache::PkgFileIterator pkgCache::FileEnd() class pkgCache::Namespace /*{{{*/ { public: - + typedef pkgCache::GrpIterator GrpIterator; typedef pkgCache::PkgIterator PkgIterator; typedef pkgCache::VerIterator VerIterator; typedef pkgCache::DescIterator DescIterator; diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index ebda325f7..c1b546a00 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -115,9 +115,10 @@ bool pkgCacheGenerator::MergeList(ListParser &List, /* As we handle Arch all packages as architecture bounded we add all information to every (simulated) arch package */ std::vector genArch; - if (List.ArchitectureAll() == true) + if (List.ArchitectureAll() == true) { genArch = APT::Configuration::getArchitectures(); - else + genArch.push_back("all"); + } else genArch.push_back(List.Architecture()); for (std::vector::const_iterator arch = genArch.begin(); @@ -531,8 +532,11 @@ bool pkgCacheGenerator::FinishCache(OpProgress &Progress) { for (pkgCache::GrpIterator G = GetCache().GrpBegin(); G.end() != true; G++) { string const PkgName = G.Name(); for (pkgCache::PkgIterator P = G.PackageList(); P.end() != true; P = G.NextPkg(P)) { + if (strcmp(P.Arch(),"all") == 0) + continue; + pkgCache::PkgIterator allPkg; for (pkgCache::VerIterator V = P.VersionList(); V.end() != true; V++) { - string const Arch = V.Arch(); + string const Arch = V.Arch(true); map_ptrloc *OldDepLast = NULL; /* MultiArch handling introduces a lot of implicit Dependencies: - MultiArch: same → Co-Installable if they have the same version @@ -540,6 +544,8 @@ bool pkgCacheGenerator::FinishCache(OpProgress &Progress) { - All others conflict with all other group members */ bool const coInstall = (V->MultiArch == pkgCache::Version::All || V->MultiArch == pkgCache::Version::Same); + if (V->MultiArch == pkgCache::Version::All && allPkg.end() == true) + allPkg = G.FindPkg("all"); for (vector::const_iterator A = archs.begin(); A != archs.end(); ++A) { if (*A == Arch) continue; @@ -561,6 +567,12 @@ bool pkgCacheGenerator::FinishCache(OpProgress &Progress) { NewDepends(D, V, V.VerStr(), pkgCache::Dep::Greater, pkgCache::Dep::DpkgBreaks, OldDepLast); + if (V->MultiArch == pkgCache::Version::All) { + // Depend on ${self}:all which does depend on nothing + NewDepends(allPkg, V, V.VerStr(), + pkgCache::Dep::Equals, pkgCache::Dep::Depends, + OldDepLast); + } } else { // Conflicts: ${self}:other NewDepends(D, V, "", @@ -675,7 +687,7 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator Ver, pkgCache &Cache = Owner->Cache; // We do not add self referencing provides - if (Ver.ParentPkg().Name() == PkgName && PkgArch == Ver.Arch()) + if (Ver.ParentPkg().Name() == PkgName && PkgArch == Ver.Arch(true)) return true; // Get a structure diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index cd806286c..275daa187 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1587,6 +1587,8 @@ bool Policy(CommandLine &CmdL) } for (; Pkg.end() != true; Pkg = Grp.NextPkg(Pkg)) { + if (strcmp(Pkg.Arch(),"all") == 0) + continue; if (myArch == Pkg.Arch()) cout << Pkg.Name() << ":" << endl; diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 2597a6acb..93065004c 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -233,7 +233,7 @@ bool ShowList(ostream &out,string Title,string List,string VersionsList) if it is not the main architecture */ string ShowPkg(pkgCache::PkgIterator const Pkg) { string p = Pkg.Name(); - if (_config->Find("APT::Architecture") != Pkg.Arch()) + if (strcmp(Pkg.Arch(),"all") != 0 && _config->Find("APT::Architecture") != Pkg.Arch()) p.append(":").append(Pkg.Arch()); return p; } @@ -385,6 +385,8 @@ void ShowNew(ostream &out,CacheFile &Cache) { pkgCache::PkgIterator I(Cache,Cache.List[J]); if (Cache[I].NewInstall() == true) { + if (Cache[I].CandidateVerIter(Cache).Pseudo() == true) + continue; List += ShowPkg(I) + " "; VersionsList += string(Cache[I].CandVersion) + "\n"; } @@ -407,6 +409,8 @@ void ShowDel(ostream &out,CacheFile &Cache) pkgCache::PkgIterator I(Cache,Cache.List[J]); if (Cache[I].Delete() == true) { + if (Cache[I].CandidateVerIter(Cache).Pseudo() == true) + continue; if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge) List += ShowPkg(I) + "* "; else @@ -455,7 +459,9 @@ void ShowUpgraded(ostream &out,CacheFile &Cache) // Not interesting if (Cache[I].Upgrade() == false || Cache[I].NewInstall() == true) continue; - + if (Cache[I].CandidateVerIter(Cache).Pseudo() == true) + continue; + List += ShowPkg(I) + " "; VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n"; } @@ -476,7 +482,9 @@ bool ShowDowngraded(ostream &out,CacheFile &Cache) // Not interesting if (Cache[I].Downgrade() == false || Cache[I].NewInstall() == true) continue; - + if (Cache[I].CandidateVerIter(Cache).Pseudo() == true) + continue; + List += ShowPkg(I) + " "; VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n"; } -- cgit v1.2.3 From 42d71ab5fe58953a680bd300a99d173e23430d7c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 12 Feb 2010 17:17:16 +0100 Subject: In SingleArch environments we don't need the arch "all" pseudo package for handling arch:all packages, so we create only one package and stop calling it a pseudo package. --- apt-pkg/deb/deblistparser.cc | 2 +- apt-pkg/pkgcache.cc | 9 +++++++-- apt-pkg/pkgcachegen.cc | 3 ++- cmdline/apt-get.cc | 3 +++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index b3d95164a..1948aedf3 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -158,7 +158,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) the architecture bound versions coming in and out on regular basis. */ if (strcmp(Ver.Arch(true),"all") == 0) return true; - else + else if (Ver.Pseudo() == true) { // our pseudo packages have no size to not confuse the fetcher Ver->Size = 0; diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 04a2c7234..d4268b31c 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -657,8 +657,13 @@ bool pkgCache::VerIterator::Automatic() const are a problem everytime we need to download/install something. */ bool pkgCache::VerIterator::Pseudo() const { - return (S->MultiArch == pkgCache::Version::All && - strcmp(Arch(true),"all") != 0); + if (S->MultiArch == pkgCache::Version::All && + strcmp(Arch(true),"all") != 0) + { + GrpIterator const Grp = ParentPkg().Group(); + return (Grp->LastPackage != Grp->FirstPackage); + } + return false; } /*}}}*/ // VerIterator::NewestFile - Return the newest file version relation /*{{{*/ diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index c1b546a00..6d103c6b6 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -117,7 +117,8 @@ bool pkgCacheGenerator::MergeList(ListParser &List, std::vector genArch; if (List.ArchitectureAll() == true) { genArch = APT::Configuration::getArchitectures(); - genArch.push_back("all"); + if (genArch.size() != 1) + genArch.push_back("all"); } else genArch.push_back(List.Architecture()); diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 93065004c..343226bc3 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -585,6 +585,9 @@ void Stats(ostream &out,pkgDepCache &Dep) unsigned long ReInstall = 0; for (pkgCache::PkgIterator I = Dep.PkgBegin(); I.end() == false; I++) { + if (pkgCache::VerIterator(Dep, Dep[I].CandidateVer).Pseudo() == true) + continue; + if (Dep[I].NewInstall() == true) Install++; else -- cgit v1.2.3 From 9a230738b2287dc5316f601ff0b4765eff9d898d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 13 Feb 2010 00:39:10 +0100 Subject: Add a more or less useful README file for everything related to MultiArch and install it in the apt-doc package. --- README.MultiArch | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++ debian/apt-doc.docs | 3 +- 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 README.MultiArch diff --git a/README.MultiArch b/README.MultiArch new file mode 100644 index 000000000..92491631e --- /dev/null +++ b/README.MultiArch @@ -0,0 +1,106 @@ +Before we start with this topic: Note that MultiArch is not yet ready for +prime time and/or for the casual user. The implementation is so far widely +untested and only useful for developers of packagemanagment tools which +use APT and his friends and maintainers of (upcoming) MultiArch packages. +This README is especially NOT written for the casual user and is NOT a +usage guide - you have been warned. It is assumed that the reader has +at least a bit of knowledge about APT internals, dependency relations +and the MultiArch spec [0]. + + +The implementation is focused on NOT breaking existing singleArch-only +applications and/or systems as this is the current status-quo for all +systems. Also, many systems don't need (or can't make use of) MultiArch, +so APT will proceed in thinking SingleArch as long as it is not explicitly +told to handle MultiArch: +To activate MultiArch handling you need to specify architectures you +want to be considered by APT with the config list APT::Architectures +(Insert architectures in order of preference). +APT will download Packages files for all these architectures in the +update step. Exception: In the sourcelist is the optionfield used: +deb [ arch=amd64,i386 ] http://example.org/ experimental main +(This optionfield is a NOP in previous apt versions) + +Internally in APT a package is represented as a PkgIterator - +before MultiArch this PkgIterator was architecture unaware, +only VerIterators include the architecture they came from. +This is/was a big problem as all versions in a package are +considered for dependency resolution, so pinning will not work in all cases. + +The problem is solved by a conceptional change: +A PkgIterator is now architecture aware, so the packages +of foobar for amd64 and for i386 are now for apt internal totally +different packages. That is a good thing for e.g. pinning, but +sometimes you need the information that such packages are belonging together: +All these foobar packages therefore form a Group accessible with GrpIterators. +Note that the GrpIterator has the same name as all the packages in this group, +so e.g. apt-cache pkgnames iterates over GrpIterator to get the package names: +This is compatible to SingleArch as a Group consists only of a single package +and also to MultiArch as a Group consists of possible many packages which +all have the same name and are therefore out of interest for pkgnames. + + +Caused by the paragraph "Dependencies involving Architecture: all packages" +in the MultiArch spec we have a second major conceptional change +which could even break existing applications, but we hope for the best… +An Architecture: all package is internally split into pseudo packages +for all MultiArch Architectures and additional a package with the +architecture "all" with no dependencies which is a dependency of all +these architecture depending packages. While the architecture depending +packages are mainly used for dependency resolution (a package of arch A which +depends on an arch all package assumes that the dependencies of this package +are also from arch A. Packages also sometimes change from any to all or v.v.) +the arch "all" package is used for scheduling download/installation of the +underlying "real" package. Note that the architecture depending packages can +be detected with Pseudo() while the "all" package reports exactly this arch +as package architecture and as pseudo architecture of the versions of this pkg. +Beware: All versions of a "real" architecture all package will be report "all" +as their architecture if asked with Arch() regardless if they are the "all" or +the architecture depending packages. If you want to know the architecture this +pseudo package was created for call Arch(true). Also, while the spec say that +arch:all packages are not allowed to have a MultiArch flag APT assigns a +special value to them: MultiArch: all. + + +As you might guess this arch:all handling has a few problems (but we think so +far that the problems are minor compared to the problems we would have with +other implementations.) +APT doesn't know which pseudo packages of such an arch all package are +"installed" (to satisfy dependencies), so APT will generate a Cache in which +all these pseudo packages are installed (e.g. apt-cache policy will display +them all as installed). Later in the DepCache step it will "remove" +all pseudo packages whose dependencies are not satisfied. +The expense is that if the package state is broken APT could come to the +conclusion to "remove" too many pseudo packages, but in a stable environment +APT should never end up in a broken system state… + + +Given all these internal changes it is quite interesting that the actual +implementation of MultiArch is trivial: Some implicit dependencies and a few +more provides are all changes needed to get it working. Especially noteworthy +is that it wasn't needed to change the resolver in any way and other parts only +need to be told about ignoring pseudo packages or using GrpIterator instead of +PkgIterator, so chances are good that libapt-applications will proceed to work +without or at least only require minor changes, but your mileage may vary… + + +Known Issues and/or noteworthy stuff: +* The implementation is mostly untested, so it is very likely that APT will + eat your kids if you aren't as lucky as the author of these patches. +* the (install)size of a pseudo package is always NULL - if you want to know + the (install)size you need to get the info from the arch "all" package. +* It is maybe confusing, but the arch "all" package does have the same versions + and in general roughly the same information with one subtil difference: + It doesn't have any dependency, regardless of the type. The pseudo packages + depend on this package. +* apt-cache policy foobar on installed architecture all package foobar will + report all architecture depending packages as installed. Displaying here the + correct information would require to build the complete DepCache… +* [BUG] An installed package which changes the architecture from any to all + (and v.v.) shows up in the NEW packages section instead of UPGRADE. +* [TODO] Investigate the DepCache pseudo-package killer heuristic: + e.g. add more safety guards… +* [FIXME] a few corner cases/missing features marked as FIXME in the code + + +[0] https://wiki.ubuntu.com/MultiarchSpec diff --git a/debian/apt-doc.docs b/debian/apt-doc.docs index a7507f4e7..86aa69ceb 100644 --- a/debian/apt-doc.docs +++ b/debian/apt-doc.docs @@ -1 +1,2 @@ -README.progress-reporting \ No newline at end of file +README.progress-reporting +README.MultiArch -- cgit v1.2.3 From 4cc6f8dc52144f773b96ee99070d1be0821b984e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 13 Feb 2010 01:59:22 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - stdin redirected to /dev/null takes all CPU (Closes: #569488) Thanks to Aurelien Jarno for providing (again) a patch! --- apt-pkg/deb/dpkgpm.cc | 2 +- debian/changelog | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 565f01b84..3dca2b209 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1005,7 +1005,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // wait for input or output here FD_ZERO(&rfds); - if (!stdin_is_dev_null) + if (master >= 0 && !stdin_is_dev_null) FD_SET(0, &rfds); FD_SET(_dpkgin, &rfds); if(master >= 0) diff --git a/debian/changelog b/debian/changelog index a81a2abd0..5d2527cbd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,9 @@ apt (0.7.26) UNRELEASED; urgency=low - add APT::FTPArchive::AlwaysStat to disable the too aggressive caching if versions are build multiply times (not recommend) Patch by Christoph Goehre, thanks! (Closes: #463260) + * apt-pkg/deb/dpkgpm.cc: + - stdin redirected to /dev/null takes all CPU (Closes: #569488) + Thanks to Aurelien Jarno for providing (again) a patch! [ Ivan Masár ] * Slovak translation update. Closes: #568294 -- cgit v1.2.3 From 584fb392715b4e6f6c08b0c59352b1c20de8ff99 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 13 Feb 2010 17:22:34 +0100 Subject: - add --arch option for apt-ftparchive packages and contents commands - if an arch is given accept only *_all.deb and *_arch.deb instead of *.deb. Thanks Stephan Bosch for the patch! (Closes: #319710) --- debian/changelog | 3 +++ doc/apt-ftparchive.1.xml | 12 ++++++++++-- ftparchive/apt-ftparchive.cc | 7 ++++--- ftparchive/writer.cc | 30 ++++++++++++++---------------- ftparchive/writer.h | 6 +++--- 5 files changed, 34 insertions(+), 24 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5d2527cbd..addee11cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,9 @@ apt (0.7.26) UNRELEASED; urgency=low - allow also to skip the last patch if target is reached, thanks Bernhard R. Link! (Closes: #545699) * ftparchive/writer.{cc,h}: + - add --arch option for packages and contents commands + - if an arch is given accept only *_all.deb and *_arch.deb instead + of *.deb. Thanks Stephan Bosch for the patch! (Closes: #319710) - add APT::FTPArchive::AlwaysStat to disable the too aggressive caching if versions are build multiply times (not recommend) Patch by Christoph Goehre, thanks! (Closes: #463260) diff --git a/doc/apt-ftparchive.1.xml b/doc/apt-ftparchive.1.xml index eb61eae51..f88dbe631 100644 --- a/doc/apt-ftparchive.1.xml +++ b/doc/apt-ftparchive.1.xml @@ -39,6 +39,7 @@ + @@ -542,11 +543,18 @@ for i in Sections do Make the caching databases read only. Configuration Item: APT::FTPArchive::ReadOnlyDB. - + + + + Accept in the packages and contents + commands only package files matching *_arch.deb or + *_all.deb instead of all package files in the given path. + Configuration Item: APT::FTPArchive::Architecture. + - &apt-ftparchive; caches as much as possible of metadata in it is cachedb. If packages + &apt-ftparchive; caches as much as possible of metadata in a cachedb. If packages are recompiled and/or republished with the same version again, this will lead to problems as the now outdated cached metadata like size and checksums will be used. With this option enabled this will no longer happen as it will be checked if the file was changed. diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index 5b6b3940c..f1a182e52 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -333,7 +333,7 @@ bool PackageMap::GenContents(Configuration &Setup, gettimeofday(&StartTime,0); // Create a package writer object. - ContentsWriter Contents(""); + ContentsWriter Contents("", Arch); if (PkgExt.empty() == false && Contents.SetExts(PkgExt) == false) return _error->Error(_("Package extension list is too long")); if (_error->PendingError() == true) @@ -606,7 +606,7 @@ bool SimpleGenPackages(CommandLine &CmdL) // Create a package writer object. PackagesWriter Packages(_config->Find("APT::FTPArchive::DB"), - Override, ""); + Override, "", _config->Find("APT::FTPArchive::Architecture")); if (_error->PendingError() == true) return false; @@ -629,7 +629,7 @@ bool SimpleGenContents(CommandLine &CmdL) return ShowHelp(CmdL); // Create a package writer object. - ContentsWriter Contents(_config->Find("APT::FTPArchive::DB")); + ContentsWriter Contents(_config->Find("APT::FTPArchive::DB"), _config->Find("APT::FTPArchive::Architecture")); if (_error->PendingError() == true) return false; @@ -910,6 +910,7 @@ int main(int argc, const char *argv[]) {0,"delink","APT::FTPArchive::DeLinkAct",0}, {0,"readonly","APT::FTPArchive::ReadOnlyDB",0}, {0,"contents","APT::FTPArchive::Contents",0}, + {'a',"arch","APT::FTPArchive::Architecture",CommandLine::HasArg}, {'c',"config-file",0,CommandLine::ConfigFile}, {'o',"option",0,CommandLine::ArbItem}, {0,0,0,0}}; diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 18a3de0c2..9e5b7d4f3 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -54,7 +54,7 @@ inline void SetTFRewriteData(struct TFRewriteData &tfrd, // FTWScanner::FTWScanner - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -FTWScanner::FTWScanner() +FTWScanner::FTWScanner(string const &Arch): Arch(Arch) { ErrorPrinted = false; NoLinkAct = !_config->FindB("APT::FTPArchive::DeLinkAct",true); @@ -299,12 +299,11 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath, // --------------------------------------------------------------------- /* */ PackagesWriter::PackagesWriter(string const &DB,string const &Overrides,string const &ExtOverrides, - string const &aArch) : - Db(DB),Stats(Db.Stats), Arch(aArch) + string const &Arch) : + FTWScanner(Arch), Db(DB), Stats(Db.Stats) { Output = stdout; - SetExts(".deb .udeb .foo .bar .baz"); - AddPattern("*.deb"); + SetExts(".deb .udeb"); DeLinkLimit = 0; // Process the command line options @@ -340,17 +339,16 @@ bool FTWScanner::SetExts(string const &Vals) string::size_type Start = 0; while (Start <= Vals.length()-1) { - string::size_type Space = Vals.find(' ',Start); - string::size_type Length; - if (Space == string::npos) + string::size_type const Space = Vals.find(' ',Start); + string::size_type const Length = ((Space == string::npos) ? Vals.length() : Space) - Start; + if ( Arch.empty() == false ) { - Length = Vals.length()-Start; + AddPattern(string("*_") + Arch + Vals.substr(Start, Length)); + AddPattern(string("*_all") + Vals.substr(Start, Length)); } else - { - Length = Space-Start; - } - AddPattern(string("*") + Vals.substr(Start, Length)); + AddPattern(string("*") + Vals.substr(Start, Length)); + Start += Length + 1; } @@ -767,11 +765,11 @@ bool SourcesWriter::DoPackage(string FileName) // ContentsWriter::ContentsWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -ContentsWriter::ContentsWriter(string const &DB) : - Db(DB), Stats(Db.Stats) +ContentsWriter::ContentsWriter(string const &DB, string const &Arch) : + FTWScanner(Arch), Db(DB), Stats(Db.Stats) { - AddPattern("*.deb"); + SetExts(".deb"); Output = stdout; } /*}}}*/ diff --git a/ftparchive/writer.h b/ftparchive/writer.h index 520e91dd6..af7ba4edd 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -34,6 +34,7 @@ class FTWScanner { protected: vector Patterns; + string Arch; const char *OriginalPath; bool ErrorPrinted; @@ -68,7 +69,7 @@ class FTWScanner void AddPattern(string const &Pattern) { Patterns.push_back(Pattern); }; bool SetExts(string const &Vals); - FTWScanner(); + FTWScanner(string const &Arch = string()); }; class PackagesWriter : public FTWScanner @@ -92,7 +93,6 @@ class PackagesWriter : public FTWScanner string DirStrip; FILE *Output; struct CacheDB::Stats &Stats; - string Arch; inline bool ReadOverride(string const &File) {return Over.ReadOverride(File);}; inline bool ReadExtraOverride(string const &File) @@ -125,7 +125,7 @@ class ContentsWriter : public FTWScanner void Finish() {Gen.Print(Output);}; inline bool ReadyDB(string const &DB) {return Db.ReadyDB(DB);}; - ContentsWriter(string const &DB); + ContentsWriter(string const &DB, string const &Arch = string()); virtual ~ContentsWriter() {}; }; -- cgit v1.2.3 From ee60a63480f7d1a963d7ef2a8e399d0f9b651d71 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 14 Feb 2010 22:24:55 +0100 Subject: Pseudo() doesn't work in the Cache generation step as the check if only one package is in the group will generate false positives - as the others will (maybe) added a little time later in the process. --- apt-pkg/deb/deblistparser.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index bfc0e762e..84eab44a7 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -155,9 +155,10 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) to a NOP in the download/install step - this package will ensure that it is downloaded only one time and installed only one time -- even if the architecture bound versions coming in and out on regular basis. */ + bool const static multiArch = APT::Configuration::getArchitectures().size() > 1; if (strcmp(Ver.Arch(true),"all") == 0) return true; - else if (Ver.Pseudo() == true) + else if (multiArch == true) { // our pseudo packages have no size to not confuse the fetcher Ver->Size = 0; -- cgit v1.2.3 From 83742b3cf4b541fd61533dfecdc97e0e4502a7a4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 14 Feb 2010 23:34:56 +0100 Subject: Add support for the LANGUAGE environment variable --- apt-pkg/aptconfiguration.cc | 91 ++++++++++++++++++++++++++-------------- apt-pkg/aptconfiguration.h | 2 +- apt-pkg/contrib/strutl.cc | 2 +- test/libapt/getlanguages_test.cc | 61 ++++++++++++++++++++------- 4 files changed, 108 insertions(+), 48 deletions(-) diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 0fe84db74..f1989599b 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -8,10 +8,11 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include #include #include +#include #include +#include #include #include @@ -97,7 +98,7 @@ const Configuration::getCompressionTypes(bool const &Cached) { will result in "de_DE, de, en". The special word "none" is the stopcode for the not-All code vector */ std::vector const Configuration::getLanguages(bool const &All, - bool const &Cached, char const * const Locale) { + bool const &Cached, char const ** const Locale) { using std::string; // The detection is boring and has a lot of cornercases, @@ -118,27 +119,29 @@ std::vector const Configuration::getLanguages(bool const &All, } } - // get the environment language code + // get the environment language codes: LC_MESSAGES (and later LANGUAGE) // we extract both, a long and a short code and then we will // check if we actually need both (rare) or if the short is enough - string const envMsg = string(Locale == 0 ? std::setlocale(LC_MESSAGES, NULL) : Locale); + string const envMsg = string(Locale == 0 ? std::setlocale(LC_MESSAGES, NULL) : *Locale); size_t const lenShort = (envMsg.find('_') != string::npos) ? envMsg.find('_') : 2; - size_t const lenLong = (envMsg.find('.') != string::npos) ? envMsg.find('.') : (lenShort + 3); + size_t const lenLong = (envMsg.find_first_of(".@") != string::npos) ? envMsg.find_first_of(".@") : (lenShort + 3); string envLong = envMsg.substr(0,lenLong); string const envShort = envLong.substr(0,lenShort); - bool envLongIncluded = true, envShortIncluded = false; + bool envLongIncluded = true; // first cornercase: LANG=C, so we use only "en" Translation if (envLong == "C") { codes.push_back("en"); + allCodes = codes; return codes; } + // to save the servers from unneeded queries, we only try also long codes + // for languages it is realistic to have a long code translation file… + // TODO: Improve translation acquire system to drop them dynamic + char const *needLong[] = { "cs", "en", "pt", "sv", "zh", NULL }; if (envLong != envShort) { - // to save the servers from unneeded queries, we only try also long codes - // for languages it is realistic to have a long code translation file... - char const *needLong[] = { "cs", "en", "pt", "sv", "zh", NULL }; for (char const **l = needLong; *l != NULL; l++) if (envShort.compare(*l) == 0) { envLongIncluded = false; @@ -156,33 +159,64 @@ std::vector const Configuration::getLanguages(bool const &All, if (oldAcquire.empty() == false && oldAcquire != "environment") { if (oldAcquire != "none") codes.push_back(oldAcquire); + allCodes = codes; return codes; } + // It is very likely we will need to environment codes later, + // so let us generate them now from LC_MESSAGES and LANGUAGE + std::vector environment; + // take care of LC_MESSAGES + if (envLongIncluded == false) + environment.push_back(envLong); + environment.push_back(envShort); + // take care of LANGUAGE + string envLang = Locale == 0 ? getenv("LANGUAGE") : *(Locale+1); + if (envLang.empty() == false) { + std::vector env = ExplodeString(envLang,':'); + short addedLangs = 0; // add a maximum of 3 fallbacks from the environment + for (std::vector::const_iterator e = env.begin(); + e != env.end() && addedLangs < 3; ++e) { + if (unlikely(e->empty() == true) || *e == "en") + continue; + if (*e == envLong || *e == envShort) + continue; + if (std::find(environment.begin(), environment.end(), *e) != environment.end()) + continue; + if (e->find('_') != string::npos) { + // Drop LongCodes here - ShortCodes are also included + string const shorty = e->substr(0, e->find('_')); + char const **n = needLong; + for (; *n != NULL; ++n) + if (shorty == *n) + break; + if (*n == NULL) + continue; + } + ++addedLangs; + environment.push_back(*e); + } + } + // Support settings like Acquire::Translation=none on the command line to // override the configuration settings vector of languages. string const forceLang = _config->Find("Acquire::Languages",""); if (forceLang.empty() == false) { if (forceLang == "environment") { - if (envLongIncluded == false) - codes.push_back(envLong); - if (envShortIncluded == false) - codes.push_back(envShort); - return codes; + codes = environment; } else if (forceLang != "none") codes.push_back(forceLang); + allCodes = codes; return codes; } std::vector const lang = _config->FindVector("Acquire::Languages"); // the default setting -> "environment, en" if (lang.empty() == true) { - if (envLongIncluded == false) - codes.push_back(envLong); - if (envShortIncluded == false) - codes.push_back(envShort); + codes = environment; if (envShort != "en") codes.push_back("en"); + allCodes = codes; return codes; } @@ -192,26 +226,19 @@ std::vector const Configuration::getLanguages(bool const &All, for (std::vector::const_iterator l = lang.begin(); l != lang.end(); l++) { if (*l == "environment") { - if (envLongIncluded == true && envShortIncluded == true) - continue; - if (envLongIncluded == false) { - envLongIncluded = true; - if (noneSeen == false) - codes.push_back(envLong); - allCodes.push_back(envLong); - } - if (envShortIncluded == false) { - envShortIncluded = true; + for (std::vector::const_iterator e = environment.begin(); + e != environment.end(); ++e) { + if (std::find(allCodes.begin(), allCodes.end(), *e) != allCodes.end()) + continue; if (noneSeen == false) - codes.push_back(envShort); - allCodes.push_back(envShort); + codes.push_back(*e); + allCodes.push_back(*e); } continue; } else if (*l == "none") { noneSeen = true; continue; - } else if ((envLongIncluded == true && *l == envLong) || - (envShortIncluded == true && *l == envShort)) + } else if (std::find(allCodes.begin(), allCodes.end(), *l) != allCodes.end()) continue; if (noneSeen == false) diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h index b6650e20c..dd339d841 100644 --- a/apt-pkg/aptconfiguration.h +++ b/apt-pkg/aptconfiguration.h @@ -64,7 +64,7 @@ public: /*{{{*/ * \return a vector of (all) Language Codes in the prefered usage order */ std::vector static const getLanguages(bool const &All = false, - bool const &Cached = true, char const * const Locale = 0); + bool const &Cached = true, char const ** const Locale = 0); /** \brief Returns a vector of Architectures we support * diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index b285a9f2e..d3d6e2739 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1012,7 +1012,7 @@ vector ExplodeString(string const &haystack, char const &split) { do { for (; end != haystack.end() && *end != split; ++end); exploded.push_back(string(start, end)); - start = end; + start = end + 1; } while (end != haystack.end() && (++end) != haystack.end()); return exploded; } diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc index fd3c8269f..fb7afb4ef 100644 --- a/test/libapt/getlanguages_test.cc +++ b/test/libapt/getlanguages_test.cc @@ -16,75 +16,108 @@ void dumpVector(std::vector vec) { int main(int argc,char *argv[]) { - std::vector vec = APT::Configuration::getLanguages(false, false, "de_DE.UTF-8"); + char const* env[2]; + env[0] = "de_DE.UTF-8"; + env[1] = ""; + std::vector vec = APT::Configuration::getLanguages(false, false, env); equals(vec.size(), 2); equals(vec[0], "de"); equals(vec[1], "en"); // Special: Check if the cache is actually in use - vec = APT::Configuration::getLanguages(false, true, "en_GB.UTF-8"); + env[0] = "en_GB.UTF-8"; + vec = APT::Configuration::getLanguages(false, true, env); equals(vec.size(), 2); equals(vec[0], "de"); equals(vec[1], "en"); - vec = APT::Configuration::getLanguages(false, false, "en_GB.UTF-8"); + env[0] = "en_GB.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); equals(vec.size(), 2); equals(vec[0], "en_GB"); equals(vec[1], "en"); - vec = APT::Configuration::getLanguages(false, false, "pt_PR.UTF-8"); + env[0] = "tr_DE@euro"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 2); + equals(vec[0], "tr"); + equals(vec[1], "en"); + + env[0] = "de_NO"; + env[1] = "se_NO:en_GB:nb_NO:nb:no_NO:no:nn_NO:nn:da:sv:en"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 5); + equals(vec[0], "de"); + equals(vec[1], "en_GB"); + equals(vec[2], "nb"); + equals(vec[3], "no"); + equals(vec[4], "en"); + + env[0] = "pt_PR.UTF-8"; + env[1] = ""; + vec = APT::Configuration::getLanguages(false, false, env); equals(vec.size(), 3); equals(vec[0], "pt_PR"); equals(vec[1], "pt"); equals(vec[2], "en"); - vec = APT::Configuration::getLanguages(false, false, "ast_DE.UTF-8"); // bogus, but syntactical correct + env[0] = "ast_DE.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); // bogus, but syntactical correct equals(vec.size(), 2); equals(vec[0], "ast"); equals(vec[1], "en"); - vec = APT::Configuration::getLanguages(false, false, "C"); + env[0] = "C"; + vec = APT::Configuration::getLanguages(false, false, env); equals(vec.size(), 1); equals(vec[0], "en"); _config->Set("Acquire::Languages::1", "environment"); _config->Set("Acquire::Languages::2", "en"); - vec = APT::Configuration::getLanguages(false, false, "de_DE.UTF-8"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); equals(vec.size(), 2); equals(vec[0], "de"); equals(vec[1], "en"); _config->Set("Acquire::Languages::3", "de"); - vec = APT::Configuration::getLanguages(false, false, "de_DE.UTF-8"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); equals(vec.size(), 2); equals(vec[0], "de"); equals(vec[1], "en"); _config->Set("Acquire::Languages::1", "none"); - vec = APT::Configuration::getLanguages(false, false, "de_DE.UTF-8"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); equals(vec.size(), 0); - vec = APT::Configuration::getLanguages(true, false, "de_DE.UTF-8"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(true, false, env); equals(vec[0], "en"); equals(vec[1], "de"); _config->Set("Acquire::Languages::1", "fr"); _config->Set("Acquire::Languages", "de_DE"); - vec = APT::Configuration::getLanguages(false, false, "de_DE.UTF-8"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); equals(vec.size(), 1); equals(vec[0], "de_DE"); _config->Set("Acquire::Languages", "none"); - vec = APT::Configuration::getLanguages(true, false, "de_DE.UTF-8"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(true, false, env); equals(vec.size(), 0); _config->Set("Acquire::Languages", ""); //FIXME: Remove support for this deprecated setting _config->Set("APT::Acquire::Translation", "ast_DE"); - vec = APT::Configuration::getLanguages(true, false, "de_DE.UTF-8"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(true, false, env); equals(vec.size(), 1); equals(vec[0], "ast_DE"); _config->Set("APT::Acquire::Translation", "none"); - vec = APT::Configuration::getLanguages(true, false, "de_DE.UTF-8"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(true, false, env); equals(vec.size(), 0); return 0; -- cgit v1.2.3 From af3f8112590edf58cab36e72bca6d5f8e161fbc3 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 15 Feb 2010 00:01:36 +0100 Subject: Activate support of :any and stuff in apt-get build-dep as we have now support for MultiArch, so Multi-Arch: allowed packages should already provide package:any --- cmdline/apt-get.cc | 2 +- debian/changelog | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 5ef5533e2..216383bc6 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2458,7 +2458,7 @@ bool DoBuildDep(CommandLine &CmdL) // Process the build-dependencies vector BuildDeps; - if (Last->BuildDepends(BuildDeps, _config->FindB("APT::Get::Arch-Only",false)) == false) + if (Last->BuildDepends(BuildDeps, _config->FindB("APT::Get::Arch-Only",true)) == false) return _error->Error(_("Unable to get build-dependency information for %s"),Src.c_str()); // Also ensure that build-essential packages are present diff --git a/debian/changelog b/debian/changelog index addee11cd..948846a6c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,9 +8,10 @@ apt (0.7.26) UNRELEASED; urgency=low but we support the usage of the new ABI so libapt users can start to prepare for MultiArch (Closes: #536029) * Ignore :qualifiers after package name in build dependencies - for now as long we don't understand them (Closes: #558103) + in the library by default, but try to honour them in apt-get + as we have some sort of MultiArch support ready (Closes: #558103) * apt-pkg/contrib/mmap.{cc,h}: - - extend it to have a growable flag - unused now but maybe... + - extend it to have a growable flag - unused now but maybe… * apt-pkg/pkgcache.h: - use long instead of short for {Ver,Desc}File size, patch from Víctor Manuel Jáquez Leal, thanks! (Closes: #538917) -- cgit v1.2.3 From d44b437bd2897bf7fbfbde07a4511c6f7b9ef6a2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 15 Feb 2010 13:02:27 +0100 Subject: * buildlib/apti18n.h.in, po/makefile: - add ngettext support with P_() --- buildlib/apti18n.h.in | 3 +++ cmdline/apt-get.cc | 12 +++++++----- debian/changelog | 2 ++ po/makefile | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/buildlib/apti18n.h.in b/buildlib/apti18n.h.in index e7beceb09..6928d626c 100644 --- a/buildlib/apti18n.h.in +++ b/buildlib/apti18n.h.in @@ -11,8 +11,10 @@ # include # ifdef APT_DOMAIN # define _(x) dgettext(APT_DOMAIN,x) +# define P_(msg,plural,n) dngettext(APT_DOMAIN,msg,plural,n) # else # define _(x) gettext(x) +# define P_(msg,plural,n) ngettext(msg,plural,n) # endif # define N_(x) x #else @@ -21,5 +23,6 @@ # define textdomain(a) # define bindtextdomain(a, b) # define _(x) x +# define P_(msg,plural,n) (n == 1 ? msg : plural) # define N_(x) x #endif diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 216383bc6..c8c733716 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1526,10 +1526,9 @@ bool DoAutomaticRemove(CacheFile &Cache) // only show stuff in the list that is not yet marked for removal if(Cache[Pkg].Delete() == false) { + ++autoRemoveCount; // we don't need to fill the strings if we don't need them - if (smallList == true) - ++autoRemoveCount; - else + if (smallList == false) { autoremovelist += string(Pkg.Name()) + " "; autoremoveversions += string(Cache[Pkg].CandVersion) + "\n"; @@ -1542,9 +1541,12 @@ bool DoAutomaticRemove(CacheFile &Cache) if (doAutoRemove == false && (autoremovelist.empty() == false || autoRemoveCount != 0)) { if (smallList == false) - ShowList(c1out, _("The following packages were automatically installed and are no longer required:"), autoremovelist, autoremoveversions); + ShowList(c1out, P_("The following package is automatically installed and is no longer required:", + "The following packages were automatically installed and are no longer required:", + autoRemoveCount), autoremovelist, autoremoveversions); else - ioprintf(c1out, _("%lu packages were automatically installed and are no longer required.\n"), autoRemoveCount); + ioprintf(c1out, P_("%lu package was automatically installed and is no longer required.\n", + "%lu packages were automatically installed and are no longer required.\n", autoRemoveCount), autoRemoveCount); c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl; } // Now see if we had destroyed anything (if we had done anything) diff --git a/debian/changelog b/debian/changelog index 948846a6c..f328b11a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,8 @@ apt (0.7.26) UNRELEASED; urgency=low * apt-pkg/deb/dpkgpm.cc: - stdin redirected to /dev/null takes all CPU (Closes: #569488) Thanks to Aurelien Jarno for providing (again) a patch! + * buildlib/apti18n.h.in, po/makefile: + - add ngettext support with P_() [ Ivan Masár ] * Slovak translation update. Closes: #568294 diff --git a/po/makefile b/po/makefile index 07dc51c07..9f8b7b22e 100644 --- a/po/makefile +++ b/po/makefile @@ -37,6 +37,7 @@ $(POTFILES) : $(PO)/%.pot : cat $(PO)/domains/$*/*.srclist > $(PO)/POTFILES_$*.in $(XGETTEXT) --default-domain=$* --directory=$(BASE) \ --add-comments --foreign --keyword=_ --keyword=N_ \ + --keyword=P_:1,2 \ --files-from=$(PO)/POTFILES_$*.in -o $(PO)/domains/$*/c.pot rm -f $(PO)/POTFILES_$*.in $(MSGCOMM) --more-than=0 $(PO)/domains/$*/c.pot $(PO)/domains/$*/sh.pot --output=$@ -- cgit v1.2.3 From 1a31359bfe4fdbf9ac1a25ab0b9f013d37099ac4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 15 Feb 2010 13:05:53 +0100 Subject: * aptconfiguration.cc: - include all existing Translation files in the Cache (Closes: 564137) Previously if APT was executed with a different LC_* all these invocations needed to rebuild the Cache as too many files were included or missing: Now the lists-directory is checked for Translation-files and all these included in getLanguages() regardless of the environment setting (after a "none" so APT will not use them for displaying information). --- apt-pkg/aptconfiguration.cc | 78 ++++++++++++++++++++++++++++++++++++---- apt-pkg/deb/debmetaindex.cc | 5 ++- debian/changelog | 2 ++ test/libapt/getlanguages_test.cc | 22 ++++++++++-- test/libapt/run-tests.sh | 7 ++++ 5 files changed, 105 insertions(+), 9 deletions(-) diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index f1989599b..429219cbd 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -14,9 +14,12 @@ #include #include -#include -#include +#include +#include + #include +#include +#include /*}}}*/ namespace APT { // getCompressionTypes - Return Vector of usbale compressiontypes /*{{{*/ @@ -119,6 +122,37 @@ std::vector const Configuration::getLanguages(bool const &All, } } + // Include all Language codes we have a Translation file for in /var/lib/apt/lists + // so they will be all included in the Cache. + std::vector builtin; + DIR *D = opendir(_config->FindDir("Dir::State::lists").c_str()); + if (D != 0) { + builtin.push_back("none"); + for (struct dirent *Ent = readdir(D); Ent != 0; Ent = readdir(D)) { + string const name = Ent->d_name; + size_t const foundDash = name.rfind("-"); + size_t const foundUnderscore = name.rfind("_"); + if (foundDash == string::npos || foundUnderscore == string::npos || + foundDash <= foundUnderscore || + name.substr(foundUnderscore+1, foundDash-(foundUnderscore+1)) != "Translation") + continue; + string const c = name.substr(foundDash+1); + if (unlikely(c.empty() == true) || c == "en") + continue; + // Skip unusual files, like backups or that alike + string::const_iterator s = c.begin(); + for (;s != c.end(); ++s) { + if (isalpha(*s) == 0) + break; + } + if (s != c.end()) + continue; + if (std::find(builtin.begin(), builtin.end(), c) != builtin.end()) + continue; + builtin.push_back(c); + } + } + // get the environment language codes: LC_MESSAGES (and later LANGUAGE) // we extract both, a long and a short code and then we will // check if we actually need both (rare) or if the short is enough @@ -134,7 +168,11 @@ std::vector const Configuration::getLanguages(bool const &All, if (envLong == "C") { codes.push_back("en"); allCodes = codes; - return codes; + allCodes.insert(allCodes.end(), builtin.begin(), builtin.end()); + if (All == true) + return allCodes; + else + return codes; } // to save the servers from unneeded queries, we only try also long codes @@ -159,8 +197,16 @@ std::vector const Configuration::getLanguages(bool const &All, if (oldAcquire.empty() == false && oldAcquire != "environment") { if (oldAcquire != "none") codes.push_back(oldAcquire); + codes.push_back("en"); allCodes = codes; - return codes; + for (std::vector::const_iterator b = builtin.begin(); + b != builtin.end(); ++b) + if (std::find(allCodes.begin(), allCodes.end(), *b) == allCodes.end()) + allCodes.push_back(*b); + if (All == true) + return allCodes; + else + return codes; } // It is very likely we will need to environment codes later, @@ -207,7 +253,14 @@ std::vector const Configuration::getLanguages(bool const &All, } else if (forceLang != "none") codes.push_back(forceLang); allCodes = codes; - return codes; + for (std::vector::const_iterator b = builtin.begin(); + b != builtin.end(); ++b) + if (std::find(allCodes.begin(), allCodes.end(), *b) == allCodes.end()) + allCodes.push_back(*b); + if (All == true) + return allCodes; + else + return codes; } std::vector const lang = _config->FindVector("Acquire::Languages"); @@ -217,7 +270,14 @@ std::vector const Configuration::getLanguages(bool const &All, if (envShort != "en") codes.push_back("en"); allCodes = codes; - return codes; + for (std::vector::const_iterator b = builtin.begin(); + b != builtin.end(); ++b) + if (std::find(allCodes.begin(), allCodes.end(), *b) == allCodes.end()) + allCodes.push_back(*b); + if (All == true) + return allCodes; + else + return codes; } // the configs define the order, so add the environment @@ -245,6 +305,12 @@ std::vector const Configuration::getLanguages(bool const &All, codes.push_back(*l); allCodes.push_back(*l); } + + for (std::vector::const_iterator b = builtin.begin(); + b != builtin.end(); ++b) + if (std::find(allCodes.begin(), allCodes.end(), *b) == allCodes.end()) + allCodes.push_back(*b); + if (All == true) return allCodes; else diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index eb01a0156..0e4e6df9e 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -214,6 +214,7 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool const &GetAll) const s != sections.end(); ++s) for (set::const_iterator l = s->second.begin(); l != s->second.end(); l++) { + if (*l == "none") continue; debTranslationsIndex i = debTranslationsIndex(URI,Dist,s->first,(*l).c_str()); i.GetIndexes(Owner); } @@ -268,8 +269,10 @@ vector *debReleaseIndex::GetIndexFiles() { for (map >::const_iterator s = sections.begin(); s != sections.end(); ++s) for (set::const_iterator l = s->second.begin(); - l != s->second.end(); l++) + l != s->second.end(); l++) { + if (*l == "none") continue; Indexes->push_back(new debTranslationsIndex(URI,Dist,s->first,(*l).c_str())); + } return Indexes; } diff --git a/debian/changelog b/debian/changelog index f328b11a7..fdce01098 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,8 @@ apt (0.7.26) UNRELEASED; urgency=low Thanks to Aurelien Jarno for providing (again) a patch! * buildlib/apti18n.h.in, po/makefile: - add ngettext support with P_() + * aptconfiguration.cc: + - include all existing Translation files in the Cache (Closes: 564137) [ Ivan Masár ] * Slovak translation update. Closes: #568294 diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc index fb7afb4ef..0db190b50 100644 --- a/test/libapt/getlanguages_test.cc +++ b/test/libapt/getlanguages_test.cc @@ -16,9 +16,15 @@ void dumpVector(std::vector vec) { int main(int argc,char *argv[]) { + if (argc != 2) { + std::cout << "One parameter expected - given " << argc << std::endl; + return 100; + } + char const* env[2]; env[0] = "de_DE.UTF-8"; env[1] = ""; + std::vector vec = APT::Configuration::getLanguages(false, false, env); equals(vec.size(), 2); equals(vec[0], "de"); @@ -87,6 +93,16 @@ int main(int argc,char *argv[]) equals(vec[0], "de"); equals(vec[1], "en"); + _config->Set("Dir::State::lists", argv[1]); + vec = APT::Configuration::getLanguages(true, false, env); + equals(vec.size(), 5); + equals(vec[0], "de"); + equals(vec[1], "en"); + equals(vec[2], "none"); + equals(vec[3], "pt"); + equals(vec[4], "tr"); + + _config->Set("Dir::State::lists", "/non-existing-dir"); _config->Set("Acquire::Languages::1", "none"); env[0] = "de_DE.UTF-8"; vec = APT::Configuration::getLanguages(false, false, env); @@ -113,12 +129,14 @@ int main(int argc,char *argv[]) _config->Set("APT::Acquire::Translation", "ast_DE"); env[0] = "de_DE.UTF-8"; vec = APT::Configuration::getLanguages(true, false, env); - equals(vec.size(), 1); + equals(vec.size(), 2); equals(vec[0], "ast_DE"); + equals(vec[1], "en"); _config->Set("APT::Acquire::Translation", "none"); env[0] = "de_DE.UTF-8"; vec = APT::Configuration::getLanguages(true, false, env); - equals(vec.size(), 0); + equals(vec.size(), 1); + equals(vec[0], "en"); return 0; } diff --git a/test/libapt/run-tests.sh b/test/libapt/run-tests.sh index 1fcfb6861..f9df1af5f 100755 --- a/test/libapt/run-tests.sh +++ b/test/libapt/run-tests.sh @@ -39,6 +39,13 @@ do "${tmppath}/01invalíd" ln -s "${tmppath}/anormalfile" "${tmppath}/linkedfile.list" ln -s "${tmppath}/non-existing-file" "${tmppath}/brokenlink.list" + elif [ $name = "getLanguages${EXT}" ]; then + echo "Prepare Testarea for \033[1;35m$name\033[0m ..." + tmppath=$(mktemp -d) + touch "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-tr" \ + "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-pt" \ + "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-se~" \ + "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-st.bak" fi echo -n "Testing with \033[1;35m${name}\033[0m ... " -- cgit v1.2.3 From d6b69b51004b9418478c8d5d5a5c59d5813f1289 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 16 Feb 2010 22:05:10 +0100 Subject: * debian/control: - update with no changes to debian policy 3.8.4 --- debian/changelog | 2 ++ debian/control | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index fdce01098..9cc632c37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,8 @@ apt (0.7.26) UNRELEASED; urgency=low - add ngettext support with P_() * aptconfiguration.cc: - include all existing Translation files in the Cache (Closes: 564137) + * debian/control: + - update with no changes to debian policy 3.8.4 [ Ivan Masár ] * Slovak translation update. Closes: #568294 diff --git a/debian/control b/debian/control index d756871d1..de2bf6544 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: APT Development Team Uploaders: Michael Vogt , Otavio Salvador , Christian Perrier , Daniel Burrows , Luca Bruno , Julian Andres Klode -Standards-Version: 3.8.3 +Standards-Version: 3.8.4 Build-Depends: debhelper (>= 5.0), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5), debiandoc-sgml, xsltproc, docbook-xsl, po4a (>= 0.34-2), autotools-dev Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/ -- cgit v1.2.3 From f1a5db64ad03910c2a401af8baa80fe2354beaa7 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Feb 2010 22:05:15 +0100 Subject: add a note about the uncomplete toolchain to sound a bit more scary --- README.MultiArch | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.MultiArch b/README.MultiArch index 92491631e..b2964ac38 100644 --- a/README.MultiArch +++ b/README.MultiArch @@ -7,6 +7,13 @@ usage guide - you have been warned. It is assumed that the reader has at least a bit of knowledge about APT internals, dependency relations and the MultiArch spec [0]. +Note also that the toolchain isn't ready yet, e.g. while you can simulate +the installation of MultiArch packages they will more sooner than later +cause enormous problems if really installed as dpkg can't handle MultiArch +yet (no, --force-{overwrite,architecture} aren't good options here). +Other parts of the big picture are missing and/or untested too. +You have been warned! + The implementation is focused on NOT breaking existing singleArch-only applications and/or systems as this is the current status-quo for all -- cgit v1.2.3 From a1af1f3b1b7700d1108ee7648bce7b9d2c2c506b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Feb 2010 22:09:02 +0100 Subject: * doc/apt_preferences.5.xml: - explicitly warn against careless use (Closes: #567669) --- debian/changelog | 2 ++ doc/apt_preferences.5.xml | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 9cc632c37..8a4e2ac20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,6 +34,8 @@ apt (0.7.26) UNRELEASED; urgency=low - include all existing Translation files in the Cache (Closes: 564137) * debian/control: - update with no changes to debian policy 3.8.4 + * doc/apt_preferences.5.xml: + - explicitly warn against careless use (Closes: #567669) [ Ivan Masár ] * Slovak translation update. Closes: #568294 diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index 9a4791c08..3d7896226 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -14,7 +14,7 @@ &apt-email; &apt-product; - 04 May 2009 + 16 February 2010 @@ -53,6 +53,14 @@ earliest in the &sources-list; file. The APT preferences file does not affect the choice of instance, only the choice of version. +Preferences are a strong power in the hands of a system administrator +but they can become also their biggest nightmare if used without care! +APT will not questioning the preferences so wrong settings will therefore +lead to uninstallable packages or wrong decisions while upgrading packages. +Even more problems will arise if multiply distribution releases are mixed +without a good understanding of the following paragraphs. +You have been warned. + Note that the files in the /etc/apt/preferences.d directory are parsed in alphanumeric ascending order and need to obey the following naming convention: The files have no or "pref" -- cgit v1.2.3 From b7044b4b7483259f6dbca4fce56320dbde6da02a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 18 Feb 2010 00:55:35 +0100 Subject: doesn't use a default separator in ExplodeString (halfway losted in merge) --- apt-pkg/deb/debmetaindex.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 0e4e6df9e..947a7f04b 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -313,7 +313,7 @@ class debSLTypeDebian : public pkgSourceList::Type { map::const_iterator const arch = Options.find("arch"); vector const Archs = - (arch != Options.end()) ? ExplodeString(arch->second) : + (arch != Options.end()) ? ExplodeString(arch->second, ',') : APT::Configuration::getArchitectures(); for (vector::const_iterator I = List.begin(); -- cgit v1.2.3 From 6563d0d4899d5b787842f16135fd05da878cfb45 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 19 Feb 2010 21:21:53 +0100 Subject: "Switch" to dpkg-source 3.0 (native) format --- debian/changelog | 6 ++++++ debian/source/format | 1 + 2 files changed, 7 insertions(+) create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog index ca731d11b..2b5f6fd25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +apt (0.7.26) UNRELEASED; urgency=low + + * Switch to dpkg-source 3.0 (native) format + + -- David Kalnischkies Fri, 19 Feb 2010 21:21:43 +0100 + apt (0.7.26~exp2) experimental; urgency=low * fix crash when LANGUAGE is not set diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..89ae9db8f --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) -- cgit v1.2.3 From a94263ba750c561ecf40241104970bc303cbc0b7 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 25 Feb 2010 19:51:05 +0100 Subject: * cmdline/apt-mark: - don't crash if no arguments are given (Closes: #570962) --- cmdline/apt-mark | 4 ++++ debian/changelog | 2 ++ 2 files changed, 6 insertions(+) diff --git a/cmdline/apt-mark b/cmdline/apt-mark index 2326ece38..f4f6aa576 100755 --- a/cmdline/apt-mark +++ b/cmdline/apt-mark @@ -76,6 +76,10 @@ if __name__ == "__main__": help="print verbose status messages to stdout") (options, args) = parser.parse_args() + if not args: + parser.print_help() + sys.exit(1) + # get the state-file if not options.filename: STATE_FILE = apt_pkg.Config.FindDir("Dir::State") + "extended_states" diff --git a/debian/changelog b/debian/changelog index 2b5f6fd25..c59b81af5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ apt (0.7.26) UNRELEASED; urgency=low * Switch to dpkg-source 3.0 (native) format + * cmdline/apt-mark: + - don't crash if no arguments are given (Closes: #570962) -- David Kalnischkies Fri, 19 Feb 2010 21:21:43 +0100 -- cgit v1.2.3 From d1082b44827dc90ddeffb246f3eacfff387a9c5e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 26 Feb 2010 20:19:06 +0100 Subject: * debian/control: - remove some years old and obsolete Replaces --- debian/changelog | 2 ++ debian/control | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index c59b81af5..9fc481276 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ apt (0.7.26) UNRELEASED; urgency=low * Switch to dpkg-source 3.0 (native) format * cmdline/apt-mark: - don't crash if no arguments are given (Closes: #570962) + * debian/control: + - remove some years old and obsolete Replaces -- David Kalnischkies Fri, 19 Feb 2010 21:21:43 +0100 diff --git a/debian/control b/debian/control index de2bf6544..daff242f0 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,6 @@ Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/ Package: apt Architecture: any Depends: ${shlibs:Depends}, debian-archive-keyring, ${misc:Depends} -Replaces: libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7) Provides: ${libapt-pkg:provides} Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt Description: Advanced front-end for dpkg @@ -27,7 +26,6 @@ Package: apt-doc Architecture: all Priority: optional Depends: ${misc:Depends} -Replaces: apt (<< 0.5.4.9) Section: doc Description: Documentation for APT This package contains the user guide and offline guide, for APT, an @@ -56,7 +54,6 @@ Package: apt-utils Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Provides: ${libapt-inst:provides} -Replaces: apt (<< 0.5.9) Description: APT utility programs This package contains some APT utility programs such as apt-ftparchive, apt-sortpkgs and apt-extracttemplates. -- cgit v1.2.3 From 75ce206243e409b170d06723430eb85a4a747882 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 26 Feb 2010 20:47:19 +0100 Subject: move ShowPkg() from apt-get to the PkgIterator and rename it to FullName() responseable for displaying a package name and the architecture in a uniform way. Pretty option can be used to not append the architecture if it is the native architecture or all - and use it all over the place in the commandline tools. --- apt-pkg/cacheiterators.h | 1 + apt-pkg/pkgcache.cc | 12 ++++++++ cmdline/apt-cache.cc | 59 +++++++++++++++++------------------ cmdline/apt-get.cc | 80 ++++++++++++++++++++---------------------------- 4 files changed, 75 insertions(+), 77 deletions(-) diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 43cbe1377..a64326a44 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -151,6 +151,7 @@ class pkgCache::PkgIterator: public Iterator { //Nice printable representation friend std::ostream& operator <<(std::ostream& out, PkgIterator i); + std::string FullName(bool const &Pretty = false) const; // Constructors inline PkgIterator(pkgCache &Owner,Package *Trg) : Iterator(Owner, Trg), HashIndex(0) { diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 29c27b58e..24d9e0329 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -445,6 +445,18 @@ operator<<(ostream& out, pkgCache::PkgIterator Pkg) return out; } /*}}}*/ +// PkgIterator::FullName - Returns Name and (maybe) Architecture /*{{{*/ +// --------------------------------------------------------------------- +/* Returns a name:arch string */ +std::string pkgCache::PkgIterator::FullName(bool const &Pretty) const +{ + string fullname = Name(); + if (Pretty == false || + (strcmp(Arch(), "all") != 0 && _config->Find("APT::Architecture") != Arch())) + return fullname.append(":").append(Arch()); + return fullname; +} + /*}}}*/ // DepIterator::IsCritical - Returns true if the dep is important /*{{{*/ // --------------------------------------------------------------------- /* Currently critical deps are defined as depends, predepends and diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 8323a740e..355e9aefb 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -139,7 +139,7 @@ bool UnMet(CommandLine &CmdL) // Oops, it failed.. if (Header == false) ioprintf(cout,_("Package %s version %s has an unmet dep:\n"), - P.Name(),V.VerStr()); + P.FullName(true).c_str(),V.VerStr()); Header = true; // Print out the dep type @@ -149,7 +149,7 @@ bool UnMet(CommandLine &CmdL) Start = RealStart; do { - cout << Start.TargetPkg().Name(); + cout << Start.TargetPkg().FullName(true); if (Start.TargetVer() != 0) cout << " (" << Start.CompType() << " " << Start.TargetVer() << ")"; @@ -182,7 +182,7 @@ bool DumpPackage(CommandLine &CmdL) continue; } - cout << "Package: " << Pkg.Name() << endl; + cout << "Package: " << Pkg.FullName(true) << endl; cout << "Versions: " << endl; for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; Cur++) { @@ -204,7 +204,7 @@ bool DumpPackage(CommandLine &CmdL) cout << "Reverse Depends: " << endl; for (pkgCache::DepIterator D = Pkg.RevDependsList(); D.end() != true; D++) { - cout << " " << D.ParentPkg().Name() << ',' << D.TargetPkg().Name(); + cout << " " << D.ParentPkg().FullName(true) << ',' << D.TargetPkg().FullName(true); if (D->Version != 0) cout << ' ' << DeNull(D.TargetVer()) << endl; else @@ -216,7 +216,7 @@ bool DumpPackage(CommandLine &CmdL) { cout << Cur.VerStr() << " - "; for (pkgCache::DepIterator Dep = Cur.DependsList(); Dep.end() != true; Dep++) - cout << Dep.TargetPkg().Name() << " (" << (int)Dep->CompareOp << " " << DeNull(Dep.TargetVer()) << ") "; + cout << Dep.TargetPkg().FullName(true) << " (" << (int)Dep->CompareOp << " " << DeNull(Dep.TargetVer()) << ") "; cout << endl; } @@ -225,12 +225,12 @@ bool DumpPackage(CommandLine &CmdL) { cout << Cur.VerStr() << " - "; for (pkgCache::PrvIterator Prv = Cur.ProvidesList(); Prv.end() != true; Prv++) - cout << Prv.ParentPkg().Name() << " "; + cout << Prv.ParentPkg().FullName(true) << " "; cout << endl; } cout << "Reverse Provides: " << endl; for (pkgCache::PrvIterator Prv = Pkg.ProvidesList(); Prv.end() != true; Prv++) - cout << Prv.OwnerPkg().Name() << " " << Prv.OwnerVer().VerStr() << endl; + cout << Prv.OwnerPkg().FullName(true) << " " << Prv.OwnerVer().VerStr() << endl; } return true; @@ -353,13 +353,13 @@ bool Dump(CommandLine &Cmd) for (pkgCache::PkgIterator P = Cache.PkgBegin(); P.end() == false; P++) { - cout << "Package: " << P.Name() << endl; + cout << "Package: " << P.FullName(true) << endl; for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; V++) { cout << " Version: " << V.VerStr() << endl; cout << " File: " << V.FileList().File().FileName() << endl; for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; D++) - cout << " Depends: " << D.TargetPkg().Name() << ' ' << + cout << " Depends: " << D.TargetPkg().FullName(true) << ' ' << DeNull(D.TargetVer()) << endl; for (pkgCache::DescIterator D = V.DescriptionList(); D.end() == false; D++) { @@ -570,11 +570,11 @@ bool Depends(CommandLine &CmdL) pkgCache::VerIterator Ver = Pkg.VersionList(); if (Ver.end() == true) { - cout << '<' << Pkg.Name() << '>' << endl; + cout << '<' << Pkg.FullName(true) << '>' << endl; continue; } - cout << Pkg.Name() << endl; + cout << Pkg.FullName(true) << endl; for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) { @@ -596,9 +596,9 @@ bool Depends(CommandLine &CmdL) // Show the package if (Trg->VersionList == 0) - cout << D.DepType() << ": <" << Trg.Name() << ">" << endl; + cout << D.DepType() << ": <" << Trg.FullName(true) << ">" << endl; else - cout << D.DepType() << ": " << Trg.Name() << endl; + cout << D.DepType() << ": " << Trg.FullName(true) << endl; if (Recurse == true) Colours[D.TargetPkg()->ID]++; @@ -614,7 +614,7 @@ bool Depends(CommandLine &CmdL) if (V != Cache.VerP + V.ParentPkg()->VersionList || V->ParentPkg == D->Package) continue; - cout << " " << V.ParentPkg().Name() << endl; + cout << " " << V.ParentPkg().FullName(true) << endl; if (Recurse == true) Colours[D.ParentPkg()->ID]++; @@ -663,11 +663,11 @@ bool RDepends(CommandLine &CmdL) pkgCache::VerIterator Ver = Pkg.VersionList(); if (Ver.end() == true) { - cout << '<' << Pkg.Name() << '>' << endl; + cout << '<' << Pkg.FullName(true) << '>' << endl; continue; } - cout << Pkg.Name() << endl; + cout << Pkg.FullName(true) << endl; cout << "Reverse Depends:" << endl; for (pkgCache::DepIterator D = Pkg.RevDependsList(); D.end() == false; D++) @@ -684,9 +684,9 @@ bool RDepends(CommandLine &CmdL) cout << " "; if (Trg->VersionList == 0) - cout << D.DepType() << ": <" << Trg.Name() << ">" << endl; + cout << D.DepType() << ": <" << Trg.FullName(true) << ">" << endl; else - cout << Trg.Name() << endl; + cout << Trg.FullName(true) << endl; if (Recurse == true) Colours[D.ParentPkg()->ID]++; @@ -702,7 +702,7 @@ bool RDepends(CommandLine &CmdL) if (V != Cache.VerP + V.ParentPkg()->VersionList || V->ParentPkg == D->Package) continue; - cout << " " << V.ParentPkg().Name() << endl; + cout << " " << V.ParentPkg().FullName(true) << endl; if (Recurse == true) Colours[D.ParentPkg()->ID]++; @@ -863,7 +863,7 @@ bool XVcg(CommandLine &CmdL) // Only graph critical deps if (D.IsCritical() == true) { - printf ("edge: { sourcename: \"%s\" targetname: \"%s\" class: 2 ",Pkg.Name(), D.TargetPkg().Name() ); + printf ("edge: { sourcename: \"%s\" targetname: \"%s\" class: 2 ",Pkg.FullName(true).c_str(), D.TargetPkg().FullName(true).c_str() ); // Colour the node for recursion if (Show[D.TargetPkg()->ID] <= DoneNR) @@ -922,10 +922,10 @@ bool XVcg(CommandLine &CmdL) continue; if (Show[Pkg->ID] == DoneNR) - printf("node: { title: \"%s\" label: \"%s\" color: orange shape: %s }\n", Pkg.Name(), Pkg.Name(), + printf("node: { title: \"%s\" label: \"%s\" color: orange shape: %s }\n", Pkg.FullName(true).c_str(), Pkg.FullName(true).c_str(), Shapes[ShapeMap[Pkg->ID]]); else - printf("node: { title: \"%s\" label: \"%s\" shape: %s }\n", Pkg.Name(), Pkg.Name(), + printf("node: { title: \"%s\" label: \"%s\" shape: %s }\n", Pkg.FullName(true).c_str(), Pkg.FullName(true).c_str(), Shapes[ShapeMap[Pkg->ID]]); } @@ -1084,7 +1084,7 @@ bool Dotty(CommandLine &CmdL) // Only graph critical deps if (D.IsCritical() == true) { - printf("\"%s\" -> \"%s\"",Pkg.Name(),D.TargetPkg().Name()); + printf("\"%s\" -> \"%s\"",Pkg.FullName(true).c_str(),D.TargetPkg().FullName(true).c_str()); // Colour the node for recursion if (Show[D.TargetPkg()->ID] <= DoneNR) @@ -1138,10 +1138,10 @@ bool Dotty(CommandLine &CmdL) // Orange box for early recursion stoppage if (Show[Pkg->ID] == DoneNR) - printf("\"%s\" [color=orange,shape=%s];\n",Pkg.Name(), + printf("\"%s\" [color=orange,shape=%s];\n",Pkg.FullName(true).c_str(), Shapes[ShapeMap[Pkg->ID]]); else - printf("\"%s\" [shape=%s];\n",Pkg.Name(), + printf("\"%s\" [shape=%s];\n",Pkg.FullName(true).c_str(), Shapes[ShapeMap[Pkg->ID]]); } @@ -1561,7 +1561,7 @@ bool Policy(CommandLine &CmdL) continue; // Print the package name and the version we are forcing to - cout << " " << I.Name() << " -> "; + cout << " " << I.FullName(true) << " -> "; pkgCache::VerIterator V = Plcy.GetMatch(I); if (V.end() == true) @@ -1590,10 +1590,7 @@ bool Policy(CommandLine &CmdL) if (strcmp(Pkg.Arch(),"all") == 0) continue; - if (myArch == Pkg.Arch()) - cout << Pkg.Name() << ":" << endl; - else - cout << Pkg.Name() << ": [" << Pkg.Arch() << "]" << endl; + cout << Pkg.FullName(true) << ":" << endl; // Installed version cout << _(" Installed: "); @@ -1691,7 +1688,7 @@ bool Madison(CommandLine &CmdL) { if ((*IF)->FindInCache(*(VF.File().Cache())) == VF.File()) { - cout << setw(10) << Pkg.Name() << " | " << setw(10) << V.VerStr() << " | " + cout << setw(10) << Pkg.FullName(true) << " | " << setw(10) << V.VerStr() << " | " << (*IF)->Describe(true) << endl; } } diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index c8c733716..4596c3d61 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -227,17 +227,6 @@ bool ShowList(ostream &out,string Title,string List,string VersionsList) return false; } /*}}}*/ -// ShowPkg - display a package name /*{{{*/ -// --------------------------------------------------------------------- -/* Displays the package name and maybe also the architecture - if it is not the main architecture */ -string ShowPkg(pkgCache::PkgIterator const Pkg) { - string p = Pkg.Name(); - if (strcmp(Pkg.Arch(),"all") != 0 && _config->Find("APT::Architecture") != Pkg.Arch()) - p.append(":").append(Pkg.Arch()); - return p; -} - /*}}}*/ // ShowBroken - Debugging aide /*{{{*/ // --------------------------------------------------------------------- /* This prints out the names of all the packages that are broken along @@ -269,8 +258,8 @@ void ShowBroken(ostream &out,CacheFile &Cache,bool Now) } // Print out each package and the failed dependencies - out << " " << ShowPkg(I) << " :"; - unsigned const Indent = ShowPkg(I).size() + 3; + out << " " << I.FullName(true) << " :"; + unsigned const Indent = I.FullName(true).size() + 3; bool First = true; pkgCache::VerIterator Ver; @@ -323,7 +312,7 @@ void ShowBroken(ostream &out,CacheFile &Cache,bool Now) out << ' ' << End.DepType() << ": "; FirstOr = false; - out << ShowPkg(Start.TargetPkg()); + out << Start.TargetPkg().FullName(true); // Show a quick summary of the version requirements if (Start.TargetVer() != 0) @@ -387,7 +376,7 @@ void ShowNew(ostream &out,CacheFile &Cache) if (Cache[I].NewInstall() == true) { if (Cache[I].CandidateVerIter(Cache).Pseudo() == true) continue; - List += ShowPkg(I) + " "; + List += I.FullName(true) + " "; VersionsList += string(Cache[I].CandVersion) + "\n"; } } @@ -412,9 +401,9 @@ void ShowDel(ostream &out,CacheFile &Cache) if (Cache[I].CandidateVerIter(Cache).Pseudo() == true) continue; if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge) - List += ShowPkg(I) + "* "; + List += I.FullName(true) + "* "; else - List += ShowPkg(I) + " "; + List += I.FullName(true) + " "; VersionsList += string(Cache[I].CandVersion)+ "\n"; } @@ -439,7 +428,7 @@ void ShowKept(ostream &out,CacheFile &Cache) I->CurrentVer == 0 || Cache[I].Delete() == true) continue; - List += ShowPkg(I) + " "; + List += I.FullName(true) + " "; VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n"; } ShowList(out,_("The following packages have been kept back:"),List,VersionsList); @@ -462,7 +451,7 @@ void ShowUpgraded(ostream &out,CacheFile &Cache) if (Cache[I].CandidateVerIter(Cache).Pseudo() == true) continue; - List += ShowPkg(I) + " "; + List += I.FullName(true) + " "; VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n"; } ShowList(out,_("The following packages will be upgraded:"),List,VersionsList); @@ -485,7 +474,7 @@ bool ShowDowngraded(ostream &out,CacheFile &Cache) if (Cache[I].CandidateVerIter(Cache).Pseudo() == true) continue; - List += ShowPkg(I) + " "; + List += I.FullName(true) + " "; VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n"; } return ShowList(out,_("The following packages will be DOWNGRADED:"),List,VersionsList); @@ -503,7 +492,7 @@ bool ShowHold(ostream &out,CacheFile &Cache) pkgCache::PkgIterator I(Cache,Cache.List[J]); if (Cache[I].InstallVer != (pkgCache::Version *)I.CurrentVer() && I->SelectedState == pkgCache::State::Hold) { - List += ShowPkg(I) + " "; + List += I.FullName(true) + " "; VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n"; } } @@ -537,7 +526,7 @@ bool ShowEssential(ostream &out,CacheFile &Cache) if (Added[I->ID] == false) { Added[I->ID] = true; - List += ShowPkg(I) + " "; + List += I.FullName(true) + " "; //VersionsList += string(Cache[I].CurVersion) + "\n"; ??? } } @@ -561,7 +550,7 @@ bool ShowEssential(ostream &out,CacheFile &Cache) Added[P->ID] = true; char S[300]; - snprintf(S,sizeof(S),_("%s (due to %s) "),P.Name(),I.Name()); + snprintf(S,sizeof(S),_("%s (due to %s) "),P.FullName(true).c_str(),I.FullName(true).c_str()); List += S; //VersionsList += "\n"; ??? } @@ -1106,7 +1095,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, if (found_one == true) { ioprintf(c1out,_("Note, selecting %s instead of %s\n"), - Prov.Name(),Pkg.Name()); + Prov.FullName(true).c_str(),Pkg.FullName(true).c_str()); Pkg = Prov; } } @@ -1117,7 +1106,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, { if (AllowFail == true) ioprintf(c1out,_("Skipping %s, it is already installed and upgrade is not set.\n"), - Pkg.Name()); + Pkg.FullName(true).c_str()); return true; } @@ -1134,7 +1123,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, if (AllowFail == false) return false; - ioprintf(c1out,_("Package %s is not installed, so not removed\n"),Pkg.Name()); + ioprintf(c1out,_("Package %s is not installed, so not removed\n"),Pkg.FullName(true).c_str()); return true; } @@ -1146,7 +1135,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, if (Pkg->ProvidesList != 0) { ioprintf(c1out,_("Package %s is a virtual package provided by:\n"), - Pkg.Name()); + Pkg.FullName(true).c_str()); pkgCache::PrvIterator I = Pkg.ProvidesList(); for (; I.end() == false; I++) @@ -1156,10 +1145,10 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, if (Cache[Pkg].CandidateVerIter(Cache) == I.OwnerVer()) { if (Cache[Pkg].Install() == true && Cache[Pkg].NewInstall() == false) - c1out << " " << Pkg.Name() << " " << I.OwnerVer().VerStr() << + c1out << " " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr() << _(" [Installed]") << endl; else - c1out << " " << Pkg.Name() << " " << I.OwnerVer().VerStr() << endl; + c1out << " " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr() << endl; } } c1out << _("You should explicitly select one to install.") << endl; @@ -1169,7 +1158,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, ioprintf(c1out, _("Package %s is not available, but is referred to by another package.\n" "This may mean that the package is missing, has been obsoleted, or\n" - "is only available from another source\n"),Pkg.Name()); + "is only available from another source\n"),Pkg.FullName(true).c_str()); string List; string VersionsList; @@ -1183,13 +1172,13 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, if (Seen[Dep.ParentPkg()->ID] == true) continue; Seen[Dep.ParentPkg()->ID] = true; - List += string(Dep.ParentPkg().Name()) + " "; + List += Dep.ParentPkg().FullName(true) + " "; //VersionsList += string(Dep.ParentPkg().CurVersion) + "\n"; ??? } ShowList(c1out,_("However the following packages replace it:"),List,VersionsList); } - _error->Error(_("Package %s has no installation candidate"),Pkg.Name()); + _error->Error(_("Package %s has no installation candidate"),Pkg.FullName(true).c_str()); return false; } @@ -1210,7 +1199,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, { if (Pkg->CurrentVer == 0 || Pkg.CurrentVer().Downloadable() == false) ioprintf(c1out,_("Reinstallation of %s is not possible, it cannot be downloaded.\n"), - Pkg.Name()); + Pkg.FullName(true).c_str()); else Cache.SetReInstall(Pkg,true); } @@ -1218,7 +1207,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, { if (AllowFail == true) ioprintf(c1out,_("%s is already the newest version.\n"), - Pkg.Name()); + Pkg.FullName(true).c_str()); } } else @@ -1247,15 +1236,15 @@ bool TryToChangeVer(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, { if (IsRel == true) return _error->Error(_("Release '%s' for '%s' was not found"), - VerTag,Pkg.Name()); + VerTag,Pkg.FullName(true).c_str()); return _error->Error(_("Version '%s' for '%s' was not found"), - VerTag,Pkg.Name()); + VerTag,Pkg.FullName(true).c_str()); } if (strcmp(VerTag,Ver.VerStr()) != 0) { ioprintf(c1out,_("Selected version %s (%s) for %s\n"), - Ver.VerStr(),Ver.RelStr().c_str(),Pkg.Name()); + Ver.VerStr(),Ver.RelStr().c_str(),Pkg.FullName(true).c_str()); } Cache.SetCandidateVersion(Ver); @@ -1511,7 +1500,7 @@ bool DoAutomaticRemove(CacheFile &Cache) { if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install()) if(Debug) - std::cout << "We could delete %s" << Pkg.Name() << std::endl; + std::cout << "We could delete %s" << Pkg.FullName(true).c_str() << std::endl; if (doAutoRemove) { @@ -1530,7 +1519,7 @@ bool DoAutomaticRemove(CacheFile &Cache) // we don't need to fill the strings if we don't need them if (smallList == false) { - autoremovelist += string(Pkg.Name()) + " "; + autoremovelist += Pkg.FullName(true) + " "; autoremoveversions += string(Cache[Pkg].CandVersion) + "\n"; } } @@ -1804,7 +1793,7 @@ bool DoInstall(CommandLine &CmdL) _config->FindB("APT::Get::Download-Only",false) == false) { ioprintf(c1out,_("%s set to manually installed.\n"), - Pkg.Name()); + Pkg.FullName(true).c_str()); Cache->MarkAuto(Pkg,false); AutoMarkChanged++; } @@ -1873,7 +1862,7 @@ bool DoInstall(CommandLine &CmdL) break; if (*J == 0) { - List += string(I.Name()) + " "; + List += I.FullName(true) + " "; VersionsList += string(Cache[I].CandVersion) + "\n"; } } @@ -1909,7 +1898,7 @@ bool DoInstall(CommandLine &CmdL) for(;;) { /* Skip if package is installed already, or is about to be */ - string target = string(Start.TargetPkg().Name()) + " "; + string target = Start.TargetPkg().FullName(true) + " "; if ((*Start.TargetPkg()).SelectedState == pkgCache::State::Install || Cache[Start.TargetPkg()].Install()) @@ -2559,7 +2548,7 @@ bool DoBuildDep(CommandLine &CmdL) for (; Prv.end() != true; Prv++) { if (_config->FindB("Debug::BuildDeps",false) == true) - cout << " Checking provider " << Prv.OwnerPkg().Name() << endl; + cout << " Checking provider " << Prv.OwnerPkg().FullName() << endl; if ((*Cache)[Prv.OwnerPkg()].InstVerIter(*Cache).end() == false) break; @@ -2600,7 +2589,7 @@ bool DoBuildDep(CommandLine &CmdL) if (Prv.end() == false) { if (_config->FindB("Debug::BuildDeps",false) == true) - cout << " Is provided by installed package " << Prv.OwnerPkg().Name() << endl; + cout << " Is provided by installed package " << Prv.OwnerPkg().FullName() << endl; skipAlternatives = hasAlternatives; continue; } @@ -2625,7 +2614,7 @@ bool DoBuildDep(CommandLine &CmdL) return _error->Error(_("Failed to satisfy %s dependency for %s: Installed package %s is too new"), Last->BuildDepType((*D).Type), Src.c_str(), - Pkg.Name()); + Pkg.FullName(true).c_str()); } } @@ -2674,7 +2663,6 @@ bool DoBuildDep(CommandLine &CmdL) return true; } /*}}}*/ - // DoMoo - Never Ask, Never Tell /*{{{*/ // --------------------------------------------------------------------- /* */ -- cgit v1.2.3 From 06afffcc24f339e8735acd4698af6e5995ad24aa Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 27 Feb 2010 02:02:25 +0100 Subject: =?UTF-8?q?*=20apt-pkg/contrib/mmap.{h,cc}:=20=20=20-=20add=20char?= =?UTF-8?q?[]=20fallback=20for=20filesystems=20without=20shared=20writable?= =?UTF-8?q?=20=20=20=20=20mmap()=20like=20JFFS2.=20Thanks=20to=20Marius=20?= =?UTF-8?q?Vollmer=20for=20writing=20=20=20=20=20and=20to=20Lo=C3=AFc=20Mi?= =?UTF-8?q?nier=20for=20pointing=20to=20the=20patch!=20(Closes:=20#314334)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apt-pkg/contrib/mmap.cc | 70 +++++++++++++++++++++++++++++++++++++++++-------- apt-pkg/contrib/mmap.h | 5 ++++ debian/changelog | 4 +++ 3 files changed, 68 insertions(+), 11 deletions(-) diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index f440f9489..b3f29032c 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -27,6 +27,7 @@ #include #include #include +#include #include /*}}}*/ @@ -35,7 +36,7 @@ // --------------------------------------------------------------------- /* */ MMap::MMap(FileFd &F,unsigned long Flags) : Flags(Flags), iSize(0), - Base(0) + Base(0), SyncToFd(NULL) { if ((Flags & NoImmMap) != NoImmMap) Map(F); @@ -45,7 +46,7 @@ MMap::MMap(FileFd &F,unsigned long Flags) : Flags(Flags), iSize(0), // --------------------------------------------------------------------- /* */ MMap::MMap(unsigned long Flags) : Flags(Flags), iSize(0), - Base(0) + Base(0), SyncToFd(NULL) { } /*}}}*/ @@ -78,7 +79,24 @@ bool MMap::Map(FileFd &Fd) // Map it. Base = mmap(0,iSize,Prot,Map,Fd.Fd(),0); if (Base == (void *)-1) - return _error->Errno("mmap",_("Couldn't make mmap of %lu bytes"),iSize); + { + if (errno == ENODEV || errno == EINVAL) + { + // The filesystem doesn't support this particular kind of mmap. + // So we allocate a buffer and read the whole file into it. + int const dupped_fd = dup(Fd.Fd()); + if (dupped_fd == -1) + return _error->Errno("mmap", _("Couldn't duplicate file descriptor %i"), Fd.Fd()); + + Base = new unsigned char[iSize]; + SyncToFd = new FileFd (dupped_fd); + if (!SyncToFd->Seek(0L) || !SyncToFd->Read(Base, iSize)) + return false; + } + else + return _error->Errno("mmap",_("Couldn't make mmap of %lu bytes"), + iSize); + } return true; } @@ -93,10 +111,19 @@ bool MMap::Close(bool DoSync) if (DoSync == true) Sync(); - - if (munmap((char *)Base,iSize) != 0) - _error->Warning("Unable to munmap"); - + + if (SyncToFd != NULL) + { + delete[] (char *)Base; + delete SyncToFd; + SyncToFd = NULL; + } + else + { + if (munmap((char *)Base, iSize) != 0) + _error->WarningE("mmap", _("Unable to close mmap")); + } + iSize = 0; Base = 0; return true; @@ -113,8 +140,18 @@ bool MMap::Sync() #ifdef _POSIX_SYNCHRONIZED_IO if ((Flags & ReadOnly) != ReadOnly) - if (msync((char *)Base,iSize,MS_SYNC) < 0) - return _error->Errno("msync","Unable to write mmap"); + { + if (SyncToFd != NULL) + { + if (!SyncToFd->Seek(0) || !SyncToFd->Write(Base, iSize)) + return false; + } + else + { + if (msync((char *)Base, iSize, MS_SYNC) < 0) + return _error->Errno("msync", _("Unable to synchronize mmap")); + } + } #endif return true; } @@ -130,8 +167,19 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop) #ifdef _POSIX_SYNCHRONIZED_IO unsigned long PSize = sysconf(_SC_PAGESIZE); if ((Flags & ReadOnly) != ReadOnly) - if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) < 0) - return _error->Errno("msync","Unable to write mmap"); + { + if (SyncToFd != 0) + { + if (!SyncToFd->Seek(0) || + !SyncToFd->Write (((char *)Base)+Start, Stop-Start)) + return false; + } + else + { + if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) < 0) + return _error->Errno("msync", _("Unable to synchronize mmap")); + } + } #endif return true; } diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index cd2b15ba2..5ca951204 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -44,6 +44,11 @@ class MMap unsigned long iSize; void *Base; + // In case mmap can not be used, we keep a dup of the file + // descriptor that should have been mmaped so that we can write to + // the file in Sync(). + FileFd *SyncToFd; + bool Map(FileFd &Fd); bool Close(bool DoSync = true); diff --git a/debian/changelog b/debian/changelog index 9fc481276..39cc70da9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,10 @@ apt (0.7.26) UNRELEASED; urgency=low - don't crash if no arguments are given (Closes: #570962) * debian/control: - remove some years old and obsolete Replaces + * apt-pkg/contrib/mmap.{h,cc}: + - add char[] fallback for filesystems without shared writable + mmap() like JFFS2. Thanks to Marius Vollmer for writing + and to Loïc Minier for pointing to the patch! (Closes: #314334) -- David Kalnischkies Fri, 19 Feb 2010 21:21:43 +0100 -- cgit v1.2.3 From e0b94b97b179812e5a0b3b72ea9fcae106d545c5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 27 Feb 2010 17:01:12 +0100 Subject: Enable the AutoRemover to talk "Multi-Arch" by marking all pseudo packages in a group if one is marked. The auto-installed flag is from now on Architecture bound: A section without an architecture tag will be treated as applying to all architectures - the next write operation will take care of this by creating separate sections for the architectures. --- apt-pkg/depcache.cc | 170 +++++++++++++++++++++++++++++++++------------------- apt-pkg/depcache.h | 4 +- 2 files changed, 109 insertions(+), 65 deletions(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index eeb74a434..45c614c6f 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -165,34 +165,46 @@ bool pkgDepCache::Init(OpProgress *Prog) bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/ { FileFd state_file; - string state = _config->FindDir("Dir::State") + "extended_states"; + string const state = _config->FindDir("Dir::State") + "extended_states"; if(FileExists(state)) { state_file.Open(state, FileFd::ReadOnly); - int file_size = state_file.Size(); + int const file_size = state_file.Size(); if(Prog != NULL) Prog->OverallProgress(0, file_size, 1, _("Reading state information")); pkgTagFile tagfile(&state_file); pkgTagSection section; - int amt=0; - bool debug_autoremove=_config->FindB("Debug::pkgAutoRemove",false); + int amt = 0; + bool const debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false); while(tagfile.Step(section)) { - string pkgname = section.FindS("Package"); - pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname); - // Silently ignore unknown packages and packages with no actual - // version. - if(!pkg.end() && !pkg.VersionList().end()) { - short reason = section.FindI("Auto-Installed", 0); - if(reason > 0) - PkgState[pkg->ID].Flags |= Flag::Auto; - if(debug_autoremove) - std::cout << "Auto-Installed : " << pkgname << std::endl; - amt+=section.size(); - if(Prog != NULL) - Prog->OverallProgress(amt, file_size, 1, - _("Reading state information")); + string const pkgname = section.FindS("Package"); + string pkgarch = section.FindS("Architecture"); + if (pkgarch.empty() == true) + pkgarch = "any"; + pkgCache::PkgIterator pkg = Cache->FindPkg(pkgname, pkgarch); + // Silently ignore unknown packages and packages with no actual version. + if(pkg.end() == true || pkg->VersionList == 0) + continue; + + short const reason = section.FindI("Auto-Installed", 0); + if(reason > 0) + { + PkgState[pkg->ID].Flags |= Flag::Auto; + if (unlikely(debug_autoremove)) + std::cout << "Auto-Installed : " << pkg.FullName() << std::endl; + if (pkgarch == "any") + { + pkgCache::GrpIterator G = pkg.Group(); + for (pkg = G.NextPkg(pkg); pkg.end() != true; pkg = G.NextPkg(pkg)) + if (pkg->VersionList != 0) + PkgState[pkg->ID].Flags |= Flag::Auto; + } } + amt += section.size(); + if(Prog != NULL) + Prog->OverallProgress(amt, file_size, 1, + _("Reading state information")); } if(Prog != NULL) Prog->OverallProgress(file_size, file_size, 1, @@ -204,13 +216,13 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/ /*}}}*/ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ { - bool debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false); + bool const debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false); if(debug_autoremove) std::clog << "pkgDepCache::writeStateFile()" << std::endl; FileFd StateFile; - string state = _config->FindDir("Dir::State") + "extended_states"; + string const state = _config->FindDir("Dir::State") + "extended_states"; // if it does not exist, create a empty one if(!FileExists(state)) @@ -225,7 +237,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ state.c_str()); FILE *OutFile; - string outfile = state + ".tmp"; + string const outfile = state + ".tmp"; if((OutFile = fopen(outfile.c_str(),"w")) == NULL) return _error->Error(_("Failed to write temporary StateFile %s"), outfile.c_str()); @@ -236,46 +248,54 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ std::set pkgs_seen; const char *nullreorderlist[] = {0}; while(tagfile.Step(section)) { - string pkgname = section.FindS("Package"); + string const pkgname = section.FindS("Package"); + string pkgarch = section.FindS("Architecture"); + if (pkgarch.empty() == true) + pkgarch = "native"; // Silently ignore unknown packages and packages with no actual // version. - pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname); + pkgCache::PkgIterator pkg = Cache->FindPkg(pkgname, pkgarch); if(pkg.end() || pkg.VersionList().end()) continue; - bool newAuto = (PkgState[pkg->ID].Flags & Flag::Auto); + bool const newAuto = (PkgState[pkg->ID].Flags & Flag::Auto); if(_config->FindB("Debug::pkgAutoRemove",false)) std::clog << "Update existing AutoInstall info: " - << pkg.Name() << std::endl; - TFRewriteData rewrite[2]; - rewrite[0].Tag = "Auto-Installed"; - rewrite[0].Rewrite = newAuto ? "1" : "0"; + << pkg.FullName() << std::endl; + TFRewriteData rewrite[3]; + rewrite[0].Tag = "Architecture"; + rewrite[0].Rewrite = pkg.Arch(); rewrite[0].NewTag = 0; - rewrite[1].Tag = 0; + rewrite[1].Tag = "Auto-Installed"; + rewrite[1].Rewrite = newAuto ? "1" : "0"; + rewrite[1].NewTag = 0; + rewrite[2].Tag = 0; TFRewrite(OutFile, section, nullreorderlist, rewrite); fprintf(OutFile,"\n"); - pkgs_seen.insert(pkgname); + pkgs_seen.insert(pkg.FullName()); } // then write the ones we have not seen yet std::ostringstream ostr; for(pkgCache::PkgIterator pkg=Cache->PkgBegin(); !pkg.end(); pkg++) { if(PkgState[pkg->ID].Flags & Flag::Auto) { - if (pkgs_seen.find(pkg.Name()) != pkgs_seen.end()) { + if (pkgs_seen.find(pkg.FullName()) != pkgs_seen.end()) { if(debug_autoremove) - std::clog << "Skipping already written " << pkg.Name() << std::endl; + std::clog << "Skipping already written " << pkg.FullName() << std::endl; continue; } - // skip not installed ones if requested - if(InstalledOnly && pkg->CurrentVer == 0) - continue; + // skip not installed ones if requested + if(InstalledOnly && pkg->CurrentVer == 0) + continue; + const char* const pkgarch = pkg.Arch(); + if (strcmp(pkgarch, "all") == 0) + continue; if(debug_autoremove) - std::clog << "Writing new AutoInstall: " - << pkg.Name() << std::endl; + std::clog << "Writing new AutoInstall: " << pkg.FullName() << std::endl; ostr.str(string("")); - ostr << "Package: " << pkg.Name() + ostr << "Package: " << pkg.Name() + << "\nArchitecture: " << pkgarch << "\nAuto-Installed: 1\n\n"; fprintf(OutFile,"%s",ostr.str().c_str()); - fprintf(OutFile,"\n"); } } fclose(OutFile); @@ -1426,7 +1446,7 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc) // debug output if(debug_autoremove && PkgState[p->ID].Flags & Flag::Auto) - std::clog << "AutoDep: " << p.Name() << std::endl; + std::clog << "AutoDep: " << p.FullName() << std::endl; } // init vars @@ -1460,13 +1480,18 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc) // MarkPackage - mark a single package in Mark-and-Sweep /*{{{*/ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, const pkgCache::VerIterator &ver, - bool follow_recommends, - bool follow_suggests) + bool const &follow_recommends, + bool const &follow_suggests) { pkgDepCache::StateCache &state = PkgState[pkg->ID]; - VerIterator currver = pkg.CurrentVer(); - VerIterator candver = state.CandidateVerIter(*this); - VerIterator instver = state.InstVerIter(*this); + + // if we are marked already we are done + if(state.Marked) + return; + + VerIterator const currver = pkg.CurrentVer(); + VerIterator const candver = state.CandidateVerIter(*this); + VerIterator const instver = state.InstVerIter(*this); #if 0 // If a package was garbage-collected but is now being marked, we @@ -1492,15 +1517,11 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, !(ver == currver && instver.end() && !ver.end())) return; - // if we are marked already we are done - if(state.Marked) - return; + bool const debug_autoremove = _config->FindB("Debug::pkgAutoRemove", false); - bool debug_autoremove = _config->FindB("Debug::pkgAutoRemove", false); - if(debug_autoremove) { - std::clog << "Marking: " << pkg.Name(); + std::clog << "Marking: " << pkg.FullName(); if(!ver.end()) std::clog << " " << ver.VerStr(); if(!currver.end()) @@ -1512,8 +1533,34 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, state.Marked=true; - if(!ver.end()) + if(ver.end() == true) + return; + + // If the version belongs to a Multi-Arch all package + // we will mark all others in this Group with this version also + // Beware: We compare versions here the lazy way: string comparision + // this is bad if multiple repositories provide different versions + // of the package with an identical version number - but even in this + // case the dependencies are likely the same. + if (ver->MultiArch == pkgCache::Version::All && + strcmp(ver.Arch(true), "all") == 0) { + GrpIterator G = pkg.Group(); + const char* const VerStr = ver.VerStr(); + for (PkgIterator P = G.FindPkg("any"); + P.end() != true; P = G.NextPkg(P)) + { + for (VerIterator V = P.VersionList(); + V.end() != true; ++V) + { + if (strcmp(VerStr, V.VerStr()) != 0) + continue; + MarkPackage(P, V, follow_recommends, follow_suggests); + break; + } + } + } + for(DepIterator d = ver.DependsList(); !d.end(); ++d) { if(d->Type == Dep::Depends || @@ -1531,10 +1578,9 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, { if(debug_autoremove) { - std::clog << "Following dep: " << d.ParentPkg().Name() + std::clog << "Following dep: " << d.ParentPkg().FullName() << " " << d.ParentVer().VerStr() << " " - << d.DepType() << " " - << d.TargetPkg().Name(); + << d.DepType() << " " << d.TargetPkg().FullName(); if((d->CompareOp & ~pkgCache::Dep::Or) != pkgCache::Dep::NoOp) { std::clog << " (" << d.CompType() << " " @@ -1542,7 +1588,7 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, } std::clog << std::endl; } - MarkPackage(V.ParentPkg(), V, + MarkPackage(V.ParentPkg(), V, follow_recommends, follow_suggests); } } @@ -1555,17 +1601,16 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, { if(debug_autoremove) { - std::clog << "Following dep: " << d.ParentPkg().Name() - << " " << d.ParentVer().VerStr() << " " - << d.DepType() << " " - << d.TargetPkg().Name(); + std::clog << "Following dep: " << d.ParentPkg().FullName() << " " + << d.ParentVer().VerStr() << " " + << d.DepType() << " " << d.TargetPkg().FullName() << " "; if((d->CompareOp & ~pkgCache::Dep::Or) != pkgCache::Dep::NoOp) { std::clog << " (" << d.CompType() << " " << d.TargetVer() << ")"; } std::clog << ", provided by " - << prv.OwnerPkg().Name() << " " + << prv.OwnerPkg().FullName() << " " << prv.OwnerVer().VerStr() << std::endl; } @@ -1576,7 +1621,6 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, } } } - } } /*}}}*/ bool pkgDepCache::Sweep() /*{{{*/ @@ -1598,7 +1642,7 @@ bool pkgDepCache::Sweep() /*{{{*/ { state.Garbage=true; if(debug_autoremove) - std::cout << "Garbage: " << p.Name() << std::endl; + std::cout << "Garbage: " << p.FullName() << std::endl; } } diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index ab1021a44..23b29cc13 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -79,8 +79,8 @@ class pkgDepCache : protected pkgCache::Namespace */ void MarkPackage(const pkgCache::PkgIterator &pkg, const pkgCache::VerIterator &ver, - bool follow_recommends, - bool follow_suggests); + bool const &follow_recommends, + bool const &follow_suggests); /** \brief Update the Marked field of all packages. * -- cgit v1.2.3 From a04cd1f9a580867d65be8f1ecb3eac25a86eb953 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 28 Feb 2010 19:45:05 +0100 Subject: Fix the PkgFileIterator Constructor which defaults to the wrong value. (0 instead of the HeaderP) This breaks the Cache Validation functionality as the end() doesn't test for NULL. (The fault was introduced with the rewriting of the CacheIterators) --- apt-pkg/cacheiterators.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index a64326a44..28e062f3c 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -345,7 +345,8 @@ class pkgCache::PkgFileIterator : public Iterator // Constructors inline PkgFileIterator() : Iterator() {}; - inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg = 0) : Iterator(Owner, Trg) {}; + inline PkgFileIterator(pkgCache &Owner) : Iterator(Owner, Owner.PkgFileP) {}; + inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Iterator(Owner, Trg) {}; }; /*}}}*/ // Version File /*{{{*/ -- cgit v1.2.3 From 4a6d21639f807ae82d5a51a92c4bbbd0ca2a4494 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 28 Feb 2010 22:45:34 +0100 Subject: Create Pins for all group members instead of only for native architecture --- apt-pkg/policy.cc | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index f9901bc9a..0b8c1a81b 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -187,35 +187,38 @@ pkgCache::VerIterator pkgPolicy::GetCandidateVer(pkgCache::PkgIterator Pkg) void pkgPolicy::CreatePin(pkgVersionMatch::MatchType Type,string Name, string Data,signed short Priority) { - Pin *P = 0; - if (Name.empty() == true) - P = &*Defaults.insert(Defaults.end(),PkgPin()); - else { - // Get a spot to put the pin - pkgCache::PkgIterator Pkg = Cache->FindPkg(Name); - if (Pkg.end() == true) + Pin *P = &*Defaults.insert(Defaults.end(),PkgPin()); + P->Type = Type; + P->Priority = Priority; + P->Data = Data; + return; + } + + // Get a spot to put the pin + pkgCache::GrpIterator Grp = Cache->FindGrp(Name); + for (pkgCache::PkgIterator Pkg = Grp.FindPkg("any"); + Pkg.end() != true; Pkg = Grp.NextPkg(Pkg)) + { + Pin *P = 0; + if (Pkg.end() == false) + P = Pins + Pkg->ID; + else { // Check the unmatched table - for (vector::iterator I = Unmatched.begin(); + for (vector::iterator I = Unmatched.begin(); I != Unmatched.end() && P == 0; I++) if (I->Pkg == Name) P = &*I; - + if (P == 0) - P = &*Unmatched.insert(Unmatched.end(),PkgPin()); + P = &*Unmatched.insert(Unmatched.end(),PkgPin()); } - else - { - P = Pins + Pkg->ID; - } + P->Type = Type; + P->Priority = Priority; + P->Data = Data; } - - // Set.. - P->Type = Type; - P->Priority = Priority; - P->Data = Data; } /*}}}*/ // Policy::GetMatch - Get the matching version for a package pin /*{{{*/ -- cgit v1.2.3 From 70ae240915df3ef89715d71d5fe7a6910cbf057e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 1 Mar 2010 15:27:55 +0100 Subject: Remove and Unpack operations should not be ignored for pseudo packages - they should trigger the remove/unpack of the "all" package. Otherwise - as this package has no dependencies - it will be triggered to late. The Configuration step doesn't need it as the "all" package is a dependency of the pseudo-package, so it will be configured before the pseudo packages are tried: So at this step the ignorance is okay. Also IsMissing() should report the status of the all package if an pseudo package is checked instead of always reporting no-miss. --- apt-pkg/orderlist.cc | 11 ++++++----- apt-pkg/packagemanager.cc | 13 +++++++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc index 2e7618b55..7c950292a 100644 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@ -127,8 +127,9 @@ bool pkgOrderList::IsMissing(PkgIterator Pkg) if (FileList[Pkg->ID].empty() == false) return false; + // Missing Pseudo packages are missing if the real package is missing if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == true) - return false; + return IsMissing(Pkg.Group().FindPkg("all")); return true; } @@ -203,7 +204,7 @@ bool pkgOrderList::OrderCritical() { PkgIterator P(Cache,*I); if (IsNow(P) == true) - clog << " " << P.Name() << ' ' << IsMissing(P) << ',' << IsFlag(P,After) << endl; + clog << " " << P.FullName() << ' ' << IsMissing(P) << ',' << IsFlag(P,After) << endl; } } @@ -276,7 +277,7 @@ bool pkgOrderList::OrderUnpack(string *FileList) { PkgIterator P(Cache,*I); if (IsNow(P) == true) - clog << " " << P.Name() << ' ' << IsMissing(P) << ',' << IsFlag(P,After) << endl; + clog << " " << P.FullName() << ' ' << IsMissing(P) << ',' << IsFlag(P,After) << endl; } } @@ -547,7 +548,7 @@ bool pkgOrderList::VisitNode(PkgIterator Pkg) if (Debug == true) { for (int j = 0; j != Depth; j++) clog << ' '; - clog << "Visit " << Pkg.Name() << endl; + clog << "Visit " << Pkg.FullName() << endl; } Depth++; @@ -606,7 +607,7 @@ bool pkgOrderList::VisitNode(PkgIterator Pkg) if (Debug == true) { for (int j = 0; j != Depth; j++) clog << ' '; - clog << "Leave " << Pkg.Name() << ' ' << IsFlag(Pkg,Added) << ',' << IsFlag(Pkg,AddPending) << endl; + clog << "Leave " << Pkg.FullName() << ' ' << IsFlag(Pkg,Added) << ',' << IsFlag(Pkg,AddPending) << endl; } return true; diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index db882721e..35cc24550 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -470,6 +470,8 @@ bool pkgPackageManager::SmartRemove(PkgIterator Pkg) if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false) return Remove(Pkg,(Cache[Pkg].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge); + else + return SmartRemove(Pkg.Group().FindPkg("all")); return true; } /*}}}*/ @@ -584,11 +586,14 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) for (PrvIterator P = Cache[Pkg].InstVerIter(Cache).ProvidesList(); P.end() == false; P++) CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion()); - - if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false && - Install(Pkg,FileNames[Pkg->ID]) == false) + + if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false) + { + if(Install(Pkg,FileNames[Pkg->ID]) == false) + return false; + } else if (SmartUnPack(Pkg.Group().FindPkg("all")) == false) return false; - + List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States); // Perform immedate configuration of the package. -- cgit v1.2.3 From 1ec1653cd4849423e0d5f769ecbfab2d6f16c4ad Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 1 Mar 2010 21:59:03 +0100 Subject: We need to kill also pseudo packages which have no dependency, no installed reverse dependency and which also doesn't provide something. They cause problems if this pseudo packages get new dependencies. As a consequence we also need to recheck the dependencies of a killed pseudo package (and especially the providers of these dependencies) to really kill all non required packages. --- apt-pkg/depcache.cc | 77 ++++++++++++++++++++++++++++++++++++++++++++--------- apt-pkg/depcache.h | 1 + 2 files changed, 66 insertions(+), 12 deletions(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 45c614c6f..893164ea1 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -630,11 +630,46 @@ bool pkgDepCache::RemovePseudoInstalledPkg(PkgIterator &Pkg, std::setMultiArch != Version::All) return false; - unsigned char const DepState = VersionState(V.DependsList(),DepInstall,DepInstMin,DepInstPolicy); - if ((DepState & DepInstMin) == DepInstMin) + // Never ever kill an "all" package - they have no dependency so they can't be broken + if (strcmp(Pkg.Arch(),"all") == 0) return false; - // Dependencies for this arch all are not statisfied +// std::cout << "CHECK " << Pkg << std::endl; + + unsigned char const DepState = VersionState(V.DependsList(),DepInstall,DepInstMin,DepInstPolicy); + if ((DepState & DepInstMin) == DepInstMin) { + // okay, the package isn't broken, but is the package also required? + // If it has no real dependencies, no installed rdepends and doesn't + // provide something of value, we will kill it as not required. + // These pseudopackages have otherwise interesting effects if they get + // a new dependency in a newer version… + for (pkgCache::DepIterator D = V.DependsList(); + D.end() != true; ++D) + if ((D->Type == pkgCache::Dep::Depends || + D->Type == pkgCache::Dep::PreDepends) && + D.ParentPkg()->Group != Pkg->Group) + return false; + for (DepIterator D = Pkg.RevDependsList(); D.end() != true; ++D) + { + if (D->Type != pkgCache::Dep::Depends && + D->Type != pkgCache::Dep::PreDepends) + continue; + PkgIterator const P = D.ParentPkg(); + if (P->CurrentVer != 0) + return false; + } + for (PrvIterator Prv = V.ProvidesList(); Prv.end() != true; Prv++) + for (DepIterator d = Prv.ParentPkg().RevDependsList(); + d.end() != true; ++d) + { + PkgIterator const P = d.ParentPkg(); + if (P->CurrentVer != 0 && + P->Group != Pkg->Group) + return false; + } + } + + // Dependencies for this arch all package are not statisfied // so we installed it only for our convenience: get right of it now. RemoveSizes(Pkg); RemoveStates(Pkg); @@ -655,15 +690,33 @@ bool pkgDepCache::RemovePseudoInstalledPkg(PkgIterator &Pkg, std::setCurrentVer != 0) - recheck.insert(P.Index()); - } + for (DepIterator d = V.DependsList(); d.end() != true; ++d) + { + PkgIterator const P = d.TargetPkg(); + for (PrvIterator Prv = P.ProvidesList(); Prv.end() != true; ++Prv) + { + PkgIterator const O = Prv.OwnerPkg(); + if (O->CurrentVer != 0) + recheck.insert(O.Index()); + } + + if (P->CurrentVer != 0) + recheck.insert(P.Index()); + } + + for (PrvIterator Prv = V.ProvidesList(); Prv.end() != true; Prv++) + { + for (DepIterator d = Prv.ParentPkg().RevDependsList(); + d.end() != true; ++d) + { + PkgIterator const P = d.ParentPkg(); + if (P->CurrentVer == 0) + continue; + + recheck.insert(P.Index()); + } + } + return true; } diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 23b29cc13..ea605f199 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -332,6 +332,7 @@ class pkgDepCache : protected pkgCache::Namespace inline operator pkgCache &() {return *Cache;}; inline Header &Head() {return *Cache->HeaderP;}; inline PkgIterator PkgBegin() {return Cache->PkgBegin();}; + inline GrpIterator FindGrp(string const &Name) {return Cache->FindGrp(Name);}; inline PkgIterator FindPkg(string const &Name) {return Cache->FindPkg(Name);}; inline PkgIterator FindPkg(string const &Name, string const &Arch) {return Cache->FindPkg(Name, Arch);}; -- cgit v1.2.3 From 5e5d20643487fd1693af418bd1201be5802c232d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 1 Mar 2010 22:47:17 +0100 Subject: fix compiler error if compiled with -std=c++0x --- apt-pkg/algorithms.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index c905cffa9..f8a9e210c 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -535,11 +535,11 @@ void pkgProblemResolver::MakeScores() // Important Required Standard Optional Extra signed short PrioMap[] = { 0, - _config->FindI("pkgProblemResolver::Scores::Important",3), - _config->FindI("pkgProblemResolver::Scores::Required",2), - _config->FindI("pkgProblemResolver::Scores::Standard",1), - _config->FindI("pkgProblemResolver::Scores::Optional",-1), - _config->FindI("pkgProblemResolver::Scores::Extra",-2) + (signed short) _config->FindI("pkgProblemResolver::Scores::Important",3), + (signed short) _config->FindI("pkgProblemResolver::Scores::Required",2), + (signed short) _config->FindI("pkgProblemResolver::Scores::Standard",1), + (signed short) _config->FindI("pkgProblemResolver::Scores::Optional",-1), + (signed short) _config->FindI("pkgProblemResolver::Scores::Extra",-2) }; signed short PrioEssentials = _config->FindI("pkgProblemResolver::Scores::Essentials",100); signed short PrioInstalledAndNotObsolete = _config->FindI("pkgProblemResolver::Scores::NotObsolete",1); -- cgit v1.2.3 From 37049546fc18d93f4387917bc9b8181e8adeb3fa Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 2 Mar 2010 18:55:18 +0100 Subject: * doc/apt_preferences.5.xml: - fix two typos and be more verbose in the novice warning. Thanks to Osamu Aoki for pointing it out! (Closes: #567669) --- debian/changelog | 3 +++ doc/apt_preferences.5.xml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 39cc70da9..417c23e8c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ apt (0.7.26) UNRELEASED; urgency=low - add char[] fallback for filesystems without shared writable mmap() like JFFS2. Thanks to Marius Vollmer for writing and to Loïc Minier for pointing to the patch! (Closes: #314334) + * doc/apt_preferences.5.xml: + - fix two typos and be more verbose in the novice warning. + Thanks to Osamu Aoki for pointing it out! (Closes: #567669) -- David Kalnischkies Fri, 19 Feb 2010 21:21:43 +0100 diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index 3d7896226..e773ad144 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -59,6 +59,9 @@ APT will not questioning the preferences so wrong settings will therefore lead to uninstallable packages or wrong decisions while upgrading packages. Even more problems will arise if multiply distribution releases are mixed without a good understanding of the following paragraphs. +Packages included in a specific release aren't tested in and +therefore doesn't always work as expected in older or newer releases or +together with other packages from different releases. You have been warned. Note that the files in the /etc/apt/preferences.d -- cgit v1.2.3 From 5bdd31d56d4ae367f85195de327017c748ad7e89 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 2 Mar 2010 18:57:27 +0100 Subject: ignore the autogenerated files and directories in abicheck/ --- .bzrignore | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.bzrignore b/.bzrignore index ac276b3fb..c4cd052a7 100644 --- a/.bzrignore +++ b/.bzrignore @@ -11,6 +11,15 @@ configure buildlib/config.sub buildlib/config.guess +# abichecker related files/dir +abicheck/apt_build.xml +abicheck/apt_installed.xml +abicheck/compat_reports/ +abicheck/descriptors_storage/ +abicheck/header_compile_errors/ +abicheck/test_results/ +abicheck/tests/ + # generated files in the progress to build all # apt man pages and other documentation doc/*.1 -- cgit v1.2.3 From cf0e078c440226e0009bb861486b974a03842f7b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 3 Mar 2010 21:29:01 +0100 Subject: fix memory leak in getLanguages() by closing the directory after checking --- apt-pkg/aptconfiguration.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 10613f11d..f3f94dce3 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -152,6 +152,7 @@ std::vector const Configuration::getLanguages(bool const &All, builtin.push_back(c); } } + closedir(D); // get the environment language codes: LC_MESSAGES (and later LANGUAGE) // we extract both, a long and a short code and then we will -- cgit v1.2.3 From 569cc9349d26cc6a886111023df21ba569b1ffbe Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 12 Mar 2010 10:56:25 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - fix error message construction in OpenLog() --- apt-pkg/deb/dpkgpm.cc | 16 +++++++++------- debian/changelog | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index fb6054f79..ad1ea77fd 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -564,35 +564,37 @@ void pkgDPkgPM::WriteHistoryTag(string tag, string value) // DPkgPM::OpenLog /*{{{*/ bool pkgDPkgPM::OpenLog() { - string logdir = _config->FindDir("Dir::Log"); + string const logdir = _config->FindDir("Dir::Log"); if(not FileExists(logdir)) return _error->Error(_("Directory '%s' missing"), logdir.c_str()); // get current time char timestr[200]; - time_t t = time(NULL); - struct tm *tmp = localtime(&t); + time_t const t = time(NULL); + struct tm const * const tmp = localtime(&t); strftime(timestr, sizeof(timestr), "%F %T", tmp); // open terminal log - string logfile_name = flCombine(logdir, + string const logfile_name = flCombine(logdir, _config->Find("Dir::Log::Terminal")); if (!logfile_name.empty()) { term_out = fopen(logfile_name.c_str(),"a"); if (term_out == NULL) - return _error->WarningE(_("Could not open file '%s'"), logfile_name.c_str()); + return _error->WarningE("OpenLog", _("Could not open file '%s'"), logfile_name.c_str()); chmod(logfile_name.c_str(), 0600); fprintf(term_out, "\nLog started: %s\n", timestr); } - // write - string history_name = flCombine(logdir, + // write your history + string const history_name = flCombine(logdir, _config->Find("Dir::Log::History")); if (!history_name.empty()) { history_out = fopen(history_name.c_str(),"a"); + if (history_out == NULL) + return _error->WarningE("OpenLog", _("Could not open file '%s'"), history_name.c_str()); chmod(history_name.c_str(), 0644); fprintf(history_out, "\nStart-Date: %s\n", timestr); string remove, purge, install, upgrade, downgrade; diff --git a/debian/changelog b/debian/changelog index 417c23e8c..d1983ee9e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ apt (0.7.26) UNRELEASED; urgency=low * doc/apt_preferences.5.xml: - fix two typos and be more verbose in the novice warning. Thanks to Osamu Aoki for pointing it out! (Closes: #567669) + * apt-pkg/deb/dpkgpm.cc: + - fix error message construction in OpenLog() -- David Kalnischkies Fri, 19 Feb 2010 21:21:43 +0100 -- cgit v1.2.3 From 6cd9fbd763298816e5d010703ceb9ffad0c235c9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 12 Mar 2010 10:59:37 +0100 Subject: * cmdline/apt-get.cc: - add a --only-upgrade flag to install command (Closes: #572259) That is NOT what is requested in e.g. #74067 - this is a very simple flag which behaves orthogonal to --no-upgrade not a full-blown upgrade option for a single package instead of the whole package set. --- cmdline/apt-get.cc | 14 +++++++++++++- debian/changelog | 2 ++ doc/apt-get.8.xml | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 5a814e255..b35e16b92 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1098,7 +1098,17 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, Pkg.Name()); return true; } - + + // Ignore request for install if package would be new + if (_config->FindB("APT::Get::Only-Upgrade", false) == true && + Pkg->CurrentVer == 0) + { + if (AllowFail == true) + ioprintf(c1out,_("Skipping %s, it is not installed and only upgrades are requested.\n"), + Pkg.Name()); + return true; + } + // Check if there is something at all to install pkgDepCache::StateCache &State = Cache[Pkg]; if (Remove == true && Pkg->CurrentVer == 0) @@ -1779,6 +1789,7 @@ bool DoInstall(CommandLine &CmdL) Cache[Pkg].Install() == false && (Cache[Pkg].Flags & pkgCache::Flag::Auto) && _config->FindB("APT::Get::ReInstall",false) == false && + _config->FindB("APT::Get::Only-Upgrade",false) == false && _config->FindB("APT::Get::Download-Only",false) == false) { ioprintf(c1out,_("%s set to manually installed.\n"), @@ -2821,6 +2832,7 @@ int main(int argc,const char *argv[]) /*{{{*/ {0,"fix-missing","APT::Get::Fix-Missing",0}, {0,"ignore-hold","APT::Ignore-Hold",0}, {0,"upgrade","APT::Get::upgrade",0}, + {0,"only-upgrade","APT::Get::Only-Upgrade",0}, {0,"force-yes","APT::Get::force-yes",0}, {0,"print-uris","APT::Get::Print-URIs",0}, {0,"diff-only","APT::Get::Diff-Only",0}, diff --git a/debian/changelog b/debian/changelog index d1983ee9e..f27c096b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ apt (0.7.26) UNRELEASED; urgency=low Thanks to Osamu Aoki for pointing it out! (Closes: #567669) * apt-pkg/deb/dpkgpm.cc: - fix error message construction in OpenLog() + * cmdline/apt-get.cc: + - add a --only-upgrade flag to install command (Closes: #572259) -- David Kalnischkies Fri, 19 Feb 2010 21:21:43 +0100 diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index 3d22f262c..4f8c80169 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -444,6 +444,13 @@ Configuration Item: APT::Get::Upgrade. + + Do not install new packages; When used in conjunction with install, + only-upgrade will prevent packages on the command line + from being upgraded if they are not already installed. + Configuration Item: APT::Get::Only-Upgrade. + + Force yes; This is a dangerous option that will cause apt to continue without prompting if it is doing something potentially harmful. It -- cgit v1.2.3 From 3a4477a4241bcfbc9db541cf34cc75c1f1111b78 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 12 Mar 2010 11:08:13 +0100 Subject: * cmdline/apt-get.cc - fix memory leaks in error conditions in DoSource() --- apt-pkg/cdrom.cc | 3 ++- cmdline/apt-get.cc | 6 +++++- debian/changelog | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 96d4e9c91..783ffc430 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -289,7 +289,8 @@ bool pkgCdrom::DropRepeats(vector &List,const char *Name) List[J] = string(); } } - + delete[] Inodes; + // Wipe erased entries for (unsigned int I = 0; I < List.size();) { diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index b35e16b92..849401b0c 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2299,6 +2299,7 @@ bool DoSource(CommandLine &CmdL) { for (unsigned I = 0; I != J; I++) ioprintf(cout,_("Fetch source %s\n"),Dsc[I].Package.c_str()); + delete[] Dsc; return true; } @@ -2309,6 +2310,7 @@ bool DoSource(CommandLine &CmdL) for (; I != Fetcher.UriEnd(); I++) cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl; + delete[] Dsc; return true; } @@ -2334,6 +2336,7 @@ bool DoSource(CommandLine &CmdL) if (_config->FindB("APT::Get::Download-only",false) == true) { c1out << _("Download complete and in download only mode") << endl; + delete[] Dsc; return true; } @@ -2395,7 +2398,8 @@ bool DoSource(CommandLine &CmdL) _exit(0); } - + delete[] Dsc; + // Wait for the subprocess int Status = 0; while (waitpid(Process,&Status,0) != Process) diff --git a/debian/changelog b/debian/changelog index f27c096b6..b05498f12 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ apt (0.7.26) UNRELEASED; urgency=low - fix error message construction in OpenLog() * cmdline/apt-get.cc: - add a --only-upgrade flag to install command (Closes: #572259) + - fix memory leaks in error conditions in DoSource() -- David Kalnischkies Fri, 19 Feb 2010 21:21:43 +0100 -- cgit v1.2.3 From 2bb255740bf18b5e0524fe833523303abb5c9051 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 12 Mar 2010 19:41:30 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - if available store the Commandline in the history * apt-pkg/contrib/cmndline.cc: - save Commandline in Commandline::AsString for logging --- apt-pkg/contrib/cmndline.cc | 42 ++++++++++++++++++++++++++++++++- apt-pkg/contrib/cmndline.h | 1 + apt-pkg/deb/dpkgpm.cc | 2 ++ debian/changelog | 3 +++ test/libapt/commandlineasstring_test.cc | 39 ++++++++++++++++++++++++++++++ test/libapt/makefile | 6 +++++ 6 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 test/libapt/commandlineasstring_test.cc diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc index bfd53695e..0b16bf51a 100644 --- a/apt-pkg/contrib/cmndline.cc +++ b/apt-pkg/contrib/cmndline.cc @@ -135,7 +135,9 @@ bool CommandLine::Parse(int argc,const char **argv) for (; I != argc; I++) *Files++ = argv[I]; *Files = 0; - + + SaveInConfig(argc, argv); + return true; } /*}}}*/ @@ -351,3 +353,41 @@ bool CommandLine::DispatchArg(Dispatch *Map,bool NoMatch) return false; } /*}}}*/ +// CommandLine::SaveInConfig - for output later in a logfile or so /*{{{*/ +// --------------------------------------------------------------------- +/* We save the commandline here to have it around later for e.g. logging. + It feels a bit like a hack here and isn't bulletproof, but it is better + than nothing after all. */ +void CommandLine::SaveInConfig(unsigned int const &argc, char const * const * const argv) +{ + char cmdline[300]; + unsigned int length = 0; + bool lastWasOption = false; + bool closeQuote = false; + for (unsigned int i = 0; i < argc; ++i, ++length) + { + for (unsigned int j = 0; argv[i][j] != '\0' && length < sizeof(cmdline)-1; ++j, ++length) + { + cmdline[length] = argv[i][j]; + if (lastWasOption == true && argv[i][j] == '=') + { + // That is possibly an option: Quote it if it includes spaces, + // the benefit is that this will eliminate also most false positives + const char* c = &argv[i][j+1]; + for (; *c != '\0' && *c != ' '; ++c); + if (*c == '\0') continue; + cmdline[++length] = '"'; + closeQuote = true; + } + } + if (closeQuote == true) + cmdline[length++] = '"'; + // Problem: detects also --hello + if (cmdline[length-1] == 'o') + lastWasOption = true; + cmdline[length] = ' '; + } + cmdline[--length] = '\0'; + _config->Set("CommandLine::AsString", cmdline); +} + /*}}}*/ diff --git a/apt-pkg/contrib/cmndline.h b/apt-pkg/contrib/cmndline.h index e28071e81..7c0c71aa7 100644 --- a/apt-pkg/contrib/cmndline.h +++ b/apt-pkg/contrib/cmndline.h @@ -60,6 +60,7 @@ class CommandLine Configuration *Conf; bool HandleOpt(int &I,int argc,const char *argv[], const char *&Opt,Args *A,bool PreceedeMatch = false); + void static SaveInConfig(unsigned int const &argc, char const * const * const argv); public: diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index ad1ea77fd..9ba60060c 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -614,6 +614,8 @@ bool pkgDPkgPM::OpenLog() remove += I.Name() + string(" (") + Cache[I].CurVersion + string("), "); } } + if (_config->Exists("Commandline::AsString") == true) + WriteHistoryTag("Commandline", _config->Find("Commandline::AsString")); WriteHistoryTag("Install", install); WriteHistoryTag("Upgrade", upgrade); WriteHistoryTag("Downgrade",downgrade); diff --git a/debian/changelog b/debian/changelog index b05498f12..506e70a25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,9 +14,12 @@ apt (0.7.26) UNRELEASED; urgency=low Thanks to Osamu Aoki for pointing it out! (Closes: #567669) * apt-pkg/deb/dpkgpm.cc: - fix error message construction in OpenLog() + - if available store the Commandline in the history * cmdline/apt-get.cc: - add a --only-upgrade flag to install command (Closes: #572259) - fix memory leaks in error conditions in DoSource() + * apt-pkg/contrib/cmndline.cc: + - save Commandline in Commandline::AsString for logging -- David Kalnischkies Fri, 19 Feb 2010 21:21:43 +0100 diff --git a/test/libapt/commandlineasstring_test.cc b/test/libapt/commandlineasstring_test.cc new file mode 100644 index 000000000..a38957d7e --- /dev/null +++ b/test/libapt/commandlineasstring_test.cc @@ -0,0 +1,39 @@ +#include +#include + +#include + +#include "assert.h" + +class CLT: public CommandLine { + + public: + std::string static AsString(const char * const * const argv, + unsigned int const argc) { + std::string const static conf = "Commandline::AsString"; + _config->Clear(conf); + SaveInConfig(argc, argv); + return _config->Find(conf); + } +}; + +#define CMD(y,z) equals(CLT::AsString(argv, y), z); + +int main() { + { + const char* const argv[] = {"apt-get", "install", "-sf"}; + CMD(3, "apt-get install -sf"); + } + { + const char* const argv[] = {"apt-cache", "-s", "apt", "-so", "Debug::test=Test"}; + CMD(5, "apt-cache -s apt -so Debug::test=Test"); + } + { + const char* const argv[] = {"apt-cache", "-s", "apt", "-so", "Debug::test=Das ist ein Test"}; + CMD(5, "apt-cache -s apt -so Debug::test=\"Das ist ein Test\""); + } + { + const char* const argv[] = {"apt-cache", "-s", "apt", "--hallo", "test=1.0"}; + CMD(5, "apt-cache -s apt --hallo test=1.0"); + } +} diff --git a/test/libapt/makefile b/test/libapt/makefile index 08f581e6d..cb76d5ee6 100644 --- a/test/libapt/makefile +++ b/test/libapt/makefile @@ -23,3 +23,9 @@ PROGRAM = GetListOfFilesInDir${BASENAME} SLIBS = -lapt-pkg SOURCE = getlistoffilesindir_test.cc include $(PROGRAM_H) + +# Program for testing CommandLine reconstruction +PROGRAM = commandlineasstring${BASENAME} +SLIBS = -lapt-pkg +SOURCE = commandlineasstring_test.cc +include $(PROGRAM_H) -- cgit v1.2.3 From ea5624c3d04c35f5a269b6f7431c135330c9b9b5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 13 Mar 2010 14:11:22 +0100 Subject: * apt-pkg/deb/debversion.cc: - consider absent of debian revision equivalent to 0 (Closes: #573592) This moves the existing testcase for version comparison to "my" directory, adds a few more tests (e.g. the tests used in cupt) and rewrites the testcases runner: The runner does now call dpkg --compare-versions to check what dpkg thinks about the comparison - all done in less code ;) --- apt-pkg/deb/debversion.cc | 18 ++- debian/changelog | 2 + test/libapt/compareversion_test.cc | 123 ++++++++++++++++++++ test/libapt/makefile | 6 + test/makefile | 7 -- test/versions.lst | 64 +++++++++- test/versiontest.cc | 233 ------------------------------------- 7 files changed, 207 insertions(+), 246 deletions(-) create mode 100644 test/libapt/compareversion_test.cc delete mode 100644 test/versiontest.cc diff --git a/apt-pkg/deb/debversion.cc b/apt-pkg/deb/debversion.cc index ad45e9a44..755ffbe96 100644 --- a/apt-pkg/deb/debversion.cc +++ b/apt-pkg/deb/debversion.cc @@ -190,8 +190,22 @@ int debVersioningSystem::DoCmpVersion(const char *A,const char *AEnd, dlhs++; if (drhs != rhs) drhs++; - - return CmpFragment(dlhs,AEnd,drhs,BEnd); + + // no debian revision need to be treated like -0 + if (*(dlhs-1) == '-' && *(drhs-1) == '-') + return CmpFragment(dlhs,AEnd,drhs,BEnd); + else if (*(dlhs-1) == '-') + { + const char* null = "0"; + return CmpFragment(dlhs,AEnd,null, null+1); + } + else if (*(drhs-1) == '-') + { + const char* null = "0"; + return CmpFragment(null, null+1, drhs, BEnd); + } + else + return 0; } /*}}}*/ // debVS::CheckDep - Check a single dependency /*{{{*/ diff --git a/debian/changelog b/debian/changelog index 506e70a25..b0d7cb536 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,8 @@ apt (0.7.26) UNRELEASED; urgency=low - fix memory leaks in error conditions in DoSource() * apt-pkg/contrib/cmndline.cc: - save Commandline in Commandline::AsString for logging + * apt-pkg/deb/debversion.cc: + - consider absent of debian revision equivalent to 0 (Closes: #573592) -- David Kalnischkies Fri, 19 Feb 2010 21:21:43 +0100 diff --git a/test/libapt/compareversion_test.cc b/test/libapt/compareversion_test.cc new file mode 100644 index 000000000..b6213e84c --- /dev/null +++ b/test/libapt/compareversion_test.cc @@ -0,0 +1,123 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +/* ###################################################################### + + Version Test - Simple program to run through a file and comare versions. + + Each version is compared and the result is checked against an expected + result in the file. The format of the file is + a b Res + Where Res is -1, 1, 0. dpkg -D=1 --compare-versions a "<" b can be + used to determine what Res should be. # at the start of the line + is a comment and blank lines are skipped + + The runner will also call dpkg --compare-versions to check if APT and + dpkg have (still) the same idea. + + ##################################################################### */ + /*}}}*/ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +using namespace std; + +bool callDPkg(const char *val, const char *ref, const char &op) { + pid_t Process = ExecFork(); + if (Process == 0) + { + const char * args[6]; + args[0] = "/usr/bin/dpkg"; + args[1] = "--compare-versions"; + args[2] = val; + args[3] = (op == 1) ? ">>" : ( (op == 0) ? "=" : "<<"); + args[4] = ref; + args[5] = 0; + execv(args[0], (char**) args); + exit(1); + } + int Ret; + waitpid(Process, &Ret, 0); + return WIFEXITED(Ret) == true && WEXITSTATUS(Ret) == 0; +} + +void assertVersion(int const &CurLine, string const &A, string const &B, int const &Expected) { + int Res = debVS.CmpVersion(A.c_str(), B.c_str()); + bool const dpkg = callDPkg(A.c_str(),B.c_str(), Expected); + Res = (Res < 0) ? -1 : ( (Res > 0) ? 1 : Res); + + if (Res != Expected) + _error->Error("Comparison failed on line %u. '%s' '%s' '%s' %i != %i",CurLine,A.c_str(),((Expected == 1) ? "<<" : ( (Expected == 0) ? "=" : ">>")) ,B.c_str(),Res,Expected); + if (dpkg == false) + _error->Error("DPkg differ with line: %u. '%s' '%s' '%s' == false",CurLine,A.c_str(),((Expected == 1) ? "<<" : ( (Expected == 0) ? "=" : ">>")),B.c_str()); +} + +bool RunTest(const char *File) +{ + ifstream F(File,ios::in); + if (!F != 0) + return false; + + char Buffer[300]; + int CurLine = 0; + + while (1) + { + F.getline(Buffer,sizeof(Buffer)); + CurLine++; + if (F.eof() != 0) + return true; + if (!F != 0) + return _error->Error("Line %u in %s is too long",CurLine,File); + + // Comment + if (Buffer[0] == '#' || Buffer[0] == 0) + continue; + + // First version + char *I; + char *Start = Buffer; + for (I = Buffer; *I != 0 && *I != ' '; I++); + string A(Start, I - Start); + + if (*I == 0) + return _error->Error("Invalid line %u",CurLine); + + // Second version + I++; + Start = I; + for (I = Start; *I != 0 && *I != ' '; I++); + string B(Start,I - Start); + + if (*I == 0 || I[1] == 0) + return _error->Error("Invalid line %u",CurLine); + + // Result + I++; + int const Expected = atoi(I); + assertVersion(CurLine, A, B, Expected); + // Check the reverse as well + assertVersion(CurLine, B, A, Expected*-1); + } +} + +int main(int argc, char *argv[]) +{ + if (argc <= 1) + RunTest("../versions.lst"); + else + RunTest(argv[1]); + + // Print any errors or warnings found + _error->DumpErrors(); + return 0; +} diff --git a/test/libapt/makefile b/test/libapt/makefile index cb76d5ee6..98bdb3348 100644 --- a/test/libapt/makefile +++ b/test/libapt/makefile @@ -29,3 +29,9 @@ PROGRAM = commandlineasstring${BASENAME} SLIBS = -lapt-pkg SOURCE = commandlineasstring_test.cc include $(PROGRAM_H) + +# Program for testing debians version comparing +PROGRAM = compareversion${BASENAME} +SLIBS = -lapt-pkg +SOURCE = compareversion_test.cc +include $(PROGRAM_H) diff --git a/test/makefile b/test/makefile index fb9123d0a..b8c104eae 100644 --- a/test/makefile +++ b/test/makefile @@ -24,13 +24,6 @@ LIB_MAKES = apt-pkg/makefile apt-inst/makefile SOURCE = scratch.cc include $(PROGRAM_H) -# Version compare tester -PROGRAM=versiontest -SLIBS = -lapt-pkg -LIB_MAKES = apt-pkg/makefile -SOURCE = versiontest.cc -include $(PROGRAM_H) - # Version compare tester PROGRAM=testextract SLIBS = -lapt-pkg -lapt-inst diff --git a/test/versions.lst b/test/versions.lst index efc19c4f0..517214151 100644 --- a/test/versions.lst +++ b/test/versions.lst @@ -10,10 +10,11 @@ 1.3 1.2.2 1 # Important attributes -- . -1 -p - -1 -a - -1 -z - -1 +# disabled as dpkg --compare-versions doesn't like them… +#- . -1 +#p - -1 +#a - -1 +#z - -1 a . -1 z . -1 @@ -22,6 +23,10 @@ z . -1 1:1.25-4 1:1.25-8 -1 0:1.18.36 1.18.36 0 +# native version +1.18.36 1.18.35 1 +0:1.18.36 1.18.35 1 + # Funky, but allowed, characters in upstream version 9:1.18.36:5.4-20 10:0.5.1-22 -1 9:1.18.36:5.4-20 9:1.18.36:5.5-1 -1 @@ -49,3 +54,54 @@ III-alpha9.8 III-alpha9.8-1.5 -1 # #205960 3.0~rc1-1 3.0-1 -1 + +# #573592 - debian policy 5.6.12 +1.0 1.0-0 0 +0.2 1.0-0 -1 +1.0 1.0-0+b1 -1 +1.0 1.0-0~ 1 + +# if a version includes a dash +# it should be the debrev dash - policy says so… +0:0-0-0 0-0 1 + +# do we like strange versions? Yes we like strange versions… +0 0 0 +0 00 0 + +# "steal" the testcases from cupt +1.2.3 1.2.3 0 # identical +4.4.3-2 4.4.3-2 0 # identical +1:2ab:5 1:2ab:5 0 # this is correct... +7:1-a:b-5 7:1-a:b-5 0 # and this +57:1.2.3abYZ+~-4-5 57:1.2.3abYZ+~-4-5 0 # and those too +1.2.3 0:1.2.3 0 # zero epoch +1.2.3 1.2.3-0 0 # zero revision +009 9 0 # zeroes... +009ab5 9ab5 0 # there as well +1.2.3 1.2.3-1 -1 # added non-zero revision +1.2.3 1.2.4 -1 # just bigger +1.2.4 1.2.3 1 # order doesn't matter +1.2.24 1.2.3 1 # bigger, eh? +0.10.0 0.8.7 1 # bigger, eh? +3.2 2.3 1 # major number rocks +1.3.2a 1.3.2 1 # letters rock +0.5.0~git 0.5.0~git2 -1 # numbers rock +2a 21 -1 # but not in all places +1.3.2a 1.3.2b -1 # but there is another letter +1:1.2.3 1.2.4 1 # epoch rocks +1:1.2.3 1:1.2.4 -1 # bigger anyway +1.2a+~bCd3 1.2a++ -1 # tilde doesn't rock +1.2a+~bCd3 1.2a+~ 1 # but first is longer! +5:2 304-2 1 # epoch rocks +5:2 304:2 -1 # so big epoch? +25:2 3:2 1 # 25 > 3, obviously +1:2:123 1:12:3 -1 # 12 > 2 +1.2-5 1.2-3-5 -1 # 1.2 < 1.2-3 +5.10.0 5.005 1 # preceding zeroes don't matters +3a9.8 3.10.2 -1 # letters are before all letter symbols +3a9.8 3~10 1 # but after the tilde +1.4+OOo3.0.0~ 1.4+OOo3.0.0-4 -1 # another tilde check +2.4.7-1 2.4.7-z -1 # revision comparing +1.002-1+b2 1.00 1 # whatever... +2.2.4-47978_Debian_lenny 2.2.4-47978_Debian_lenny 0 # and underscore... diff --git a/test/versiontest.cc b/test/versiontest.cc deleted file mode 100644 index 4ede4b280..000000000 --- a/test/versiontest.cc +++ /dev/null @@ -1,233 +0,0 @@ -// -*- mode: cpp; mode: fold -*- -// Description /*{{{*/ -// $Id: versiontest.cc,v 1.5 2003/08/18 15:55:19 mdz Exp $ -/* ###################################################################### - - Version Test - Simple program to run through a file and comare versions. - - Each version is compared and the result is checked against an expected - result in the file. The format of the file is - a b Res - Where Res is -1, 1, 0. dpkg -D=1 --compare-versions a "<" b can be - used to determine what Res should be. # at the start of the line - is a comment and blank lines are skipped - - ##################################################################### */ - /*}}}*/ -#include -#include -#include -#include -#include -#include - -using namespace std; - - static int verrevcmp(const char *val, const char *ref) -{ - int vc, rc; - long vl, rl; - const char *vp, *rp; - - if (!val) - val = ""; - if (!ref) - ref = ""; - for (;;) - { - vp = val; - while (*vp && !isdigit(*vp)) - vp++; - rp = ref; - while (*rp && !isdigit(*rp)) - rp++; - for (;;) - { - vc= val == vp ? 0 : *val++; - rc= ref == rp ? 0 : *ref++; - if (!rc && !vc) - break; - if (vc && !isalpha(vc)) - vc += 256; /* assumes ASCII character set */ - if (rc && !isalpha(rc)) - rc += 256; - if (vc != rc) - return vc - rc; - } - val = vp; - ref = rp; - vl = 0; - if (isdigit(*vp)) - vl = strtol(val,(char**)&val,10); - rl = 0; - if (isdigit(*rp)) - rl = strtol(ref,(char**)&ref,10); - if (vl != rl) - return vl - rl; - if (!*val && !*ref) - return 0; - if (!*val) - return -1; - if (!*ref) - return +1; - } -} - -#if 0 -static int verrevcmp(const char *val, const char *ref) -{ - int vc, rc; - long vl, rl; - const char *vp, *rp; - - if (!val) val= ""; - if (!ref) ref= ""; - for (;;) - { - vp= val; while (*vp && !isdigit(*vp) && *vp != '~') vp++; - rp= ref; while (*rp && !isdigit(*rp) && *rp != '~') rp++; - for (;;) - { - vc= val == vp ? 0 : *val++; - rc= ref == rp ? 0 : *ref++; - if (!rc && !vc) break; - if (vc && !isalpha(vc)) vc += 256; /* assumes ASCII character set */ - if (rc && !isalpha(rc)) rc += 256; - if (vc != rc) return vc - rc; - } - - val= vp; - ref= rp; - if (*vp == '~') val++; - if (*rp == '~') ref++; - vl=0; if (isdigit(*val)) vl= strtol(val,(char**)&val,10); - rl=0; if (isdigit(*ref)) rl= strtol(ref,(char**)&ref,10); - if (vl == 0 && rl == 0) - { - if (*vp == '~' && *rp != '~') return -1; - if (*vp != '~' && *rp == '~') return +1; - } - if (*vp == '~') - vl *= -1; - if (*rp == '~') - rl *= -1; - if (vl != rl) return vl - rl; - if (!*val && !*ref) return 0; - if (!*val) - { - if (*ref == '~') - return +1; - else - return -1; - } - - if (!*ref) - { - if (*val == '~') - return -1; - else - return +1; - } - } -} -#endif - -bool RunTest(const char *File) -{ - ifstream F(File,ios::in); - if (!F != 0) - return false; - - char Buffer[300]; - int CurLine = 0; - - while (1) - { - F.getline(Buffer,sizeof(Buffer)); - CurLine++; - if (F.eof() != 0) - return true; - if (!F != 0) - return _error->Error("Line %u in %s is too long",CurLine,File); - - // Comment - if (Buffer[0] == '#' || Buffer[0] == 0) - continue; - - // First version - char *I; - char *Start = Buffer; - for (I = Buffer; *I != 0 && *I != ' '; I++); - string A(Start, I - Start); - - if (*I == 0) - return _error->Error("Invalid line %u",CurLine); - - // Second version - I++; - Start = I; - for (I = Start; *I != 0 && *I != ' '; I++); - string B(Start,I - Start); - - if (*I == 0 || I[1] == 0) - return _error->Error("Invalid line %u",CurLine); - - // Result - I++; - int Expected = atoi(I); - int Res = debVS.CmpVersion(A.c_str(), B.c_str()); - int Res2 = verrevcmp(A.c_str(),B.c_str()); - cout << "'" << A << "' ? '" << B << "' = " << Res << " (= " << Expected << ") " << Res2 << endl; - - if (Res < 0) - Res = -1; - else if (Res > 0) - Res = 1; - - if (Res != Expected) - _error->Error("Comparison failed on line %u. '%s' ? '%s' %i != %i",CurLine,A.c_str(),B.c_str(),Res,Expected); - - // Check the reverse as well - Expected = -1*Expected; - Res = debVS.CmpVersion(B.c_str(), A.c_str()); - Res2 = verrevcmp(B.c_str(),A.c_str()); - - cout << "'" << B << "' ? '" << A << "' = " << Res << " (= " << Expected << ") " << Res2 << endl; - - if (Res < 0) - Res = -1; - else if (Res > 0) - Res = 1; - - if (Res != Expected) - _error->Error("Comparison failed on line %u. '%s' ? '%s' %i != %i",CurLine,B.c_str(),A.c_str(),Res,Expected); - } -} - -int main(int argc, char *argv[]) -{ - if (argc <= 1) - { - cerr << "You must specify a test file" << endl; - return 0; - } - - RunTest(argv[1]); - - // Print any errors or warnings found - if (_error->empty() == false) - { - string Err; - while (_error->empty() == false) - { - - bool Type = _error->PopMessage(Err); - if (Type == true) - cout << "E: " << Err << endl; - else - cout << "W: " << Err << endl; - } - - return 0; - } -} -- cgit v1.2.3 From 1f530ccb32c17b70b05dd5feee706dc1098a7251 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 14 Mar 2010 14:45:00 +0100 Subject: Ensure that for each all package at least one pseudopackage is installed Removing pseudo packages is cool so far, the problem is that we will remove with the not required removing so many pseudo packages that we will have after the remove a few packages with NO installed pseudo package (e.g. metapackages are good candidates) - so we will walk over all these packages and try to find a pseudopackage for this package we can install without breaking something. --- apt-pkg/depcache.cc | 77 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 68 insertions(+), 9 deletions(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 893164ea1..ffa4fe71c 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -634,10 +634,8 @@ bool pkgDepCache::RemovePseudoInstalledPkg(PkgIterator &Pkg, std::setType == pkgCache::Dep::Depends || - D->Type == pkgCache::Dep::PreDepends) && - D.ParentPkg()->Group != Pkg->Group) + if (D.IsCritical() == true && D.ParentPkg()->Group != Pkg->Group) return false; for (DepIterator D = Pkg.RevDependsList(); D.end() != true; ++D) { - if (D->Type != pkgCache::Dep::Depends && - D->Type != pkgCache::Dep::PreDepends) + if (D.IsCritical() == false) continue; PkgIterator const P = D.ParentPkg(); + if (P->Group == Pkg->Group) + continue; if (P->CurrentVer != 0) return false; } @@ -800,6 +797,68 @@ void pkgDepCache::Update(OpProgress *Prog) } recheck.erase(p); } + + /* Okay, we have killed a great amount of pseudopackages - + we have killed so many that we have now arch "all" packages + without an installed pseudo package, but we NEED an installed + pseudo package, so we will search now for a pseudo package + we can install without breaking everything. */ + for (GrpIterator G = Cache->GrpBegin(); G.end() != true; ++G) + { + PkgIterator P = G.FindPkg("all"); + if (P.end() == true) + continue; + if (P->CurrentVer == 0) + continue; + bool installed = false; + for (P = G.FindPkg("any"); P.end() != true; P = G.NextPkg(P)) + { + if (strcmp(P.Arch(), "all") == 0) + continue; + if (P->CurrentVer == 0) + continue; + installed = true; + break; + } + if (installed == false) + recheck.insert(G.Index()); + } + std::vector Archs = APT::Configuration::getArchitectures(); + bool checkChanged = false; + do { + for(std::set::const_iterator g = recheck.begin(); + g != recheck.end(); ++g) { + GrpIterator G = GrpIterator(*Cache, Cache->GrpP + *g); + VerIterator allV = G.FindPkg("all").CurrentVer(); + for (std::vector::const_iterator a = Archs.begin(); + a != Archs.end(); ++a) + { + PkgIterator P = G.FindPkg(*a); + if (P.end() == true) continue; + for (VerIterator V = P.VersionList(); V.end() != true; ++V) + { + // FIXME: String comparison isn't a save indicator! + if (strcmp(allV.VerStr(),V.VerStr()) != 0) + continue; + unsigned char const CurDepState = VersionState(V.DependsList(),DepInstall,DepInstMin,DepInstPolicy); + if ((CurDepState & DepInstMin) != DepInstMin) + break; // we found the correct version, but it is broken. Better try another arch or later again + P->CurrentVer = V.Index(); + AddStates(P); + Update(P); + AddSizes(P); + checkChanged = true; + break; + } + } + recheck.erase(g); + } + } while (checkChanged == true && recheck.empty() == false); + + if (_config->FindB("Debug::MultiArchKiller", false) == true) + for(std::set::const_iterator g = recheck.begin(); + g != recheck.end(); ++g) + std::cout << "No pseudo package for »" << GrpIterator(*Cache, Cache->GrpP + *g).Name() << "« installed" << std::endl; } if (Prog != 0) -- cgit v1.2.3 From 7f912c325b207beac9deb5daafb7ec34b9db067a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 14 Mar 2010 17:26:50 +0100 Subject: * debian/control: - add automake/conf build-depends/conflicts as recommend by the autotools-dev README (Closes: #572615) --- debian/changelog | 2 ++ debian/control | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3b564b3a1..142577e42 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ apt (0.7.26) UNRELEASED; urgency=low - don't crash if no arguments are given (Closes: #570962) * debian/control: - remove some years old and obsolete Replaces + - add automake/conf build-depends/conflicts as recommend by + the autotools-dev README (Closes: #572615) * apt-pkg/contrib/mmap.{h,cc}: - add char[] fallback for filesystems without shared writable mmap() like JFFS2. Thanks to Marius Vollmer for writing diff --git a/debian/control b/debian/control index 0cf092c25..b7c3e5712 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,8 @@ Uploaders: Michael Vogt , Otavio Salvador , Christian Perrier , Daniel Burrows , Luca Bruno , Julian Andres Klode Standards-Version: 3.8.4 -Build-Depends: debhelper (>= 5.0), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5), debiandoc-sgml, xsltproc, docbook-xsl, po4a (>= 0.34-2), autotools-dev +Build-Depends: debhelper (>= 5.0), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5), debiandoc-sgml, xsltproc, docbook-xsl, po4a (>= 0.34-2), autotools-dev, autoconf, automake +Build-Conflicts: autoconf2.13, automake1.4 Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/ Package: apt -- cgit v1.2.3 From c176c4d0adad246ac0768f9e2b60aa8e4c56fffb Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 14 Mar 2010 21:48:14 +0100 Subject: * apt-pkg/depcache.cc: - remove Auto-Installed information from extended_states together with the package itself (Closes: #572364) --- apt-pkg/depcache.cc | 31 ++++++++++++++++++++++++------- apt-pkg/depcache.h | 2 +- apt-pkg/tagfile.cc | 13 ++----------- apt-pkg/tagfile.h | 15 ++++++++++++++- debian/changelog | 3 +++ 5 files changed, 44 insertions(+), 20 deletions(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 5943d858a..e9fb5f76a 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -235,16 +235,30 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ std::set pkgs_seen; const char *nullreorderlist[] = {0}; while(tagfile.Step(section)) { - string pkgname = section.FindS("Package"); + string const pkgname = section.FindS("Package"); // Silently ignore unknown packages and packages with no actual // version. pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname); if(pkg.end() || pkg.VersionList().end()) continue; - bool newAuto = (PkgState[pkg->ID].Flags & Flag::Auto); + StateCache const &P = PkgState[pkg->ID]; + bool newAuto = (P.Flags & Flag::Auto); + // skip not installed or now-removed ones if requested + if (InstalledOnly && ( + (pkg->CurrentVer == 0 && P.Mode != ModeInstall) || + (pkg->CurrentVer != 0 && P.Mode == ModeDelete))) + { + // The section is obsolete if it contains no other tag + unsigned int const count = section.Count(); + if (count < 2 || + (count == 2 && section.Exists("Auto-Installed"))) + continue; + else + newAuto = false; + } if(_config->FindB("Debug::pkgAutoRemove",false)) std::clog << "Update existing AutoInstall info: " - << pkg.Name() << std::endl; + << pkgname << std::endl; TFRewriteData rewrite[2]; rewrite[0].Tag = "Auto-Installed"; rewrite[0].Rewrite = newAuto ? "1" : "0"; @@ -258,15 +272,18 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ // then write the ones we have not seen yet std::ostringstream ostr; for(pkgCache::PkgIterator pkg=Cache->PkgBegin(); !pkg.end(); pkg++) { - if(PkgState[pkg->ID].Flags & Flag::Auto) { + StateCache const &P = PkgState[pkg->ID]; + if(P.Flags & Flag::Auto) { if (pkgs_seen.find(pkg.Name()) != pkgs_seen.end()) { if(debug_autoremove) std::clog << "Skipping already written " << pkg.Name() << std::endl; continue; } - // skip not installed ones if requested - if(InstalledOnly && pkg->CurrentVer == 0) - continue; + // skip not installed ones if requested + if (InstalledOnly && ( + (pkg->CurrentVer == 0 && P.Mode != ModeInstall) || + (pkg->CurrentVer != 0 && P.Mode == ModeDelete))) + continue; if(debug_autoremove) std::clog << "Writing new AutoInstall: " << pkg.Name() << std::endl; diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 0306861a1..fd1f202be 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -447,7 +447,7 @@ class pkgDepCache : protected pkgCache::Namespace // read persistent states bool readStateFile(OpProgress *prog); - bool writeStateFile(OpProgress *prog, bool InstalledOnly=false); + bool writeStateFile(OpProgress *prog, bool InstalledOnly=true); // Size queries inline double UsrSize() {return iUsrSize;}; diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 7c5d15a58..0d4999ee7 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -193,17 +193,8 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) /*}}}*/ // TagSection::Scan - Scan for the end of the header information /*{{{*/ // --------------------------------------------------------------------- -/* This looks for the first double new line in the data stream. It also - indexes the tags in the section. This very simple hash function for the - last 8 letters gives very good performance on the debian package files */ -inline static unsigned long AlphaHash(const char *Text, const char *End = 0) -{ - unsigned long Res = 0; - for (; Text != End && *Text != ':' && *Text != 0; Text++) - Res = ((unsigned long)(*Text) & 0xDF) ^ (Res << 1); - return Res & 0xFF; -} - +/* This looks for the first double new line in the data stream. + It also indexes the tags in the section. */ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) { const char *End = Start + MaxLength; diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 321329a23..f63a51d07 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -33,7 +33,18 @@ class pkgTagSection unsigned int AlphaIndexes[0x100]; unsigned int TagCount; - + + /* This very simple hash function for the last 8 letters gives + very good performance on the debian package files */ + inline static unsigned long AlphaHash(const char *Text, const char *End = 0) + { + unsigned long Res = 0; + for (; Text != End && *Text != ':' && *Text != 0; Text++) + Res = ((unsigned long)(*Text) & 0xDF) ^ (Res << 1); + return Res & 0xFF; + } + + protected: const char *Stop; @@ -54,6 +65,8 @@ class pkgTagSection virtual void TrimRecord(bool BeforeRecord, const char* &End); inline unsigned int Count() const {return TagCount;}; + inline bool Exists(const char* const Tag) {return AlphaIndexes[AlphaHash(Tag)] != 0;} + inline void Get(const char *&Start,const char *&Stop,unsigned int I) const {Start = Section + Indexes[I]; Stop = Section + Indexes[I+1];} diff --git a/debian/changelog b/debian/changelog index 142577e42..415a6fd8d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ apt (0.7.26) UNRELEASED; urgency=low [ David Kalnischkies ] * Switch to dpkg-source 3.0 (native) format + * apt-pkg/depcache.cc: + - remove Auto-Installed information from extended_states + together with the package itself (Closes: #572364) * cmdline/apt-mark: - don't crash if no arguments are given (Closes: #570962) * debian/control: -- cgit v1.2.3 From b45fb8db8c586fa837a9d1ad0c2247a7e003e51f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 15 Mar 2010 11:02:31 +0100 Subject: * doc/makefile, doc/*: - generate subdirectories for building the manpages in on the fly depending on the po files we have. --- debian/changelog | 3 +++ doc/de/makefile | 11 ----------- doc/es/makefile | 11 ----------- doc/fr/makefile | 11 ----------- doc/it/makefile | 11 ----------- doc/ja/makefile | 11 ----------- doc/lang.makefile | 11 +++++++++++ doc/makefile | 15 ++++++++++++--- doc/pl/makefile | 11 ----------- doc/pt_BR/makefile | 11 ----------- 10 files changed, 26 insertions(+), 80 deletions(-) delete mode 100644 doc/de/makefile delete mode 100644 doc/es/makefile delete mode 100644 doc/fr/makefile delete mode 100644 doc/it/makefile delete mode 100644 doc/ja/makefile create mode 100644 doc/lang.makefile delete mode 100644 doc/pl/makefile delete mode 100644 doc/pt_BR/makefile diff --git a/debian/changelog b/debian/changelog index 415a6fd8d..ddbf19214 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,9 @@ apt (0.7.26) UNRELEASED; urgency=low - save Commandline in Commandline::AsString for logging * apt-pkg/deb/debversion.cc: - consider absent of debian revision equivalent to 0 (Closes: #573592) + * doc/makefile, doc/*: + - generate subdirectories for building the manpages in on the fly + depending on the po files we have. [ Julian Andres Klode ] * cmdline/apt-mark: diff --git a/doc/de/makefile b/doc/de/makefile deleted file mode 100644 index a827a0f24..000000000 --- a/doc/de/makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=doc/de - -# Bring in the default rules -include ../../buildlib/defaults.mak - -# Language Code of this translation -LC=de - -include $(PO4A_MANPAGE_H) diff --git a/doc/es/makefile b/doc/es/makefile deleted file mode 100644 index 0b5b52222..000000000 --- a/doc/es/makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=doc/es - -# Bring in the default rules -include ../../buildlib/defaults.mak - -# Language Code of this translation -LC=es - -include $(PO4A_MANPAGE_H) diff --git a/doc/fr/makefile b/doc/fr/makefile deleted file mode 100644 index 214534736..000000000 --- a/doc/fr/makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=doc/fr - -# Bring in the default rules -include ../../buildlib/defaults.mak - -# Language Code of this translation -LC=fr - -include $(PO4A_MANPAGE_H) diff --git a/doc/it/makefile b/doc/it/makefile deleted file mode 100644 index 2179ec15f..000000000 --- a/doc/it/makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=doc/it - -# Bring in the default rules -include ../../buildlib/defaults.mak - -# Language Code of this translation -LC=it - -include $(PO4A_MANPAGE_H) diff --git a/doc/ja/makefile b/doc/ja/makefile deleted file mode 100644 index f44bb1c0f..000000000 --- a/doc/ja/makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=doc/ja - -# Bring in the default rules -include ../../buildlib/defaults.mak - -# Language Code of this translation -LC=ja - -include $(PO4A_MANPAGE_H) diff --git a/doc/lang.makefile b/doc/lang.makefile new file mode 100644 index 000000000..9fdc6ea70 --- /dev/null +++ b/doc/lang.makefile @@ -0,0 +1,11 @@ +# -*- make -*- +BASE=../.. +SUBDIR=doc/@@LANG@@ + +# Bring in the default rules +include ../../buildlib/defaults.mak + +# Language Code of this translation +LC=@@LANG@@ + +include $(PO4A_MANPAGE_H) diff --git a/doc/makefile b/doc/makefile index 6e6186466..93504e23e 100644 --- a/doc/makefile +++ b/doc/makefile @@ -46,9 +46,14 @@ TO = $(DOC) TARGET = binary include $(COPY_H) -#.PHONY: headers library clean veryclean all binary program doc doc.pt_BR doc.fr +.PHONY: clean clean-subdirs veryclean veryclean-subdirs all binary doc doc: - for dir in $(SUBDIRS); do\ + for i in $(shell ls po/*.po | sed -r 's#po/([a-z]+[A-Z_]*).po#\1#'); do \ + test -d $$i || mkdir $$i; \ + test -f $$i/makefile || sed "s#@@LANG@@#$$i#" lang.makefile > $$i/makefile; \ + done + # it is likely that we have changed the list, so SUBDIRS is incorrect + for dir in $(dir $(wildcard */makefile)); do\ $(MAKE) -C $$dir $@; \ done @@ -70,7 +75,7 @@ doc: po4a clean: po4a-clean -.PHONY: update-po po4a +.PHONY: update-po po4a stats update-po: po4a --previous --no-backups --force --no-translations po4a.conf @@ -79,6 +84,10 @@ po4a-clean: po4a: po4a --previous --no-backups po4a.conf + +stats: + for i in po/*.po; do echo -n "$$i: "; msgfmt --statistics $$i; done + endif ifdef DOXYGEN diff --git a/doc/pl/makefile b/doc/pl/makefile deleted file mode 100644 index 7e77b29b9..000000000 --- a/doc/pl/makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=doc/pl - -# Bring in the default rules -include ../../buildlib/defaults.mak - -# Language Code of this translation -LC=pl - -include $(PO4A_MANPAGE_H) diff --git a/doc/pt_BR/makefile b/doc/pt_BR/makefile deleted file mode 100644 index 6e485bbf6..000000000 --- a/doc/pt_BR/makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -*- make -*- -BASE=../.. -SUBDIR=doc/pt_BR - -# Bring in the default rules -include ../../buildlib/defaults.mak - -# Language Code of this translation -LC=pt_BR - -include $(PO4A_MANPAGE_H) -- cgit v1.2.3 From 7e2b56a39618589e77ea8c73611ab0aae39aae7f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Mar 2010 14:47:05 +0100 Subject: * apt-pkg/pkgcachegen.cc: - merge versions correctly even if multiple different versions with the same version number are available. Thanks to Magnus Holmgren for the patch! (Closes: #351056) --- apt-pkg/pkgcachegen.cc | 28 +++++++++++----------------- debian/changelog | 4 ++++ 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 3eeb18cae..75a0e34f0 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -175,17 +175,22 @@ bool pkgCacheGenerator::MergeList(ListParser &List, pkgCache::VerIterator Ver = Pkg.VersionList(); map_ptrloc *LastVer = &Pkg->VersionList; int Res = 1; + unsigned long const Hash = List.VersionHash(); for (; Ver.end() == false; LastVer = &Ver->NextVer, Ver++) { Res = Cache.VS->CmpVersion(Version,Ver.VerStr()); - if (Res >= 0) + // Version is higher as current version - insert here + if (Res > 0) break; + // Versionstrings are equal - is hash also equal? + if (Res == 0 && Ver->Hash == Hash) + break; + // proceed with the next till we have either the right + // or we found another version (which will be lower) } - - /* We already have a version for this item, record that we - saw it */ - unsigned long Hash = List.VersionHash(); - if (Res == 0 && Ver->Hash == Hash) + + /* We already have a version for this item, record that we saw it */ + if (Res == 0) { if (List.UsePackage(Pkg,Ver) == false) return _error->Error(_("Error occurred while processing %s (UsePackage2)"), @@ -204,17 +209,6 @@ bool pkgCacheGenerator::MergeList(ListParser &List, } continue; - } - - // Skip to the end of the same version set. - if (Res == 0) - { - for (; Ver.end() == false; LastVer = &Ver->NextVer, Ver++) - { - Res = Cache.VS->CmpVersion(Version,Ver.VerStr()); - if (Res != 0) - break; - } } // Add a new version diff --git a/debian/changelog b/debian/changelog index ddbf19214..bdafa70e8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,10 @@ apt (0.7.26) UNRELEASED; urgency=low * doc/makefile, doc/*: - generate subdirectories for building the manpages in on the fly depending on the po files we have. + * apt-pkg/pkgcachegen.cc: + - merge versions correctly even if multiple different versions + with the same version number are available. + Thanks to Magnus Holmgren for the patch! (Closes: #351056) [ Julian Andres Klode ] * cmdline/apt-mark: -- cgit v1.2.3 From 6086b2b2a250c066b713097ea70a08f9ae225692 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Mar 2010 17:05:57 +0100 Subject: The language directories for manpage building are now autogenerated so we should ignore them. --- .bzrignore | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.bzrignore b/.bzrignore index c4cd052a7..7c4b11b10 100644 --- a/.bzrignore +++ b/.bzrignore @@ -22,12 +22,6 @@ abicheck/tests/ # generated files in the progress to build all # apt man pages and other documentation -doc/*.1 -doc/*.5 -doc/*.8 -doc/*/*.1 -doc/*/*.5 -doc/*/*.8 -doc/*/apt.ent -doc/*/*.xml -doc/*/*.sgml +./doc/*/ +!./doc/examples/ +!./doc/po/ -- cgit v1.2.3 From e426a5ff1cd02797b29f5781be4d6fc8bdf44610 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 18 Mar 2010 13:27:55 +0100 Subject: Fix a segfault in the version merger introduced in the previous patch: As we skip now versions with a different hash we will have situations in which the version is equal but the hash different causing to check the next version, but as this version was the last one the version iterator is invalid then the merger wants to add further information. --- apt-pkg/pkgcachegen.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 75a0e34f0..47ead2df9 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -190,7 +190,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, } /* We already have a version for this item, record that we saw it */ - if (Res == 0) + if (Res == 0 && Ver.end() == false && Ver->Hash == Hash) { if (List.UsePackage(Pkg,Ver) == false) return _error->Error(_("Error occurred while processing %s (UsePackage2)"), -- cgit v1.2.3 From 306eacf617b8ea8c87b31258c55a5373be4ad946 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 18 Mar 2010 18:07:51 +0100 Subject: generate "negative" dependencies against all architectures of a package Negative means here Conflicts, Replaces and Breaks - this adds again a whole lot of dependencies. --- apt-pkg/deb/deblistparser.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 84eab44a7..5c9cf6d4b 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -609,7 +609,10 @@ bool debListParser::ParseDepends(pkgCache::VerIterator Ver, const char *Stop; if (Section.Find(Tag,Start,Stop) == false) return true; - + + static std::vector const archs = APT::Configuration::getArchitectures(); + static bool const multiArch = archs.size() <= 1; + string Package; string const pkgArch = Ver.Arch(true); string Version; @@ -620,8 +623,18 @@ bool debListParser::ParseDepends(pkgCache::VerIterator Ver, Start = ParseDepends(Start,Stop,Package,Version,Op); if (Start == 0) return _error->Error("Problem parsing dependency %s",Tag); - - if (NewDepends(Ver,Package,pkgArch,Version,Op,Type) == false) + + if (multiArch == true && + (Type == pkgCache::Dep::Conflicts || + Type == pkgCache::Dep::DpkgBreaks || + Type == pkgCache::Dep::Replaces)) + { + for (std::vector::const_iterator a = archs.begin(); + a != archs.end(); ++a) + if (NewDepends(Ver,Package,*a,Version,Op,Type) == false) + return false; + } + else if (NewDepends(Ver,Package,pkgArch,Version,Op,Type) == false) return false; if (Start == Stop) break; -- cgit v1.2.3 From 8d4c859d0d20687a8ffcf9e1d60466d061c2e24d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 18 Mar 2010 18:51:14 +0100 Subject: Readd the FindPkg() method implementation used in the singleArch days to use it as a fallback if multiarch is not enabled. The effect is barly noticeable but SingleArch is the realworld scenario. --- apt-pkg/pkgcache.cc | 30 +++++++++++++++++++++++++++++- apt-pkg/pkgcache.h | 8 +++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 24d9e0329..fe8757ded 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -108,6 +108,7 @@ bool pkgCache::Header::CheckSizes(Header &Against) const /* */ pkgCache::pkgCache(MMap *Map, bool DoMap) : Map(*Map) { + MultiArchEnabled = APT::Configuration::getArchitectures().size() > 1; if (DoMap == true) ReMap(); } @@ -178,11 +179,31 @@ unsigned long pkgCache::sHash(const char *Str) const return Hash % _count(HeaderP->PkgHashTable); } + /*}}}*/ +// Cache::SingleArchFindPkg - Locate a package by name /*{{{*/ +// --------------------------------------------------------------------- +/* Returns 0 on error, pointer to the package otherwise + The multiArch enabled methods will fallback to this one as it is (a bit) + faster for single arch environments and realworld is mostly singlearch… */ +pkgCache::PkgIterator pkgCache::SingleArchFindPkg(const string &Name) +{ + // Look at the hash bucket + Package *Pkg = PkgP + HeaderP->PkgHashTable[Hash(Name)]; + for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage) + { + if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] && + stringcasecmp(Name,StrP + Pkg->Name) == 0) + return PkgIterator(*this,Pkg); + } + return PkgIterator(*this,0); +} /*}}}*/ // Cache::FindPkg - Locate a package by name /*{{{*/ // --------------------------------------------------------------------- /* Returns 0 on error, pointer to the package otherwise */ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) { + if (MultiArchCache() == false) + return SingleArchFindPkg(Name); size_t const found = Name.find(':'); if (found == string::npos) return FindPkg(Name, "native"); @@ -195,7 +216,14 @@ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) { // Cache::FindPkg - Locate a package by name /*{{{*/ // --------------------------------------------------------------------- /* Returns 0 on error, pointer to the package otherwise */ -pkgCache::PkgIterator pkgCache::FindPkg(const string &Name, string Arch) { +pkgCache::PkgIterator pkgCache::FindPkg(const string &Name, string const &Arch) { + if (MultiArchCache() == false) { + if (Arch == "native" || Arch == "all" || + Arch == _config->Find("APT::Architecture")) + return SingleArchFindPkg(Name); + else + return PkgIterator(*this,0); + } /* We make a detour via the GrpIterator here as on a multi-arch environment a group is easier to find than a package (less entries in the buckets) */ diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 012caac76..577eebad9 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -126,7 +126,7 @@ class pkgCache /*{{{*/ // Accessors GrpIterator FindGrp(const string &Name); PkgIterator FindPkg(const string &Name); - PkgIterator FindPkg(const string &Name, string Arch); + PkgIterator FindPkg(const string &Name, const string &Arch); Header &Head() {return *HeaderP;}; inline GrpIterator GrpBegin(); @@ -136,6 +136,8 @@ class pkgCache /*{{{*/ inline PkgFileIterator FileBegin(); inline PkgFileIterator FileEnd(); + inline bool MultiArchCache() const { return MultiArchEnabled; }; + // Make me a function pkgVersioningSystem *VS; @@ -146,6 +148,10 @@ class pkgCache /*{{{*/ pkgCache(MMap *Map,bool DoMap = true); virtual ~pkgCache() {}; + +private: + bool MultiArchEnabled; + PkgIterator SingleArchFindPkg(const string &Name); }; /*}}}*/ // Header structure /*{{{*/ -- cgit v1.2.3 From 6083d5ec97c605df51633cf6522df1323f69c29c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 19 Mar 2010 10:54:26 +0100 Subject: =?UTF-8?q?add=20translation=20of=20the=20manpages=20to=20PT=20(po?= =?UTF-8?q?rtuguese)=20Thanks=20to=20Am=C3=A9rico=20Monteiro!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 2 + doc/po/pt.po | 11089 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 11091 insertions(+) create mode 100644 doc/po/pt.po diff --git a/debian/changelog b/debian/changelog index 595285dbf..cd5f2ae1b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ apt (0.7.26) UNRELEASED; urgency=low * Ignore :qualifiers after package name in build dependencies in the library by default, but try to honour them in apt-get as we have some sort of MultiArch support ready (Closes: #558103) + * add translation of the manpages to PT (portuguese) + Thanks to Américo Monteiro! * Switch to dpkg-source 3.0 (native) format * apt-pkg/depcache.cc: - remove Auto-Installed information from extended_states diff --git a/doc/po/pt.po b/doc/po/pt.po new file mode 100644 index 000000000..1e308afdc --- /dev/null +++ b/doc/po/pt.po @@ -0,0 +1,11089 @@ +# Translation of apt manpages to Portuguese +# Copyright (C) 2009 Free Software Foundation, Inc. +# This file is distributed under the same license as the apt-doc package. +# +# Américo Monteiro , 2009, 2010. +msgid "" +msgstr "" +"Project-Id-Version: apt-doc 0.7.26~exp3\n" +"POT-Creation-Date: 2010-03-14 16:41+0100\n" +"PO-Revision-Date: 2010-03-19 00:21+0000\n" +"Last-Translator: Américo Monteiro \n" +"Language-Team: Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. type: TH +#: apt.8:17 +#, no-wrap +msgid "apt" +msgstr "apt" + +#. type: TH +#: apt.8:17 +#, no-wrap +msgid "16 June 1998" +msgstr "16 Junho 1998" + +#. type: TH +#: apt.8:17 +#, no-wrap +msgid "Debian GNU/Linux" +msgstr "Debian GNU/Linux" + +#. type: SH +#: apt.8:18 +#, no-wrap +msgid "NAME" +msgstr "NOME" + +#. type: Plain text +#: apt.8:20 +msgid "apt - Advanced Package Tool" +msgstr "apt - Advanced Package Tool" + +#. type: SH +#: apt.8:20 +#, no-wrap +msgid "SYNOPSIS" +msgstr "SINOPSE" + +#. type: Plain text +#: apt.8:22 +msgid "B" +msgstr "B" + +#. type: SH +#: apt.8:22 +#, no-wrap +msgid "DESCRIPTION" +msgstr "DESCRIÇÃO" + +#. type: Plain text +#: apt.8:31 +msgid "" +"APT is a management system for software packages. For normal day to day " +"package management there are several frontends available, such as B" +"(8) for the command line or B(8) for the X Window System. Some " +"options are only implemented in B(8) though." +msgstr "" +"APT é um sistema de gestão para pacotes de software. Para a gestão de " +"pacotes normal do dia-a-dia existem vários frontends disponíveis, como o " +"B(8) para a linha de comandos ou o B(8) para o X Window " +"System. No entanto, algumas das opções estão apenas implementadas no B(8)." + +#. type: SH +#: apt.8:31 +#, no-wrap +msgid "OPTIONS" +msgstr "OPÇÕES" + +#. type: Plain text +#: apt.8:33 apt.8:35 +msgid "None." +msgstr "Nenhum." + +#. type: SH +#: apt.8:33 +#, no-wrap +msgid "FILES" +msgstr "FICHEIROS" + +#. type: SH +#: apt.8:35 +#, no-wrap +msgid "SEE ALSO" +msgstr "VEJA TAMBÉM" + +#. type: Plain text +#: apt.8:42 +msgid "" +"B(8), B(8), B(5), B(5), " +"B(5), B(8)" +msgstr "" +"B(8), B(8), B(5), B(5), " +"B(5), B(8)" + +#. type: SH +#: apt.8:42 +#, no-wrap +msgid "DIAGNOSTICS" +msgstr "DIAGNÓSTICOS" + +#. type: Plain text +#: apt.8:44 +msgid "apt returns zero on normal operation, decimal 100 on error." +msgstr "o apt devolve zero na operação normal, 100 decimal em erro." + +#. type: SH +#: apt.8:44 +#, no-wrap +msgid "BUGS" +msgstr "BUGS" + +#. type: Plain text +#: apt.8:46 +msgid "This manpage isn't even started." +msgstr "Este manual ainda nem começou." + +#. type: Plain text +#: apt.8:55 +msgid "" +"See Ehttp://bugs.debian.org/aptE. If you wish to report a bug in " +"B, please see I or the " +"B(1) command." +msgstr "" +"Veja Ehttp://bugs.debian.org/aptE. Se deseja reportar um bug em " +"B, por favor veja I ou o " +"comando B(1) ." + +#. type: SH +#: apt.8:55 +#, no-wrap +msgid "AUTHOR" +msgstr "AUTOR" + +#. type: Plain text +#: apt.8:56 +msgid "apt was written by the APT team Eapt@packages.debian.orgE." +msgstr "apt foi escrito pelo APT team Eapt@packages.debian.orgE." + +#. type: Plain text +#: apt.ent:2 +msgid "" +msgstr "" + +#. type: Plain text +#: apt.ent:10 +msgid "" +" &docdir;examples/configure-index.gz\"> /etc/apt.conf\"> " +msgstr "" +" &docdir;examples/configure-index.gz\"> /etc/apt.conf\"> " + +#. type: Plain text +#: apt.ent:17 +#, no-wrap +msgid "" +"\n" +"\n" +" apt.conf\n" +" 5\n" +" \"\n" +">\n" +msgstr "" +"\n" +"\n" +" apt.conf\n" +" 5\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:23 +#, no-wrap +msgid "" +"\n" +" apt-get\n" +" 8\n" +" \"\n" +">\n" +msgstr "" +"\n" +" apt-get\n" +" 8\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:29 +#, no-wrap +msgid "" +"\n" +" apt-config\n" +" 8\n" +" \"\n" +">\n" +msgstr "" +"\n" +" apt-config\n" +" 8\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:35 +#, no-wrap +msgid "" +"\n" +" apt-cdrom\n" +" 8\n" +" \"\n" +">\n" +msgstr "" +"\n" +" apt-cdrom\n" +" 8\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:41 +#, no-wrap +msgid "" +"\n" +" apt-cache\n" +" 8\n" +" \"\n" +">\n" +msgstr "" +"\n" +" apt-cache\n" +" 8\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:47 +#, no-wrap +msgid "" +"\n" +" apt_preferences\n" +" 5\n" +" \"\n" +">\n" +msgstr "" +"\n" +" apt_preferences\n" +" 5\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:53 +#, no-wrap +msgid "" +"\n" +" apt-key\n" +" 8\n" +" \"\n" +">\n" +msgstr "" +"\n" +" apt-key\n" +" 8\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:59 +#, no-wrap +msgid "" +"\n" +" apt-secure\n" +" 8\n" +" \"\n" +">\n" +msgstr "" +"\n" +" apt-secure\n" +" 8\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:65 +#, no-wrap +msgid "" +"\n" +" apt-ftparchive\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" apt-ftparchive\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:72 +#, no-wrap +msgid "" +"\n" +" sources.list\n" +" 5\n" +" \"\n" +">\n" +msgstr "" +"\n" +" sources.list\n" +" 5\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:78 +#, no-wrap +msgid "" +"\n" +" reportbug\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" reportbug\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:84 +#, no-wrap +msgid "" +"\n" +" dpkg\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" dpkg\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:90 +#, no-wrap +msgid "" +"\n" +" dpkg-buildpackage\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" dpkg-buildpackage\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:96 +#, no-wrap +msgid "" +"\n" +" gzip\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" gzip\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:102 +#, no-wrap +msgid "" +"\n" +" dpkg-scanpackages\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" dpkg-scanpackages\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:108 +#, no-wrap +msgid "" +"\n" +" dpkg-scansources\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" dpkg-scansources\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:114 +#, no-wrap +msgid "" +"\n" +" dselect\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" dselect\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:120 +#, no-wrap +msgid "" +"\n" +" aptitude\n" +" 8\n" +" \"\n" +">\n" +msgstr "" +"\n" +" aptitude\n" +" 8\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:126 +#, no-wrap +msgid "" +"\n" +" synaptic\n" +" 8\n" +" \"\n" +">\n" +msgstr "" +"\n" +" synaptic\n" +" 8\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:132 +#, no-wrap +msgid "" +"\n" +" debsign\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" debsign\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:138 +#, no-wrap +msgid "" +"\n" +" debsig-verify\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" debsig-verify\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:144 +#, no-wrap +msgid "" +"\n" +" gpg\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" gpg\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:150 +#, no-wrap +msgid "" +"\n" +" gnome-apt\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" gnome-apt\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:156 +#, no-wrap +msgid "" +"\n" +" wajig\n" +" 1\n" +" \"\n" +">\n" +msgstr "" +"\n" +" wajig\n" +" 1\n" +" \"\n" +">\n" + +#. type: Plain text +#: apt.ent:168 +#, no-wrap +msgid "" +"\n" +"\n" +"
apt@packages.debian.org
\n" +" \n" +" Jason Gunthorpe\n" +" \n" +" \n" +" 1998-2001 Jason Gunthorpe\n" +" 28 October 2008\n" +" Linux\n" +msgstr "" +"\n" +"\n" +"
apt@packages.debian.org
\n" +" \n" +" Jason Gunthorpe\n" +" \n" +" \n" +" 1998-2001 Jason Gunthorpe\n" +" 28 Outubro 2008\n" +" Linux\n" + +#. type: Plain text +#: apt.ent:171 +#, no-wrap +msgid "" +" \n" +"\"> \n" +msgstr "" +" \n" +"\"> \n" + +#. type: Plain text +#: apt.ent:177 +#, no-wrap +msgid "" +"\n" +" apt@packages.debian.org\n" +" \n" +"\">\n" +msgstr "" +"\n" +" apt@packages.debian.org\n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:185 +#, no-wrap +msgid "" +"\n" +" Jason\n" +" Gunthorpe\n" +" \n" +" \n" +"\">\n" +msgstr "" +"\n" +" Jason\n" +" Gunthorpe\n" +" \n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:193 +#, no-wrap +msgid "" +"\n" +" Mike\n" +" O'Connor\n" +" \n" +" \n" +"\">\n" +msgstr "" +"\n" +" Mike\n" +" O'Connor\n" +" \n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:200 +#, no-wrap +msgid "" +"\n" +" APT team\n" +" \n" +" \n" +"\">\n" +msgstr "" +"\n" +" APT team\n" +" \n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:204 apt.ent:215 +#, no-wrap +msgid "" +"Linux\n" +"\">\n" +msgstr "" +"Linux\n" +"\">\n" + +#. type: Plain text +#: apt.ent:211 +#, no-wrap +msgid "" +"\n" +" Jason Gunthorpe\n" +" 1998-2001\n" +" \n" +"\">\n" +msgstr "" +"\n" +" Jason Gunthorpe\n" +" 1998-2001\n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:221 +#, no-wrap +msgid "" +"\n" +"\t\tQA Page\n" +"\t
\n" +"\">\n" +msgstr "" +"\n" +"\t\tQA Page\n" +"\t\n" +"\">\n" + +#. type: Plain text +#: apt.ent:232 +#, no-wrap +msgid "" +"\n" +"Bugs\n" +" APT bug page. \n" +" If you wish to report a bug in APT, please see\n" +" /usr/share/doc/debian/bug-reporting.txt or the\n" +" &reportbug; command.\n" +" \n" +" \n" +"\">\n" +msgstr "" +"\n" +"Bugs\n" +" página de bugs do APT. \n" +" Se deseja reportar um bug no APT, por favor veja\n" +" /usr/share/doc/debian/bug-reporting.txt ou o\n" +" comando &reportbug;.\n" +" \n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:240 +#, no-wrap +msgid "" +"\n" +"Author\n" +" APT was written by the APT team apt@packages.debian.org.\n" +" \n" +" \n" +"\">\n" +msgstr "" +"\n" +"Autor\n" +" APT foi escrito pela equipa do APT apt@packages.debian.org.\n" +" \n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:250 +#, no-wrap +msgid "" +"\n" +"\n" +" \n" +" Show a short usage summary.\n" +" \n" +" \n" +"
\n" +msgstr "" +"\n" +"\n" +" \n" +" Mostra um sumário curto da utilização.\n" +" \n" +" \n" +" \n" + +#. type: Plain text +#: apt.ent:258 +#, no-wrap +msgid "" +" \n" +" \n" +" \n" +" Show the program version.\n" +" \n" +" \n" +" \n" +msgstr "" +" \n" +" \n" +" \n" +" Mostra a versão do programa.\n" +" \n" +" \n" +" \n" + +#. type: Plain text +#: apt.ent:268 +#, no-wrap +msgid "" +" \n" +" \n" +" \n" +" Configuration File; Specify a configuration file to use. \n" +" The program will read the default configuration file and then this \n" +" configuration file. See &apt-conf; for syntax information. \n" +" \n" +" \n" +" \n" +msgstr "" +" \n" +" \n" +" \n" +" Ficheiro de Configuração; Especifica um ficheiro de configuração a usar. \n" +" O programa irá ler o ficheiro de configuração predefinido e depois este \n" +" ficheiro de configuração. Veja &apt-conf; para informação de sintaxe. \n" +" \n" +" \n" +" \n" + +#. type: Plain text +#: apt.ent:280 +#, no-wrap +msgid "" +" \n" +" \n" +" \n" +" Set a Configuration Option; This will set an arbitrary\n" +" configuration option. The syntax is .\n" +" and can be used multiple\n" +" times to set different options.\n" +" \n" +" \n" +" \n" +"\">\n" +msgstr "" +" \n" +" \n" +" \n" +" Define uma Opção de Configuração; Isto irá definir uma opção\n" +" de configuração arbitrária. A sintaxe é .\n" +" e podem ser usadas várias\n" +" vezes para definir opções diferentes.\n" +" \n" +" \n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:291 +#, no-wrap +msgid "" +"\n" +"All command line options may be set using the configuration file, the\n" +" descriptions indicate the configuration option to set. For boolean\n" +" options you can override the config file by using something like \n" +" ,, \n" +" or several other variations.\n" +" \n" +"\">\n" +msgstr "" +"\n" +"Todas as opções de linha de comandos podem ser definidas usando o ficheiro de configuração, as\n" +" descrições indicam a opção de configuração a definir. Para opções\n" +" booleanas você pode sobre por o ficheiro de configuração usando algo como \n" +" ,, \n" +" ou várias outras variantes.\n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:297 +#, no-wrap +msgid "" +"/etc/apt/apt.conf\n" +" APT configuration file.\n" +" Configuration Item: Dir::Etc::Main.\n" +" \n" +msgstr "" +"/etc/apt/apt.conf\n" +" Ficheiro de configuração do APT.\n" +" Item de Configuração: Dir::Etc::Main.\n" +" \n" + +#. type: Plain text +#: apt.ent:303 +#, no-wrap +msgid "" +" /etc/apt/apt.conf.d/\n" +" APT configuration file fragments.\n" +" Configuration Item: Dir::Etc::Parts.\n" +" \n" +"\">\n" +msgstr "" +" /etc/apt/apt.conf.d/\n" +" Ficheiros de configuração fragmentados do APT.\n" +" Item de Configuração: Dir::Etc::Parts.\n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:309 +#, no-wrap +msgid "" +"&cachedir;/archives/\n" +" Storage area for retrieved package files.\n" +" Configuration Item: Dir::Cache::Archives.\n" +" \n" +msgstr "" +"&cachedir;/archives/\n" +" Área de armazenamento para ficheiros de pacotes obtidos.\n" +" Item de Configuração: Dir::Cache::Archives.\n" +" \n" + +#. type: Plain text +#: apt.ent:315 +#, no-wrap +msgid "" +" &cachedir;/archives/partial/\n" +" Storage area for package files in transit.\n" +" Configuration Item: Dir::Cache::Archives (implicit partial). \n" +" \n" +"\">\n" +msgstr "" +" &cachedir;/archives/partial/\n" +" Área de armazenamento para ficheiros de pacotes em curso.\n" +" Item de Configuração: Dir::Cache::Archives (implicit partial). \n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:325 +#, no-wrap +msgid "" +"/etc/apt/preferences\n" +" Version preferences file.\n" +" This is where you would specify "pinning",\n" +" i.e. a preference to get certain packages\n" +" from a separate source\n" +" or from a different version of a distribution.\n" +" Configuration Item: Dir::Etc::Preferences.\n" +" \n" +msgstr "" +"/etc/apt/preferences\n" +" Ficheiro de preferências de versão.\n" +" Isto é onde você deve especificar "pinning",\n" +" isto é, uma preferência para obter certos pacotes\n" +" A partir de uma fonte separada\n" +" ou a partir duma versão diferente de uma distribuição.\n" +" Item de Configuração: Dir::Etc::Preferences.\n" +" \n" + +#. type: Plain text +#: apt.ent:331 +#, no-wrap +msgid "" +" /etc/apt/preferences.d/\n" +" File fragments for the version preferences.\n" +" Configuration Item: Dir::Etc::PreferencesParts.\n" +" \n" +"\">\n" +msgstr "" +" /etc/apt/preferences.d/\n" +" Ficheiros fragmentados para as preferências de versão.\n" +" Item de Configuração: Dir::Etc::PreferencesParts.\n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:337 +#, no-wrap +msgid "" +"/etc/apt/sources.list\n" +" Locations to fetch packages from.\n" +" Configuration Item: Dir::Etc::SourceList.\n" +" \n" +msgstr "" +"/etc/apt/sources.list\n" +" Localizações de onde obter pacotes.\n" +" Item de Configuração: Dir::Etc::SourceList.\n" +" \n" + +#. type: Plain text +#: apt.ent:343 +#, no-wrap +msgid "" +" /etc/apt/sources.list.d/\n" +" File fragments for locations to fetch packages from.\n" +" Configuration Item: Dir::Etc::SourceParts.\n" +" \n" +"\">\n" +msgstr "" +" /etc/apt/sources.list.d/\n" +" Ficheiros fragmentados para localizações de onde obter pacotes.\n" +" Item de Configuração: Dir::Etc::SourceParts.\n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:350 +#, no-wrap +msgid "" +"&statedir;/lists/\n" +" Storage area for state information for each package resource specified in\n" +" &sources-list;\n" +" Configuration Item: Dir::State::Lists.\n" +" \n" +msgstr "" +"&statedir;/lists/\n" +" Área de armazenamento para informação de estado para cada recurso de pacote especificado em\n" +" &sources-list;\n" +" Tem de Configuração: Dir::State::Lists.\n" +" \n" + +#. type: Plain text +#: apt.ent:356 +#, no-wrap +msgid "" +" &statedir;/lists/partial/\n" +" Storage area for state information in transit.\n" +" Configuration Item: Dir::State::Lists (implicit partial).\n" +" \n" +"\">\n" +msgstr "" +" &statedir;/lists/partial/\n" +" Área de armazenamento para informação de estado em trânsito.\n" +" Item de Configuração: Dir::State::Lists (parcial implícito).\n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:362 +#, no-wrap +msgid "" +"/etc/apt/trusted.gpg\n" +" Keyring of local trusted keys, new keys will be added here.\n" +" Configuration Item: Dir::Etc::Trusted.\n" +" \n" +msgstr "" +"/etc/apt/trusted.gpg\n" +" Chaveiro de chaves de confiança locais, as novas chaves serão adicionadas aqui.\n" +" Item de Configuração: Dir::Etc::Trusted.\n" +" \n" + +#. type: Plain text +#: apt.ent:369 +#, no-wrap +msgid "" +" /etc/apt/trusted.gpg.d/\n" +" File fragments for the trusted keys, additional keyrings can\n" +" be stored here (by other packages or the administrator).\n" +" Configuration Item Dir::Etc::TrustedParts.\n" +" \n" +"\">\n" +msgstr "" +" /etc/apt/trusted.gpg.d/\n" +" Fragmentos de ficheiro para as chaves de confiança, chaveiros adicionais podem\n" +" ser armazenados aqui (por outros pacotes ou pelo administrador).\n" +" Item de Configuração Dir::Etc::TrustedParts.\n" +" \n" +"\">\n" + +#. type: Plain text +#: apt.ent:371 +msgid "" +msgstr "" + +#. type: Plain text +#: apt.ent:380 +#, no-wrap +msgid "" +"\n" +"john@doe.org in 2009,\n" +" 2010 and Daniela Acme daniela@acme.us in 2010 together with the\n" +" Debian Dummy l10n Team debian-l10n-dummy@lists.debian.org.\n" +"\">\n" +msgstr "" +"a_monteiro@netcabo.pt em 2009, 2010.\n" +" A tradução foi revista pela equipa de traduções portuguesas da Debian traduz@debianpt.org.\n" +"\">\n" + +#. type: Plain text +#: apt.ent:387 +#, no-wrap +msgid "" +"\n" +"\n" +msgstr "" +"\n" + +#. The last update date +#. type: Content of: +#: apt-cache.8.xml:13 apt-config.8.xml:13 apt-extracttemplates.1.xml:13 +#: apt-sortpkgs.1.xml:13 sources.list.5.xml:13 +msgid "" +"&apt-author.jgunthorpe; &apt-author.team; &apt-email; &apt-product; 29 " +"February 2004" +msgstr "" +"&apt-author.jgunthorpe; &apt-author.team; &apt-email; &apt-product; 29 " +"Fevereiro 2004" + +#. type: Content of: +#: apt-cache.8.xml:22 apt-cache.8.xml:29 +msgid "apt-cache" +msgstr "apt-cache" + +#. type: Content of: +#: apt-cache.8.xml:23 apt-cdrom.8.xml:22 apt-config.8.xml:23 apt-get.8.xml:23 +#: apt-key.8.xml:15 apt-mark.8.xml:23 apt-secure.8.xml:15 +msgid "8" +msgstr "8" + +#. type: Content of: +#: apt-cache.8.xml:24 apt-cdrom.8.xml:23 apt-config.8.xml:24 +#: apt-extracttemplates.1.xml:24 apt-ftparchive.1.xml:24 apt-get.8.xml:24 +#: apt-key.8.xml:16 apt-mark.8.xml:24 apt-secure.8.xml:16 +#: apt-sortpkgs.1.xml:24 apt.conf.5.xml:30 apt_preferences.5.xml:23 +#: sources.list.5.xml:24 +msgid "APT" +msgstr "APT" + +#. type: Content of: +#: apt-cache.8.xml:30 +msgid "APT package handling utility -- cache manipulator" +msgstr "Utilitário de manuseamento de pacotes do APT -- manipulador de cache" + +#. type: Content of: +#: apt-cache.8.xml:36 +msgid "" +"apt-cache " +"add file gencaches showpkg pkg " +"showsrc pkg stats dump dumpavail unmet search regex show pkg depends pkg " +"rdepends pkg pkgnames prefix dotty pkg " +"xvcg pkg policy pkgs madison pkgs " +msgstr "" +"apt-cache " +" add ficheiro gencaches " +"showpkg pacote showsrc pacote stats dump dumpavail unmet search regex show pacote depends " +"pacote rdepends pacote pkgnames prefixo dotty pacote xvcg pacote policy pacotes madison pacotes " + +#. type: Content of: +#: apt-cache.8.xml:62 apt-cdrom.8.xml:47 apt-config.8.xml:47 +#: apt-extracttemplates.1.xml:43 apt-ftparchive.1.xml:56 apt-get.8.xml:125 +#: apt-key.8.xml:35 apt-mark.8.xml:52 apt-secure.8.xml:40 +#: apt-sortpkgs.1.xml:44 apt.conf.5.xml:39 apt_preferences.5.xml:33 +#: sources.list.5.xml:33 +msgid "Description" +msgstr "Descrição" + +#. type: Content of: <refentry><refsect1><para> +#: apt-cache.8.xml:63 +msgid "" +"<command>apt-cache</command> performs a variety of operations on APT's " +"package cache. <command>apt-cache</command> does not manipulate the state of " +"the system but does provide operations to search and generate interesting " +"output from the package metadata." +msgstr "" +"<command>apt-cache</command> executa uma variedade de operações na cache de " +"pacotes do APT. <command>apt-cache</command> não manipula o estado do " +"sistema mas fornece operações para procurar e gerar resultados interessantes " +"a partir dos metadados do pacote." + +#. type: Content of: <refentry><refsect1><para> +#: apt-cache.8.xml:68 apt-get.8.xml:131 +msgid "" +"Unless the <option>-h</option>, or <option>--help</option> option is given, " +"one of the commands below must be present." +msgstr "" +"A menos que a opção <option>-h</option>, ou <option>--help</option> seja " +"fornecida, um dos comandos abaixo têm que estar presentes." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:72 +msgid "add <replaceable>file(s)</replaceable>" +msgstr "add <replaceable>ficheiro(s)</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:73 +msgid "" +"<literal>add</literal> adds the named package index files to the package " +"cache. This is for debugging only." +msgstr "" +"<literal>add</literal> adiciona ficheiros índice do pacote nomeado à cache " +"pacotes. Isto é apenas para depuração." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:77 +msgid "gencaches" +msgstr "gencaches" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:78 +msgid "" +"<literal>gencaches</literal> performs the same operation as <command>apt-get " +"check</command>. It builds the source and package caches from the sources in " +"&sources-list; and from <filename>/var/lib/dpkg/status</filename>." +msgstr "" +"<literal>gencaches</literal> executa a mesma operação que o <command>apt-get " +"check</command>. Constrói as caches de fonte e pacote a partir das fontes em " +"&sources-list; e a partir de <filename>/var/lib/dpkg/status</filename>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:84 +msgid "showpkg <replaceable>pkg(s)</replaceable>" +msgstr "showpkg <replaceable>pacote(s)</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:85 +msgid "" +"<literal>showpkg</literal> displays information about the packages listed on " +"the command line. Remaining arguments are package names. The available " +"versions and reverse dependencies of each package listed are listed, as well " +"as forward dependencies for each version. Forward (normal) dependencies are " +"those packages upon which the package in question depends; reverse " +"dependencies are those packages that depend upon the package in question. " +"Thus, forward dependencies must be satisfied for a package, but reverse " +"dependencies need not be. For instance, <command>apt-cache showpkg " +"libreadline2</command> would produce output similar to the following:" +msgstr "" +"<literal>showpkg</literal> mostra informação acerca dos pacotes listados na " +"linha de comandos. Os argumentos restantes são nomes de pacotes. São " +"listadas as versões disponíveis e dependências reversas de cada pacote " +"listado, assim como as dependências dianteiras de cada versão. Dependências " +"dianteiras (normais) são aqueles pacotes de que o pacote em questão depende; " +"dependências reversas são aqueles pacotes que dependem do pacote em questão. " +"Assim, as dependências dianteiras de um pacote têm de ser satisfeitas, mas " +"as dependências reversas não precisam de ser. Por exemplo, <command>apt-" +"cache showpkg libreadline2</command> deverá produzir resultados semelhantes " +"ao seguinte:" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><informalexample><programlisting> +#: apt-cache.8.xml:97 +#, no-wrap +msgid "" +"Package: libreadline2\n" +"Versions: 2.1-12(/var/state/apt/lists/foo_Packages),\n" +"Reverse Depends: \n" +" libreadlineg2,libreadline2\n" +" libreadline2-altdev,libreadline2\n" +"Dependencies:\n" +"2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null))\n" +"Provides:\n" +"2.1-12 - \n" +"Reverse Provides: \n" +msgstr "" +"Pacote: libreadline2\n" +"Versões: 2.1-12(/var/state/apt/lists/foo_Packages),\n" +"Dependências Reversas Depends: \n" +" libreadlineg2,libreadline2\n" +" libreadline2-altdev,libreadline2\n" +"Dependências:\n" +"2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null))\n" +"Fornecimentos:\n" +"2.1-12 - \n" +"Fornecimentos Reversos: \n" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:109 +msgid "" +"Thus it may be seen that libreadline2, version 2.1-12, depends on libc5 and " +"ncurses3.0 which must be installed for libreadline2 to work. In turn, " +"libreadlineg2 and libreadline2-altdev depend on libreadline2. If " +"libreadline2 is installed, libc5 and ncurses3.0 (and ldso) must also be " +"installed; libreadlineg2 and libreadline2-altdev do not have to be " +"installed. For the specific meaning of the remainder of the output it is " +"best to consult the apt source code." +msgstr "" +"Assim pode-se ver que libreadline2, versão 2.1-12, depende de libc5 e " +"ncurses3.0 que têm que ser instalados para que libreadline2 funcione. Por " +"sua vez, libreadlineg2 e libreadline2-altdev dependem de libreadline2. Se " +"libreadline2 for instalado, libc5 e ncurses3.0 (e ldso) também têm que ser " +"instalados; libreadlineg2 e libreadline2-altdev não precisam de ser " +"instalados. Para o significado específico do lembrete da saída é melhor " +"consultar o código fonte do apt." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:118 +msgid "stats" +msgstr "stats" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:118 +msgid "" +"<literal>stats</literal> displays some statistics about the cache. No " +"further arguments are expected. Statistics reported are:" +msgstr "" +"<literal>stats</literal> mostra algumas estatísticas acerca da cache. Não " +"são esperados mais argumentos. As estatísticas reportadas são:" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para><itemizedlist><listitem><para> +#: apt-cache.8.xml:121 +msgid "" +"<literal>Total package names</literal> is the number of package names found " +"in the cache." +msgstr "" +"<literal>Total package names</literal> é o número de nomes de pacotes " +"encontrados na cache." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para><itemizedlist><listitem><para> +#: apt-cache.8.xml:125 +msgid "" +"<literal>Normal packages</literal> is the number of regular, ordinary " +"package names; these are packages that bear a one-to-one correspondence " +"between their names and the names used by other packages for them in " +"dependencies. The majority of packages fall into this category." +msgstr "" +"<literal>Normal packages</literal> é o número de nomes de pacotes regulares " +"e ordinários; estes são pacotes que têm uma correspondência de um-para-um " +"entre os seus nomes e os nomes usados por outros pacotes para eles nas " +"dependências. A maioria dos pacotes caem nesta categoria." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para><itemizedlist><listitem><para> +#: apt-cache.8.xml:131 +msgid "" +"<literal>Pure virtual packages</literal> is the number of packages that " +"exist only as a virtual package name; that is, packages only \"provide\" the " +"virtual package name, and no package actually uses the name. For instance, " +"\"mail-transport-agent\" in the Debian GNU/Linux system is a pure virtual " +"package; several packages provide \"mail-transport-agent\", but there is no " +"package named \"mail-transport-agent\"." +msgstr "" +"<literal>Pure virtual packages</literal> é o número de pacotes que existem " +"apenas como nome de pacote virtual; isto é, os pacotes apenas " +"\"disponibilizam\" o nome do pacote virtual, e nenhum pacote usa realmente o " +"nome. Por exemplo, \"mail-transport-agent\" no sistema Debian GNU/Linux é um " +"pacote puramente virtual; vários pacotes disponibilizam \"mail-transport-" +"agent\", mas não existe um existe um pacote chamado \"mail-transport-agent\"." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para><itemizedlist><listitem><para> +#: apt-cache.8.xml:139 +msgid "" +"<literal>Single virtual packages</literal> is the number of packages with " +"only one package providing a particular virtual package. For example, in the " +"Debian GNU/Linux system, \"X11-text-viewer\" is a virtual package, but only " +"one package, xless, provides \"X11-text-viewer\"." +msgstr "" +"<literal>Single virtual packages</literal> é o número de pacotes com apenas " +"um pacote a disponibilizar um pacote virtual particular. Por exemplo, no " +"sistema Debian GNU/Linux, \"X11-text-viewer\" é um pacote virtual, mas " +"apenas um pacote, xless, disponibiliza \"X11-text-viewer\"." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para><itemizedlist><listitem><para> +#: apt-cache.8.xml:145 +msgid "" +"<literal>Mixed virtual packages</literal> is the number of packages that " +"either provide a particular virtual package or have the virtual package name " +"as the package name. For instance, in the Debian GNU/Linux system, \"debconf" +"\" is both an actual package, and provided by the debconf-tiny package." +msgstr "" +"<literal>Mixed virtual packages</literal> é o número de pacotes que ou " +"disponibilizam um pacote virtual particular ou têm o nome de pacote virtual " +"como o nome de pacote. Por exemplo, no sistema Debian GNU/Linux, \"debconf\" " +"é tanto um pacote real, como também disponibilizado pelo pacote debconf-tiny." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para><itemizedlist><listitem><para> +#: apt-cache.8.xml:152 +msgid "" +"<literal>Missing</literal> is the number of package names that were " +"referenced in a dependency but were not provided by any package. Missing " +"packages may be an evidence if a full distribution is not accessed, or if a " +"package (real or virtual) has been dropped from the distribution. Usually " +"they are referenced from Conflicts or Breaks statements." +msgstr "" +"<literal>Missing</literal> é o número de nomes de pacotes que são " +"referenciados numa dependência mas não foram disponibilizados por nenhum " +"pacote. Os pacotes em falta podem ser uma evidência de que não se está a " +"aceder ao total de uma distribuição, ou que um pacote (real ou virtual) foi " +"removido da distribuição. Normalmente são referenciados a partir de " +"declarações de Conflitos ou Breaks." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para><itemizedlist><listitem><para> +#: apt-cache.8.xml:159 +msgid "" +"<literal>Total distinct</literal> versions is the number of package versions " +"found in the cache; this value is therefore at least equal to the number of " +"total package names. If more than one distribution (both \"stable\" and " +"\"unstable\", for instance), is being accessed, this value can be " +"considerably larger than the number of total package names." +msgstr "" +"<literal>Total distinct versions</literal> é o número de versões de pacotes " +"encontrados na cache; este valor é portanto pelo menos igual ao número do " +"total de nomes de pacotes. Se mais do que uma distribuição (ambas \"stable\" " +"e \"unstable\", por exemplo) está a ser acedida, este valor pode ser " +"consideravelmente maior que o número do total de nomes de pacotes." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para><itemizedlist><listitem><para> +#: apt-cache.8.xml:166 +msgid "" +"<literal>Total dependencies</literal> is the number of dependency " +"relationships claimed by all of the packages in the cache." +msgstr "" +"<literal>Total dependencies</literal> é o número de relacionamentos com " +"dependências reivindicadas por todos os pacotes na cache." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:173 +msgid "showsrc <replaceable>pkg(s)</replaceable>" +msgstr "showsrc <replaceable>pacote(s)</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:174 +msgid "" +"<literal>showsrc</literal> displays all the source package records that " +"match the given package names. All versions are shown, as well as all " +"records that declare the name to be a Binary." +msgstr "" +"<literal>showsrc</literal> mostra todos os registos de pacotes fonte que " +"correspondem aos nomes de pacotes fornecidos. Todas as versões são " +"mostradas, assim como todos os registos que declaram o nome como sendo um " +"Binário." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:179 apt-config.8.xml:84 +msgid "dump" +msgstr "dump" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:180 +msgid "" +"<literal>dump</literal> shows a short listing of every package in the cache. " +"It is primarily for debugging." +msgstr "" +"<literal>dump</literal> mostra uma listagem curta de todos os pacotes na " +"cache. É principalmente para depuração." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:184 +msgid "dumpavail" +msgstr "dumpavail" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:185 +msgid "" +"<literal>dumpavail</literal> prints out an available list to stdout. This is " +"suitable for use with &dpkg; and is used by the &dselect; method." +msgstr "" +"<literal>dumpavail</literal> escreve uma lista de disponibilidades no " +"stdout. Isto é apropriado para usar com o &dpkg; e é usado pelo método " +"&dselect;." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:189 +msgid "unmet" +msgstr "unmet" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:190 +msgid "" +"<literal>unmet</literal> displays a summary of all unmet dependencies in the " +"package cache." +msgstr "" +"<literal>unmet</literal> mostra um sumário de todas as dependências " +"insatisfeitas na cache do pacote." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:194 +msgid "show <replaceable>pkg(s)</replaceable>" +msgstr "show <replaceable>pacote(s)</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:195 +msgid "" +"<literal>show</literal> performs a function similar to <command>dpkg --print-" +"avail</command>; it displays the package records for the named packages." +msgstr "" +"<literal>show</literal> executa uma função semelhante ao <command>dpkg --" +"print-avail</command>; mostra os registos do pacote para os pacotes nomeados." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:200 +msgid "search <replaceable>regex [ regex ... ]</replaceable>" +msgstr "search <replaceable>regex [ regex ... ]</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:201 +msgid "" +"<literal>search</literal> performs a full text search on all available " +"package lists for the POSIX regex pattern given, see " +"<citerefentry><refentrytitle><command>regex</command></refentrytitle> " +"<manvolnum>7</manvolnum></citerefentry>. It searches the package names and " +"the descriptions for an occurrence of the regular expression and prints out " +"the package name and the short description, including virtual package " +"names. If <option>--full</option> is given then output identical to " +"<literal>show</literal> is produced for each matched package, and if " +"<option>--names-only</option> is given then the long description is not " +"searched, only the package name is." +msgstr "" +"<literal>search</literal> executa uma busca de texto completo em todas as " +"listas de pacotes disponíveis para o padrão POSIX regex fornecido, veja " +"<citerefentry><refentrytitle><command>regex</command></refentrytitle> " +"<manvolnum>7</manvolnum></citerefentry>. Procura nos nomes de pacotes e nas " +"descrições por uma ocorrência da expressão regular e escreve o nome do " +"pacote e a descrição curta, incluindo nomes de pacotes virtuais. Se for " +"fornecido <option>--full</option> então são produzidos resultados idênticos " +"ao <literal>show</literal> para cada pacote correspondente, e se for " +"fornecido <option>--names-only</option> então não há procura na descrição " +"longa, apenas no nome do pacote." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:214 +msgid "" +"Separate arguments can be used to specify multiple search patterns that are " +"and'ed together." +msgstr "" +"Podem ser usados argumentos separados para especificar múltiplos padrões de " +"busca os quais são lidados em conjunto." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:218 +msgid "depends <replaceable>pkg(s)</replaceable>" +msgstr "depends <replaceable>pacote(s)</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:219 +msgid "" +"<literal>depends</literal> shows a listing of each dependency a package has " +"and all the possible other packages that can fulfill that dependency." +msgstr "" +"<literal>depends</literal> mostra uma listagem de cada dependência que um " +"pacote tem e todos os outros pacotes possíveis que podem satisfazer essa " +"dependência." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:223 +msgid "rdepends <replaceable>pkg(s)</replaceable>" +msgstr "rdepends <replaceable>pacote(s)</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:224 +msgid "" +"<literal>rdepends</literal> shows a listing of each reverse dependency a " +"package has." +msgstr "" +"<literal>rdepends</literal> mostra uma listagem de cada dependência reversa " +"que um pacote tem." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:228 +msgid "pkgnames <replaceable>[ prefix ]</replaceable>" +msgstr "pkgnames <replaceable>[ prefixo ]</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:229 +msgid "" +"This command prints the name of each package APT knows. The optional " +"argument is a prefix match to filter the name list. The output is suitable " +"for use in a shell tab complete function and the output is generated " +"extremely quickly. This command is best used with the <option>--generate</" +"option> option." +msgstr "" +"Este comando escreve o nome de cada pacote que o APT conhece. O argumento " +"opcional é um prefixo de correspondência para filtrar a lista de nomes. O " +"resultado é apropriado para usar numa função completa de consola e o " +"resultado é gerado com extrema rapidez. Este comando fica melhor usado com a " +"opção <option>--generate</option>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:234 +msgid "" +"Note that a package which APT knows of is not necessarily available to " +"download, installable or installed, e.g. virtual packages are also listed in " +"the generated list." +msgstr "" +"Note que um pacote que o APT conheça não está necessariamente disponível " +"para download, instalável ou instalado, por exemplo, os pacotes virtuais " +"também são listados na lista gerada." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:239 +msgid "dotty <replaceable>pkg(s)</replaceable>" +msgstr "dotty <replaceable>pacote(s)</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:240 +msgid "" +"<literal>dotty</literal> takes a list of packages on the command line and " +"generates output suitable for use by dotty from the <ulink url=\"http://www." +"research.att.com/sw/tools/graphviz/\">GraphViz</ulink> package. The result " +"will be a set of nodes and edges representing the relationships between the " +"packages. By default the given packages will trace out all dependent " +"packages; this can produce a very large graph. To limit the output to only " +"the packages listed on the command line, set the <literal>APT::Cache::" +"GivenOnly</literal> option." +msgstr "" +"<literal>dotty</literal> recebe uma lista de pacotes na linha de comandos e " +"gera resultados apropriados para uso pelo dotty do pacote <ulink url=" +"\"http://www.research.att.com/sw/tools/graphviz/\">GraphViz</ulink>. O " +"resultado será um conjunto de nós e orlas que representam os relacionamentos " +"entre os pacotes. Por predefinição, os pacotes fornecidos irão seguir todos " +"os pacotes dependentes; isto pode produzir um gráfico muito grande. Para " +"limitar os resultados apenas aos pacotes listados na linha de comandos, " +"defina a opção <literal>APT::Cache::GivenOnly</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:249 +msgid "" +"The resulting nodes will have several shapes; normal packages are boxes, " +"pure provides are triangles, mixed provides are diamonds, missing packages " +"are hexagons. Orange boxes mean recursion was stopped [leaf packages], blue " +"lines are pre-depends, green lines are conflicts." +msgstr "" +"Os nós resultantes irão ter várias formas; pacotes normais são caixas, " +"fornecimentos puros são triângulos, fornecimentos mistos são diamantes, " +"pacotes desaparecidos são hexágonos. Caixas cor de laranja significa que a " +"recursão parou [pacotes leaf], linhas azuis são pré-dependências, linhas " +"verdes são conflitos." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:254 +msgid "Caution, dotty cannot graph larger sets of packages." +msgstr "" +"Atenção, o dotty não consegue fazer gráficos com grandes conjuntos de " +"pacotes." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:257 +msgid "xvcg <replaceable>pkg(s)</replaceable>" +msgstr "xvcg <replaceable>pacote(s)</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:258 +msgid "" +"The same as <literal>dotty</literal>, only for xvcg from the <ulink url=" +"\"http://rw4.cs.uni-sb.de/users/sander/html/gsvcg1.html\">VCG tool</ulink>." +msgstr "" +"O mesmo que <literal>dotty</literal>, apenas para xvcg a partir de <ulink " +"url=\"http://rw4.cs.uni-sb.de/users/sander/html/gsvcg1.html\">Ferramenta " +"VCG</ulink>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:262 +msgid "policy <replaceable>[ pkg(s) ]</replaceable>" +msgstr "policy <replaceable>[ pacote(s) ]</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:263 +msgid "" +"<literal>policy</literal> is meant to help debug issues relating to the " +"preferences file. With no arguments it will print out the priorities of each " +"source. Otherwise it prints out detailed information about the priority " +"selection of the named package." +msgstr "" +"<literal>policy</literal> destina-se a ajudar a depurar problemas " +"relacionados com o ficheiro de preferências. Sem argumentos irá escrever as " +"propriedades de cada fonte. Caso contrário escreve informação detalhada " +"acerca da selecção de prioridade do pacote nomeado." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:269 +msgid "madison <replaceable>/[ pkg(s) ]</replaceable>" +msgstr "madison <replaceable>/[ pacote(s) ]</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:270 +msgid "" +"<literal>apt-cache</literal>'s <literal>madison</literal> command attempts " +"to mimic the output format and a subset of the functionality of the Debian " +"archive management tool, <literal>madison</literal>. It displays available " +"versions of a package in a tabular format. Unlike the original " +"<literal>madison</literal>, it can only display information for the " +"architecture for which APT has retrieved package lists (<literal>APT::" +"Architecture</literal>)." +msgstr "" +"O comando <literal>madison</literal> do <literal>apt-cache</literal> tenta " +"imitar o formato de saída e um subconjunto das funcionalidades da ferramenta " +"<literal>madison</literal> de gestão de pacotes da Debian. Mostra versões " +"disponíveis de um pacote num formato tabular. Ao contrário do " +"<literal>madison</literal> original, apenas pode mostrar informação para a " +"arquitectura que o APT recolheu listas de pacotes (<literal>APT::" +"Architecture</literal>)." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:281 apt-config.8.xml:93 apt-extracttemplates.1.xml:56 +#: apt-ftparchive.1.xml:493 apt-get.8.xml:319 apt-mark.8.xml:89 +#: apt-sortpkgs.1.xml:54 apt.conf.5.xml:502 apt.conf.5.xml:524 +msgid "options" +msgstr "opções" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:285 +msgid "<option>-p</option>" +msgstr "<option>-p</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:285 +msgid "<option>--pkg-cache</option>" +msgstr "<option>--pkg-cache</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:286 +msgid "" +"Select the file to store the package cache. The package cache is the primary " +"cache used by all operations. Configuration Item: <literal>Dir::Cache::" +"pkgcache</literal>." +msgstr "" +"Selecciona o ficheiro para armazenar a cache do pacote. A cache do pacote é " +"a cache principal usada por todas as operações. Item de Configuração: " +"<literal>Dir::Cache::pkgcache</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:291 apt-ftparchive.1.xml:536 apt-get.8.xml:376 +#: apt-sortpkgs.1.xml:58 +msgid "<option>-s</option>" +msgstr "<option>-s</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:291 +msgid "<option>--src-cache</option>" +msgstr "<option>--src-cache</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:292 +msgid "" +"Select the file to store the source cache. The source is used only by " +"<literal>gencaches</literal> and it stores a parsed version of the package " +"information from remote sources. When building the package cache the source " +"cache is used to avoid reparsing all of the package files. Configuration " +"Item: <literal>Dir::Cache::srcpkgcache</literal>." +msgstr "" +"Selecciona o ficheiro para armazenar a cache de fonte. A fonte é usada " +"apenas pelo <literal>gencaches</literal> e armazena uma versão analisada da " +"informação do pacote a partir de fontes remotas. Ao construir a cache de " +"pacote é usada a cache fonte para evitar reanalisar todos os ficheiros do " +"pacote. Item de Configuração: <literal>Dir::Cache::srcpkgcache</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:299 apt-ftparchive.1.xml:510 apt-get.8.xml:366 +msgid "<option>-q</option>" +msgstr "<option>-q</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:299 apt-ftparchive.1.xml:510 apt-get.8.xml:366 +msgid "<option>--quiet</option>" +msgstr "<option>--quiet</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:300 +msgid "" +"Quiet; produces output suitable for logging, omitting progress indicators. " +"More q's will produce more quietness up to a maximum of 2. You can also use " +"<option>-q=#</option> to set the quietness level, overriding the " +"configuration file. Configuration Item: <literal>quiet</literal>." +msgstr "" +"Quiet; produz resultados apropriados para registar em logs, omitindo os " +"indicadores de progresso. Mais q's irão produzir mais serenidade até um " +"máximo de 2. Você também pode usar <option>-q=#</option> para definir o " +"nível de serenidade, sobrepondo o ficheiro de configuração. Item de " +"Configuração: <literal>quiet</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:306 +msgid "<option>-i</option>" +msgstr "<option>-i</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:306 +msgid "<option>--important</option>" +msgstr "<option>--important</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:307 +msgid "" +"Print only important dependencies; for use with unmet and depends. Causes " +"only Depends and Pre-Depends relations to be printed. Configuration Item: " +"<literal>APT::Cache::Important</literal>." +msgstr "" +"Escreve apenas dependências importantes; para usar com unmet e depends. " +"Separa apenas relações de Depends e Pre-Depends para serem escritas. Item de " +"Configuração: <literal>APT::Cache::Important</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:312 apt-cdrom.8.xml:121 apt-get.8.xml:333 +msgid "<option>-f</option>" +msgstr "<option>-f</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:312 +msgid "<option>--full</option>" +msgstr "<option>--full</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:313 +msgid "" +"Print full package records when searching. Configuration Item: " +"<literal>APT::Cache::ShowFull</literal>." +msgstr "" +"Escreve registos de pacote completos quando procura. Item de Configuração: " +"<literal>APT::Cache::ShowFull</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:317 apt-cdrom.8.xml:131 apt-ftparchive.1.xml:548 +msgid "<option>-a</option>" +msgstr "<option>-a</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:317 +msgid "<option>--all-versions</option>" +msgstr "<option>--all-versions</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:318 +msgid "" +"Print full records for all available versions. This is the default; to turn " +"it off, use <option>--no-all-versions</option>. If <option>--no-all-" +"versions</option> is specified, only the candidate version will displayed " +"(the one which would be selected for installation). This option is only " +"applicable to the <literal>show</literal> command. Configuration Item: " +"<literal>APT::Cache::AllVersions</literal>." +msgstr "" +"Escreve registos completos para todas as versões disponíveis. Isto é a " +"predefinição; para a desligar, use <option>--no-all-versions</option>. Se " +"<option>--no-all-versions</option> for especificada, apenas a versão " +"candidata será mostrada (aquela que seria seleccionada para instalação). " +"Esta opção é aplicável apenas ao comando <literal>show</literal>. Item de " +"Configuração: <literal>APT::Cache::AllVersions</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:326 +msgid "<option>-g</option>" +msgstr "<option>-g</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:326 +msgid "<option>--generate</option>" +msgstr "<option>--generate</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:327 +msgid "" +"Perform automatic package cache regeneration, rather than use the cache as " +"it is. This is the default; to turn it off, use <option>--no-generate</" +"option>. Configuration Item: <literal>APT::Cache::Generate</literal>." +msgstr "" +"Executa regeneração automática da cache de pacote, em vez de usar a cache " +"como está. Isto é a predefinição; para a desligar, use <option>--no-" +"generate</option>. Item de Configuração: <literal>APT::Cache::Generate</" +"literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:332 +msgid "<option>--names-only</option>" +msgstr "<option>--names-only</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:332 apt-cdrom.8.xml:139 +msgid "<option>-n</option>" +msgstr "<option>-n</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:333 +msgid "" +"Only search on the package names, not the long descriptions. Configuration " +"Item: <literal>APT::Cache::NamesOnly</literal>." +msgstr "" +"Apenas procura nos nomes dos pacotes, e não nas descrições longas. Item de " +"Configuração: <literal>APT::Cache::NamesOnly</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:337 +msgid "<option>--all-names</option>" +msgstr "<option>--all-names</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:338 +msgid "" +"Make <literal>pkgnames</literal> print all names, including virtual packages " +"and missing dependencies. Configuration Item: <literal>APT::Cache::" +"AllNames</literal>." +msgstr "" +"Faz com que o <literal>pkgnames</literal> escreva todos os nomes, incluindo " +"pacotes virtuais e dependências em falta. Item de configuração: " +"<literal>APT::Cache::AllNames</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:343 +msgid "<option>--recurse</option>" +msgstr "<option>--recurse</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:344 +msgid "" +"Make <literal>depends</literal> and <literal>rdepends</literal> recursive so " +"that all packages mentioned are printed once. Configuration Item: " +"<literal>APT::Cache::RecurseDepends</literal>." +msgstr "" +"Torna <literal>depends</literal> e <literal>rdepends</literal> recursivo " +"para que todos os pacotes mencionados sejam escritos uma vez. Item de " +"Configuração <literal>APT::Cache::RecurseDepends</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cache.8.xml:349 +msgid "<option>--installed</option>" +msgstr "<option>--installed</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cache.8.xml:351 +msgid "" +"Limit the output of <literal>depends</literal> and <literal>rdepends</" +"literal> to packages which are currently installed. Configuration Item: " +"<literal>APT::Cache::Installed</literal>." +msgstr "" +"Limita a saída de <literal>depends</literal> e <literal>rdepends</literal> " +"aos pacotes que estão actualmente instalados. Item de Configuração: " +"<literal>APT::Cache::Installed</literal>." + +#. type: Content of: <refentry><refsect1><variablelist> +#: apt-cache.8.xml:356 apt-cdrom.8.xml:150 apt-config.8.xml:98 +#: apt-extracttemplates.1.xml:67 apt-ftparchive.1.xml:576 apt-get.8.xml:561 +#: apt-sortpkgs.1.xml:64 +msgid "&apt-commonoptions;" +msgstr "&apt-commonoptions;" + +#. type: Content of: <refentry><refsect1><title> +#: apt-cache.8.xml:361 apt-get.8.xml:566 apt-key.8.xml:153 apt-mark.8.xml:122 +#: apt.conf.5.xml:1035 apt_preferences.5.xml:633 +msgid "Files" +msgstr "Ficheiros" + +#. type: Content of: <refentry><refsect1><variablelist> +#: apt-cache.8.xml:363 +msgid "&file-sourceslist; &file-statelists;" +msgstr "&file-sourceslist; &file-statelists;" + +#. type: Content of: <refentry><refsect1><title> +#: apt-cache.8.xml:368 apt-cdrom.8.xml:155 apt-config.8.xml:103 +#: apt-extracttemplates.1.xml:74 apt-ftparchive.1.xml:592 apt-get.8.xml:576 +#: apt-key.8.xml:174 apt-mark.8.xml:133 apt-secure.8.xml:181 +#: apt-sortpkgs.1.xml:69 apt.conf.5.xml:1041 apt_preferences.5.xml:640 +#: sources.list.5.xml:233 +msgid "See Also" +msgstr "Veja também" + +#. type: Content of: <refentry><refsect1><para> +#: apt-cache.8.xml:369 +msgid "&apt-conf;, &sources-list;, &apt-get;" +msgstr "&apt-conf;, &sources-list;, &apt-get;" + +#. type: Content of: <refentry><refsect1><title> +#: apt-cache.8.xml:373 apt-cdrom.8.xml:160 apt-config.8.xml:108 +#: apt-extracttemplates.1.xml:78 apt-ftparchive.1.xml:596 apt-get.8.xml:582 +#: apt-mark.8.xml:137 apt-sortpkgs.1.xml:73 +msgid "Diagnostics" +msgstr "Diagnóstico" + +#. type: Content of: <refentry><refsect1><para> +#: apt-cache.8.xml:374 +msgid "" +"<command>apt-cache</command> returns zero on normal operation, decimal 100 " +"on error." +msgstr "" +"<command>apt-cache</command> devolve zero em operação normal, 100 decimal em " +"erro." + +#. type: Content of: <refentry><refentryinfo> +#: apt-cdrom.8.xml:13 +msgid "" +"&apt-author.jgunthorpe; &apt-author.team; &apt-email; &apt-product; <date>14 " +"February 2004</date>" +msgstr "" +"&apt-author.jgunthorpe; &apt-author.team; &apt-email; &apt-product; <date>14 " +"Fevereiro 2004</date>" + +#. type: Content of: <refentry><refnamediv><refname> +#: apt-cdrom.8.xml:21 apt-cdrom.8.xml:28 +msgid "apt-cdrom" +msgstr "apt-cdrom" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt-cdrom.8.xml:29 +msgid "APT CDROM management utility" +msgstr "Utilitário de gestão de CDROM do APT" + +#. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis> +#: apt-cdrom.8.xml:35 +msgid "" +"<command>apt-cdrom</command> <arg><option>-hvrmfan</option></arg> " +"<arg><option>-d=<replaceable>cdrom mount point</replaceable></option></arg> " +"<arg><option>-o=<replaceable>config string</replaceable></option></arg> " +"<arg><option>-c=<replaceable>file</replaceable></option></arg> <group> " +"<arg>add</arg> <arg>ident</arg> </group>" +msgstr "" +"<command>apt-cdrom</command> <arg><option>-hvrmfan</option></arg> " +"<arg><option>-d=<replaceable>ponto de montagem do cdrom</replaceable></" +"option></arg> <arg><option>-o=<replaceable>string de configuração</" +"replaceable></option></arg> <arg><option>-c=<replaceable>ficheiro</" +"replaceable></option></arg> <group> <arg>add</arg> <arg>ident</arg> </group>" + +#. type: Content of: <refentry><refsect1><para> +#: apt-cdrom.8.xml:48 +msgid "" +"<command>apt-cdrom</command> is used to add a new CDROM to APTs list of " +"available sources. <command>apt-cdrom</command> takes care of determining " +"the structure of the disc as well as correcting for several possible mis-" +"burns and verifying the index files." +msgstr "" +"O <command>apt-cdrom</command> é usado para adicionar um novo CDROM à lista " +"de fontes disponíveis do APT. O <command>apt-cdrom</command> encarrega-se de " +"determinar a estrutura do disco assim como corrigir várias falhas possíveis " +"e verificar os ficheiros de índice." + +#. type: Content of: <refentry><refsect1><para> +#: apt-cdrom.8.xml:55 +msgid "" +"It is necessary to use <command>apt-cdrom</command> to add CDs to the APT " +"system, it cannot be done by hand. Furthermore each disk in a multi-cd set " +"must be inserted and scanned separately to account for possible mis-burns." +msgstr "" +"É necessário usar o <command>apt-cdrom</command> para adicionar CDs ao " +"sistema APT, não pode ser feito manualmente. Mais, cada disco de um conjunto " +"de vários discos tem que ser inserido e sondado separadamente para ter em " +"conta possíveis falhas." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:65 +msgid "add" +msgstr "add" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt-cdrom.8.xml:66 +msgid "" +"<literal>add</literal> is used to add a new disc to the source list. It will " +"unmount the CDROM device, prompt for a disk to be inserted and then proceed " +"to scan it and copy the index files. If the disc does not have a proper " +"<filename>disk</filename> directory you will be prompted for a descriptive " +"title." +msgstr "" +"<literal>add</literal> é usado para adicionar um novo disco à lista de " +"fontes. Irá desmontar o dispositivo CDROM, pedir que seja inserido um disco " +"e depois prosseguir com a sua sondagem e cópia dos ficheiros índice. Se o " +"disco não possuir um directório <filename>disk</filename> apropriado, ser-" +"lhe-à pedido um título descritivo." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt-cdrom.8.xml:74 +msgid "" +"APT uses a CDROM ID to track which disc is currently in the drive and " +"maintains a database of these IDs in <filename>&statedir;/cdroms.list</" +"filename>" +msgstr "" +"O APT usa um ID de CDROM para acompanhar qual disco está actualmente na " +"drive e mantêm uma base de dados desses IDs em <filename>&statedir;/cdroms." +"list</filename>" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:81 +msgid "ident" +msgstr "ident" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt-cdrom.8.xml:82 +msgid "" +"A debugging tool to report the identity of the current disc as well as the " +"stored file name" +msgstr "" +"Uma ferramenta de depuração para reportar a identificação do disco actual " +"assim como o nome de ficheiro armazenado" + +#. type: Content of: <refentry><refsect1><para> +#: apt-cdrom.8.xml:61 +msgid "" +"Unless the <option>-h</option>, or <option>--help</option> option is given " +"one of the commands below must be present. <placeholder type=\"variablelist" +"\" id=\"0\"/>" +msgstr "" +"A menos que a opção <option>-h</option>, ou <option>--help</option> seja " +"fornecida, um dos comandos abaixo têm que estar presentes. <placeholder type=" +"\"variablelist\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><title> +#: apt-cdrom.8.xml:91 apt-key.8.xml:139 +msgid "Options" +msgstr "Opções" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:95 apt-ftparchive.1.xml:504 apt-get.8.xml:328 +msgid "<option>-d</option>" +msgstr "<option>-d</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:95 +msgid "<option>--cdrom</option>" +msgstr "<option>--cdrom</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cdrom.8.xml:96 +msgid "" +"Mount point; specify the location to mount the cdrom. This mount point must " +"be listed in <filename>/etc/fstab</filename> and properly configured. " +"Configuration Item: <literal>Acquire::cdrom::mount</literal>." +msgstr "" +"Ponto de Montagem; especifica a localização para montar o cdrom. Este ponto " +"de montagem deve estar listado em <filename>/etc/fstab</filename> e " +"configurado apropriadamente. Item de configuração: <literal>Acquire::cdrom::" +"mount</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:104 +msgid "<option>-r</option>" +msgstr "<option>-r</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:104 +msgid "<option>--rename</option>" +msgstr "<option>--rename</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cdrom.8.xml:105 +msgid "" +"Rename a disc; change the label of a disk or override the disks given label. " +"This option will cause <command>apt-cdrom</command> to prompt for a new " +"label. Configuration Item: <literal>APT::CDROM::Rename</literal>." +msgstr "" +"Renomear um disco; muda a etiqueta de um disco ou sobrepõe a etiqueta " +"fornecida do disco. Esta opção irá fazer com que o <command>apt-cdrom</" +"command> pergunte por uma nova etiqueta. Item de configuração: <literal>APT::" +"CDROM::Rename</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:113 apt-get.8.xml:347 +msgid "<option>-m</option>" +msgstr "<option>-m</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:113 +msgid "<option>--no-mount</option>" +msgstr "<option>--no-mount</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cdrom.8.xml:114 +msgid "" +"No mounting; prevent <command>apt-cdrom</command> from mounting and " +"unmounting the mount point. Configuration Item: <literal>APT::CDROM::" +"NoMount</literal>." +msgstr "" +"Nenhuma montagem; impede o <command>apt-cdrom</command> de montar e " +"desmontar o ponto de montagem. Item de configuração: <literal>APT::CDROM::" +"NoMount</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:121 +msgid "<option>--fast</option>" +msgstr "<option>--fast</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cdrom.8.xml:122 +msgid "" +"Fast Copy; Assume the package files are valid and do not check every " +"package. This option should be used only if <command>apt-cdrom</command> has " +"been run on this disc before and did not detect any errors. Configuration " +"Item: <literal>APT::CDROM::Fast</literal>." +msgstr "" +"Copia rápida; Assume que os ficheiros do pacote são válidos e não verifica " +"cada pacote. Este opção só deve ser usada se o <command>apt-cdrom</command> " +"já foi corrido com este disco e não detectou nenhum erro. Item de " +"configuração: <literal>APT::CDROM::Fast</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:131 +msgid "<option>--thorough</option>" +msgstr "<option>--thorough</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cdrom.8.xml:132 +msgid "" +"Thorough Package Scan; This option may be needed with some old Debian " +"1.1/1.2 discs that have Package files in strange places. It takes much " +"longer to scan the CD but will pick them all up." +msgstr "" +"Sondagem de pacote exaustiva; Esta opção pode ser necessária com alguns " +"discos Debian antigos 1.1/1.2 que têm ficheiros de pacotes em lugares " +"estranhos. Demora muito mais tempo a sondar o CD mas irá apanhá-los a todos." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:140 apt-get.8.xml:378 +msgid "<option>--just-print</option>" +msgstr "<option>--just-print</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:141 apt-get.8.xml:380 +msgid "<option>--recon</option>" +msgstr "<option>--recon</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-cdrom.8.xml:142 apt-get.8.xml:381 +msgid "<option>--no-act</option>" +msgstr "<option>--no-act</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-cdrom.8.xml:143 +msgid "" +"No Changes; Do not change the &sources-list; file and do not write index " +"files. Everything is still checked however. Configuration Item: " +"<literal>APT::CDROM::NoAct</literal>." +msgstr "" +"Nenhuma alteração; Não altera o ficheiro &sources-list; e não escreve " +"ficheiros índice. No entanto, tudo continua a ser verificado. Item de " +"configuração: <literal>APT::CDROM::NoAct</literal>." + +#. type: Content of: <refentry><refsect1><para> +#: apt-cdrom.8.xml:156 +msgid "&apt-conf;, &apt-get;, &sources-list;" +msgstr "&apt-conf;, &apt-get;, &sources-list;" + +#. type: Content of: <refentry><refsect1><para> +#: apt-cdrom.8.xml:161 +msgid "" +"<command>apt-cdrom</command> returns zero on normal operation, decimal 100 " +"on error." +msgstr "" +"<command>apt-cdrom</command> devolve zero em operação normal, 100 decimal em " +"erro." + +#. type: Content of: <refentry><refnamediv><refname> +#: apt-config.8.xml:22 apt-config.8.xml:29 +msgid "apt-config" +msgstr "apt-config" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt-config.8.xml:30 +msgid "APT Configuration Query program" +msgstr "Programa de Consulta de Configuração do APT" + +#. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis> +#: apt-config.8.xml:36 +msgid "" +"<command>apt-config</command> <arg><option>-hv</option></arg> <arg><option>-" +"o=<replaceable>config string</replaceable></option></arg> <arg><option>-" +"c=<replaceable>file</replaceable></option></arg> <group choice=\"req\"> " +"<arg>shell</arg> <arg>dump</arg> </group>" +msgstr "" +"<command>apt-config</command> <arg><option>-hv</option></arg> <arg><option>-" +"o=<replaceable>string de configuração</replaceable></option></arg> " +"<arg><option>-c=<replaceable>ficheiro</replaceable></option></arg> <group " +"choice=\"req\"> <arg>shell</arg> <arg>dump</arg> </group>" + +#. type: Content of: <refentry><refsect1><para> +#: apt-config.8.xml:48 +msgid "" +"<command>apt-config</command> is an internal program used by various " +"portions of the APT suite to provide consistent configurability. It accesses " +"the main configuration file <filename>/etc/apt/apt.conf</filename> in a " +"manner that is easy to use by scripted applications." +msgstr "" +"<command>apt-config</command> é um programa interno usado por várias partes " +"da suite APT para fornecer uma configurabilidade consistente. Acede ao " +"ficheiro de configuração principal <filename>/etc/apt/apt.conf</filename> de " +"um modo que é fácil de usar para aplicações em script." + +#. type: Content of: <refentry><refsect1><para> +#: apt-config.8.xml:53 apt-ftparchive.1.xml:72 +msgid "" +"Unless the <option>-h</option>, or <option>--help</option> option is given " +"one of the commands below must be present." +msgstr "" +"A menos que a opção <option>-h</option>, ou <option>--help</option> seja " +"fornecida, um dos comandos abaixo têm que estar presentes." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-config.8.xml:58 +msgid "shell" +msgstr "shell" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-config.8.xml:60 +msgid "" +"shell is used to access the configuration information from a shell script. " +"It is given pairs of arguments, the first being a shell variable and the " +"second the configuration value to query. As output it lists a series of " +"shell assignments commands for each present value. In a shell script it " +"should be used like:" +msgstr "" +"shell é usado para aceder à informação de configuração a partir de um script " +"shell. É fornecido pares de argumentos, sendo o primeiro uma variável de " +"shell e o segundo o valor de configuração a consultar. Como resultado cria " +"uma lista de comandos de atribuições de shell para cada valor presente. Num " +"script shell deverá ser usado como:" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><informalexample><programlisting> +#: apt-config.8.xml:68 +#, no-wrap +msgid "" +"OPTS=\"-f\"\n" +"RES=`apt-config shell OPTS MyApp::options`\n" +"eval $RES\n" +msgstr "" +"OPTS=\"-f\"\n" +"RES=`apt-config shell OPTS MyApp::options`\n" +"eval $RES\n" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-config.8.xml:73 +msgid "" +"This will set the shell environment variable $OPTS to the value of MyApp::" +"options with a default of <option>-f</option>." +msgstr "" +"Isto irá definir a variável de ambiente shell $OPTS ao valor de MyApp::" +"options com uma predefinição de <option>-f</option>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-config.8.xml:77 +msgid "" +"The configuration item may be postfixed with a /[fdbi]. f returns file " +"names, d returns directories, b returns true or false and i returns an " +"integer. Each of the returns is normalized and verified internally." +msgstr "" +"O item de configuração pode ser pós-fixado com um /[fdbi]. f devolve nomes " +"de ficheiros, d devolve directórios, b devolve verdadeiro ou falso e i " +"devolve um número inteiro. Cada um dos valores devolvidos é normalizado e " +"verificado internamente." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-config.8.xml:86 +msgid "Just show the contents of the configuration space." +msgstr "Apenas mostra o conteúdo do espaço de configuração." + +#. type: Content of: <refentry><refsect1><para> +#: apt-config.8.xml:104 apt-extracttemplates.1.xml:75 apt-ftparchive.1.xml:593 +#: apt-sortpkgs.1.xml:70 +msgid "&apt-conf;" +msgstr "&apt-conf;" + +#. type: Content of: <refentry><refsect1><para> +#: apt-config.8.xml:109 +msgid "" +"<command>apt-config</command> returns zero on normal operation, decimal 100 " +"on error." +msgstr "" +"<command>apt-config</command> devolve zero em operação normal, 100 decimal " +"em erro." + +#. type: Content of: <refentry><refnamediv><refname> +#: apt-extracttemplates.1.xml:22 apt-extracttemplates.1.xml:29 +msgid "apt-extracttemplates" +msgstr "apt-extracttemplates" + +#. type: Content of: <refentry><refmeta><manvolnum> +#: apt-extracttemplates.1.xml:23 apt-ftparchive.1.xml:23 apt-sortpkgs.1.xml:23 +msgid "1" +msgstr "1" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt-extracttemplates.1.xml:30 +msgid "Utility to extract DebConf config and templates from Debian packages" +msgstr "" +"Utilitário para extrair configurações e modelos DebConf a partir de pacotes " +"Debian" + +#. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis> +#: apt-extracttemplates.1.xml:36 +msgid "" +"<command>apt-extracttemplates</command> <arg><option>-hv</option></arg> " +"<arg><option>-t=<replaceable>temporary directory</replaceable></option></" +"arg> <arg choice=\"plain\" rep=\"repeat\"><replaceable>file</replaceable></" +"arg>" +msgstr "" +"<command>apt-extracttemplates</command> <arg><option>-hv</option></arg> " +"<arg><option>-t=<replaceable>directório temporário</replaceable></option></" +"arg> <arg choice=\"plain\" rep=\"repeat\"><replaceable>ficheiro</" +"replaceable></arg>" + +#. type: Content of: <refentry><refsect1><para> +#: apt-extracttemplates.1.xml:44 +msgid "" +"<command>apt-extracttemplates</command> will take one or more Debian package " +"files as input and write out (to a temporary directory) all associated " +"config scripts and template files. For each passed in package that contains " +"config scripts and templates, one line of output will be generated in the " +"format:" +msgstr "" +"<command>apt-extracttemplates</command> irá receber um ou mais ficheiros de " +"pacotes Debian na sua entrada e escrever (para um directório temporário) " +"todos os scripts de configuração associados e ficheiros de modelo. Por cada " +"pacote passado por ele que contenha scripts de configuração e modelos, será " +"gerada uma linha no formato:" + +#. type: Content of: <refentry><refsect1><para> +#: apt-extracttemplates.1.xml:49 +msgid "package version template-file config-script" +msgstr "pacote versão ficheiro-modelo script-de-configuração" + +#. type: Content of: <refentry><refsect1><para> +#: apt-extracttemplates.1.xml:50 +msgid "" +"template-file and config-script are written to the temporary directory " +"specified by the -t or --tempdir (<literal>APT::ExtractTemplates::TempDir</" +"literal>) directory, with filenames of the form <filename>package.template." +"XXXX</filename> and <filename>package.config.XXXX</filename>" +msgstr "" +"ficheiro-modelo e script-de-configuração são escritos num directório " +"temporário especificado por -t ou --tempdir (<literal>APT::" +"ExtractTemplates::TempDir</literal>) directório, com nomes de ficheiros no " +"formato <filename>pacote.modelo.XXXX</filename> e <filename>pacote." +"configuração.XXXX</filename>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-extracttemplates.1.xml:60 apt-get.8.xml:495 +msgid "<option>-t</option>" +msgstr "<option>-t</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-extracttemplates.1.xml:60 +msgid "<option>--tempdir</option>" +msgstr "<option>--tempdir</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-extracttemplates.1.xml:62 +msgid "" +"Temporary directory in which to write extracted debconf template files and " +"config scripts. Configuration Item: <literal>APT::ExtractTemplates::" +"TempDir</literal>" +msgstr "" +"Directório temporário para onde escrever ficheiros debconf modelo extraídos " +"e scripts de configuração. Item de Configuração: <literal>APT::" +"ExtractTemplates::TempDir</literal>" + +#. type: Content of: <refentry><refsect1><para> +#: apt-extracttemplates.1.xml:79 +msgid "" +"<command>apt-extracttemplates</command> returns zero on normal operation, " +"decimal 100 on error." +msgstr "" +"<command>apt-extracttemplates</command> devolve zero na operação normal, 100 " +"decimal em erro." + +#. The last update date +#. type: Content of: <refentry><refentryinfo> +#: apt-ftparchive.1.xml:13 +msgid "" +"&apt-author.jgunthorpe; &apt-author.team; &apt-email; &apt-product; <date>17 " +"August 2009</date>" +msgstr "" +"&apt-author.jgunthorpe; &apt-author.team; &apt-email; &apt-product; <date>17 " +"Agosto 2009</date>" + +#. type: Content of: <refentry><refnamediv><refname> +#: apt-ftparchive.1.xml:22 apt-ftparchive.1.xml:29 +msgid "apt-ftparchive" +msgstr "apt-ftparchive" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt-ftparchive.1.xml:30 +msgid "Utility to generate index files" +msgstr "Utilitário para gerar ficheiros de índice" + +#. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis> +#: apt-ftparchive.1.xml:36 +msgid "" +"<command>apt-ftparchive</command> <arg><option>-hvdsq</option></arg> " +"<arg><option>--md5</option></arg> <arg><option>--delink</option></arg> " +"<arg><option>--readonly</option></arg> <arg><option>--contents</option></" +"arg> <arg><option>--arch <replaceable>architecture</replaceable></option></" +"arg> <arg><option>-o <replaceable>config</replaceable>=<replaceable>string</" +"replaceable></option></arg> <arg><option>-c=<replaceable>file</replaceable></" +"option></arg> <group choice=\"req\"> <arg>packages<arg choice=\"plain\" rep=" +"\"repeat\"><replaceable>path</replaceable></arg><arg><replaceable>override</" +"replaceable><arg><replaceable>pathprefix</replaceable></arg></arg></arg> " +"<arg>sources<arg choice=\"plain\" rep=\"repeat\"><replaceable>path</" +"replaceable></arg><arg><replaceable>override</" +"replaceable><arg><replaceable>pathprefix</replaceable></arg></arg></arg> " +"<arg>contents <arg choice=\"plain\"><replaceable>path</replaceable></arg></" +"arg> <arg>release <arg choice=\"plain\"><replaceable>path</replaceable></" +"arg></arg> <arg>generate <arg choice=\"plain\"><replaceable>config-file</" +"replaceable></arg> <arg choice=\"plain\" rep=\"repeat" +"\"><replaceable>section</replaceable></arg></arg> <arg>clean <arg choice=" +"\"plain\"><replaceable>config-file</replaceable></arg></arg> </group>" +msgstr "" +"<command>apt-ftparchive</command> <arg><option>-hvdsq</option></arg> " +"<arg><option>--md5</option></arg> <arg><option>--delink</option></arg> " +"<arg><option>--readonly</option></arg> <arg><option>--contents</option></" +"arg> <arg><option>--arch <replaceable>arquitectura</replaceable></option></" +"arg> <arg><option>-o <replaceable>configuração</" +"replaceable>=<replaceable>string</replaceable></option></arg> <arg><option>-" +"c=<replaceable>ficheiro</replaceable></option></arg> <group choice=\"req\"> " +"<arg>packages<arg choice=\"plain\" rep=\"repeat\"><replaceable>caminho</" +"replaceable></arg><arg><replaceable>override</" +"replaceable><arg><replaceable>prefixo-de-caminho</replaceable></arg></arg></" +"arg> <arg>sources<arg choice=\"plain\" rep=\"repeat\"><replaceable>caminho</" +"replaceable></arg><arg><replaceable>sobrepor</" +"replaceable><arg><replaceable>prefixo-de-caminho</replaceable></arg></arg></" +"arg> <arg>contents <arg choice=\"plain\"><replaceable>caminho</replaceable></" +"arg></arg> <arg>release <arg choice=\"plain\"><replaceable>caminho</" +"replaceable></arg></arg> <arg>generate <arg choice=\"plain" +"\"><replaceable>ficheiro-de-configuração</replaceable></arg> <arg choice=" +"\"plain\" rep=\"repeat\"><replaceable>secção</replaceable></arg></arg> " +"<arg>clean <arg choice=\"plain\"><replaceable>ficheiro-de-configuração</" +"replaceable></arg></arg> </group>" + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:57 +msgid "" +"<command>apt-ftparchive</command> is the command line tool that generates " +"the index files that APT uses to access a distribution source. The index " +"files should be generated on the origin site based on the content of that " +"site." +msgstr "" +"<command>apt-ftparchive</command> é a ferramenta de linha de comandos que " +"cria os ficheiros índice que o APT usa para aceder a uma fonte de " +"distribuição. Os ficheiros índice devem ser gerados no site de origem " +"baseados no conteúdo desse site." + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:61 +msgid "" +"<command>apt-ftparchive</command> is a superset of the &dpkg-scanpackages; " +"program, incorporating its entire functionality via the <literal>packages</" +"literal> command. It also contains a contents file generator, " +"<literal>contents</literal>, and an elaborate means to 'script' the " +"generation process for a complete archive." +msgstr "" +"<command>apt-ftparchive</command> é um super conjunto do programa &dpkg-" +"scanpackages;, incorporando todas as suas funcionalidades através do comando " +"<literal>packages</literal>. Também contém um gerador de ficheiro de " +"conteúdos, <literal>contents</literal>, e um meio elaborado de colocar em " +"script o processo de geração para um arquivo completo." + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:67 +msgid "" +"Internally <command>apt-ftparchive</command> can make use of binary " +"databases to cache the contents of a .deb file and it does not rely on any " +"external programs aside from &gzip;. When doing a full generate it " +"automatically performs file-change checks and builds the desired compressed " +"output files." +msgstr "" +"Internamente o <command>apt-ftparchive</command> pode fazer uso de bases de " +"dados binárias para por em cache os conteúdos de um ficheiro .deb e não " +"precisa de nenhum programa externo à excepção do &gzip;. Quando faz uma " +"geração completa, executa automaticamente verificações de alterações de " +"ficheiros e constrói os ficheiros comprimidos desejados." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:76 +msgid "packages" +msgstr "packages" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:78 +msgid "" +"The packages command generates a package file from a directory tree. It " +"takes the given directory and recursively searches it for .deb files, " +"emitting a package record to stdout for each. This command is approximately " +"equivalent to &dpkg-scanpackages;." +msgstr "" +"O comando packages gera um ficheiro pacote a partir duma árvore de " +"directórios. Recebe um dado directório e procura recursivamente por " +"ficheiros .deb, emitindo um registo de pacote para o stdout por cada um. " +"Este comando é aproximadamente equivalente ao &dpkg-scanpackages;." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:83 apt-ftparchive.1.xml:107 +msgid "" +"The option <option>--db</option> can be used to specify a binary caching DB." +msgstr "" +"A opção <option>--db</option> pode ser usada para especificar uma base de " +"dados de cache binária." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:86 +msgid "sources" +msgstr "sources" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:88 +msgid "" +"The <literal>sources</literal> command generates a source index file from a " +"directory tree. It takes the given directory and recursively searches it " +"for .dsc files, emitting a source record to stdout for each. This command is " +"approximately equivalent to &dpkg-scansources;." +msgstr "" +"O comando <literal>sources</literal> gera um índice de fonte a partir duma " +"árvore de directórios. Recebe um dado directório e procura recursivamente " +"por ficheiros .dsc, emitindo um registo de fonte para o stdout por cada um. " +"Este comando é aproximadamente equivalente ao &dpkg-scansources;." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:93 +msgid "" +"If an override file is specified then a source override file will be looked " +"for with an extension of .src. The --source-override option can be used to " +"change the source override file that will be used." +msgstr "" +"Se for especificado um ficheiro de sobreposição então será procurado um " +"ficheiro de sobreposição de fonte com uma extensão de .src. A opção --" +"source-override pode ser usada para alterar o ficheiro de sobreposição de " +"fonte que irá ser usado." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:98 +msgid "contents" +msgstr "contents" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:100 +msgid "" +"The <literal>contents</literal> command generates a contents file from a " +"directory tree. It takes the given directory and recursively searches it " +"for .deb files, and reads the file list from each file. It then sorts and " +"writes to stdout the list of files matched to packages. Directories are not " +"written to the output. If multiple packages own the same file then each " +"package is separated by a comma in the output." +msgstr "" +"O comando<literal>contents</literal> gera um ficheiro de conteúdos a partir " +"duma árvore de directórios. Recebe um dado directório e procura " +"recursivamente por ficheiros .deb, e lê a lista de ficheiros de cada " +"ficheiro. Então organiza e escreve para o stdout a lista de ficheiros " +"correspondente a pacotes. Os directórios não são escritos no saída. Se " +"múltiplos pacotes possuírem o mesmo ficheiro então cada pacote é separado " +"por uma vírgula na saída." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:110 +msgid "release" +msgstr "release" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:112 +msgid "" +"The <literal>release</literal> command generates a Release file from a " +"directory tree. It recursively searches the given directory for Packages, " +"Packages.gz, Packages.bz2, Sources, Sources.gz, Sources.bz2, Release and " +"md5sum.txt files. It then writes to stdout a Release file containing an MD5 " +"digest and SHA1 digest for each file." +msgstr "" +"O comando <literal>release</literal> gera um ficheiro Release a partir duma " +"árvore de directórios. Procura recursivamente o directório dado por " +"ficheiros Packages, Packages.gz, Packages.bz2, Sources, Sources.gz, Sources." +"bz2, Release e md5sum.txt. Depois escreve para o stdout um ficheiro Release " +"contendo um sumário MD5 e um sumário SHA1 por cada ficheiro." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:119 +msgid "" +"Values for the additional metadata fields in the Release file are taken from " +"the corresponding variables under <literal>APT::FTPArchive::Release</" +"literal>, e.g. <literal>APT::FTPArchive::Release::Origin</literal>. The " +"supported fields are: <literal>Origin</literal>, <literal>Label</literal>, " +"<literal>Suite</literal>, <literal>Version</literal>, <literal>Codename</" +"literal>, <literal>Date</literal>, <literal>Architectures</literal>, " +"<literal>Components</literal>, <literal>Description</literal>." +msgstr "" +"Valores para os campos de metadados adicionais no ficheiro Release são " +"tomados a partir das variáveis correspondentes sob <literal>APT::FTPArchive::" +"Release</literal>, ex. <literal>APT::FTPArchive::Release::Origin</literal>. " +"Os campos suportados são: <literal>Origin</literal>, <literal>Label</" +"literal>, <literal>Suite</literal>, <literal>Version</literal>, " +"<literal>Codename</literal>, <literal>Date</literal>, " +"<literal>Architectures</literal>, <literal>Components</literal>, " +"<literal>Description</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:129 +msgid "generate" +msgstr "generate" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:131 +msgid "" +"The <literal>generate</literal> command is designed to be runnable from a " +"cron script and builds indexes according to the given config file. The " +"config language provides a flexible means of specifying which index files " +"are built from which directories, as well as providing a simple means of " +"maintaining the required settings." +msgstr "" +"O comando <literal>generate</literal> é desenhado para ser executado a " +"partir dum script cron e constrói índices de acordo com o ficheiro de " +"configuração fornecido. A linguagem de configuração disponibiliza um meio " +"flexível de de especificar quais ficheiros índice são construídos a partir " +"de quais directórios, assim como disponibilizar um meio simples de manter as " +"definições requeridas." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:138 apt-get.8.xml:292 +msgid "clean" +msgstr "clean" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:140 +msgid "" +"The <literal>clean</literal> command tidies the databases used by the given " +"configuration file by removing any records that are no longer necessary." +msgstr "" +"O comando <literal>clean</literal> arruma as bases de dados usadas pelo " +"ficheiro de configuração fornecido ao remover quaisquer registos que já não " +"são necessários." + +#. type: Content of: <refentry><refsect1><title> +#: apt-ftparchive.1.xml:146 +msgid "The Generate Configuration" +msgstr "A Configuração do Generate" + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:148 +msgid "" +"The <literal>generate</literal> command uses a configuration file to " +"describe the archives that are going to be generated. It follows the typical " +"ISC configuration format as seen in ISC tools like bind 8 and dhcpd. &apt-" +"conf; contains a description of the syntax. Note that the generate " +"configuration is parsed in sectional manner, but &apt-conf; is parsed in a " +"tree manner. This only effects how the scope tag is handled." +msgstr "" +"O comando <literal>generate</literal> usa um ficheiro de configuração para " +"descrever os arquivos que vão ser gerados. Segue o formato típico de " +"configuração ISC como visto em ferramentas ISC como o bind 8 e dhcpd. &apt-" +"conf; contém uma descrição da sintaxe. Note que a configuração gerada é " +"analisada de maneira seccional, mas o &apt-conf; é analisado numa maneira de " +"árvore. Isto apenas afecta o modo de como a etiqueta scope é manuseada." + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:156 +msgid "" +"The generate configuration has 4 separate sections, each described below." +msgstr "" +"A configuração do generate tem 4 secções separadas, cada uma descrita mais " +"abaixo." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt-ftparchive.1.xml:158 +msgid "Dir Section" +msgstr "Secção Dir" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt-ftparchive.1.xml:160 +msgid "" +"The <literal>Dir</literal> section defines the standard directories needed " +"to locate the files required during the generation process. These " +"directories are prepended certain relative paths defined in later sections " +"to produce a complete an absolute path." +msgstr "" +"A secção <literal>Dir</literal> define os directórios standard necessários " +"para localizar os ficheiros requisitados durante o processo de geração. " +"Estes directórios precedem a certos caminhos relativos definidos em secções " +"posteriores para produzir um caminho completo e absoluto." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:165 +msgid "ArchiveDir" +msgstr "ArchiveDir" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:167 +msgid "" +"Specifies the root of the FTP archive, in a standard Debian configuration " +"this is the directory that contains the <filename>ls-LR</filename> and dist " +"nodes." +msgstr "" +"Especifica a raiz do arquivo FTP, numa configuração Debian standard este é o " +"directório que contém o <filename>ls-LR</filename> e nós da distribuição." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:172 +msgid "OverrideDir" +msgstr "OverrideDir" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:174 +msgid "Specifies the location of the override files." +msgstr "Especifica a localização dos ficheiros de sobrepor." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:177 +msgid "CacheDir" +msgstr "CacheDir" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:179 +msgid "Specifies the location of the cache files" +msgstr "Especifica a localização dos ficheiros de cache" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:182 +msgid "FileListDir" +msgstr "FileListDir" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:184 +msgid "" +"Specifies the location of the file list files, if the <literal>FileList</" +"literal> setting is used below." +msgstr "" +"Especifica a localização dos ficheiros de listas de ficheiros, se a " +"definição <literal>FileList</literal> for usada mais abaixo." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt-ftparchive.1.xml:190 +msgid "Default Section" +msgstr "Secção Default" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt-ftparchive.1.xml:192 +msgid "" +"The <literal>Default</literal> section specifies default values, and " +"settings that control the operation of the generator. Other sections may " +"override these defaults with a per-section setting." +msgstr "" +"A secção <literal>Default</literal> especifica valores predefinidos, e " +"definições que controlam a operação do gerador. Outras secções podem " +"sobrepor estas predefinições em uma definição por-secção." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:196 +msgid "Packages::Compress" +msgstr "Packages::Compress" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:198 +msgid "" +"Sets the default compression schemes to use for the Package index files. It " +"is a string that contains a space separated list of at least one of: '.' (no " +"compression), 'gzip' and 'bzip2'. The default for all compression schemes is " +"'. gzip'." +msgstr "" +"Define os esquemas de compressão predefinidos a usar para os ficheiros de " +"índice Package. É uma string que contém uma lista separada por espaços de " +"pelo menos um de: '.' (nenhuma compressão), 'gzip' and 'bzip2'. A " +"predefinição para todos os esquemas de compressão é '. gzip'." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:204 +msgid "Packages::Extensions" +msgstr "Packages::Extensions" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:206 +msgid "" +"Sets the default list of file extensions that are package files. This " +"defaults to '.deb'." +msgstr "" +"Define a lista predefinida das extensões de ficheiros que são ficheiros " +"pacote. A predefinição é '.deb'." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:210 +msgid "Sources::Compress" +msgstr "Sources::Compress" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:212 +msgid "" +"This is similar to <literal>Packages::Compress</literal> except that it " +"controls the compression for the Sources files." +msgstr "" +"Isto é semelhante a <literal>Packages::Compress</literal> excepto que " +"controla a compressão para os ficheiros das Fontes." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:216 +msgid "Sources::Extensions" +msgstr "Sources::Extensions" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:218 +msgid "" +"Sets the default list of file extensions that are source files. This " +"defaults to '.dsc'." +msgstr "" +"Define a lista predefinida das extensões de ficheiros que são ficheiros de " +"fontes. A predefinição é '.dsc'." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:222 +msgid "Contents::Compress" +msgstr "Contents::Compress" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:224 +msgid "" +"This is similar to <literal>Packages::Compress</literal> except that it " +"controls the compression for the Contents files." +msgstr "" +"Isto é semelhante a <literal>Packages::Compress</literal> excepto que " +"controla a compressão para os ficheiros de Conteúdos." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:228 +msgid "DeLinkLimit" +msgstr "DeLinkLimit" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:230 +msgid "" +"Specifies the number of kilobytes to delink (and replace with hard links) " +"per run. This is used in conjunction with the per-section <literal>External-" +"Links</literal> setting." +msgstr "" +"Especifica o número de kilobytes para delink (e substitui com hard links) " +"por execução. Isto é usado em conjunto com a definição <literal>External-" +"Links</literal> por secção." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:235 +msgid "FileMode" +msgstr "FileMode" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:237 +msgid "" +"Specifies the mode of all created index files. It defaults to 0644. All " +"index files are set to this mode with no regard to the umask." +msgstr "" +"Especifica o modo de todos os ficheiros índice criados. A predefinição é " +"0644. Todos os ficheiros índice são definidos para este modo " +"independentemente do umask." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt-ftparchive.1.xml:244 +msgid "TreeDefault Section" +msgstr "Secção TreeDefault" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt-ftparchive.1.xml:246 +msgid "" +"Sets defaults specific to <literal>Tree</literal> sections. All of these " +"variables are substitution variables and have the strings $(DIST), " +"$(SECTION) and $(ARCH) replaced with their respective values." +msgstr "" +"Define predefinições específicas para as secções <literal>Tree</literal>. " +"Todas estas variáveis são variáveis de substituição e têm as strings " +"$(DIST), $(SECTION) e $(ARCH) substituídas pelos seus respectivos valores." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:251 +msgid "MaxContentsChange" +msgstr "MaxContentsChange" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:253 +msgid "" +"Sets the number of kilobytes of contents files that are generated each day. " +"The contents files are round-robined so that over several days they will all " +"be rebuilt." +msgstr "" +"Define o número de kilobytes dos ficheiros de conteúdo que são gerados a " +"cada dia. Os ficheiros de conteúdo são re-circulados para que ao fim de " +"alguns dias todos sejam reconstruídos." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:258 +msgid "ContentsAge" +msgstr "ContentsAge" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:260 +msgid "" +"Controls the number of days a contents file is allowed to be checked without " +"changing. If this limit is passed the mtime of the contents file is updated. " +"This case can occur if the package file is changed in such a way that does " +"not result in a new contents file [override edit for instance]. A hold off " +"is allowed in hopes that new .debs will be installed, requiring a new file " +"anyhow. The default is 10, the units are in days." +msgstr "" +"Controla o número de dias que se permite a um ficheiro de conteúdo ser " +"verificado sem alteração. Se este limite for ultrapassado o mtime do " +"ficheiro de conteúdo é actualizado. Este caso pode ocorrer se o ficheiro de " +"pacote é alterado num modo que não resulta num novo ficheiro de conteúdo " +"[por exemplo uma edição de sobreposição]. É permitido um soltar na esperança " +"que novos .debs sejam instalados, requerendo um novo ficheiro de qualquer " +"modo. A predefinição é 10, as unidades são em dias." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:269 +msgid "Directory" +msgstr "Directory" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:271 +msgid "" +"Sets the top of the .deb directory tree. Defaults to <filename>$(DIST)/" +"$(SECTION)/binary-$(ARCH)/</filename>" +msgstr "" +"Define o topo da árvore de directórios .deb. A predefinição é <filename>" +"$(DIST)/$(SECTION)/binary-$(ARCH)/</filename>" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:275 +msgid "SrcDirectory" +msgstr "SrcDirectory" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:277 +msgid "" +"Sets the top of the source package directory tree. Defaults to <filename>" +"$(DIST)/$(SECTION)/source/</filename>" +msgstr "" +"Define o topo da árvore de directórios de pacotes fonte. A predefinição é " +"<filename>$(DIST)/$(SECTION)/source/</filename>" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:281 apt-ftparchive.1.xml:407 +msgid "Packages" +msgstr "Packages" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:283 +msgid "" +"Sets the output Packages file. Defaults to <filename>$(DIST)/$(SECTION)/" +"binary-$(ARCH)/Packages</filename>" +msgstr "" +"Define o ficheiro Packages de saída. A predefinição é <filename>$(DIST)/" +"$(SECTION)/binary-$(ARCH)/Packages</filename>" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:287 apt-ftparchive.1.xml:412 +msgid "Sources" +msgstr "Sources" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:289 +msgid "" +"Sets the output Sources file. Defaults to <filename>$(DIST)/$(SECTION)/" +"source/Sources</filename>" +msgstr "" +"Define o ficheiro Sources de saída. A predefinição é <filename>$(DIST)/" +"$(SECTION)/source/Sources</filename>" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:293 +msgid "InternalPrefix" +msgstr "InternalPrefix" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:295 +msgid "" +"Sets the path prefix that causes a symlink to be considered an internal link " +"instead of an external link. Defaults to <filename>$(DIST)/$(SECTION)/</" +"filename>" +msgstr "" +"Define o prefixo de caminho que causa que um symlink seja considerado um " +"link interno em vez de um link externo. A predefinição é <filename>$(DIST)/" +"$(SECTION)/</filename>" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:300 apt-ftparchive.1.xml:418 +msgid "Contents" +msgstr "Contents" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:302 +msgid "" +"Sets the output Contents file. Defaults to <filename>$(DIST)/Contents-$(ARCH)" +"</filename>. If this setting causes multiple Packages files to map onto a " +"single Contents file (such as the default) then <command>apt-ftparchive</" +"command> will integrate those package files together automatically." +msgstr "" +"Define a saída do ficheiro Contents. A predefinição é <filename>$(DIST)/" +"Contents-$(ARCH)</filename>. Se esta definição causar múltiplos ficheiros " +"Packages para mapear em um único ficheiro Contents (tal como a predefinição) " +"então o <command>apt-ftparchive</command> irá automaticamente integrar esses " +"ficheiros pacotes todos juntos." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:309 +msgid "Contents::Header" +msgstr "Contents::Header" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:311 +msgid "Sets header file to prepend to the contents output." +msgstr "Define o ficheiro cabeçalho para prefixar a saída de conteúdos." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:314 apt-ftparchive.1.xml:443 +msgid "BinCacheDB" +msgstr "BinCacheDB" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:316 +msgid "" +"Sets the binary cache database to use for this section. Multiple sections " +"can share the same database." +msgstr "" +"Define a base de dados de cache binária a usar para esta secção. Múltiplas " +"secções podem partilhar a mesma base de dados." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:320 +msgid "FileList" +msgstr "FileList" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:322 +msgid "" +"Specifies that instead of walking the directory tree, <command>apt-" +"ftparchive</command> should read the list of files from the given file. " +"Relative files names are prefixed with the archive directory." +msgstr "" +"Especifica que em vez de navegar na árvore de directórios, o <command>apt-" +"ftparchive</command> deverá ler a lista de ficheiros a partir do ficheiro " +"fornecido. Nomes de ficheiros relativos são prefixados com o directório de " +"arquivo." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:327 +msgid "SourceFileList" +msgstr "SourceFileList" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:329 +msgid "" +"Specifies that instead of walking the directory tree, <command>apt-" +"ftparchive</command> should read the list of files from the given file. " +"Relative files names are prefixed with the archive directory. This is used " +"when processing source indexes." +msgstr "" +"Especifica que em vez de navegar na árvore de directórios, o <command>apt-" +"ftparchive</command> deverá ler a lista de ficheiros a partir do ficheiro " +"fornecido. Nomes de ficheiros relativos são prefixados com o directório de " +"arquivo. Isto é usado quando se processa índices de fonte." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt-ftparchive.1.xml:337 +msgid "Tree Section" +msgstr "Secção Tree" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt-ftparchive.1.xml:339 +msgid "" +"The <literal>Tree</literal> section defines a standard Debian file tree " +"which consists of a base directory, then multiple sections in that base " +"directory and finally multiple Architectures in each section. The exact " +"pathing used is defined by the <literal>Directory</literal> substitution " +"variable." +msgstr "" +"A secção <literal>Tree</literal> define uma árvore de ficheiros Debian " +"standard que consiste de um directório base, depois múltiplas secções nesse " +"directório base e finalmente múltiplas Arquitecturas em cada secção. O " +"caminho exacto usado é definido pela variável de substituição " +"<literal>Directory</literal>." + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt-ftparchive.1.xml:344 +msgid "" +"The <literal>Tree</literal> section takes a scope tag which sets the " +"<literal>$(DIST)</literal> variable and defines the root of the tree (the " +"path is prefixed by <literal>ArchiveDir</literal>). Typically this is a " +"setting such as <filename>dists/woody</filename>." +msgstr "" +"A secção <literal>Tree</literal> recebe uma etiqueta scope que define a " +"variável <literal>$(DIST)</literal> e define a raiz da árvore (o caminho é " +"prefixado por <literal>ArchiveDir</literal>). Tipicamente esta é uma " +"definição tal como <filename>dists/woody</filename>." + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt-ftparchive.1.xml:349 +msgid "" +"All of the settings defined in the <literal>TreeDefault</literal> section " +"can be use in a <literal>Tree</literal> section as well as three new " +"variables." +msgstr "" +"Todas as definições definidas na secção <literal>TreeDefault</literal> podem " +"ser usadas na secção <literal>Tree</literal> assim como as novas três " +"variáveis." + +#. type: Content of: <refentry><refsect1><refsect2><para><programlisting> +#: apt-ftparchive.1.xml:355 +#, no-wrap +msgid "" +"for i in Sections do \n" +" for j in Architectures do\n" +" Generate for DIST=scope SECTION=i ARCH=j\n" +" " +msgstr "" +"for i in Sections do \n" +" for j in Architectures do\n" +" Generate for DIST=scope SECTION=i ARCH=j\n" +" " + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt-ftparchive.1.xml:352 +msgid "" +"When processing a <literal>Tree</literal> section <command>apt-ftparchive</" +"command> performs an operation similar to: <placeholder type=\"programlisting" +"\" id=\"0\"/>" +msgstr "" +"Quando processa uma secção <literal>Tree</literal>, o <command>apt-" +"ftparchive</command> executa uma operação semelhante a: <placeholder type=" +"\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:361 +msgid "Sections" +msgstr "Sections" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:363 +msgid "" +"This is a space separated list of sections which appear under the " +"distribution, typically this is something like <literal>main contrib non-" +"free</literal>" +msgstr "" +"Isto é uma lista de secções separada por espaços que aparece sob a " +"distribuição, tipicamente isto é algo como <literal>main contrib non-free</" +"literal>" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:368 +msgid "Architectures" +msgstr "Architectures" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:370 +msgid "" +"This is a space separated list of all the architectures that appear under " +"search section. The special architecture 'source' is used to indicate that " +"this tree has a source archive." +msgstr "" +"Isto é uma lista separada por espaços de todas as arquitecturas que aparecem " +"sob a secção de buscas. A arquitectura especial 'source' é usada para " +"indicar que esta árvore tem um arquivo fonte." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:375 apt-ftparchive.1.xml:423 +msgid "BinOverride" +msgstr "BinOverride" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:377 +msgid "" +"Sets the binary override file. The override file contains section, priority " +"and maintainer address information." +msgstr "" +"Define o ficheiro de sobreposição binário. O ficheiro de sobreposição " +"informação de secção, prioridade e endereço do responsável." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:381 apt-ftparchive.1.xml:428 +msgid "SrcOverride" +msgstr "SrcOverride" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:383 +msgid "" +"Sets the source override file. The override file contains section " +"information." +msgstr "" +"Define o ficheiro de sobreposição fonte. O ficheiro de sobreposição " +"informação de secção." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:387 apt-ftparchive.1.xml:433 +msgid "ExtraOverride" +msgstr "ExtraOverride" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:389 apt-ftparchive.1.xml:435 +msgid "Sets the binary extra override file." +msgstr "Define o ficheiro de sobreposição extra binário." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:392 apt-ftparchive.1.xml:438 +msgid "SrcExtraOverride" +msgstr "SrcExtraOverride" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:394 apt-ftparchive.1.xml:440 +msgid "Sets the source extra override file." +msgstr "Define o ficheiro de sobreposição extra fonte." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt-ftparchive.1.xml:399 +msgid "BinDirectory Section" +msgstr "Secção BinDirectory" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt-ftparchive.1.xml:401 +msgid "" +"The <literal>bindirectory</literal> section defines a binary directory tree " +"with no special structure. The scope tag specifies the location of the " +"binary directory and the settings are similar to the <literal>Tree</literal> " +"section with no substitution variables or <literal>Section</" +"literal><literal>Architecture</literal> settings." +msgstr "" +"A secção <literal>bindirectory</literal> define uma árvore de directórios " +"binários sem nenhuma estrutura especial. A etiqueta scope especifica a " +"localização do directório binário e as definições são semelhantes às da " +"secção <literal>Tree</literal> sem nenhumas variáveis de substituição ou " +"definições <literal>Section</literal><literal>Architecture</literal>." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:409 +msgid "Sets the Packages file output." +msgstr "Define a saída do ficheiro Packages." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:414 +msgid "" +"Sets the Sources file output. At least one of <literal>Packages</literal> or " +"<literal>Sources</literal> is required." +msgstr "" +"Define a saída do ficheiro Sources. É necessário pelo menos um de " +"<literal>Packages</literal> ou <literal>Sources</literal>." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:420 +msgid "Sets the Contents file output. (optional)" +msgstr "Define a saída do ficheiro Contents (opcional)" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:425 +msgid "Sets the binary override file." +msgstr "Define o ficheiro de sobreposição binário." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:430 +msgid "Sets the source override file." +msgstr "Define o ficheiro de sobreposição fonte." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:445 +msgid "Sets the cache DB." +msgstr "Define a base de dados de cache." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:448 +msgid "PathPrefix" +msgstr "PathPrefix" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:450 +msgid "Appends a path to all the output paths." +msgstr "Acrescenta um caminho a todos os caminhos de saída." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:453 +msgid "FileList, SourceFileList" +msgstr "FileList, SourceFileList" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:455 +msgid "Specifies the file list file." +msgstr "Especifica o ficheiro de lista de ficheiros." + +#. type: Content of: <refentry><refsect1><title> +#: apt-ftparchive.1.xml:462 +msgid "The Binary Override File" +msgstr "O Ficheiro Binary Override" + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:463 +msgid "" +"The binary override file is fully compatible with &dpkg-scanpackages;. It " +"contains 4 fields separated by spaces. The first field is the package name, " +"the second is the priority to force that package to, the third is the the " +"section to force that package to and the final field is the maintainer " +"permutation field." +msgstr "" +"O ficheiro de sobreposição binário é totalmente compatível com &dpkg-" +"scanpackages;. Contém 4 campos separados por espaços. O primeiro campo é o " +"nome do pacote, o segundo é a prioridade a qual forçar esse pacote, o " +"terceiro é a secção onde forçar esse pacote e o último campo é o campo de " +"permutação do responsável." + +#. type: Content of: <refentry><refsect1><para><literallayout> +#: apt-ftparchive.1.xml:469 +#, no-wrap +msgid "old [// oldn]* => new" +msgstr "old [// oldn]* => new" + +#. type: Content of: <refentry><refsect1><para><literallayout> +#: apt-ftparchive.1.xml:471 +#, no-wrap +msgid "new" +msgstr "new" + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:468 +msgid "" +"The general form of the maintainer field is: <placeholder type=" +"\"literallayout\" id=\"0\"/> or simply, <placeholder type=\"literallayout\" " +"id=\"1\"/> The first form allows a double-slash separated list of old email " +"addresses to be specified. If any of those are found then new is substituted " +"for the maintainer field. The second form unconditionally substitutes the " +"maintainer field." +msgstr "" +"O formato geral do campo do responsável é: <placeholder type=\"literallayout" +"\" id=\"0\"/> ou simplesmente, <placeholder type=\"literallayout\" id=\"1\"/" +">. O primeiro formato permite uma lista separada por um duplo slash (//) de " +"antigos endereços e email a serem especificados. Se nenhum destes for " +"encontrado então 'new' é substituído para o campo do responsável. O segundo " +"formato substitui incondicionalmente o campo do responsável." + +#. type: Content of: <refentry><refsect1><title> +#: apt-ftparchive.1.xml:479 +msgid "The Source Override File" +msgstr "O Ficheiro Source Override" + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:481 +msgid "" +"The source override file is fully compatible with &dpkg-scansources;. It " +"contains 2 fields separated by spaces. The first fields is the source " +"package name, the second is the section to assign it." +msgstr "" +"O ficheiro de sobreposição de fonte é totalmente compatível com &dpkg-" +"scansources;. Contém dois campos separados por espaços. O primeiro campo é o " +"nome de pacote fonte, o segundo é a secção onde o atribuir." + +#. type: Content of: <refentry><refsect1><title> +#: apt-ftparchive.1.xml:486 +msgid "The Extra Override File" +msgstr "O Ficheiro Extra Override" + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:488 +msgid "" +"The extra override file allows any arbitrary tag to be added or replaced in " +"the output. It has 3 columns, the first is the package, the second is the " +"tag and the remainder of the line is the new value." +msgstr "" +"O ficheiro de sobreposição extra permite que qualquer etiqueta arbitrária " +"seja adicionada ou substituída na saída. Tem 3 colunas, a primeira é o " +"pacote, a segunda é a etiqueta e restante da linha é o novo valor." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:497 +msgid "<option>--md5</option>" +msgstr "<option>--md5</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:499 +msgid "" +"Generate MD5 sums. This defaults to on, when turned off the generated index " +"files will not have MD5Sum fields where possible. Configuration Item: " +"<literal>APT::FTPArchive::MD5</literal>" +msgstr "" +"Gera sumários MD5. A predefinição é ligado, quando desligado os ficheiros " +"índice gerados não terão campos MD5Sum onde possíveis. Item de Configuração: " +"<literal>APT::FTPArchive::MD5</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:504 +msgid "<option>--db</option>" +msgstr "<option>--db</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:506 +msgid "" +"Use a binary caching DB. This has no effect on the generate command. " +"Configuration Item: <literal>APT::FTPArchive::DB</literal>." +msgstr "" +"Usa uma base de dados de cache binária. Isto não tem efeito no comando " +"generate. Item de configuração: <literal>APT::FTPArchive::DB</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:512 +msgid "" +"Quiet; produces output suitable for logging, omitting progress indicators. " +"More q's will produce more quiet up to a maximum of 2. You can also use " +"<option>-q=#</option> to set the quiet level, overriding the configuration " +"file. Configuration Item: <literal>quiet</literal>." +msgstr "" +"Silencioso; produz saída apropriada para registar em logs, omitindo " +"indicadores de progresso. Mais q's irão produzir mais silencio até um máximo " +"de 2. Você também pode usar <option>-q=#</option> para definir o nível de " +"silêncio, sobrepondo o ficheiro de configuração. Item de Configuração: " +"<literal>quiet</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:518 +msgid "<option>--delink</option>" +msgstr "<option>--delink</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:520 +msgid "" +"Perform Delinking. If the <literal>External-Links</literal> setting is used " +"then this option actually enables delinking of the files. It defaults to on " +"and can be turned off with <option>--no-delink</option>. Configuration " +"Item: <literal>APT::FTPArchive::DeLinkAct</literal>." +msgstr "" +"Executa Dissociação. Se é usada a definição <literal>External-Links</" +"literal> então esta opção activa a dissociação dos ficheiros. A sua " +"predefinição é ligada e e pode ser desligada com <option>--no-delink</" +"option>. Item de Configuração: <literal>APT::FTPArchive::DeLinkAct</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:526 +msgid "<option>--contents</option>" +msgstr "<option>--contents</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:528 +msgid "" +"Perform contents generation. When this option is set and package indexes are " +"being generated with a cache DB then the file listing will also be extracted " +"and stored in the DB for later use. When using the generate command this " +"option also allows the creation of any Contents files. The default is on. " +"Configuration Item: <literal>APT::FTPArchive::Contents</literal>." +msgstr "" +"Executa a geração de conteúdos. Quando esta opção está definida e os índices " +"de pacotes são gerados com um base de dados cache então a listagem de " +"ficheiros também será extraída e guardada na base de dados para utilização " +"posterior. Quando se usa o comando generate, esta opção também permite a " +"criação de quaisquer ficheiros de Conteúdos. A predefinição é ligado. Item " +"de Configuração: <literal>APT::FTPArchive::Contents</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:536 +msgid "<option>--source-override</option>" +msgstr "<option>--source-override</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:538 +msgid "" +"Select the source override file to use with the <literal>sources</literal> " +"command. Configuration Item: <literal>APT::FTPArchive::SourceOverride</" +"literal>." +msgstr "" +"Selecciona o ficheiro de sobreposição de fonte a usar com o comando " +"<literal>sources</literal>. Item de Configuração: <literal>APT::FTPArchive::" +"SourceOverride</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:542 +msgid "<option>--readonly</option>" +msgstr "<option>--readonly</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:544 +msgid "" +"Make the caching databases read only. Configuration Item: <literal>APT::" +"FTPArchive::ReadOnlyDB</literal>." +msgstr "" +"Torna as bases de dados de cache apenas de leitura. Item de Configuração: " +"<literal>APT::FTPArchive::ReadOnlyDB</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:548 +msgid "<option>--arch</option>" +msgstr "<option>--arch</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:549 +msgid "" +"Accept in the <literal>packages</literal> and <literal>contents</literal> " +"commands only package files matching <literal>*_arch.deb</literal> or " +"<literal>*_all.deb</literal> instead of all package files in the given " +"path. Configuration Item: <literal>APT::FTPArchive::Architecture</literal>." +msgstr "" +"Aceita nos comandos <literal>packages</literal> e <literal>contents</" +"literal> apenas ficheiros de pacotes que condizem com <literal>*_arch.deb</" +"literal> ou <literal>*_all.deb</literal> em vez de todos os ficheiros de " +"pacotes presentes no caminho fornecido. Item de Configuração: <literal>APT::" +"FTPArchive::Architecture</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:555 +msgid "<option>APT::FTPArchive::AlwaysStat</option>" +msgstr "<option>APT::FTPArchive::AlwaysStat</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:557 +msgid "" +"&apt-ftparchive; caches as much as possible of metadata in a cachedb. If " +"packages are recompiled and/or republished with the same version again, this " +"will lead to problems as the now outdated cached metadata like size and " +"checksums will be used. With this option enabled this will no longer happen " +"as it will be checked if the file was changed. Note that this option is set " +"to \"<literal>false</literal>\" by default as it is not recommend to upload " +"multiply versions/builds of a package with the same versionnumber, so in " +"theory nobody will have these problems and therefore all these extra checks " +"are useless." +msgstr "" +"&apt-ftparchive; põe em cache o máximo possível de metadados numa base de " +"dados de cache. Se os pacotes forem recompilados e/ou republicados de novo " +"com a mesma versão, irá originar problemas porque serão usados os metadados " +"desactualizados em cache como o tamanho e sumários de verificação. Com esta " +"opção activa isto não irá mais acontecer porque será verificado se o " +"ficheiro foi alterado. Note que esta opção vem regulada para " +"\"<literal>false</literal>\" por predefinição pois não é recomendado " +"disponibilizar múltiplas versões/compilações de um pacote com o mesmo número " +"de versão, portanto em teoria ninguém irá ter estes problemas e então todas " +"as verificações extras serão desnecessárias." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-ftparchive.1.xml:567 +msgid "<option>APT::FTPArchive::LongDescription</option>" +msgstr "<option>APT::FTPArchive::LongDescription</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-ftparchive.1.xml:569 +msgid "" +"This configuration option defaults to \"<literal>true</literal>\" and should " +"only be set to <literal>\"false\"</literal> if the Archive generated with " +"&apt-ftparchive; also provides <filename>Translation</filename> files. Note " +"that it is currently not possible to create these files with <command>apt-" +"ftparchive</command>." +msgstr "" +"Esta opção de configuração tem a predefinição de \"<literal>true</literal>\" " +"e deve apenas ser definida para <literal>\"false\"</literal> se o Arquivo " +"gerado com &apt-ftparchive; também disponibilizar ficheiros " +"<filename>Translation</filename>. Note que actualmente não é possível criar " +"esses ficheiros com <command>apt-ftparchive</command>." + +#. type: Content of: <refentry><refsect1><title> +#: apt-ftparchive.1.xml:581 apt.conf.5.xml:1029 apt_preferences.5.xml:480 +#: sources.list.5.xml:193 +msgid "Examples" +msgstr "Examples" + +#. type: Content of: <refentry><refsect1><para><programlisting> +#: apt-ftparchive.1.xml:587 +#, no-wrap +msgid "<command>apt-ftparchive</command> packages <replaceable>directory</replaceable> | <command>gzip</command> > <filename>Packages.gz</filename>\n" +msgstr "<command>apt-ftparchive</command> pacotes <replaceable>directório</replaceable> | <command>gzip</command> > <filename>Packages.gz</filename>\n" + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:583 +msgid "" +"To create a compressed Packages file for a directory containing binary " +"packages (.deb): <placeholder type=\"programlisting\" id=\"0\"/>" +msgstr "" +"Para criar um ficheiro Packages comprimido para um directório que contém " +"pacotes binários (.deb): <placeholder type=\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><para> +#: apt-ftparchive.1.xml:597 +msgid "" +"<command>apt-ftparchive</command> returns zero on normal operation, decimal " +"100 on error." +msgstr "" +"<command>apt-ftparchive</command> devolve zero na operação normal, 100 " +"decimal em erro." + +#. The last update date +#. type: Content of: <refentry><refentryinfo> +#: apt-get.8.xml:13 +msgid "" +"&apt-author.jgunthorpe; &apt-author.team; &apt-email; &apt-product; <date>08 " +"November 2008</date>" +msgstr "" +"&apt-author.jgunthorpe; &apt-author.team; &apt-email; &apt-product; <date>08 " +"Novembro 2008</date>" + +#. type: <heading></heading> +#: apt-get.8.xml:22 apt-get.8.xml:29 guide.sgml:96 +msgid "apt-get" +msgstr "apt-get" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt-get.8.xml:30 +msgid "APT package handling utility -- command-line interface" +msgstr "" +"Utilitário de manuseamento de pacotes do APT -- interface de linha de " +"comandos" + +#. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis> +#: apt-get.8.xml:36 +msgid "" +"<command>apt-get</command> <arg><option>-sqdyfmubV</option></arg> <arg> " +"<option>-o= <replaceable>config_string</replaceable> </option> </arg> <arg> " +"<option>-c= <replaceable>config_file</replaceable> </option> </arg> <arg> " +"<option>-t=</option> <group choice='req'> <arg choice='plain'> " +"<replaceable>target_release_name</replaceable> </arg> <arg choice='plain'> " +"<replaceable>target_release_number_expression</replaceable> </arg> <arg " +"choice='plain'> <replaceable>target_release_codename</replaceable> </arg> </" +"group> </arg> <group choice=\"req\"> <arg choice='plain'>update</arg> <arg " +"choice='plain'>upgrade</arg> <arg choice='plain'>dselect-upgrade</arg> <arg " +"choice='plain'>dist-upgrade</arg> <arg choice='plain'>install <arg choice=" +"\"plain\" rep=\"repeat\"><replaceable>pkg</replaceable> <arg> <group " +"choice='req'> <arg choice='plain'> =<replaceable>pkg_version_number</" +"replaceable> </arg> <arg choice='plain'> /<replaceable>target_release_name</" +"replaceable> </arg> <arg choice='plain'> /" +"<replaceable>target_release_codename</replaceable> </arg> </group> </arg> </" +"arg> </arg> <arg choice='plain'>remove <arg choice=\"plain\" rep=\"repeat" +"\"><replaceable>pkg</replaceable></arg></arg> <arg choice='plain'>purge <arg " +"choice=\"plain\" rep=\"repeat\"><replaceable>pkg</replaceable></arg></arg> " +"<arg choice='plain'>source <arg choice=\"plain\" rep=\"repeat" +"\"><replaceable>pkg</replaceable> <arg> <group choice='req'> <arg " +"choice='plain'> =<replaceable>pkg_version_number</replaceable> </arg> <arg " +"choice='plain'> /<replaceable>target_release_name</replaceable> </arg> <arg " +"choice='plain'> /<replaceable>target_release_codename</replaceable> </arg> </" +"group> </arg> </arg> </arg> <arg choice='plain'>build-dep <arg choice=\"plain" +"\" rep=\"repeat\"><replaceable>pkg</replaceable></arg></arg> <arg " +"choice='plain'>check</arg> <arg choice='plain'>clean</arg> <arg " +"choice='plain'>autoclean</arg> <arg choice='plain'>autoremove</arg> <arg " +"choice='plain'> <group choice='req'> <arg choice='plain'>-v</arg> <arg " +"choice='plain'>--version</arg> </group> </arg> <arg choice='plain'> <group " +"choice='req'> <arg choice='plain'>-h</arg> <arg choice='plain'>--help</arg> " +"</group> </arg> </group>" +msgstr "" +"<command>apt-get</command> <arg><option>-sqdyfmubV</option></arg> <arg> " +"<option>-o= <replaceable>string_de_configuração</replaceable> </option> </" +"arg> <arg> <option>-c= <replaceable>ficheiro_de_configuração</replaceable> </" +"option> </arg> <arg> <option>-t=</option> <group choice='req'> <arg " +"choice='plain'> <replaceable>nome_de_lançamento_de_destino</replaceable> </" +"arg> <arg choice='plain'> " +"<replaceable>expressão_de_número_de_lançamento_de_destino</replaceable> </" +"arg> <arg choice='plain'> " +"<replaceable>nome_de_código_do_lançamento_de_destino</replaceable> </arg> </" +"group> </arg> <group choice=\"req\"> <arg choice='plain'>update</arg> <arg " +"choice='plain'>upgrade</arg> <arg choice='plain'>dselect-upgrade</arg> <arg " +"choice='plain'>dist-upgrade</arg> <arg choice='plain'>install <arg choice=" +"\"plain\" rep=\"repeat\"><replaceable>pacote</replaceable> <arg> <group " +"choice='req'> <arg choice='plain'> =<replaceable>número_de_versão_do_pacote</" +"replaceable> </arg> <arg choice='plain'> /" +"<replaceable>nome_do_lançamento_de_destino</replaceable> </arg> <arg " +"choice='plain'> /<replaceable>nome_de_código_do_lançamento_de_destino</" +"replaceable> </arg> </group> </arg> </arg> </arg> <arg choice='plain'>remove " +"<arg choice=\"plain\" rep=\"repeat\"><replaceable>pacote</replaceable></" +"arg></arg> <arg choice='plain'>purge <arg choice=\"plain\" rep=\"repeat" +"\"><replaceable>pacote</replaceable></arg></arg> <arg choice='plain'>source " +"<arg choice=\"plain\" rep=\"repeat\"><replaceable>pacote</replaceable> <arg> " +"<group choice='req'> <arg choice='plain'> " +"=<replaceable>número_de_versão_do_pacote</replaceable> </arg> <arg " +"choice='plain'> /<replaceable>nome_de_lançamento_de_destino</replaceable> </" +"arg> <arg choice='plain'> /" +"<replaceable>nome_de_código_de_lançamento_de_destino</replaceable> </arg> </" +"group> </arg> </arg> </arg> <arg choice='plain'>build-dep <arg choice=\"plain" +"\" rep=\"repeat\"><replaceable>pacote</replaceable></arg></arg> <arg " +"choice='plain'>check</arg> <arg choice='plain'>clean</arg> <arg " +"choice='plain'>autoclean</arg> <arg choice='plain'>autoremove</arg> <arg " +"choice='plain'> <group choice='req'> <arg choice='plain'>-v</arg> <arg " +"choice='plain'>--version</arg> </group> </arg> <arg choice='plain'> <group " +"choice='req'> <arg choice='plain'>-h</arg> <arg choice='plain'>--help</arg> " +"</group> </arg> </group>" + +#. type: Content of: <refentry><refsect1><para> +#: apt-get.8.xml:126 +msgid "" +"<command>apt-get</command> is the command-line tool for handling packages, " +"and may be considered the user's \"back-end\" to other tools using the APT " +"library. Several \"front-end\" interfaces exist, such as &dselect;, " +"&aptitude;, &synaptic;, &gnome-apt; and &wajig;." +msgstr "" +"<command>apt-get</command> é a ferramenta de linha de comandos para lidar " +"com pacotes, e pode ser considerada o \"back-end\" dos utilizadores para " +"outras ferramentas que usam a biblioteca APT. Existem várias interfaces " +"\"front-end\" como o &dselect;, &aptitude;, &synaptic;, &gnome-apt; e " +"&wajig;." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:135 apt-key.8.xml:124 +msgid "update" +msgstr "update" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:136 +msgid "" +"<literal>update</literal> is used to resynchronize the package index files " +"from their sources. The indexes of available packages are fetched from the " +"location(s) specified in <filename>/etc/apt/sources.list</filename>. For " +"example, when using a Debian archive, this command retrieves and scans the " +"<filename>Packages.gz</filename> files, so that information about new and " +"updated packages is available. An <literal>update</literal> should always be " +"performed before an <literal>upgrade</literal> or <literal>dist-upgrade</" +"literal>. Please be aware that the overall progress meter will be incorrect " +"as the size of the package files cannot be known in advance." +msgstr "" +"<literal>update</literal> é usado para re-sincronizar os ficheiros de " +"índices de pacotes a partir das suas fontes. Os índices dos pacotes " +"disponíveis são obtidos a partir das localizações em <filename>/etc/apt/" +"sources.list</filename>. Por exemplo, quando se usa um arquivo Debian, este " +"comando recolhe e analisa os ficheiros <filename>Packages.gz</filename> para " +"que a informação sobre pacotes novos e actualizados fique disponível. Um " +"<literal>update</literal> deve ser sempre executado antes de um " +"<literal>upgrade</literal> ou <literal>dist-upgrade</literal>. Por favor " +"note que a medição do processo total ira estar incorrecta pois o tamanho dos " +"ficheiros de pacotes não pode ser conhecido com antecedência." + +#. type: <tag></tag> +#: apt-get.8.xml:147 guide.sgml:121 +msgid "upgrade" +msgstr "upgrade" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:148 +msgid "" +"<literal>upgrade</literal> is used to install the newest versions of all " +"packages currently installed on the system from the sources enumerated in " +"<filename>/etc/apt/sources.list</filename>. Packages currently installed " +"with new versions available are retrieved and upgraded; under no " +"circumstances are currently installed packages removed, or packages not " +"already installed retrieved and installed. New versions of currently " +"installed packages that cannot be upgraded without changing the install " +"status of another package will be left at their current version. An " +"<literal>update</literal> must be performed first so that <command>apt-get</" +"command> knows that new versions of packages are available." +msgstr "" +"<literal>upgrade</literal> é usado para instalar as versões mais recentes de " +"todos os pacotes presentemente instalados no sistema a partir das fontes " +"enumeradas em <filename>/etc/apt/sources.list</filename>. Os pacotes " +"presentemente instalados com versões novas são obtidos e instalados; em " +"nenhumas circunstâncias os pacotes presentemente instalados serão removidos, " +"nem pacotes já instalados serão obtidos e instalados.Os pacotes " +"presentemente instalados com novas versões e que não possam ser actualizados " +"sem alterarem o estado da instalação de outro pacote serão deixados na " +"versão presente. Deve ser executado primeiro um <literal>update</literal> " +"para que o <command>apt-get</command> fique a saber que estão disponíveis " +"novas versões de pacotes." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:160 +msgid "dselect-upgrade" +msgstr "dselect-upgrade" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:161 +msgid "" +"<literal>dselect-upgrade</literal> is used in conjunction with the " +"traditional Debian packaging front-end, &dselect;. <literal>dselect-upgrade</" +"literal> follows the changes made by &dselect; to the <literal>Status</" +"literal> field of available packages, and performs the actions necessary to " +"realize that state (for instance, the removal of old and the installation of " +"new packages)." +msgstr "" +"<literal>dselect-upgrade</literal> é usado em conjunto com o front-end de " +"pacotes Debian tradicional, &dselect;. <literal>dselect-upgrade</literal> " +"segue as alterações feitas pelo &dselect; ao campo <literal>Status</literal> " +"dos pacotes disponíveis, e executa as acções necessárias para realizar esse " +"estado (por exemplo, a remoção de pacotes antigos e a instalação de novos)." + +#. type: <tag></tag> +#: apt-get.8.xml:170 guide.sgml:140 +msgid "dist-upgrade" +msgstr "dist-upgrade" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:171 +msgid "" +"<literal>dist-upgrade</literal> in addition to performing the function of " +"<literal>upgrade</literal>, also intelligently handles changing dependencies " +"with new versions of packages; <command>apt-get</command> has a \"smart\" " +"conflict resolution system, and it will attempt to upgrade the most " +"important packages at the expense of less important ones if necessary. So, " +"<literal>dist-upgrade</literal> command may remove some packages. The " +"<filename>/etc/apt/sources.list</filename> file contains a list of locations " +"from which to retrieve desired package files. See also &apt-preferences; " +"for a mechanism for overriding the general settings for individual packages." +msgstr "" +"<literal>dist-upgrade</literal> adicionalmente a executar a função do " +"<literal>upgrade</literal>, também lida inteligentemente com as alterações " +"de dependências com as novas versões de pacotes; o <command>apt-get</" +"command> tem um sistema de resolução de conflitos 'inteligente', que irá " +"tentar actualizar os pacotes mais importantes a custo dos pacotes menos " +"importantes, caso necessário. Portanto, o comando <literal>dist-upgrade</" +"literal> pode remover alguns pacotes. O ficheiro <filename>/etc/apt/sources." +"list</filename> contém uma lista de localizações de onde obter os ficheiros " +"de pacotes desejados. Veja também &apt-preferences; para um mecanismo para " +"sobrepor as definições gerais em pacotes individuais." + +#. type: <tag></tag> +#: apt-get.8.xml:183 guide.sgml:131 +msgid "install" +msgstr "install" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:185 +msgid "" +"<literal>install</literal> is followed by one or more packages desired for " +"installation or upgrading. Each package is a package name, not a fully " +"qualified filename (for instance, in a Debian GNU/Linux system, libc6 would " +"be the argument provided, not <literal>libc6_1.9.6-2.deb</literal>). All " +"packages required by the package(s) specified for installation will also be " +"retrieved and installed. The <filename>/etc/apt/sources.list</filename> " +"file is used to locate the desired packages. If a hyphen is appended to the " +"package name (with no intervening space), the identified package will be " +"removed if it is installed. Similarly a plus sign can be used to designate " +"a package to install. These latter features may be used to override " +"decisions made by apt-get's conflict resolution system." +msgstr "" +"<literal>install</literal> é seguido por um ou mais pacotes desejados para " +"instalação ou actualização. Cada pacote é um nome de pacote, não um nome de " +"ficheiro completamente qualificado (por exemplo, num sistema Debian GNU/" +"Linux, libc6 seria o argumento fornecido e não <literal>libc6_1.9.6-2.deb</" +"literal>). Todos os pacotes necessários pelos pacotes especificados para " +"instalação irão também ser obtidos e instalados. O ficheiro <filename>/etc/" +"apt/sources.list</filename> é usado para localizar os pacotes desejados. Se " +"for acrescentado um sinal menos (-) ao nome do pacote (sem nenhum espaço a " +"separar), o pacote identificado irá ser removido se estiver instalado. À " +"semelhança, um sinal mais (+) pode ser usado para designar um pacote a " +"instalar. Estas últimas funcionalidades podem ser usadas para sobrepor " +"decisões feitas pelo sistema de resolução de conflitos do apt-get." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:203 +msgid "" +"A specific version of a package can be selected for installation by " +"following the package name with an equals and the version of the package to " +"select. This will cause that version to be located and selected for install. " +"Alternatively a specific distribution can be selected by following the " +"package name with a slash and the version of the distribution or the Archive " +"name (stable, testing, unstable)." +msgstr "" +"Pode ser seleccionada para instalação uma versão específica de um pacote ao " +"continuar o nome do pacote com um igual (=) e a versão do pacote a " +"seleccionar. Isto irá fazer com que essa versão seja localizada e " +"seleccionada para instalação. Alternativamente pode ser seleccionada uma " +"distribuição específica ao continuar o nome do pacote com uma slash (/) e a " +"versão da distribuição ou o nome de Arquivo (stable, testing, unstable)." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:210 +msgid "" +"Both of the version selection mechanisms can downgrade packages and must be " +"used with care." +msgstr "" +"Ambos os mecanismos de selecção de versão podem regredir pacotes (downgrade) " +"e devem ser usados com cuidado." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:213 +msgid "" +"This is also the target to use if you want to upgrade one or more already-" +"installed packages without upgrading every package you have on your system. " +"Unlike the \"upgrade\" target, which installs the newest version of all " +"currently installed packages, \"install\" will install the newest version of " +"only the package(s) specified. Simply provide the name of the package(s) " +"you wish to upgrade, and if a newer version is available, it (and its " +"dependencies, as described above) will be downloaded and installed." +msgstr "" +"Este é também o objectivo a usar se deseja actualizar um ou mais pacotes já " +"instalados sem actualizar todos os pacotes que tem no seu sistema. Ao " +"contrário do objectivo \"upgrade\", o qual instala as versões mais recentes " +"de todos os pacotes presentemente instalados, o \"install\" irá instalar a " +"versão mais recente apenas dos pacotes especificados. Simplesmente forneça o " +"nome do(s) pacote(s) que deseja actualizar, e se estiver disponível uma nova " +"versão, ela ( e as suas dependências, como descrito em cima) serão " +"descarregadas e instaladas." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:224 +msgid "" +"Finally, the &apt-preferences; mechanism allows you to create an alternative " +"installation policy for individual packages." +msgstr "" +"Finalmente, o mecanismo &apt-preferences; permite-lhe criar uma política de " +"instalação alternativa para pacotes individuais." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:228 +msgid "" +"If no package matches the given expression and the expression contains one " +"of '.', '?' or '*' then it is assumed to be a POSIX regular expression, and " +"it is applied to all package names in the database. Any matches are then " +"installed (or removed). Note that matching is done by substring so 'lo.*' " +"matches 'how-lo' and 'lowest'. If this is undesired, anchor the regular " +"expression with a '^' or '$' character, or create a more specific regular " +"expression." +msgstr "" +"Se nenhum pacote coincidir com a expressão fornecida e a expressão conter um " +"de '.', '?' ou '*' então é assumido ser uma expressão regular POSIX, e é " +"aplicada a todos os nomes de pacotes da base de dados. Quaisquer " +"correspondências são então instaladas (ou removidas). Note que a " +"correspondência é feita por substring, portanto 'lo.*' corresponde a 'how-" +"lo' e 'lowest'. Se isto for indesejável, ancore a expressão regular com a " +"caractere '^' ou '$', para criar uma expressão regular mais específica." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:237 +msgid "remove" +msgstr "remove" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:238 +msgid "" +"<literal>remove</literal> is identical to <literal>install</literal> except " +"that packages are removed instead of installed. Note the removing a package " +"leaves its configuration files in system. If a plus sign is appended to the " +"package name (with no intervening space), the identified package will be " +"installed instead of removed." +msgstr "" +"<literal>remove</literal> é idêntico a <literal>install</literal> à " +"excepção que os pacotes são removidos em vez de instalados. Note que remover " +"um pacote deixa os seus ficheiros de configuração no sistema. Se um sinal " +"mais (+) for acrescentado ao nome do pacote (sem nenhum espaço a separar), o " +"pacote identificado será instalado em vez de removido." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:245 +msgid "purge" +msgstr "purge" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:246 +msgid "" +"<literal>purge</literal> is identical to <literal>remove</literal> except " +"that packages are removed and purged (any configuration files are deleted " +"too)." +msgstr "" +"<literal>purge</literal> é idêntico ao <literal>remove</literal> com a " +"excepção que os pacotes são removidos e purgados (quaisquer ficheiros de " +"configuração são também apagados)." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:250 +msgid "source" +msgstr "source" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:251 +msgid "" +"<literal>source</literal> causes <command>apt-get</command> to fetch source " +"packages. APT will examine the available packages to decide which source " +"package to fetch. It will then find and download into the current directory " +"the newest available version of that source package while respect the " +"default release, set with the option <literal>APT::Default-Release</" +"literal>, the <option>-t</option> option or per package with the " +"<literal>pkg/release</literal> syntax, if possible." +msgstr "" +"<literal>source</literal> faz com que o <command>apt-get</command> procure " +"pacotes fonte. O APT irá examinar os pacotes disponíveis para decidir qual " +"pacote fonte obter. Irá então encontrar e descarregar para o directório " +"actual a versão disponível mais recente desse pacote fonte enquanto respeita " +"o lançamento predefinido, definido com a opção <literal>APT::Default-" +"Release</literal>, a opção <option>-t</option> ou por pacote com a sintaxe " +"<literal>pkg/release</literal>, se possível." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:259 +msgid "" +"Source packages are tracked separately from binary packages via <literal>deb-" +"src</literal> type lines in the &sources-list; file. This means that you " +"will need to add such a line for each repository you want to get sources " +"from. If you don't do this you will properly get another (newer, older or " +"none) source version than the one you have installed or could install." +msgstr "" +"Os pacotes fonte são acompanhados em separado dos pacotes binários via linha " +"do tipo <literal>deb-src</literal> no ficheiro &sources-list;. Isto quer " +"dizer que você precisa de adicionar tal linha para cada repositório de onde " +"deseja obter fontes. Se você não fizer isto, irá provavelmente obter outra " +"versão de fonte (mais recente, antiga ou nenhuma) que aquela que tem " +"instalada ou pode instalar." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:266 +msgid "" +"If the <option>--compile</option> option is specified then the package will " +"be compiled to a binary .deb using <command>dpkg-buildpackage</command>, if " +"<option>--download-only</option> is specified then the source package will " +"not be unpacked." +msgstr "" +"Se for especificada a opção <option>--compile</option> então o pacote irá " +"ser compilado para um binário .deb usando <command>dpkg-buildpackage</" +"command>, Se for especificado <option>--download-only</option> então o " +"pacote fonte não será desempacotado." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:271 +msgid "" +"A specific source version can be retrieved by postfixing the source name " +"with an equals and then the version to fetch, similar to the mechanism used " +"for the package files. This enables exact matching of the source package " +"name and version, implicitly enabling the <literal>APT::Get::Only-Source</" +"literal> option." +msgstr "" +"Uma versão fonte específica pode ser obtida ao pós-fixar o nome da fonte com " +"um igual (=) e depois a versão a procurar, semelhante ao mecanismo usado " +"para os ficheiros de pacotes. Isto activa a correspondência exacta do pacote " +"fonte, nome e versão, activando implicitamente a opção <literal>APT::Get::" +"Only-Source</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:277 +msgid "" +"Note that source packages are not tracked like binary packages, they exist " +"only in the current directory and are similar to downloading source tar " +"balls." +msgstr "" +"Note que os pacotes fonte não são acompanhados como pacotes binários, eles " +"existem apenas no directório actual e são semelhantes à descarga de tar " +"balls fonte." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:282 +msgid "build-dep" +msgstr "build-dep" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:283 +msgid "" +"<literal>build-dep</literal> causes apt-get to install/remove packages in an " +"attempt to satisfy the build dependencies for a source package." +msgstr "" +"<literal>build-dep</literal> faz o apt-get instalar/remover pacotes numa " +"tentativa de satisfazer dependências de compilação para um pacote fonte." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:287 +msgid "check" +msgstr "check" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:288 +msgid "" +"<literal>check</literal> is a diagnostic tool; it updates the package cache " +"and checks for broken dependencies." +msgstr "" +"<literal>check</literal> é uma ferramenta de diagnóstico; actualiza a cache " +"de pacotes e verifica por dependências quebradas." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:293 +msgid "" +"<literal>clean</literal> clears out the local repository of retrieved " +"package files. It removes everything but the lock file from " +"<filename>&cachedir;/archives/</filename> and <filename>&cachedir;/archives/" +"partial/</filename>. When APT is used as a &dselect; method, <literal>clean</" +"literal> is run automatically. Those who do not use dselect will likely " +"want to run <literal>apt-get clean</literal> from time to time to free up " +"disk space." +msgstr "" +"<literal>clean</literal> limpa o repositório local dos ficheiros de pacotes " +"obtidos. Remove tudo excepto o ficheiro lock de <filename>&cachedir;/" +"archives/</filename> e <filename>&cachedir;/archives/partial/</filename>. " +"Quando o APT é usado com um método &dselect;, <literal>clean</literal> é " +"executado automaticamente. Aqueles que não usam o dselect irão provavelmente " +"querer executar <literal>apt-get clean</literal> de tempos a tempos para " +"libertar espaço do disco." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:302 +msgid "autoclean" +msgstr "autoclean" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:303 +msgid "" +"Like <literal>clean</literal>, <literal>autoclean</literal> clears out the " +"local repository of retrieved package files. The difference is that it only " +"removes package files that can no longer be downloaded, and are largely " +"useless. This allows a cache to be maintained over a long period without it " +"growing out of control. The configuration option <literal>APT::Clean-" +"Installed</literal> will prevent installed packages from being erased if it " +"is set to off." +msgstr "" +"Tal como o <literal>clean</literal>, <literal>autoclean</literal> limpa o " +"repositório local de ficheiros de pacotes obtidos. A diferença é que apenas " +"remove ficheiros de pacotes que já não podem ser mais descarregados, e são " +"na maioria dos casos inúteis. Isto permite a manutenção de uma cache durante " +"um longo período sem que ela cresça descontroladamente. A opção de " +"configuração <literal>APT::Clean-Installed</literal> irá prevenir que " +"pacotes instalados sejam apagados se estiver definida para 'off'." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:312 +msgid "autoremove" +msgstr "autoremove" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:313 +msgid "" +"<literal>autoremove</literal> is used to remove packages that were " +"automatically installed to satisfy dependencies for some package and that " +"are no more needed." +msgstr "" +"<literal>autoremove</literal> é usado para remover pacotes que foram " +"instalados automaticamente para satisfazer dependências de algum pacote e " +"que já não são necessários." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:323 apt-get.8.xml:429 +msgid "<option>--no-install-recommends</option>" +msgstr "<option>--no-install-recommends</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:324 +msgid "" +"Do not consider recommended packages as a dependency for installing. " +"Configuration Item: <literal>APT::Install-Recommends</literal>." +msgstr "" +"Não considera pacotes recomendados como dependências para instalação. Item " +"de Configuração: <literal>APT::Install-Recommends</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:328 +msgid "<option>--download-only</option>" +msgstr "<option>--download-only</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:329 +msgid "" +"Download only; package files are only retrieved, not unpacked or installed. " +"Configuration Item: <literal>APT::Get::Download-Only</literal>." +msgstr "" +"Apenas descarrega; os ficheiros pacotes são apenas obtidos, não são " +"desempacotados nem instalados. Item de Configuração: <literal>APT::Get::" +"Download-Only</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:333 +msgid "<option>--fix-broken</option>" +msgstr "<option>--fix-broken</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:334 +msgid "" +"Fix; attempt to correct a system with broken dependencies in place. This " +"option, when used with install/remove, can omit any packages to permit APT " +"to deduce a likely solution. If packages are specified, these have to " +"completely correct the problem. The option is sometimes necessary when " +"running APT for the first time; APT itself does not allow broken package " +"dependencies to exist on a system. It is possible that a system's dependency " +"structure can be so corrupt as to require manual intervention (which usually " +"means using &dselect; or <command>dpkg --remove</command> to eliminate some " +"of the offending packages). Use of this option together with <option>-m</" +"option> may produce an error in some situations. Configuration Item: " +"<literal>APT::Get::Fix-Broken</literal>." +msgstr "" +"Corrige; tenta corrigir um sistema com dependências quebradas no lugar. Esta " +"opção, quando usada com install/remove, pode omitir quaisquer pacotes para " +"permitir ao APT deduzir uma solução provável. Se forem especificados " +"pacotes, este têm de corrigir completamente o problema. A opção é por vezes " +"necessária quando se corre o APT pela primeira vez. O próprio APT não " +"permite que existam num sistema dependências de pacotes quebradas. É " +"possível que uma estrutura de dependências de um sistema esteja tão " +"corrompida ao ponto de requerer intervenção manual (o que normalmente " +"significa usar o &dselect; ou <command>dpkg --remove</command> para eliminar " +"alguns dos pacotes ofensivos). O uso desta opção juntamente com <option>-m</" +"option> pode produzir um erro em algumas situações. Item de Configuração: " +"<literal>APT::Get::Fix-Broken</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:347 +msgid "<option>--ignore-missing</option>" +msgstr "<option>--ignore-missing</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:348 +msgid "<option>--fix-missing</option>" +msgstr "<option>--fix-missing</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:349 +msgid "" +"Ignore missing packages; If packages cannot be retrieved or fail the " +"integrity check after retrieval (corrupted package files), hold back those " +"packages and handle the result. Use of this option together with <option>-f</" +"option> may produce an error in some situations. If a package is selected " +"for installation (particularly if it is mentioned on the command line) and " +"it could not be downloaded then it will be silently held back. " +"Configuration Item: <literal>APT::Get::Fix-Missing</literal>." +msgstr "" +"Ignora pacotes em falta; Se pacotes não podem ser obtidos ou falham a " +"verificação de integridade após obtenção (ficheiros de pacotes corrompidos), " +"retêm esses pacotes e manuseia o resultado. Usar esta opção em conjunto com " +"<option>-f</option> pode produzir erros em algumas situações. Se um pacote " +"for seleccionado para instalação (particularmente se for mencionado na linha " +"de comandos) e não pode ser descarregado estão será retido em silêncio. Item " +"de Configuração: <literal>APT::Get::Fix-Missing</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:359 +msgid "<option>--no-download</option>" +msgstr "<option>--no-download</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:360 +msgid "" +"Disables downloading of packages. This is best used with <option>--ignore-" +"missing</option> to force APT to use only the .debs it has already " +"downloaded. Configuration Item: <literal>APT::Get::Download</literal>." +msgstr "" +"Desactiva a descarga de pacotes. Isto é melhor ser usado com <option>--" +"ignore-missing</option> para forçar o APT a usar os .debs que já foram " +"descarregados. Item de Configuração: <literal>APT::Get::Download</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:367 +msgid "" +"Quiet; produces output suitable for logging, omitting progress indicators. " +"More q's will produce more quiet up to a maximum of 2. You can also use " +"<option>-q=#</option> to set the quiet level, overriding the configuration " +"file. Note that quiet level 2 implies <option>-y</option>, you should never " +"use -qq without a no-action modifier such as -d, --print-uris or -s as APT " +"may decided to do something you did not expect. Configuration Item: " +"<literal>quiet</literal>." +msgstr "" +"Silencioso; produz saída apropriada para registar em log, omitindo " +"indicadores de progresso. Mais q's irá resultar em mais silêncio até o " +"máximo de 2. Você também pode usar <option>-q=#</option> para definir o " +"nível de silêncio, sobrepondo o ficheiro de configuração. Note que o " +"silêncio nível 2 implica <option>-y</option>, você nunca deve usar -qq sem " +"um modificador de 'nenhuma acção' tal como -d, --print-uris ou -s pois o APT " +"pode decidir fazer algo que você não esperava. Item de Configuração: " +"<literal>quiet</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:377 +msgid "<option>--simulate</option>" +msgstr "<option>--simulate</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:379 +msgid "<option>--dry-run</option>" +msgstr "<option>--dry-run</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:382 +msgid "" +"No action; perform a simulation of events that would occur but do not " +"actually change the system. Configuration Item: <literal>APT::Get::" +"Simulate</literal>." +msgstr "" +"Nenhuma acção; executa uma simulação dos eventos que irão ocorrer mas na " +"realidade não altera o sistema. Item de Configuração: <literal>APT::Get::" +"Simulate</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:386 +msgid "" +"Simulation run as user will deactivate locking (<literal>Debug::NoLocking</" +"literal>) automatic. Also a notice will be displayed indicating that this " +"is only a simulation, if the option <literal>APT::Get::Show-User-Simulation-" +"Note</literal> is set (Default: true). Neither NoLocking nor the notice " +"will be triggered if run as root (root should know what he is doing without " +"further warnings by <literal>apt-get</literal>)." +msgstr "" +"Uma simulação corrida como utilizador irá automaticamente desactivar o " +"bloqueio (<literal>Debug::NoLocking</literal>). Também será mostrado um " +"aviso indicando que é apenas uma simulação, se a opção <literal>APT::Get::" +"Show-User-Simulation-Note</literal> estiver definida (a predefinição é " +"verdadeira). Nem o NoLocking nem o aviso serão activados se corrido como " +"root (o root deve saber o que está a fazer sem mais avisos do <literal>apt-" +"get</literal>)." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:392 +msgid "" +"Simulate prints out a series of lines each one representing a dpkg " +"operation, Configure (Conf), Remove (Remv), Unpack (Inst). Square brackets " +"indicate broken packages and empty set of square brackets meaning breaks " +"that are of no consequence (rare)." +msgstr "" +"A simulação escreve uma série de linhas cada uma representando uma operação " +"do dpkg, Configurar (Conf), Remover (Remv), Desempacotar (Inst). Parênteses " +"rectos ([]) indicam pacotes quebrados e conjuntos de parênteses rectos " +"vazios significam quebras que não têm consequência (raro)." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:399 +msgid "<option>-y</option>" +msgstr "<option>-y</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:399 +msgid "<option>--yes</option>" +msgstr "<option>--yes</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:400 +msgid "<option>--assume-yes</option>" +msgstr "<option>--assume-yes</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:401 +msgid "" +"Automatic yes to prompts; assume \"yes\" as answer to all prompts and run " +"non-interactively. If an undesirable situation, such as changing a held " +"package, trying to install a unauthenticated package or removing an " +"essential package occurs then <literal>apt-get</literal> will abort. " +"Configuration Item: <literal>APT::Get::Assume-Yes</literal>." +msgstr "" +"Responde sim automaticamente aos avisos; assume \"yes\" como resposta a " +"todos os avisos e corre não-interactivamente. Se uma situação indesejável " +"ocorrer, tal como alterar um pacote retido, tentar instalar um pacote não " +"autenticado ou remover um pacote essencial, então o <literal>apt-get</" +"literal> irá abortar. Item de Configuração: <literal>APT::Get::Assume-Yes</" +"literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:408 +msgid "<option>-u</option>" +msgstr "<option>-u</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:408 +msgid "<option>--show-upgraded</option>" +msgstr "<option>--show-upgraded</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:409 +msgid "" +"Show upgraded packages; Print out a list of all packages that are to be " +"upgraded. Configuration Item: <literal>APT::Get::Show-Upgraded</literal>." +msgstr "" +"Mostra pacotes actualizados; Escreve uma lista de todos os pacotes que estão " +"prestes a ser actualizados. Item de Configuração: <literal>APT::Get::Show-" +"Upgraded</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:414 +msgid "<option>-V</option>" +msgstr "<option>-V</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:414 +msgid "<option>--verbose-versions</option>" +msgstr "<option>--verbose-versions</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:415 +msgid "" +"Show full versions for upgraded and installed packages. Configuration Item: " +"<literal>APT::Get::Show-Versions</literal>." +msgstr "" +"Mostra as versões completas para pacotes actualizados e instalados. Item de " +"Configuração: <literal>APT::Get::Show-Versions</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:419 +msgid "<option>-b</option>" +msgstr "<option>-b</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:419 +msgid "<option>--compile</option>" +msgstr "<option>--compile</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:420 +msgid "<option>--build</option>" +msgstr "<option>--build</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:421 +msgid "" +"Compile source packages after downloading them. Configuration Item: " +"<literal>APT::Get::Compile</literal>." +msgstr "" +"Compila pacotes fonte após os descarregar. Item de Configuração: " +"<literal>APT::Get::Compile</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:425 +msgid "<option>--install-recommends</option>" +msgstr "<option>--install-recommends</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:426 +msgid "Also install recommended packages." +msgstr "Também instala pacotes recomendados." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:430 +msgid "Do not install recommended packages." +msgstr "Não instala pacotes recomendados." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:433 +msgid "<option>--ignore-hold</option>" +msgstr "<option>--ignore-hold</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:434 +msgid "" +"Ignore package Holds; This causes <command>apt-get</command> to ignore a " +"hold placed on a package. This may be useful in conjunction with " +"<literal>dist-upgrade</literal> to override a large number of undesired " +"holds. Configuration Item: <literal>APT::Ignore-Hold</literal>." +msgstr "" +"Ignora pacotes retidos; Isto faz com que o <command>apt-get</command> ignore " +"a retenção de um pacote. Isto pode ser útil em conjunto com <literal>dist-" +"upgrade</literal> para sobrepor um grande número de retenções não desejadas. " +"Item de Configuração: <literal>APT::Ignore-Hold</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:440 +msgid "<option>--no-upgrade</option>" +msgstr "<option>--no-upgrade</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:441 +msgid "" +"Do not upgrade packages; When used in conjunction with <literal>install</" +"literal>, <literal>no-upgrade</literal> will prevent packages on the command " +"line from being upgraded if they are already installed. Configuration Item: " +"<literal>APT::Get::Upgrade</literal>." +msgstr "" +"Não actualiza pacotes; Quando usado em conjunto com <literal>install</" +"literal>, o <literal>no-upgrade</literal> irá prevenir que pacotes sejam " +"actualizados na linha de comandos se estes já estiverem instalados. Item de " +"Configuração: <literal>APT::Get::Upgrade</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:447 +msgid "<option>--only-upgrade</option>" +msgstr "<option>--only-upgrade</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:448 +msgid "" +"Do not install new packages; When used in conjunction with <literal>install</" +"literal>, <literal>only-upgrade</literal> will prevent packages on the " +"command line from being upgraded if they are not already installed. " +"Configuration Item: <literal>APT::Get::Only-Upgrade</literal>." +msgstr "" +"Não instala pacotes novos; Quando usado em conjunto com <literal>install</" +"literal>, o <literal>only-upgrade</literal> irá prevenir que pacotes sejam " +"actualizados na linha de comandos se estes não estiverem já instalados. Item " +"de Configuração: <literal>APT::Get::Only-Upgrade</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:454 +msgid "<option>--force-yes</option>" +msgstr "<option>--force-yes</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:455 +msgid "" +"Force yes; This is a dangerous option that will cause apt to continue " +"without prompting if it is doing something potentially harmful. It should " +"not be used except in very special situations. Using <literal>force-yes</" +"literal> can potentially destroy your system! Configuration Item: " +"<literal>APT::Get::force-yes</literal>." +msgstr "" +"Força o sim; Esta é uma opção perigosa que irá fazer com que o apt continue " +"sem avisar quando está a fazer algo potencialmente prejudicial. Não deve ser " +"usado excepto em situações muito especiais. Usar o <literal>force-yes</" +"literal> pode destruir potencialmente o seu sistema! Item de Configuração: " +"<literal>APT::Get::force-yes</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:462 +msgid "<option>--print-uris</option>" +msgstr "<option>--print-uris</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:463 +msgid "" +"Instead of fetching the files to install their URIs are printed. Each URI " +"will have the path, the destination file name, the size and the expected md5 " +"hash. Note that the file name to write to will not always match the file " +"name on the remote site! This also works with the <literal>source</literal> " +"and <literal>update</literal> commands. When used with the <literal>update</" +"literal> command the MD5 and size are not included, and it is up to the user " +"to decompress any compressed files. Configuration Item: <literal>APT::Get::" +"Print-URIs</literal>." +msgstr "" +"Ao invés de ir buscar os ficheiros para instalar, escreve os seus URIs. Cada " +"URI irá ter o caminho, o nome de ficheiro de destino, o tamanho e o hash md5 " +"esperado. Note que o nome de ficheiro a escrever nem sempre irá condizer com " +"o nome do ficheiro no site remoto! Isto também funciona com os comandos " +"<literal>source</literal> e <literal>update</literal>. Quando usado com o " +"comando <literal>update</literal> o MD5 e o tamanho não são incluídos, e " +"cabe ao utilizador descomprimir quaisquer ficheiros comprimidos. Item de " +"Configuração: <literal>APT::Get::Print-URIs</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:473 +msgid "<option>--purge</option>" +msgstr "<option>--purge</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:474 +msgid "" +"Use purge instead of remove for anything that would be removed. An asterisk " +"(\"*\") will be displayed next to packages which are scheduled to be purged. " +"<option>remove --purge</option> is equivalent to the <option>purge</option> " +"command. Configuration Item: <literal>APT::Get::Purge</literal>." +msgstr "" +"Usa purgar em vez de remoção para tudo o que seja removido. Um asterisco (\"*" +"\") será mostrado junto dos pacotes que estão agendados para serem purgados. " +"<option>remove --purge</option> é equivalente ao comando <option>purge</" +"option>. Item de Configuração: <literal>APT::Get::Purge</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:481 +msgid "<option>--reinstall</option>" +msgstr "<option>--reinstall</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:482 +msgid "" +"Re-Install packages that are already installed and at the newest version. " +"Configuration Item: <literal>APT::Get::ReInstall</literal>." +msgstr "" +"Re-instala pacotes que já estão instalados e na versão mais recente. Item de " +"Configuração: <literal>APT::Get::ReInstall</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:486 +msgid "<option>--list-cleanup</option>" +msgstr "<option>--list-cleanup</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:487 +msgid "" +"This option defaults to on, use <literal>--no-list-cleanup</literal> to turn " +"it off. When on <command>apt-get</command> will automatically manage the " +"contents of <filename>&statedir;/lists</filename> to ensure that obsolete " +"files are erased. The only reason to turn it off is if you frequently " +"change your source list. Configuration Item: <literal>APT::Get::List-" +"Cleanup</literal>." +msgstr "" +"A predefinição desta opção é ligada, use <literal>--no-list-cleanup</" +"literal> para a desligar. Quando ligada o <command>apt-get</command> irá " +"gerir automaticamente os conteúdos de <filename>&statedir;/lists</filename> " +"para assegurar que os ficheiros obsoletos são apagados. A única razão para " +"desligar isto é no caso de você alterar frequentemente a sua lista de " +"fontes. Item de Configuração: <literal>APT::Get::List-Cleanup</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:496 +msgid "<option>--target-release</option>" +msgstr "<option>--target-release</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:497 +msgid "<option>--default-release</option>" +msgstr "<option>--default-release</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:498 +msgid "" +"This option controls the default input to the policy engine, it creates a " +"default pin at priority 990 using the specified release string. This " +"overrides the general settings in <filename>/etc/apt/preferences</" +"filename>. Specifically pinned packages are not affected by the value of " +"this option. In short, this option lets you have simple control over which " +"distribution packages will be retrieved from. Some common examples might be " +"<option>-t '2.1*'</option>, <option>-t unstable</option> or <option>-t sid</" +"option>. Configuration Item: <literal>APT::Default-Release</literal>; see " +"also the &apt-preferences; manual page." +msgstr "" +"Esta opção controla a entrada predefinida para o motor de políticas, cria um " +"pin predefinido na prioridade 990 usando a string de lançamento " +"especificada. Isto sobrepõe as definições gerais em <filename>/etc/apt/" +"preferences</filename>. Os pacotes com pin específico não são afectados pelo " +"valor desta opção. Em resumo, esta opção permite-lhe ter controlo simples " +"sobre de qual distribuição os pacotes serão obtidos. Alguns exemplos comuns " +"podem ser <option>-t '2.1*'</option>, <option>-t unstable</option> ou " +"<option>-t sid</option>. Item de Configuração: <literal>APT::Default-" +"Release</literal>; veja também o manual &apt-preferences;." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:511 +msgid "<option>--trivial-only</option>" +msgstr "<option>--trivial-only</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:513 +msgid "" +"Only perform operations that are 'trivial'. Logically this can be considered " +"related to <option>--assume-yes</option>, where <option>--assume-yes</" +"option> will answer yes to any prompt, <option>--trivial-only</option> will " +"answer no. Configuration Item: <literal>APT::Get::Trivial-Only</literal>." +msgstr "" +"Apenas executa operações 'triviais'. Na lógica isto pode ser considerado " +"relacionado ao <option>--assume-yes</option>, onde <option>--assume-yes</" +"option> irá responder 'sim' a todos os avisos, <option>--trivial-only</" +"option> irá responder 'não'. Item de Configuração: <literal>APT::Get::" +"Trivial-Only</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:519 +msgid "<option>--no-remove</option>" +msgstr "<option>--no-remove</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:520 +msgid "" +"If any packages are to be removed apt-get immediately aborts without " +"prompting. Configuration Item: <literal>APT::Get::Remove</literal>." +msgstr "" +"Se quaisquer pacotes estiverem para ser removidos, o apt-get aborta " +"imediatamente sem aviso. Item de Configuração: <literal>APT::Get::Remove</" +"literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:525 +msgid "<option>--auto-remove</option>" +msgstr "<option>--auto-remove</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:526 +msgid "" +"If the command is either <literal>install</literal> or <literal>remove</" +"literal>, then this option acts like running <literal>autoremove</literal> " +"command, removing the unused dependency packages. Configuration Item: " +"<literal>APT::Get::AutomaticRemove</literal>." +msgstr "" +"Se o comando for <literal>install</literal> ou <literal>remove</literal>, " +"então esta opção age como se corresse o comando <literal>autoremove</" +"literal>, removendo os pacotes de dependências não utilizados. Item de " +"Configuração: <literal>APT::Get::AutomaticRemove</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:532 +msgid "<option>--only-source</option>" +msgstr "<option>--only-source</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:533 +msgid "" +"Only has meaning for the <literal>source</literal> and <literal>build-dep</" +"literal> commands. Indicates that the given source names are not to be " +"mapped through the binary table. This means that if this option is " +"specified, these commands will only accept source package names as " +"arguments, rather than accepting binary package names and looking up the " +"corresponding source package. Configuration Item: <literal>APT::Get::Only-" +"Source</literal>." +msgstr "" +"Apenas tem significado para os comandos <literal>source</literal> e " +"<literal>build-dep</literal>. Indica que os nomes de fontes fornecidos não " +"são para serem mapeados através da tabela de binários. Isto quer dizer que " +"se esta opção for especificada, estes comandos apenas irão aceitar nomes de " +"pacotes fonte como argumentos, em vez de aceitarem nomes de pacotes binários " +"e procurar o pacote fonte correspondente. Item de Configuração: " +"<literal>APT::Get::Only-Source</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:543 +msgid "<option>--diff-only</option>" +msgstr "<option>--diff-only</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:543 +msgid "<option>--dsc-only</option>" +msgstr "<option>--dsc-only</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:543 +msgid "<option>--tar-only</option>" +msgstr "<option>--tar-only</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:544 +msgid "" +"Download only the diff, dsc, or tar file of a source archive. Configuration " +"Item: <literal>APT::Get::Diff-Only</literal>, <literal>APT::Get::Dsc-Only</" +"literal>, and <literal>APT::Get::Tar-Only</literal>." +msgstr "" +"Descarrega apenas o ficheiro diff, dsc, ou tar de um pacote fonte. Item de " +"Configuração: <literal>APT::Get::Diff-Only</literal>, <literal>APT::Get::Dsc-" +"Only</literal>, e <literal>APT::Get::Tar-Only</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:549 +msgid "<option>--arch-only</option>" +msgstr "<option>--arch-only</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:550 +msgid "" +"Only process architecture-dependent build-dependencies. Configuration Item: " +"<literal>APT::Get::Arch-Only</literal>." +msgstr "" +"Apenas processa dependências de compilação dependentes da arquitectura. Item " +"de Configuração: <literal>APT::Get::Arch-Only</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-get.8.xml:554 +msgid "<option>--allow-unauthenticated</option>" +msgstr "<option>--allow-unauthenticated</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-get.8.xml:555 +msgid "" +"Ignore if packages can't be authenticated and don't prompt about it. This " +"is useful for tools like pbuilder. Configuration Item: <literal>APT::Get::" +"AllowUnauthenticated</literal>." +msgstr "" +"Ignora se os pacotes não podem ser autenticados e não avisa sobre isso. Isto " +"é útil para ferramentas como o pbuilder. Item de Configuração: <literal>APT::" +"Get::AllowUnauthenticated</literal>." + +#. type: Content of: <refentry><refsect1><variablelist> +#: apt-get.8.xml:568 +msgid "" +"&file-sourceslist; &file-aptconf; &file-preferences; &file-cachearchives; " +"&file-statelists;" +msgstr "" +"&file-sourceslist; &file-aptconf; &file-preferences; &file-cachearchives; " +"&file-statelists;" + +#. type: Content of: <refentry><refsect1><para> +#: apt-get.8.xml:577 +msgid "" +"&apt-cache;, &apt-cdrom;, &dpkg;, &dselect;, &sources-list;, &apt-conf;, " +"&apt-config;, &apt-secure;, The APT User's guide in &guidesdir;, &apt-" +"preferences;, the APT Howto." +msgstr "" +"&apt-cache;, &apt-cdrom;, &dpkg;, &dselect;, &sources-list;, &apt-conf;, " +"&apt-config;, &apt-secure;, O guia de utilizadores do The APT em " +"&guidesdir;, &apt-preferences;, o Howto do APT." + +#. type: Content of: <refentry><refsect1><para> +#: apt-get.8.xml:583 +msgid "" +"<command>apt-get</command> returns zero on normal operation, decimal 100 on " +"error." +msgstr "" +"<command>apt-get</command> devolve zero na operação normal, 100 decimal em " +"erro." + +#. type: Content of: <refentry><refsect1><title> +#: apt-get.8.xml:586 +msgid "ORIGINAL AUTHORS" +msgstr "AUTORES ORIGINAIS" + +#. type: Content of: <refentry><refsect1><para> +#: apt-get.8.xml:587 +msgid "&apt-author.jgunthorpe;" +msgstr "&apt-author.jgunthorpe;" + +#. type: Content of: <refentry><refsect1><title> +#: apt-get.8.xml:590 +msgid "CURRENT AUTHORS" +msgstr "AUTORES ACTUAIS" + +#. type: Content of: <refentry><refsect1><para> +#: apt-get.8.xml:592 +msgid "&apt-author.team;" +msgstr "&apt-author.team;" + +#. type: Content of: <refentry><refnamediv><refname> +#: apt-key.8.xml:14 apt-key.8.xml:21 +msgid "apt-key" +msgstr "apt-key" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt-key.8.xml:22 +msgid "APT key management utility" +msgstr "Utilitário de gestão de chaves do APT" + +#. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis> +#: apt-key.8.xml:28 +msgid "" +"<command>apt-key</command> <arg><option>--keyring <replaceable>filename</" +"replaceable></option></arg> <arg><replaceable>command</replaceable></arg> " +"<arg rep=\"repeat\"><option><replaceable>arguments</replaceable></option></" +"arg>" +msgstr "" +"<command>apt-key</command> <arg><option>--keyring <replaceable>nome de " +"ficheiro</replaceable></option></arg> <arg><replaceable>comando</" +"replaceable></arg> <arg rep=\"repeat\"><option><replaceable>argumentos</" +"replaceable></option></arg>" + +#. type: Content of: <refentry><refsect1><para> +#: apt-key.8.xml:37 +msgid "" +"<command>apt-key</command> is used to manage the list of keys used by apt to " +"authenticate packages. Packages which have been authenticated using these " +"keys will be considered trusted." +msgstr "" +"<command>apt-key</command> é usado para gerir uma lista de chaves usadas " +"pelo apt para autenticar pacotes. Os pacotes que foram autenticados com " +"estas chaves serão considerados de confiança." + +#. type: Content of: <refentry><refsect1><title> +#: apt-key.8.xml:43 +msgid "Commands" +msgstr "Comandos" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:45 +msgid "add <replaceable>filename</replaceable>" +msgstr "add <replaceable>nome-de-ficheiro</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:49 +msgid "" +"Add a new key to the list of trusted keys. The key is read from " +"<replaceable>filename</replaceable>, or standard input if " +"<replaceable>filename</replaceable> is <literal>-</literal>." +msgstr "" +"Adiciona uma chave nova à lista de chaves de confiança. A chave é lida de " +"<replaceable>nome de ficheiro</replaceable>, ou entrada standard se " +"<replaceable>nome de ficheiro</replaceable> for <literal>-</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:57 +msgid "del <replaceable>keyid</replaceable>" +msgstr "del <replaceable>id de chave</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:61 +msgid "Remove a key from the list of trusted keys." +msgstr "Remove uma chave da lista de chaves de confiança." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:68 +msgid "export <replaceable>keyid</replaceable>" +msgstr "export <replaceable>id de chave</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:72 +msgid "Output the key <replaceable>keyid</replaceable> to standard output." +msgstr "" +"Escreve o <replaceable>id de chave</replaceable> da chave na saída standard." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:79 +msgid "exportall" +msgstr "exportall" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:83 +msgid "Output all trusted keys to standard output." +msgstr "Escreve todas as chaves de confiança na saída standard." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:90 +msgid "list" +msgstr "list" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:94 +msgid "List trusted keys." +msgstr "Lista as chaves de confiança." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:101 +msgid "finger" +msgstr "finger" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:105 +msgid "List fingerprints of trusted keys." +msgstr "Lista as fingerprints das chaves de confiança." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:112 +msgid "adv" +msgstr "adv" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:116 +msgid "" +"Pass advanced options to gpg. With adv --recv-key you can download the " +"public key." +msgstr "" +"Passa opções avançadas ao gpg. Com adv --recv-key você pode descarregar a " +"chave pública." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:128 +msgid "" +"Update the local keyring with the keyring of Debian archive keys and removes " +"from the keyring the archive keys which are no longer valid." +msgstr "" +"Actualiza o chaveiro local com o chaveiro das chaves de arquivos Debian e " +"remove do chaveiro as chaves de arquivo que já não são válidas." + +#. type: Content of: <refentry><refsect1><para> +#: apt-key.8.xml:140 +msgid "" +"Note that options need to be defined before the commands described in the " +"previous section." +msgstr "" +"Note que as opções precisam ser definidas antes dos comandos descritos na " +"secção prévia." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:142 +msgid "--keyring <replaceable>filename</replaceable>" +msgstr "--keyring <replaceable>nome-de-ficheiro</replaceable>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:143 +msgid "" +"With this option it is possible to specify a specific keyring file the " +"command should operate on. The default is that a command is executed on the " +"<filename>trusted.gpg</filename> file as well as on all parts in the " +"<filename>trusted.gpg.d</filename> directory, through <filename>trusted.gpg</" +"filename> is the primary keyring which means that e.g. new keys are added to " +"this one." +msgstr "" +"Com esta opção é possível especificar um ficheiro de chaveiro específico com " +"o qual o comando deve operar. A predefinição é que um comando é executado no " +"ficheiro <filename>trusted.gpg</filename> assim como em todas as partes do " +"directório <filename>trusted.gpg.d</filename>, assim <filename>trusted.gpg</" +"filename> é o chaveiro principal o que significa que, por exemplo, as novas " +"chaves são adicionadas a este." + +#. type: Content of: <refentry><refsect1><variablelist> +#: apt-key.8.xml:156 +msgid "&file-trustedgpg;" +msgstr "&file-trustedgpg;" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:158 +msgid "<filename>/etc/apt/trustdb.gpg</filename>" +msgstr "<filename>/etc/apt/trustdb.gpg</filename>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:159 +msgid "Local trust database of archive keys." +msgstr "Base de dados local de confiança de chaves de arquivos." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:162 +msgid "<filename>/usr/share/keyrings/debian-archive-keyring.gpg</filename>" +msgstr "<filename>/usr/share/keyrings/debian-archive-keyring.gpg</filename>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:163 +msgid "Keyring of Debian archive trusted keys." +msgstr "Chaveiro das chaves de confiança dos arquivos Debian." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-key.8.xml:166 +msgid "" +"<filename>/usr/share/keyrings/debian-archive-removed-keys.gpg</filename>" +msgstr "" +"<filename>/usr/share/keyrings/debian-archive-removed-keys.gpg</filename>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-key.8.xml:167 +msgid "Keyring of Debian archive removed trusted keys." +msgstr "Chaveiro das chaves de confiança removidas dos arquivos Debian." + +#. type: Content of: <refentry><refsect1><para> +#: apt-key.8.xml:176 +msgid "&apt-get;, &apt-secure;" +msgstr "&apt-get;, &apt-secure;" + +#. The last update date +#. type: Content of: <refentry><refentryinfo> +#: apt-mark.8.xml:13 +msgid "" +"&apt-author.moconnor; &apt-author.team; &apt-email; &apt-product; <date>9 " +"August 2009</date>" +msgstr "" +"&apt-author.moconnor; &apt-author.team; &apt-email; &apt-product; <date>9 " +"Agosto 2009</date>" + +#. type: Content of: <refentry><refnamediv><refname> +#: apt-mark.8.xml:22 apt-mark.8.xml:29 +msgid "apt-mark" +msgstr "apt-mark" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt-mark.8.xml:30 +msgid "mark/unmark a package as being automatically-installed" +msgstr "marca/desmarca um pacote como sendo instalado automaticamente" + +#. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis> +#: apt-mark.8.xml:36 +msgid "" +" <command>apt-mark</command> <arg><option>-hv</option></arg> <arg><option>-" +"f=<replaceable>FILENAME</replaceable></option></arg> <group choice=\"plain" +"\"> <arg choice=\"plain\"> <group choice=\"req\"> <arg choice=\"plain" +"\">markauto</arg> <arg choice=\"plain\">unmarkauto</arg> </group> <arg " +"choice=\"plain\" rep=\"repeat\"><replaceable>package</replaceable></arg> </" +"arg> <arg choice=\"plain\">showauto</arg> </group>" +msgstr "" +" <command>apt-mark</command> <arg><option>-hv</option></arg> <arg><option>-" +"f=<replaceable>NOME DE FICHEIRO</replaceable></option></arg> <group choice=" +"\"plain\"> <arg choice=\"plain\"> <group choice=\"req\"> <arg choice=\"plain" +"\">markauto</arg> <arg choice=\"plain\">unmarkauto</arg> </group> <arg " +"choice=\"plain\" rep=\"repeat\"><replaceable>pacote</replaceable></arg> </" +"arg> <arg choice=\"plain\">showauto</arg> </group>" + +#. type: Content of: <refentry><refsect1><para> +#: apt-mark.8.xml:53 +msgid "" +"<command>apt-mark</command> will change whether a package has been marked as " +"being automatically installed." +msgstr "" +"<command>apt-mark</command> irá modificar se um pacote foi marcado como " +"sendo instalado automaticamente." + +#. type: Content of: <refentry><refsect1><para> +#: apt-mark.8.xml:57 +msgid "" +"When you request that a package is installed, and as a result other packages " +"are installed to satisfy its dependencies, the dependencies are marked as " +"being automatically installed. Once these automatically installed packages " +"are no longer depended on by any manually installed packages, they will be " +"removed by e.g. <command>apt-get</command> or <command>aptitude</command>." +msgstr "" +"Quando você pede que um pacote seja instalado, e como resultado outros " +"pacotes são instalados para satisfazer as suas dependências, as dependências " +"são marcadas como sendo instaladas automaticamente. Uma vez que estes " +"pacotes instalados automaticamente não sejam mais necessários por nenhum " +"pacote instalado manualmente, eles serão removidos pelo <command>apt-get</" +"command> ou <command>aptitude</command> (exemplos)." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-mark.8.xml:65 +msgid "markauto" +msgstr "markauto" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-mark.8.xml:66 +msgid "" +"<literal>markauto</literal> is used to mark a package as being automatically " +"installed, which will cause the package to be removed when no more manually " +"installed packages depend on this package." +msgstr "" +"<literal>markauto</literal> é usado para marcar um pacote como sendo " +"instalado automaticamente, o que irá causar a remoção do pacote quando mais " +"nenhum pacote instalado manualmente depender deste pacote." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-mark.8.xml:73 +msgid "unmarkauto" +msgstr "unmarkauto" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-mark.8.xml:74 +msgid "" +"<literal>unmarkauto</literal> is used to mark a package as being manually " +"installed, which will prevent the package from being automatically removed " +"if no other packages depend on it." +msgstr "" +"<literal>unmarkauto</literal> é usado para marcar um pacote como sendo " +"instalado manualmente, o que irá prevenir que o pacote seja removido " +"automaticamente se nenhum outro pacote depender dele." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-mark.8.xml:81 +msgid "showauto" +msgstr "showauto" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-mark.8.xml:82 +msgid "" +"<literal>showauto</literal> is used to print a list of automatically " +"installed packages with each package on a new line." +msgstr "" +"<literal>showauto</literal> é usado para escrever uma lista dos pacotes " +"instalados automaticamente com cada pacote numa linha nova." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-mark.8.xml:93 +msgid "" +"<option>-f=<filename><replaceable>FILENAME</replaceable></filename></option>" +msgstr "" +"<option>-f=<filename><replaceable>NOME DE FICHEIRO</replaceable></filename></" +"option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-mark.8.xml:94 +msgid "" +"<option>--file=<filename><replaceable>FILENAME</replaceable></filename></" +"option>" +msgstr "" +"<option>--file=<filename><replaceable>NOME DE FICHEIRO</replaceable></" +"filename></option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-mark.8.xml:97 +msgid "" +"Read/Write package stats from <filename><replaceable>FILENAME</replaceable></" +"filename> instead of the default location, which is " +"<filename>extended_status</filename> in the directory defined by the " +"Configuration Item: <literal>Dir::State</literal>." +msgstr "" +"Lê/Escreve o estado de pacote a partir de " +"<filename><replaceable>NOME_DE_FICHEIRO</replaceable></filename> em vez da " +"localização predefinida, a qual é <filename>extended_status</filename> no " +"directório definido pelo Item de Configuração: <literal>Dir::State</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-mark.8.xml:103 +msgid "<option>-h</option>" +msgstr "<option>-h</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-mark.8.xml:104 +msgid "<option>--help</option>" +msgstr "<option>--help</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-mark.8.xml:105 +msgid "Show a short usage summary." +msgstr "Mostra um curto sumário de utilização." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-mark.8.xml:111 +msgid "<option>-v</option>" +msgstr "<option>-v</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-mark.8.xml:112 +msgid "<option>--version</option>" +msgstr "<option>--version</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-mark.8.xml:113 +msgid "Show the program version." +msgstr "Mostra a versão do programa." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-mark.8.xml:124 +msgid "<filename>/var/lib/apt/extended_states</filename>" +msgstr "<filename>/var/lib/apt/extended_states</filename>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-mark.8.xml:125 +msgid "" +"Status list of auto-installed packages. Configuration Item: <literal>Dir::" +"State</literal> sets the path to the <filename>extended_states</filename> " +"file." +msgstr "" +"Lista de estado de pacotes auto-instalados. Item de Configuração: " +"<literal>Dir::State</literal> que define o caminho para o ficheiro " +"<filename>extended_states</filename>." + +#. type: Content of: <refentry><refsect1><para> +#: apt-mark.8.xml:134 +msgid "&apt-get;,&aptitude;,&apt-conf;" +msgstr "&apt-get;,&aptitude;,&apt-conf;" + +#. type: Content of: <refentry><refsect1><para> +#: apt-mark.8.xml:138 +msgid "" +"<command>apt-mark</command> returns zero on normal operation, non-zero on " +"error." +msgstr "" +"<command>apt-mark</command> devolve zero na operação normal, 100 decimal em " +"erro." + +#. type: Content of: <refentry><refnamediv><refname> +#: apt-secure.8.xml:14 apt-secure.8.xml:36 +msgid "apt-secure" +msgstr "apt-secure" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt-secure.8.xml:37 +msgid "Archive authentication support for APT" +msgstr "Suporte de autenticação de arquivos para o APT" + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:42 +msgid "" +"Starting with version 0.6, <command>apt</command> contains code that does " +"signature checking of the Release file for all archives. This ensures that " +"packages in the archive can't be modified by people who have no access to " +"the Release file signing key." +msgstr "" +"A partir da versão 0.6, o <command>apt</command> contém código que faz " +"verificação de assinaturas do ficheiro Release para todos os arquivos. Isto " +"assegura que os pacotes no arquivo não podem ser modificados por pessoas que " +"não têm acesso à chave de assinatura do ficheiro Release." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:50 +msgid "" +"If a package comes from a archive without a signature or with a signature " +"that apt does not have a key for that package is considered untrusted and " +"installing it will result in a big warning. <command>apt-get</command> will " +"currently only warn for unsigned archives, future releases might force all " +"sources to be verified before downloading packages from them." +msgstr "" +"Se um pacote vem dum arquivo sem assinatura ou com uma assinatura para a " +"qual o apt não tem a chave, esse pacote é considerado 'não sendo de " +"confiança' e instalá-lo irá resultar num grande aviso. Actualmente o " +"<command>apt-get</command> irá avisar apenas de arquivos não assinados, " +"lançamentos futuros poderão vir a forçar que todas as fontes sejam " +"verificadas antes de descarregar pacotes delas." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:59 +msgid "" +"The package frontends &apt-get;, &aptitude; and &synaptic; support this new " +"authentication feature." +msgstr "" +"Os frontends de pacotes &apt-get;, &aptitude; e &synaptic; suportam esta " +"nova funcionalidade de autenticação." + +#. type: Content of: <refentry><refsect1><title> +#: apt-secure.8.xml:64 +msgid "Trusted archives" +msgstr "Arquivos de confiança" + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:67 +msgid "" +"The chain of trust from an apt archive to the end user is made up of " +"different steps. <command>apt-secure</command> is the last step in this " +"chain, trusting an archive does not mean that the packages that you trust it " +"do not contain malicious code but means that you trust the archive " +"maintainer. It's the archive maintainer responsibility to ensure that the " +"archive integrity is correct." +msgstr "" +"A corrente de confiança desde um arquivo apt até ao utilizador final é feita " +"em diferentes passos. O <command>apt-secure</command> é o último passo nesta " +"corrente, confiar num arquivo não quer dizer que os pacotes em que confia " +"não possam conter código malicioso, mas que dizer que você confia no " +"responsável do arquivo. É da responsabilidade do responsável do arquivo " +"assegurar que a integridade do arquivo está correcta." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:75 +msgid "" +"apt-secure does not review signatures at a package level. If you require " +"tools to do this you should look at <command>debsig-verify</command> and " +"<command>debsign</command> (provided in the debsig-verify and devscripts " +"packages respectively)." +msgstr "" +"O apt-secure não revê as assinaturas ao nível do pacote. Se você necessita " +"de ferramentas que o façam deve procurar pelo <command>debsig-verify</" +"command> e <command>debsign</command> (disponibilizados nos pacotes debsig-" +"verify e devscripts respectivamente)." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:82 +msgid "" +"The chain of trust in Debian starts when a maintainer uploads a new package " +"or a new version of a package to the Debian archive. This upload in order to " +"become effective needs to be signed by a key of a maintainer within the " +"Debian maintainer's keyring (available in the debian-keyring package). " +"Maintainer's keys are signed by other maintainers following pre-established " +"procedures to ensure the identity of the key holder." +msgstr "" +"A corrente de confiança em Debian começa quando o responsável faz o upload " +"de um novo pacote ou de uma nova versão de um pacote para o arquivo Debian. " +"De modo a se tornar efectivo, este upload precisa de ser assinado por uma " +"chave de um responsável dentro do chaveiro de responsáveis da Debian " +"(disponível no pacote debian-keyring). As chaves dos responsáveis são " +"assinadas por outros responsáveis seguindo procedimentos pré-estabelecidos " +"para assegurar a identidade do dono da chave." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:92 +msgid "" +"Once the uploaded package is verified and included in the archive, the " +"maintainer signature is stripped off, an MD5 sum of the package is computed " +"and put in the Packages file. The MD5 sum of all of the packages files are " +"then computed and put into the Release file. The Release file is then signed " +"by the archive key (which is created once a year) and distributed through " +"the FTP server. This key is also on the Debian keyring." +msgstr "" +"Após o upload, o pacote é verificado e incluído no arquivo, a assinatura do " +"responsável é despojada, é computado um sumário MD5 do pacote e colocado no " +"ficheiro Packages. Os sumários MD5 de todos os ficheiros pacotes são então " +"computados e colocados no ficheiro Release. O ficheiro Release é então " +"assinado pela chave de arquivo (a qual é criada uma vez por ano) e " +"distribuído através do servidor FTP. Esta chave está também no chaveiro " +"Debian." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:102 +msgid "" +"Any end user can check the signature of the Release file, extract the MD5 " +"sum of a package from it and compare it with the MD5 sum of the package he " +"downloaded. Prior to version 0.6 only the MD5 sum of the downloaded Debian " +"package was checked. Now both the MD5 sum and the signature of the Release " +"file are checked." +msgstr "" +"Qualquer utilizador final pode verificar a assinatura do ficheiro Release, " +"extrair o sumário MD5 de um pacote a partir dele, e compará-lo com o sumário " +"MD5 do pacote que descarregou. Antes da versão 0.6 apenas o sumário MD5 do " +"pacote Debian descarregado era verificado. Agora são verificados ambos: o " +"sumário MD5 e a assinatura do ficheiro Release." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:109 +msgid "" +"Notice that this is distinct from checking signatures on a per package " +"basis. It is designed to prevent two possible attacks:" +msgstr "" +"Note que isto é diferente de verificar assinaturas por cada pacote. É " +"desenhado para prevenir dois ataques possíveis:" + +#. type: Content of: <refentry><refsect1><itemizedlist><listitem><para> +#: apt-secure.8.xml:114 +msgid "" +"<literal>Network \"man in the middle\" attacks</literal>. Without signature " +"checking, a malicious agent can introduce himself in the package download " +"process and provide malicious software either by controlling a network " +"element (router, switch, etc.) or by redirecting traffic to a rogue server " +"(through arp or DNS spoofing attacks)." +msgstr "" +"<literal>Ataques de rede \"man in the middle\"</literal>. Sem verificação de " +"assinatura, um agente malicioso pode introduzir-se ele próprio no processo " +"de descarga de pacotes e disponibilizar software malicioso seja ao controlar " +"um elemento de rede (router, switch, etc.) ou ao redireccionar tráfego para " +"um servidor impostor (através de ataques de fraude de arp ou DNS)." + +#. type: Content of: <refentry><refsect1><itemizedlist><listitem><para> +#: apt-secure.8.xml:122 +msgid "" +"<literal>Mirror network compromise</literal>. Without signature checking, a " +"malicious agent can compromise a mirror host and modify the files in it to " +"propagate malicious software to all users downloading packages from that " +"host." +msgstr "" +"<literal>Mirror network compromise</literal>. Sem verificação de assinatura, " +"um agente malicioso pode comprometer uma máquina mirror e modificar os " +"ficheiros dele para propagar software malicioso a todos os utilizadores que " +"descarregam pacotes a partir dessa máquina." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:129 +msgid "" +"However, it does not defend against a compromise of the Debian master server " +"itself (which signs the packages) or against a compromise of the key used to " +"sign the Release files. In any case, this mechanism can complement a per-" +"package signature." +msgstr "" +"No entanto, isto não defende contra um compromisso do próprio servidor " +"mestre da Debian (o qual assina os pacotes) ou contra um compromisso da " +"chave usada para assinar os ficheiros Release. Em qualquer caso, este " +"mecanismo pode complementar uma assinatura por-pacote." + +#. type: Content of: <refentry><refsect1><title> +#: apt-secure.8.xml:135 +msgid "User configuration" +msgstr "Configuração do utilizador" + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:137 +msgid "" +"<command>apt-key</command> is the program that manages the list of keys used " +"by apt. It can be used to add or remove keys although an installation of " +"this release will automatically provide the default Debian archive signing " +"keys used in the Debian package repositories." +msgstr "" +"<command>apt-key</command> é o programa que gere a lista de chaves usada " +"pelo apt. Pode ser usado para adicionar ou remover chaves apesar de uma " +"instalação deste lançamento ir automaticamente disponibilizar as chaves de " +"assinaturas predefinidas de arquivo Debian usadas nos repositórios de " +"pacotes Debian." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:144 +msgid "" +"In order to add a new key you need to first download it (you should make " +"sure you are using a trusted communication channel when retrieving it), add " +"it with <command>apt-key</command> and then run <command>apt-get update</" +"command> so that apt can download and verify the <filename>Release.gpg</" +"filename> files from the archives you have configured." +msgstr "" +"De modo a adicionar uma chave nova você precisa primeiro de descarregá-la " +"(você deve certificar-se que está a usar um canal de comunicação de " +"confiança quando a obtém), adicioná-la com <command>apt-key</command> e " +"depois correr <command>apt-get update</command> para que o apt possa " +"descarregar e verificar os ficheiros <filename>Release.gpg</filename> dos " +"arquivos que você configurou." + +#. type: Content of: <refentry><refsect1><title> +#: apt-secure.8.xml:153 +msgid "Archive configuration" +msgstr "Configuração de arquivos" + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:155 +msgid "" +"If you want to provide archive signatures in an archive under your " +"maintenance you have to:" +msgstr "" +"Se você deseja fornecer assinaturas de arquivo a um arquivo sob sua " +"manutenção, você tem que:" + +#. type: Content of: <refentry><refsect1><itemizedlist><listitem><para> +#: apt-secure.8.xml:160 +msgid "" +"<emphasis>Create a toplevel Release file</emphasis>, if it does not exist " +"already. You can do this by running <command>apt-ftparchive release</" +"command> (provided in apt-utils)." +msgstr "" +"<emphasis>Criar um ficheiro Release de nível de topo</emphasis>, se este já " +"não existir. Você pode fazer isto ao correr <command>apt-ftparchive release</" +"command> (disponibilizado no apt-utils)." + +#. type: Content of: <refentry><refsect1><itemizedlist><listitem><para> +#: apt-secure.8.xml:165 +msgid "" +"<emphasis>Sign it</emphasis>. You can do this by running <command>gpg -abs -" +"o Release.gpg Release</command>." +msgstr "" +"<emphasis>Assiná-lo</emphasis>. Você pode fazer isso ao correr <command>gpg -" +"abs -o Release.gpg Release</command>." + +#. type: Content of: <refentry><refsect1><itemizedlist><listitem><para> +#: apt-secure.8.xml:168 +msgid "" +"<emphasis>Publish the key fingerprint</emphasis>, that way your users will " +"know what key they need to import in order to authenticate the files in the " +"archive." +msgstr "" +"<emphasis>Publicar a impressão digital da chave</emphasis>, deste modo os " +"seus utilizadores irão saber que chave precisam de importar de modo a " +"autenticar os ficheiros no arquivo." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:175 +msgid "" +"Whenever the contents of the archive changes (new packages are added or " +"removed) the archive maintainer has to follow the first two steps previously " +"outlined." +msgstr "" +"Sempre que o conteúdo do arquivo mude (são adicionados novos pacotes ou " +"removidos), o responsável do arquivo tem que seguir os primeiros dois passos " +"previamente delineados." + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:183 +msgid "" +"&apt-conf;, &apt-get;, &sources-list;, &apt-key;, &apt-ftparchive;, " +"&debsign; &debsig-verify;, &gpg;" +msgstr "" +"&apt-conf;, &apt-get;, &sources-list;, &apt-key;, &apt-ftparchive;, " +"&debsign; &debsig-verify;, &gpg;" + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:187 +msgid "" +"For more background information you might want to review the <ulink url=" +"\"http://www.debian.org/doc/manuals/securing-debian-howto/ch7.en.html" +"\">Debian Security Infrastructure</ulink> chapter of the Securing Debian " +"Manual (available also in the harden-doc package) and the <ulink url=" +"\"http://www.cryptnet.net/fdp/crypto/strong_distro.html\" >Strong " +"Distribution HOWTO</ulink> by V. Alex Brennen." +msgstr "" +"Para mais informação de fundo você deve querer reler a <ulink url=\"http://" +"www.debian.org/doc/manuals/securing-debian-howto/ch7.en.html" +"\">Infraestrutura de Segurança da Debian</ulink> no capítulo do Manual " +"Debian de Segurança (disponível também no pacote harden-doc) e o <ulink url=" +"\"http://www.cryptnet.net/fdp/crypto/strong_distro.html\" >Strong " +"Distribution HOWTO</ulink> de V. Alex Brennen." + +#. type: Content of: <refentry><refsect1><title> +#: apt-secure.8.xml:200 +msgid "Manpage Authors" +msgstr "Autores do manual" + +#. type: Content of: <refentry><refsect1><para> +#: apt-secure.8.xml:202 +msgid "" +"This man-page is based on the work of Javier Fernández-Sanguino Peña, Isaac " +"Jones, Colin Walters, Florian Weimer and Michael Vogt." +msgstr "" +"Este manual é baseado no trabalho de Javier Fernández-Sanguino Peña, Isaac " +"Jones, Colin Walters, Florian Weimer e Michael Vogt." + +#. type: Content of: <refentry><refnamediv><refname> +#: apt-sortpkgs.1.xml:22 apt-sortpkgs.1.xml:29 +msgid "apt-sortpkgs" +msgstr "apt-sortpkgs" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt-sortpkgs.1.xml:30 +msgid "Utility to sort package index files" +msgstr "Utilitário para organizar ficheiros índice de pacotes" + +#. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis> +#: apt-sortpkgs.1.xml:36 +msgid "" +"<command>apt-sortpkgs</command> <arg><option>-hvs</option></arg> " +"<arg><option>-o=<replaceable>config string</replaceable></option></arg> " +"<arg><option>-c=<replaceable>file</replaceable></option></arg> <arg choice=" +"\"plain\" rep=\"repeat\"><replaceable>file</replaceable></arg>" +msgstr "" +"<command>apt-sortpkgs</command> <arg><option>-hvs</option></arg> " +"<arg><option>-o=<replaceable>string de configuração</replaceable></option></" +"arg> <arg><option>-c=<replaceable>ficheiro</replaceable></option></arg> <arg " +"choice=\"plain\" rep=\"repeat\"><replaceable>ficheiro</replaceable></arg>" + +#. type: Content of: <refentry><refsect1><para> +#: apt-sortpkgs.1.xml:45 +msgid "" +"<command>apt-sortpkgs</command> will take an index file (Source index or " +"Package index) and sort the records so that they are ordered by the package " +"name. It will also sort the internal fields of each record according to the " +"internal sorting rules." +msgstr "" +"<command>apt-sortpkgs</command> irá pegar num ficheiro índice (índice de " +"fontes ou índice de pacotes) e organizar os registos para que fiquem " +"ordenados pelo nome do pacote. Também organiza os campos internos de cada " +"registo de acordo com as regras de organização internas." + +#. type: Content of: <refentry><refsect1><para> +#: apt-sortpkgs.1.xml:51 +msgid "All output is sent to stdout, the input must be a seekable file." +msgstr "" +"Todas as saídas são enviadas para o stdout, a entrada tem de ser um ficheiro " +"pesquisável." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt-sortpkgs.1.xml:58 +msgid "<option>--source</option>" +msgstr "<option>--source</option>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt-sortpkgs.1.xml:60 +msgid "" +"Use Source index field ordering. Configuration Item: <literal>APT::" +"SortPkgs::Source</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-sortpkgs.1.xml:74 +msgid "" +"<command>apt-sortpkgs</command> returns zero on normal operation, decimal " +"100 on error." +msgstr "" +"<command>apt-sortpkgs</command> devolve zero na operação normal, 100 decimal " +"em erro." + +#. The last update date +#. type: Content of: <refentry><refentryinfo> +#: apt.conf.5.xml:13 +msgid "" +"&apt-author.jgunthorpe; &apt-author.team; <author> <firstname>Daniel</" +"firstname> <surname>Burrows</surname> <contrib>Initial documentation of " +"Debug::*.</contrib> <email>dburrows@debian.org</email> </author> &apt-email; " +"&apt-product; <date>16 January 2010</date>" +msgstr "" +"&apt-author.jgunthorpe; &apt-author.team; <author> <firstname>Daniel</" +"firstname> <surname>Burrows</surname> <contrib>Documentação inicial do " +"Debug::*.</contrib> <email>dburrows@debian.org</email> </author> &apt-email; " +"&apt-product; <date>16 Janeiro 2010</date>" + +#. type: Content of: <refentry><refnamediv><refname> +#: apt.conf.5.xml:28 apt.conf.5.xml:35 +msgid "apt.conf" +msgstr "apt.conf" + +#. type: Content of: <refentry><refmeta><manvolnum> +#: apt.conf.5.xml:29 apt_preferences.5.xml:22 sources.list.5.xml:23 +msgid "5" +msgstr "5" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt.conf.5.xml:36 +msgid "Configuration file for APT" +msgstr "Ficheiro de configuração para o APT" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:40 +msgid "" +"<filename>apt.conf</filename> is the main configuration file for the APT " +"suite of tools, but by far not the only place changes to options can be " +"made. All tools therefore share the configuration files and also use a " +"common command line parser to provide a uniform environment." +msgstr "" +"<filename>apt.conf</filename> é o ficheiro de configuração principal para a " +"suite de ferramentas do APT, as não é o único lugar onde se podem fazer " +"alterações às opções. Então todas as ferramentas partilham os ficheiros de " +"configuração e também usam um analisador de linha de comandos comum para " +"disponibilizar um ambiente uniforme." + +#. type: Content of: <refentry><refsect1><orderedlist><para> +#: apt.conf.5.xml:45 +msgid "" +"When an APT tool starts up it will read the configuration files in the " +"following order:" +msgstr "" +"Quando a ferramenta APT arranca irá ler os ficheiros de configuração pela " +"seguinte ordem:" + +#. type: Content of: <refentry><refsect1><orderedlist><listitem><para> +#: apt.conf.5.xml:47 +msgid "" +"the file specified by the <envar>APT_CONFIG</envar> environment variable (if " +"any)" +msgstr "" +"o ficheiro especificado pela variável de ambiente <envar>APT_CONFIG</envar> " +"(se existir)" + +#. type: Content of: <refentry><refsect1><orderedlist><listitem><para> +#: apt.conf.5.xml:49 +msgid "" +"all files in <literal>Dir::Etc::Parts</literal> in alphanumeric ascending " +"order which have no or \"<literal>conf</literal>\" as filename extension and " +"which only contain alphanumeric, hyphen (-), underscore (_) and period (.) " +"characters - otherwise they will be silently ignored." +msgstr "" +"todos os ficheiros em <literal>Dir::Etc::Parts</literal> em ordem ascendente " +"alfanumérica sem extensão ou com \"<literal>conf</literal>\" como extensão " +"do nome de ficheiro e que apenas contêm caracteres alfanuméricos, traço (-), " +"underscore (_) e ponto (.) - caso contrário serão ignorados em silêncio." + +#. type: Content of: <refentry><refsect1><orderedlist><listitem><para> +#: apt.conf.5.xml:54 +msgid "" +"the main configuration file specified by <literal>Dir::Etc::main</literal>" +msgstr "" +"o ficheiro de configuração principal especificado por <literal>Dir::Etc::" +"main</literal>" + +#. type: Content of: <refentry><refsect1><orderedlist><listitem><para> +#: apt.conf.5.xml:56 +msgid "" +"the command line options are applied to override the configuration " +"directives or to load even more configuration files." +msgstr "" +"as opções de linha de comandos são aplicadas para sobrepor as directivas de " +"configuração ou para carregar mais ficheiros de configuração." + +#. type: Content of: <refentry><refsect1><title> +#: apt.conf.5.xml:60 +msgid "Syntax" +msgstr "Sintaxe" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:61 +msgid "" +"The configuration file is organized in a tree with options organized into " +"functional groups. Option specification is given with a double colon " +"notation, for instance <literal>APT::Get::Assume-Yes</literal> is an option " +"within the APT tool group, for the Get tool. Options do not inherit from " +"their parent groups." +msgstr "" +"O ficheiro de configuração é organizado numa árvore com as opções " +"organizadas em grupos de funcionamento. A especificação das opções é dada " +"com um sinal de dois pontos duplo , por exemplo <literal>APT::Get::Assume-" +"Yes</literal> é uma opção dentro do grupo de ferramentas do APT, para a " +"ferramenta Get. A opções não herdam dos seus grupos parentes." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:67 +msgid "" +"Syntactically the configuration language is modeled after what the ISC tools " +"such as bind and dhcp use. Lines starting with <literal>//</literal> are " +"treated as comments (ignored), as well as all text between <literal>/*</" +"literal> and <literal>*/</literal>, just like C/C++ comments. Each line is " +"of the form <literal>APT::Get::Assume-Yes \"true\";</literal>. The trailing " +"semicolon and the quotes are required. The value must be on one line, and " +"there is no kind of string concatenation. It must not include inside " +"quotes. The behavior of the backslash \"\\\" and escaped characters inside " +"a value is undefined and it should not be used. An option name may include " +"alphanumerical characters and the \"/-:._+\" characters. A new scope can be " +"opened with curly braces, like:" +msgstr "" +"Sintacticamente a linguagem de configuração é modelada após o que as " +"ferramentas ISC usam, como o bind e o dhcp. As linhas que começam com " +"<literal>//</literal> são tratadas como comentários (ignoradas), assim como " +"todo o texto entre <literal>/*</literal> e <literal>*/</literal>, tal como " +"os comentários de C/C++. Cada linha é do formato <literal>APT::Get::Assume-" +"Yes \"true\";</literal>. O ponto e vírgula à direita e as aspas são " +"necessárias. O valor deve estar numa linha, e não há nenhum tipo de " +"concatenação de string. Não pode incluir aspas interiores. O comportamento " +"da backslash \"\\\" e caracteres de escape dentro de um valor é indefinido e " +"não deve ser usado. Um nome de opção pode incluir caracteres alfanuméricos e " +"os caracteres \"/-:._+\". Um novo scope pode ser aberto com chavetas, como:" + +#. type: Content of: <refentry><refsect1><informalexample><programlisting> +#: apt.conf.5.xml:81 +#, no-wrap +msgid "" +"APT {\n" +" Get {\n" +" Assume-Yes \"true\";\n" +" Fix-Broken \"true\";\n" +" };\n" +"};\n" +msgstr "" +"APT {\n" +" Get {\n" +" Assume-Yes \"true\";\n" +" Fix-Broken \"true\";\n" +" };\n" +"};\n" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:89 +msgid "" +"with newlines placed to make it more readable. Lists can be created by " +"opening a scope and including a single string enclosed in quotes followed by " +"a semicolon. Multiple entries can be included, each separated by a semicolon." +msgstr "" +"com novas linhas colocadas para o tornar mais legível. As listas podem ser " +"criadas ao abrir um scope e incluindo uma string única entre aspas seguida " +"por um ponto e vírgula. Podem ser incluídas múltiplas entradas, cada uma " +"separada por um ponto e vírgula (;)." + +#. type: Content of: <refentry><refsect1><informalexample><programlisting> +#: apt.conf.5.xml:94 +#, no-wrap +msgid "DPkg::Pre-Install-Pkgs {\"/usr/sbin/dpkg-preconfigure --apt\";};\n" +msgstr "DPkg::Pre-Install-Pkgs {\"/usr/sbin/dpkg-preconfigure --apt\";};\n" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:97 +msgid "" +"In general the sample configuration file in <filename>&docdir;examples/apt." +"conf</filename> &configureindex; is a good guide for how it should look." +msgstr "" +"Em geral o exemplo de ficheiro de configuração em <filename>&docdir;examples/" +"apt.conf</filename> &configureindex; é um bom guia de como deve ficar." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:101 +msgid "" +"The names of the configuration items are not case-sensitive. So in the " +"previous example you could use <literal>dpkg::pre-install-pkgs</literal>." +msgstr "" +"Os nomes dos items de configuração não são sensíveis a maiúsculas/" +"minúsculas. Portanto no exemplo prévio você poderia usar <literal>dpkg::pre-" +"install-pkgs</literal>." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:104 +msgid "" +"Names for the configuration items are optional if a list is defined as it " +"can be see in the <literal>DPkg::Pre-Install-Pkgs</literal> example above. " +"If you don't specify a name a new entry will simply add a new option to the " +"list. If you specify a name you can override the option as every other " +"option by reassigning a new value to the option." +msgstr "" +"Os nomes dos items de configuração são opcionais se uma lista for definida " +"com pode ser vista no exemplo <literal>DPkg::Pre-Install-Pkgs</literal> " +"acima. Se você não especificar um nome, uma nova entrada irá simplesmente " +"adicionar uma nova opção à lista. Se você especificar um nome, você pode " +"sobrepor a opção como qualquer outra opção ao re-atribuir um novo valor à " +"opção." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:109 +msgid "" +"Two specials are allowed, <literal>#include</literal> (which is deprecated " +"and not supported by alternative implementations) and <literal>#clear</" +"literal>: <literal>#include</literal> will include the given file, unless " +"the filename ends in a slash, then the whole directory is included. " +"<literal>#clear</literal> is used to erase a part of the configuration tree. " +"The specified element and all its descendants are erased. (Note that these " +"lines also need to end with a semicolon.)" +msgstr "" +"São permitidas duas especiais, <literal>#include</literal> (a qual está " +"obsoleta e não é suportada por implementações alternativas) e " +"<literal>#clear</literal>: <literal>#include</literal> irá incluir o " +"ficheiro fornecido, a menos que o nome do ficheiro termine numa barra (/), " +"então todo o directório é incluído. <literal>#clear</literal> é usado para " +"apagar uma parte da árvore de configuração. O elemento especificado e os " +"seus descendentes são apagados. (Note que estas linhas também precisam de " +"acabar com um 'ponto e vírgula' (;) .)" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:117 +msgid "" +"The #clear command is the only way to delete a list or a complete scope. " +"Reopening a scope or the ::-style described below will <emphasis>not</" +"emphasis> override previously written entries. Only options can be " +"overridden by addressing a new value to it - lists and scopes can't be " +"overridden, only cleared." +msgstr "" +"O comando #clear é a única maneira de apagar uma lista ou um scope completo. " +"Reabrindo um scope ou o ::-style descrito abaixo <emphasis>não</emphasis> " +"irá sobrepor entradas escritas anteriormente. Apenas as opções podem ser " +"sobrepostas ao atribuir um novo valor a elas - listas e scopes não podem ser " +"sobrepostos, apenas limpos." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:122 +msgid "" +"All of the APT tools take a -o option which allows an arbitrary " +"configuration directive to be specified on the command line. The syntax is a " +"full option name (<literal>APT::Get::Assume-Yes</literal> for instance) " +"followed by an equals sign then the new value of the option. Lists can be " +"appended too by adding a trailing :: to the list name. (As you might " +"suspect: The scope syntax can't be used on the command line.)" +msgstr "" +"Todas as ferramentas do APT recebem uma opção -o que permite uma directiva " +"de configuração arbitrária para ser especificada na linha de comandos. A " +"sintaxe é um nome de opção completo (<literal>APT::Get::Assume-Yes</literal> " +"por exemplo) seguido por um igual (=) e depois o valor da opção. Também pode " +"ser acrescentadas listas ao adicionar um duplo dois-pontos (::) à direita " +"para o nome da lista. (Como deve suspeitar: A sintaxe de scope não pode ser " +"usada na linha de comandos.)" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:129 +msgid "" +"Note that you can use :: only for appending one item per line to a list and " +"that you should not use it in combination with the scope syntax. (The scope " +"syntax implicit insert ::) Using both syntaxes together will trigger a bug " +"which some users unfortunately relay on: An option with the unusual name " +"\"<literal>::</literal>\" which acts like every other option with a name. " +"These introduces many problems including that a user who writes multiple " +"lines in this <emphasis>wrong</emphasis> syntax in the hope to append to a " +"list will gain the opposite as only the last assignment for this option " +"\"<literal>::</literal>\" will be used. Upcoming APT versions will raise " +"errors and will stop working if they encounter this misuse, so please " +"correct such statements now as long as APT doesn't complain explicit about " +"them." +msgstr "" +"Note que você apenas pode usar :: para acrescentar um item por linha a uma " +"lista e não o deve usar em combinação com a sintaxe scope. (A sintaxe scope " +"implicitamente insere ::). Usar ambas as sintaxes juntamente irá disparar um " +"bug que infelizmente alguns utilizadores nos transmitem: Uma opção com o " +"nome não usual \"<literal>::</literal>\" a qual actua como qualquer outra " +"opção com um nome. Isto introduz muitos problemas incluindo que, um " +"utilizador que escreve múltiplas linhas nesta sintaxe <emphasis>errada</" +"emphasis> na esperança de acrescentar a uma lista, irá ganhar o oposto " +"porque apenas a última atribuição para esta opção \"<literal>::</literal>\" " +"será a usada. Futuras versões do APT irá levantar erros e parar de funcionar " +"se encontrarem esta má utilização, portanto por favor corrija tais " +"declarações agora enquanto o APT não se queixa explicitamente acerca delas." + +#. type: Content of: <refentry><refsect1><title> +#: apt.conf.5.xml:141 +msgid "The APT Group" +msgstr "O Grupo APT" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:142 +msgid "" +"This group of options controls general APT behavior as well as holding the " +"options for all of the tools." +msgstr "" +"Este grupo de opções controla o comportamento geral do APT assim como mantém " +"as opções para todas as ferramentas." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:146 +msgid "Architecture" +msgstr "Architecture" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:147 +msgid "" +"System Architecture; sets the architecture to use when fetching files and " +"parsing package lists. The internal default is the architecture apt was " +"compiled for." +msgstr "" +"System Architecture; define a arquitectura a usar quando procura ficheiros e " +"analisa listas de pacotes. A predefinição interna é a arquitectura para a " +"qual o APT foi compilado." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:152 +msgid "Default-Release" +msgstr "Default-Release" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:153 +msgid "" +"Default release to install packages from if more than one version available. " +"Contains release name, codename or release version. Examples: 'stable', " +"'testing', 'unstable', 'lenny', 'squeeze', '4.0', '5.0*'. See also &apt-" +"preferences;." +msgstr "" +"Lançamento predefinido de onde instalar pacotes se existir mais de uma " +"versão disponível. Contém o nome do lançamento, nome de código ou versão de " +"lançamento. Exemplos: 'stable', 'testing', 'unstable', 'lenny', 'squeeze', " +"'4.0', '5.0*'. Veja também &apt-preferences;." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:157 +msgid "Ignore-Hold" +msgstr "Ignore-Hold" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:158 +msgid "" +"Ignore Held packages; This global option causes the problem resolver to " +"ignore held packages in its decision making." +msgstr "" +"Ignore Held packages; Esta opção global faz com que ao resolver problemas, " +"os pacotes segurados sejam ignorados na sua decisão de marcação." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:162 +msgid "Clean-Installed" +msgstr "Clean-Installed" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:163 +msgid "" +"Defaults to on. When turned on the autoclean feature will remove any " +"packages which can no longer be downloaded from the cache. If turned off " +"then packages that are locally installed are also excluded from cleaning - " +"but note that APT provides no direct means to reinstall them." +msgstr "" +"A predefinição é ligada. Quando ligada, a funcionalidade autoclean irá " +"remover quaisquer pacotes que já não possam ser descarregados a partir da " +"cache. Se desligada, então os pacotes que estão instalados localmente são " +"também excluídos da limpeza - mas note que o APT não disponibiliza um meio " +"directo de os reinstalar." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:169 +msgid "Immediate-Configure" +msgstr "Immediate-Configure" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:170 +msgid "" +"Defaults to on which will cause APT to install essential and important " +"packages as fast as possible in the install/upgrade operation. This is done " +"to limit the effect of a failing &dpkg; call: If this option is disabled APT " +"does treat an important package in the same way as an extra package: Between " +"the unpacking of the important package A and his configuration can then be " +"many other unpack or configuration calls, e.g. for package B which has no " +"relation to A, but causes the dpkg call to fail (e.g. because maintainer " +"script of package B generates an error) which results in a system state in " +"which package A is unpacked but unconfigured - each package depending on A " +"is now no longer guaranteed to work as their dependency on A is not longer " +"satisfied. The immediate configuration marker is also applied to all " +"dependencies which can generate a problem if the dependencies e.g. form a " +"circle as a dependency with the immediate flag is comparable with a Pre-" +"Dependency. So in theory it is possible that APT encounters a situation in " +"which it is unable to perform immediate configuration, errors out and refers " +"to this option so the user can deactivate the immediate configuration " +"temporarily to be able to perform an install/upgrade again. Note the use of " +"the word \"theory\" here as this problem was only encountered by now in real " +"world a few times in non-stable distribution versions and was caused by " +"wrong dependencies of the package in question or by a system in an already " +"broken state, so you should not blindly disable this option as the mentioned " +"scenario above is not the only problem immediate configuration can help to " +"prevent in the first place. Before a big operation like <literal>dist-" +"upgrade</literal> is run with this option disabled it should be tried to " +"explicitly <literal>install</literal> the package APT is unable to configure " +"immediately, but please make sure to report your problem also to your " +"distribution and to the APT team with the buglink below so they can work on " +"improving or correcting the upgrade process." +msgstr "" +"A predefinição é ligado o que irá fazer com que o APT instale pacotes " +"essenciais e importantes o mais rápido possível na operação de instalar/" +"actualizar. Isto é feito para limitar o efeito de uma chamada falhada do " +"&dpkg;. Se esta opção for desactivada, o APT trata um pacote importante do " +"mesmo modo que um pacote extra: Entre o desempacotamento do pacote " +"importante A e a sua configuração podem acontecer muitas outras chamadas de " +"desempacotamento e configuração, exemplo, para o pacote B que não tem " +"nenhuma relação com A, mas causa uma falha na chamada ao dpkg (ex, porque o " +"script do responsável do pacote B gera um erro) o qual resulta num estado do " +"sistema em que o pacote A está desempacotado mas ainda não configurado - já " +"não se garante o funcionamento de cada pacote que depende de A porque a sua " +"dependência já não está satisfeita. O marcador de configuração imediata é " +"também aplicado a todas as dependências que possam gerar um problema se as " +"dependências, ex, formam um círculo como uma dependência com a marca de " +"imediato a ser comparável com uma Pré-Dependência. Portanto, em teoria, é " +"possível que o APT encontre uma situação na qual é incapaz de executar " +"configuração imediata, entre em erro e refira esta opção para que o " +"utilizador possa desactivar temporariamente a configuração imediata para ser " +"capaz de executar uma instalação/actualização outra vez. Note o uso da " +"palavra \"teoria\" aqui pois este problema foi poucas vezes encontrado até " +"agora no mundo real em versões de distribuição não-estáveis e causados por " +"dependências erradas do pacote em questão ou por um sistema já num estado " +"corrompido, portanto você não deve desactivar esta opção às cegas porque, em " +"primeiro lugar, o cenário mencionado acima não é o único problema que a " +"configuração imediata pode ajudar a prevenir. Antes de uma grande operação " +"como <literal>dist-upgrade</literal> ser corrida com esta opção desactivada, " +"deve ser tentado primeiro fazer um <literal>install</literal> explicito ao " +"pacote que o APT é incapaz de configurar imediatamente, mas por favor " +"certifique-se de também relatar o seu problema à sua distribuição e à equipa " +"do APT com o link de bug abaixo para que possam trabalhar na melhoria ou " +"correcção do processo de actualização." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:192 +msgid "Force-LoopBreak" +msgstr "Force-LoopBreak" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:193 +msgid "" +"Never Enable this option unless you -really- know what you are doing. It " +"permits APT to temporarily remove an essential package to break a Conflicts/" +"Conflicts or Conflicts/Pre-Depend loop between two essential packages. SUCH " +"A LOOP SHOULD NEVER EXIST AND IS A GRAVE BUG. This option will work if the " +"essential packages are not tar, gzip, libc, dpkg, bash or anything that " +"those packages depend on." +msgstr "" +"Nunca Active esta opção a menos que saiba -realmente- o que está a fazer. " +"Permite ao APT remover temporariamente um pacote essencial para interromper " +"um ciclo vicioso de Conflitos/Conflitos ou Conflitos/Pré-Dependência entre " +"dois pacotes essenciais. TAL CICLO VICIOSO NÃO DEVERÁ NUNCA EXISTIR E É UM " +"GRAVE BUG. Esta opção deverá funcionar se os pacotes essenciais não forem " +"tar, gzip, libc, dpkg, bash ou qualquer coisa de que estes dependem." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:201 +msgid "Cache-Limit" +msgstr "Cache-Limit" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:202 +msgid "" +"APT uses a fixed size memory mapped cache file to store the 'available' " +"information. This sets the size of that cache (in bytes)." +msgstr "" +"O APT usa um ficheiro de cache de memória mapeada de tamanho fixo para " +"armazenar a informação 'disponível'. Isto define o tamanho dessa cache (em " +"bytes)." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:206 +msgid "Build-Essential" +msgstr "Build-Essential" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:207 +msgid "Defines which package(s) are considered essential build dependencies." +msgstr "" +"Define quais pacote(s) são considerados dependências essenciais de " +"compilação." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:210 +msgid "Get" +msgstr "Get" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:211 +msgid "" +"The Get subsection controls the &apt-get; tool, please see its documentation " +"for more information about the options here." +msgstr "" +"A subsecção Get controla a ferramenta &apt-get;, por favor veja a sua " +"documentação para mais informação acerca das opções daqui." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:215 +msgid "Cache" +msgstr "Cache" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:216 +msgid "" +"The Cache subsection controls the &apt-cache; tool, please see its " +"documentation for more information about the options here." +msgstr "" +"A subsecção Cache controla a ferramenta &apt-cache;, por favor veja a sua " +"documentação para mais informação acerca das opções daqui." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:220 +msgid "CDROM" +msgstr "CDROM" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:221 +msgid "" +"The CDROM subsection controls the &apt-cdrom; tool, please see its " +"documentation for more information about the options here." +msgstr "" +"A subsecção CDROM controla a ferramenta &apt-cdrom;, por favor veja a sua " +"documentação para mais informação acerca das opções de aqui." + +#. type: Content of: <refentry><refsect1><title> +#: apt.conf.5.xml:227 +msgid "The Acquire Group" +msgstr "O Grupo Acquire" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:232 +msgid "PDiffs" +msgstr "PDiffs" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:233 +msgid "" +"Try to download deltas called <literal>PDiffs</literal> for Packages or " +"Sources files instead of downloading whole ones. True by default." +msgstr "" +"Tenta descarregar deltas chamados <literal>PDiffs</literal> para Pacotes ou " +"ficheiros Fonte em vez de os descarregar por inteiro. Verdadeiro por " +"predefinição." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:236 +msgid "" +"Two sub-options to limit the use of PDiffs are also available: With " +"<literal>FileLimit</literal> can be specified how many PDiff files are " +"downloaded at most to patch a file. <literal>SizeLimit</literal> on the " +"other hand is the maximum precentage of the size of all patches compared to " +"the size of the targeted file. If one of these limits is exceeded the " +"complete file is downloaded instead of the patches." +msgstr "" +"Estão também disponíveis duas sub-opções para limitar o uso de PDiffs: Com " +"<literal>FileLimit</literal> pode ser especificado quantos ficheiros PDiff " +"são descarregados no máximo para aplicar um patch a um ficheiro. Por outro " +"lado <literal>SizeLimit</literal> é a percentagem máxima do tamanho de todas " +"as patches comparadas com o tamanho do ficheiro de destino. Se um destes " +"limites for excedido, é descarregado o ficheiro completo em vez das patches." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:245 +msgid "Queue-Mode" +msgstr "Queue-Mode" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:246 +msgid "" +"Queuing mode; <literal>Queue-Mode</literal> can be one of <literal>host</" +"literal> or <literal>access</literal> which determines how APT parallelizes " +"outgoing connections. <literal>host</literal> means that one connection per " +"target host will be opened, <literal>access</literal> means that one " +"connection per URI type will be opened." +msgstr "" +"Modo de fila; <literal>Queue-Mode</literal> pode ser um de <literal>host</" +"literal> ou <literal>access</literal> que determina como o APT paraleliza " +"ligações de saída. <literal>host</literal> significa que será aberta uma " +"ligação por máquina destino, <literal>access</literal> significa que será " +"aberta uma ligação por tipo de URI." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:253 +msgid "Retries" +msgstr "Retries" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:254 +msgid "" +"Number of retries to perform. If this is non-zero APT will retry failed " +"files the given number of times." +msgstr "" +"Número de tentativas a executar. Se isto for diferente de zero o APT irá " +"tentar, no número fornecido de vezes, obter ficheiros falhados." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:258 +msgid "Source-Symlinks" +msgstr "Source-Symlinks" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:259 +msgid "" +"Use symlinks for source archives. If set to true then source archives will " +"be symlinked when possible instead of copying. True is the default." +msgstr "" +"Usa links simbólicos para arquivos fonte. Se definido para verdadeiro, então " +"os arquivos fonte serão links simbólicos, quando possível, em vez de cópias. " +"A predefinição é verdadeiro." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:263 sources.list.5.xml:139 +msgid "http" +msgstr "http" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:264 +msgid "" +"HTTP URIs; http::Proxy is the default http proxy to use. It is in the " +"standard form of <literal>http://[[user][:pass]@]host[:port]/</literal>. Per " +"host proxies can also be specified by using the form <literal>http::Proxy::" +"<host></literal> with the special keyword <literal>DIRECT</literal> " +"meaning to use no proxies. If no one of the above settings is specified, " +"<envar>http_proxy</envar> environment variable will be used." +msgstr "" +"HTTP URIs; http::Proxy é o proxy http predefinido a usar. Está no formato " +"standard de <literal>http://[[user][:pass]@]host[:port]/</literal>. Também " +"pode ser especificados proxies por máquina ao usar o formato <literal>http::" +"Proxy::<host></literal> com a palavra chave especial <literal>DIRECT</" +"literal> que significa não usar proxies. Se nenhuma das definições acima for " +"especificada, será usada a variável de ambiente <envar>http_proxy</envar>." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:272 +msgid "" +"Three settings are provided for cache control with HTTP/1.1 compliant proxy " +"caches. <literal>No-Cache</literal> tells the proxy to not use its cached " +"response under any circumstances, <literal>Max-Age</literal> is sent only " +"for index files and tells the cache to refresh its object if it is older " +"than the given number of seconds. Debian updates its index files daily so " +"the default is 1 day. <literal>No-Store</literal> specifies that the cache " +"should never store this request, it is only set for archive files. This may " +"be useful to prevent polluting a proxy cache with very large .deb files. " +"Note: Squid 2.0.2 does not support any of these options." +msgstr "" +"São disponibilizadas três definições para controle de cache como caches de " +"proxy compatíveis com HTTP/1.1. <literal>No-Cache</literal> diz ao proxy " +"para não usar a sua resposta em cache sob nenhumas circunstâncias, " +"<literal>Max-Age</literal> é enviado apenas para ficheiros de índice e diz à " +"cache para refrescar o seu objecto se for mais antigo que o número de " +"segundos fornecido. Debian actualiza os seus ficheiros índice diariamente, " +"portanto a predefinição é 1 dia. <literal>No-Store</literal> especifica que " +"a cache nunca deverá armazenar este requisito, é apenas definido para " +"ficheiros de arquivo. Isto pode ser útil para prevenir a poluição de uma " +"cache proxy com ficheiros .deb muito grandes. Nota: o Squid 2.0.2 não " +"suporta nenhuma destas opções." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:282 apt.conf.5.xml:346 +msgid "" +"The option <literal>timeout</literal> sets the timeout timer used by the " +"method, this applies to all things including connection timeout and data " +"timeout." +msgstr "" +"A opção <literal>timeout</literal> define o tempo limite usado por este " +"método, isto aplica-se a todas as coisas incluindo tempos limite de ligação " +"e tempos limite de dados." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:285 +msgid "" +"One setting is provided to control the pipeline depth in cases where the " +"remote server is not RFC conforming or buggy (such as Squid 2.0.2). " +"<literal>Acquire::http::Pipeline-Depth</literal> can be a value from 0 to 5 " +"indicating how many outstanding requests APT should send. A value of zero " +"MUST be specified if the remote host does not properly linger on TCP " +"connections - otherwise data corruption will occur. Hosts which require this " +"are in violation of RFC 2068." +msgstr "" +"É disponibilizada uma definição para controlar a profundidade do pipeline em " +"casos onde o servidor remoto não é compatível com RFC ou é buggy (como o " +"Squid 2.0.2). <literal>Acquire::http::Pipeline-Depth</literal> pode ser um " +"valor de 0 a 5 que indica quantos requerimentos pendentes o APT deve enviar. " +"TEM de ser especificado um valor de 0 se a máquina remota não hesitar " +"propriamente em ligações TCP - de outro modo irá ocorrer corrupção de dados. " +"As máquinas que requerem isto estão em violação de RFC 2068." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:293 +msgid "" +"The used bandwidth can be limited with <literal>Acquire::http::Dl-Limit</" +"literal> which accepts integer values in kilobyte. The default value is 0 " +"which deactivates the limit and tries uses as much as possible of the " +"bandwidth (Note that this option implicit deactivates the download from " +"multiple servers at the same time.)" +msgstr "" +"A largura de banda usada pode ser limitada com <literal>Acquire::http::Dl-" +"Limit</literal> que aceita valores inteiros em kilobytes. O valor " +"predefinido é 0 que desactiva o limite e tenta usar o máximo possível da " +"largura de banda (Note que esta opção implícita desactiva a descarga de " +"múltiplos servidores ao mesmo tempo.)" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:298 +msgid "" +"<literal>Acquire::http::User-Agent</literal> can be used to set a different " +"User-Agent for the http download method as some proxies allow access for " +"clients only if the client uses a known identifier." +msgstr "" +"<literal>Acquire::http::User-Agent</literal> pode ser usado para definir um " +"Utilizador-Agente diferente para o método de download por http, porque " +"alguns proxies apenas permitem acesso a clientes se o cliente usar um " +"identificador conhecido." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:304 +msgid "https" +msgstr "https" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:305 +msgid "" +"HTTPS URIs. Cache-control, Timeout, AllowRedirect, Dl-Limit and proxy " +"options are the same as for <literal>http</literal> method and will also " +"default to the options from the <literal>http</literal> method if they are " +"not explicitly set for https. <literal>Pipeline-Depth</literal> option is " +"not supported yet." +msgstr "" +"HTTPS URIs. as opções Cache-control, Timeout, AllowRedirect, Dl-Limit e " +"proxy são as mesmas para o método <literal>http</literal> e irá também usar " +"as opções predefinidas do método <literal>http</literal> se não forem " +"explicitamente definidas para https. A opção <literal>Pipeline-Depth</" +"literal> ainda não é suportada." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:311 +msgid "" +"<literal>CaInfo</literal> suboption specifies place of file that holds info " +"about trusted certificates. <literal><host>::CaInfo</literal> is " +"corresponding per-host option. <literal>Verify-Peer</literal> boolean " +"suboption determines whether verify server's host certificate against " +"trusted certificates or not. <literal><host>::Verify-Peer</literal> " +"is corresponding per-host option. <literal>Verify-Host</literal> boolean " +"suboption determines whether verify server's hostname or not. <literal><" +"host>::Verify-Host</literal> is corresponding per-host option. " +"<literal>SslCert</literal> determines what certificate to use for client " +"authentication. <literal><host>::SslCert</literal> is corresponding " +"per-host option. <literal>SslKey</literal> determines what private key to " +"use for client authentication. <literal><host>::SslKey</literal> is " +"corresponding per-host option. <literal>SslForceVersion</literal> overrides " +"default SSL version to use. Can contain 'TLSv1' or 'SSLv3' string. " +"<literal><host>::SslForceVersion</literal> is corresponding per-host " +"option." +msgstr "" +"A sub-opção <literal>CaInfo</literal> especifica o lugar do ficheiro que " +"contém informação acerca de certificados de confiança. <literal><" +"host>::CaInfo</literal> é a opção por máquina correspondente. A sub-opção " +"booleana <literal>Verify-Peer</literal> determina se o certificado da " +"máquina servidora é um certificado de confiança ou não. <literal><" +"host>::Verify-Peer</literal> é a opção por máquina correspondente. A sub-" +"opção <literal>Verify-Host</literal> determina se o nome da máquina " +"servidora é verificado ou não. <literal><host>::Verify-Host</literal> " +"é a opção por máquina correspondente. <literal>SslCert</literal> determina " +"qual certificado a usar para autenticação de clientes <literal><host>::" +"SslCert</literal> é a opção por máquina correspondente. <literal>SslKey</" +"literal> determina qual chave privada a usar para autenticação de clientes. " +"<literal><host>::SslKey</literal> é a opção por máquina " +"correspondente. <literal>SslForceVersion</literal> sobrepõe a versão SSL " +"predefinida a usar. Pode conter strings 'TLSv1' ou 'SSLv3'. <literal><" +"host>::SslForceVersion</literal> é a opção po máquina correspondente." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:329 sources.list.5.xml:150 +msgid "ftp" +msgstr "ftp" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:330 +msgid "" +"FTP URIs; ftp::Proxy is the default ftp proxy to use. It is in the standard " +"form of <literal>ftp://[[user][:pass]@]host[:port]/</literal>. Per host " +"proxies can also be specified by using the form <literal>ftp::Proxy::<" +"host></literal> with the special keyword <literal>DIRECT</literal> " +"meaning to use no proxies. If no one of the above settings is specified, " +"<envar>ftp_proxy</envar> environment variable will be used. To use a ftp " +"proxy you will have to set the <literal>ftp::ProxyLogin</literal> script in " +"the configuration file. This entry specifies the commands to send to tell " +"the proxy server what to connect to. Please see &configureindex; for an " +"example of how to do this. The substitution variables available are <literal>" +"$(PROXY_USER)</literal> <literal>$(PROXY_PASS)</literal> <literal>" +"$(SITE_USER)</literal> <literal>$(SITE_PASS)</literal> <literal>$(SITE)</" +"literal> and <literal>$(SITE_PORT)</literal> Each is taken from it's " +"respective URI component." +msgstr "" +"URIs FTP; ftp::Proxy é o proxy ftp predefinido a usar. Está no formato " +"standard de <literal>ftp://[[user][:pass]@]host[:port]/</literal>. Os " +"proxies por máquina podem também ser especificados ao usar o formato " +"<literal>ftp::Proxy::<host></literal> com a palavra chave especial " +"<literal>DIRECT</literal> que significa não usar nenhum proxy. Se nenhuma " +"das definições acima for especificada, será usada a variável de ambiente " +"<envar>ftp_proxy</envar>. Para usar um proxy ftp você tem que definir o " +"script <literal>ftp::ProxyLogin</literal> no ficheiro de configuração. Esta " +"entrada especifica os comandos a enviar para dizer ao servidor proxy ao que " +"se ligar. Por favor veja &configureindex; para um exemplo de como fazer " +"isto. As variáveis de substituição disponíveis são <literal>$(PROXY_USER)</" +"literal> <literal>$(PROXY_PASS)</literal> <literal>$(SITE_USER)</literal> " +"<literal>$(SITE_PASS)</literal> <literal>$(SITE)</literal> e <literal>" +"$(SITE_PORT)</literal>. Cada uma é tirada do seu componente URI respectivo." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:349 +msgid "" +"Several settings are provided to control passive mode. Generally it is safe " +"to leave passive mode on, it works in nearly every environment. However " +"some situations require that passive mode be disabled and port mode ftp used " +"instead. This can be done globally, for connections that go through a proxy " +"or for a specific host (See the sample config file for examples)." +msgstr "" +"São disponibilizadas várias definições para controlar o modo passivo. " +"Geralmente é seguro deixar o modo passivo ligado, funciona em quase todos " +"ambientes. No entanto algumas situações requerem que o modo passivo seja " +"desactivado e em vez disso usar o modo port ftp. Isto pode ser feito " +"globalmente, para ligações que passam por um proxy ou para uma máquina " +"específica (Veja a amostra de ficheiro de configuração para exemplos)." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:356 +msgid "" +"It is possible to proxy FTP over HTTP by setting the <envar>ftp_proxy</" +"envar> environment variable to a http url - see the discussion of the http " +"method above for syntax. You cannot set this in the configuration file and " +"it is not recommended to use FTP over HTTP due to its low efficiency." +msgstr "" +"É possível usar proxy FTP sobre HTTP ao definir a variável de ambiente " +"<envar>ftp_proxy</envar> para um url http - veja a discussão do método http " +"em cima para a sintaxe. Você não pode definir isto no ficheiro de " +"configuração e não é recomendado usar FTP sobre HTTP devido à sua baixa " +"eficiência." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:361 +msgid "" +"The setting <literal>ForceExtended</literal> controls the use of RFC2428 " +"<literal>EPSV</literal> and <literal>EPRT</literal> commands. The default is " +"false, which means these commands are only used if the control connection is " +"IPv6. Setting this to true forces their use even on IPv4 connections. Note " +"that most FTP servers do not support RFC2428." +msgstr "" +"A definição <literal>ForceExtended</literal> controla o uso de comandos " +"RFC2428 <literal>EPSV</literal> e <literal>EPRT</literal>. A predefinição é " +"falso, o que significa que estes comandos apenas são usados se a ligação de " +"controle for IPv6. Definir isto para verdadeiro força o seu uso mesmo em " +"ligações IPv4. Note que a maioria dos servidores FTP não suporta RFC2428." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:368 sources.list.5.xml:132 +msgid "cdrom" +msgstr "cdrom" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para><literallayout> +#: apt.conf.5.xml:374 +#, no-wrap +msgid "/cdrom/::Mount \"foo\";" +msgstr "/cdrom/::Mount \"foo\";" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:369 +msgid "" +"CDROM URIs; the only setting for CDROM URIs is the mount point, " +"<literal>cdrom::Mount</literal> which must be the mount point for the CDROM " +"drive as specified in <filename>/etc/fstab</filename>. It is possible to " +"provide alternate mount and unmount commands if your mount point cannot be " +"listed in the fstab (such as an SMB mount and old mount packages). The " +"syntax is to put <placeholder type=\"literallayout\" id=\"0\"/> within the " +"cdrom block. It is important to have the trailing slash. Unmount commands " +"can be specified using UMount." +msgstr "" +"CDROM URIs; a única definição para URIs de CDROM é o ponto de montagem, " +"<literal>cdrom::Mount</literal> que deve ser o ponto de montagem para a " +"drive de CDROM como especificado em <filename>/etc/fstab</filename>. É " +"possível fornecer comandos de montar e desmontar alternativos se o seu ponto " +"de montagem não puder ser listado na fstab (como uma montagem SMB e pacotes " +"de montagem antiga). A sintaxe é colocar <placeholder type=\"literallayout" +"\" id=\"0\"/> dentro do bloco cdrom. É importante ter a barra final. " +"Comandos para desmontar podem ser especificados usando UMount." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:379 +msgid "gpgv" +msgstr "gpgv" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:380 +msgid "" +"GPGV URIs; the only option for GPGV URIs is the option to pass additional " +"parameters to gpgv. <literal>gpgv::Options</literal> Additional options " +"passed to gpgv." +msgstr "" +"GPGV URIs;a única opção para GPGV URIs é a opção para passar parâmetros " +"adicionais ao gpgv. <literal>gpgv::Options</literal> Opções adicionais " +"passadas ao gpgv." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:385 +msgid "CompressionTypes" +msgstr "CompressionTypes" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para><synopsis> +#: apt.conf.5.xml:391 +#, no-wrap +msgid "Acquire::CompressionTypes::<replaceable>FileExtension</replaceable> \"<replaceable>Methodname</replaceable>\";" +msgstr "Acquire::CompressionTypes::<replaceable>Extensão de Ficheiro</replaceable> \"<replaceable>Nome de método</replaceable>\";" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:386 +msgid "" +"List of compression types which are understood by the acquire methods. " +"Files like <filename>Packages</filename> can be available in various " +"compression formats. Per default the acquire methods can decompress " +"<command>bzip2</command>, <command>lzma</command> and <command>gzip</" +"command> compressed files, with this setting more formats can be added on " +"the fly or the used method can be changed. The syntax for this is: " +"<placeholder type=\"synopsis\" id=\"0\"/>" +msgstr "" +"Lista dos tipos de compressão que são compreendidos pelos métodos de " +"aquisição. Ficheiros como <filename>Packages</filename> podem estar " +"disponíveis em vários formatos de compressão. Por predefinição os métodos de " +"aquisição podem descomprimir ficheiros comprimidos em <command>bzip2</" +"command>, <command>lzma</command> e <command>gzip</command>, mais formatos " +"podem ser adicionados na hora com esta definição ou o método usado pode ser " +"alterado. A sintaxe para isto é: <placeholder type=\"synopsis\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para><synopsis> +#: apt.conf.5.xml:396 +#, no-wrap +msgid "Acquire::CompressionTypes::Order:: \"gz\";" +msgstr "Acquire::CompressionTypes::Order:: \"gz\";" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para><synopsis> +#: apt.conf.5.xml:399 +#, no-wrap +msgid "Acquire::CompressionTypes::Order { \"lzma\"; \"gz\"; };" +msgstr "Acquire::CompressionTypes::Order { \"lzma\"; \"gz\"; };" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:392 +msgid "" +"Also the <literal>Order</literal> subgroup can be used to define in which " +"order the acquire system will try to download the compressed files. The " +"acquire system will try the first and proceed with the next compression type " +"in this list on error, so to prefer one over the other type simple add the " +"preferred type at first - not already added default types will be added at " +"run time to the end of the list, so e.g. <placeholder type=\"synopsis\" id=" +"\"0\"/> can be used to prefer <command>gzip</command> compressed files over " +"<command>bzip2</command> and <command>lzma</command>. If <command>lzma</" +"command> should be preferred over <command>gzip</command> and " +"<command>bzip2</command> the configure setting should look like this " +"<placeholder type=\"synopsis\" id=\"1\"/> It is not needed to add " +"<literal>bz2</literal> explicit to the list as it will be added automatic." +msgstr "" +"Também o subgrupo <literal>Order</literal> pode ser usado para definir em " +"que ordem o sistema de aquisição irá tentar descarregar os ficheiros " +"comprimidos. O sistema de aquisição irá tentar com o primeiro e prosseguir " +"com o próximo tipo de compressão na lista em caso de erro, portanto para " +"preferir um sobre outro tipo, simplesmente adicione o tipo preferido em " +"primeiro lugar - tipos predefinidos não já adicionados serão adicionados em " +"tempo de execução ao fim da lista, então, ex. <placeholder type=\"synopsis\" " +"id=\"0\"/> pode ser usado para preferir ficheiros comprimidos em " +"<command>gzip</command> sobre <command>bzip2</command> e <command>lzma</" +"command>. Se o <command>lzma</command> deve ser preferido sobre " +"<command>gzip</command> e <command>bzip2</command> a definição de " +"configuração deverá parecer-se com isto: <placeholder type=\"synopsis\" id=" +"\"1\"/>. Não é necessário adicionar explicitamente <literal>bz2</literal> à " +"lista pois será adicionado automaticamente." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para><literallayout> +#: apt.conf.5.xml:403 +#, no-wrap +msgid "Dir::Bin::bzip2 \"/bin/bzip2\";" +msgstr "Dir::Bin::bzip2 \"/bin/bzip2\";" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:401 +msgid "" +"Note that at run time the <literal>Dir::Bin::<replaceable>Methodname</" +"replaceable></literal> will be checked: If this setting exists the method " +"will only be used if this file exists, e.g. for the bzip2 method (the " +"inbuilt) setting is <placeholder type=\"literallayout\" id=\"0\"/> Note also " +"that list entries specified on the command line will be added at the end of " +"the list specified in the configuration files, but before the default " +"entries. To prefer a type in this case over the ones specified in in the " +"configuration files you can set the option direct - not in list style. This " +"will not override the defined list, it will only prefix the list with this " +"type." +msgstr "" +"Note que em tempo de execução será verificado o <literal>Dir::Bin::" +"<replaceable>nome de método</replaceable></literal>: se esta definição " +"existir, o método apenas será usado se este ficheiro existir, ex. para o " +"método bzip2 (o embutido) a definição é <placeholder type=\"literallayout\" " +"id=\"0\"/>. Note também que as entradas na lista especificadas na linha de " +"comandos serão adicionadas no fim da lista especificada nos ficheiros de " +"configuração, mas antes das entradas predefinidas. Para preferir um tipo " +"neste caso sobre aqueles especificados nos ficheiros de configuração você " +"pode definir a opção directamente - não em estilo de lista. Isto não irá " +"sobrepor a lista definida, irá apenas prefixar a lista com este tipo." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:408 +msgid "" +"While it is possible to add an empty compression type to the order list, but " +"APT in its current version doesn't understand it correctly and will display " +"many warnings about not downloaded files - these warnings are most of the " +"time false negatives. Future versions will maybe include a way to really " +"prefer uncompressed files to support the usage of local mirrors." +msgstr "" +"Apesar de ser possível de adicionar um tipo de compressão vazio à lista de " +"ordem, o APT na sua versão actual não o compreende correctamente e irá " +"mostrar muitos avisos acerca de ficheiros não descarregados - estes avisos " +"são na maioria vezes falsos positivos. Futuras versões irão talvez incluir " +"um modo de realmente preferir ficheiros não-comprimidos para suportar a " +"utilização de mirrors locais." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: apt.conf.5.xml:414 +msgid "Languages" +msgstr "Languages" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:415 +msgid "" +"The Languages subsection controls which <filename>Translation</filename> " +"files are downloaded and in which order APT tries to display the Description-" +"Translations. APT will try to display the first available Description in the " +"Language which is listed at first. Languages can be defined with their short " +"or long Languagecodes. Note that not all archives provide " +"<filename>Translation</filename> files for every Language - especially the " +"long Languagecodes are rare, so please inform you which ones are available " +"before you set here impossible values." +msgstr "" +"A subsecção Languages controla quais ficheiros <filename>Translation</" +"filename> são descarregados e em que ordem o APT tenta mostrar as Traduções " +"das Descrições. O APT irá tentar mostra a primeira Descrição disponível para " +"a Linguagem que está listada em primeiro. As linguagens podem ser definidas " +"com os seus códigos de linguagem curtos ou longos. Note que nem todos os " +"arquivos disponibilizam ficheiros <filename>Translation</filename> para " +"todas as Linguagens - especialmente os códigos de linguagem longos são " +"raros, portanto por favor informe-se sobre os quais estão disponíveis antes " +"de definir aqui valores impossíveis." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para><programlisting> +#: apt.conf.5.xml:431 +#, no-wrap +msgid "Acquire::Languages { \"environment\"; \"de\"; \"en\"; \"none\"; \"fr\"; };" +msgstr "Acquire::Languages { \"environment\"; \"de\"; \"en\"; \"none\"; \"fr\"; };" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:421 +msgid "" +"The default list includes \"environment\" and \"en\". " +"\"<literal>environment</literal>\" has a special meaning here: It will be " +"replaced at runtime with the languagecodes extracted from the " +"<literal>LC_MESSAGES</literal> environment variable. It will also ensure " +"that these codes are not included twice in the list. If " +"<literal>LC_MESSAGES</literal> is set to \"C\" only the " +"<filename>Translation-en</filename> file (if available) will be used. To " +"force apt to use no Translation file use the setting <literal>Acquire::" +"Languages=none</literal>. \"<literal>none</literal>\" is another special " +"meaning code which will stop the search for a fitting <filename>Translation</" +"filename> file. This can be used by the system administrator to let APT " +"know that it should download also this files without actually use them if " +"the environment doesn't specify this languages. So the following example " +"configuration will result in the order \"en, de\" in an english and in \"de, " +"en\" in a german localization. Note that \"fr\" is downloaded, but not used " +"if APT is not used in a french localization, in such an environment the " +"order would be \"fr, de, en\". <placeholder type=\"programlisting\" id=\"0" +"\"/>" +msgstr "" +"A lista predefinida inclui \"environment\" e \"en\". \"<literal>environment</" +"literal>\" tem um significado especial aqui: será substituída em tempo de " +"execução por códigos de linguagem extraídos a partir da variável de ambiente " +"<literal>LC_MESSAGES</literal>. Também irá assegurar que estes códigos não " +"são incluídos duas vezes na lista. Se <literal>LC_MESSAGES</literal> estiver " +"definida para \"C\" apenas o ficheiro <filename>Translation-en</filename> " +"será usado (se disponível). Para forçar o apt a não usar nenhum ficheiro de " +"tradução use a definição <literal>Acquire::Languages=none</literal>. " +"\"<literal>none</literal>\" é outro código de significado especial que irá " +"parar a procura por um ficheiro <filename>Translation</filename> apropriado. " +"Isto pode ser usado pelo administrador do sistema para dizer ao APT que deve " +"também descarregar estes ficheiros sem realmente os usar, se o ambiente não " +"especificar estas linguagens. Portanto o seguinte exemplo de configuração " +"irá resultar na ordem \"en, de\" num ambiente em inglês e \"de, en\" num " +"ambiente em alemão. Note que o \"fr\" é descarregado, mas não é usado se o " +"APT não for usado num ambiente em francês, em tal ambiente a ordem deveria " +"ser \"fr, de, en\". <placeholder type=\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:228 +msgid "" +"The <literal>Acquire</literal> group of options controls the download of " +"packages and the URI handlers. <placeholder type=\"variablelist\" id=\"0\"/>" +msgstr "" +"O grupo de opções <literal>Acquire</literal> controla a descarga de pacotes " +"e os manipuladores de URI. <placeholder type=\"variablelist\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><title> +#: apt.conf.5.xml:438 +msgid "Directories" +msgstr "Directories" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:440 +msgid "" +"The <literal>Dir::State</literal> section has directories that pertain to " +"local state information. <literal>lists</literal> is the directory to place " +"downloaded package lists in and <literal>status</literal> is the name of the " +"dpkg status file. <literal>preferences</literal> is the name of the APT " +"preferences file. <literal>Dir::State</literal> contains the default " +"directory to prefix on all sub items if they do not start with <filename>/</" +"filename> or <filename>./</filename>." +msgstr "" +"A secção <literal>Dir::State</literal> tem directórios que pertencem à " +"informação de estado local. <literal>lists</literal> é o directório para " +"colocar listas de pacotes descarregadas e <literal>status</literal> é o nome " +"do ficheiro de estado do dpkg. <literal>preferences</literal> é o nome do " +"ficheiro de preferências do APT. <literal>Dir::State</literal> contém o " +"directório predefinido para pré-fixar em todos os sub items que não começam " +"com <filename>/</filename> ou <filename>./</filename>." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:447 +msgid "" +"<literal>Dir::Cache</literal> contains locations pertaining to local cache " +"information, such as the two package caches <literal>srcpkgcache</literal> " +"and <literal>pkgcache</literal> as well as the location to place downloaded " +"archives, <literal>Dir::Cache::archives</literal>. Generation of caches can " +"be turned off by setting their names to be blank. This will slow down " +"startup but save disk space. It is probably preferred to turn off the " +"pkgcache rather than the srcpkgcache. Like <literal>Dir::State</literal> the " +"default directory is contained in <literal>Dir::Cache</literal>" +msgstr "" +"<literal>Dir::Cache</literal> contém localizações pertencentes a informação " +"da cache local, como as caches de dois pacotes <literal>srcpkgcache</" +"literal> e <literal>pkgcache</literal> assim como a localização onde colocar " +"arquivos descarregados, <literal>Dir::Cache::archives</literal>. A geração " +"de caches pode ser desligada ao definir os seus nomes para vazio. Isto irá " +"abrandar o arranque mas poupar espaço em disco. Provavelmente é preferível " +"desligar o pkgcache em vez do srcpkgcache. Tal como <literal>Dir::State</" +"literal> o directório predefinido é contido em <literal>Dir::Cache</literal>" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:456 +msgid "" +"<literal>Dir::Etc</literal> contains the location of configuration files, " +"<literal>sourcelist</literal> gives the location of the sourcelist and " +"<literal>main</literal> is the default configuration file (setting has no " +"effect, unless it is done from the config file specified by " +"<envar>APT_CONFIG</envar>)." +msgstr "" +"<literal>Dir::Etc</literal> contém a localização dos ficheiros de " +"configuração, <literal>sourcelist</literal> fornece a localização da " +"sourcelist e <literal>main</literal> é o ficheiro da configuração " +"predefinida (definição não tem efeito, a menos que seja feita a partir do " +"ficheiro de configuração especificado por <envar>APT_CONFIG</envar>)." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:462 +msgid "" +"The <literal>Dir::Parts</literal> setting reads in all the config fragments " +"in lexical order from the directory specified. After this is done then the " +"main config file is loaded." +msgstr "" +"A definição <literal>Dir::Parts</literal> lê todos os fragmentos de " +"configuração em ordem léxica a partir do directório especificado. Após isto " +"estar feito então é carregado o ficheiro de configuração principal." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:466 +msgid "" +"Binary programs are pointed to by <literal>Dir::Bin</literal>. <literal>Dir::" +"Bin::Methods</literal> specifies the location of the method handlers and " +"<literal>gzip</literal>, <literal>bzip2</literal>, <literal>lzma</literal>, " +"<literal>dpkg</literal>, <literal>apt-get</literal> <literal>dpkg-source</" +"literal> <literal>dpkg-buildpackage</literal> and <literal>apt-cache</" +"literal> specify the location of the respective programs." +msgstr "" +"Programas binários são apontados por <literal>Dir::Bin</literal>. " +"<literal>Dir::Bin::Methods</literal> especifica a localização dos " +"manipuladores do método e de <literal>gzip</literal>, <literal>bzip2</" +"literal>, <literal>lzma</literal>, <literal>dpkg</literal>, <literal>apt-" +"get</literal> <literal>dpkg-source</literal> <literal>dpkg-buildpackage</" +"literal> e <literal>apt-cache</literal> especifica a localização dos " +"respectivos programas." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:474 +msgid "" +"The configuration item <literal>RootDir</literal> has a special meaning. If " +"set, all paths in <literal>Dir::</literal> will be relative to " +"<literal>RootDir</literal>, <emphasis>even paths that are specified " +"absolutely</emphasis>. So, for instance, if <literal>RootDir</literal> is " +"set to <filename>/tmp/staging</filename> and <literal>Dir::State::status</" +"literal> is set to <filename>/var/lib/dpkg/status</filename>, then the " +"status file will be looked up in <filename>/tmp/staging/var/lib/dpkg/status</" +"filename>." +msgstr "" +"O item de configuração <literal>RootDir</literal> tem um significado " +"especial. Se definido, todos os caminhos em <literal>Dir::</literal> serão " +"relativos a <literal>RootDir</literal>, <emphasis>mesmo caminhos que estão " +"absolutamente especificados</emphasis>. Então, por exemplo, se " +"<literal>RootDir</literal> estiver definido para <filename>/tmp/staging</" +"filename> e <literal>Dir::State::status</literal> estiver definido para " +"<filename>/var/lib/dpkg/status</filename>, então o ficheiro status será " +"procurado em <filename>/tmp/staging/var/lib/dpkg/status</filename>." + +#. type: Content of: <refentry><refsect1><title> +#: apt.conf.5.xml:487 +msgid "APT in DSelect" +msgstr "APT em DSelect" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:489 +msgid "" +"When APT is used as a &dselect; method several configuration directives " +"control the default behaviour. These are in the <literal>DSelect</literal> " +"section." +msgstr "" +"Quando o APT é usado com um método &dselect;, várias directivas de " +"configuração controlam o comportamento predefinido. Estas estão na secção " +"<literal>DSelect</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:493 +msgid "Clean" +msgstr "Clean" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:494 +msgid "" +"Cache Clean mode; this value may be one of always, prompt, auto, pre-auto " +"and never. always and prompt will remove all packages from the cache after " +"upgrading, prompt (the default) does so conditionally. auto removes only " +"those packages which are no longer downloadable (replaced with a new version " +"for instance). pre-auto performs this action before downloading new " +"packages." +msgstr "" +"Modo Cache Clean: este valor deve ser um de always, prompt, auto, pre-auto e " +"never. always e prompt irão remover todos os pacotes da cache após a " +"actualização, prompt (a predefinição) fá-lo condicionalmente. auto remove " +"apenas aqueles pacotes que já não podem ser descarregados (por exemplo, " +"substituídos por uma nova versão). pre-auto executa esta acção antes de " +"descarregar novos pacotes." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:503 +msgid "" +"The contents of this variable is passed to &apt-get; as command line options " +"when it is run for the install phase." +msgstr "" +"O conteúdo desta variável é passado ao &apt-get; como opções de linha de " +"comandos quando é corrido para a fase de instalação." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:507 +msgid "Updateoptions" +msgstr "Updateoptions" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:508 +msgid "" +"The contents of this variable is passed to &apt-get; as command line options " +"when it is run for the update phase." +msgstr "" +"O conteúdo desta variável é passado ao &apt-get; como opções de linha de " +"comandos quando é executado para a fase de actualização." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:512 +msgid "PromptAfterUpdate" +msgstr "PromptAfterUpdate" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:513 +msgid "" +"If true the [U]pdate operation in &dselect; will always prompt to continue. " +"The default is to prompt only on error." +msgstr "" +"Se for verdadeira a operação [U]pdate no &dselect; irá sempre avisar para " +"continuar. A predefinição é avisar apenas em caso de erro." + +#. type: Content of: <refentry><refsect1><title> +#: apt.conf.5.xml:519 +msgid "How APT calls dpkg" +msgstr "Como o APT chama o dpkg" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:520 +msgid "" +"Several configuration directives control how APT invokes &dpkg;. These are " +"in the <literal>DPkg</literal> section." +msgstr "" +"Várias directivas de configuração controlam como o APT invoca o invokes " +"&dpkg;. Estas estão na secção <literal>DPkg</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:525 +msgid "" +"This is a list of options to pass to dpkg. The options must be specified " +"using the list notation and each list item is passed as a single argument to " +"&dpkg;." +msgstr "" +"Isto é uma lista de opções para passar ao dpkg. As opções têm de ser " +"especificadas usando a notação de lista e cada item da lista é passado como " +"um argumento único ao &dpkg;." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:530 +msgid "Pre-Invoke" +msgstr "Pre-Invoke" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:530 +msgid "Post-Invoke" +msgstr "Post-Invoke" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:531 +msgid "" +"This is a list of shell commands to run before/after invoking &dpkg;. Like " +"<literal>options</literal> this must be specified in list notation. The " +"commands are invoked in order using <filename>/bin/sh</filename>, should any " +"fail APT will abort." +msgstr "" +"Isto é uma lista de comandos shell para executar antes/após invocar o " +"&dpkg;. Tal como as <literal>opções</literal> isto tem que ser especificado " +"em notação listada. Os comandos são invocados em ordem usando <filename>/" +"bin/sh</filename>, caso algum deles falhe, o APT irá abortar." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:537 +msgid "Pre-Install-Pkgs" +msgstr "Pre-Install-Pkgs" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:538 +msgid "" +"This is a list of shell commands to run before invoking dpkg. Like " +"<literal>options</literal> this must be specified in list notation. The " +"commands are invoked in order using <filename>/bin/sh</filename>, should any " +"fail APT will abort. APT will pass to the commands on standard input the " +"filenames of all .deb files it is going to install, one per line." +msgstr "" +"Isto é uma lista de comandos shell para executar antes de invocar o &dpkg;. " +"Tal como as <literal>opções</literal> isto tem que ser especificado em " +"notação listada. Os comandos são invocados em ordem usando <filename>/bin/" +"sh</filename>, caso algum deles falhe, o APT irá abortar. O APT passa para " +"os comandos na entrada standard os nomes de ficheiros de todos os ficheiros ." +"deb que vai instalar, um por cada linha." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:544 +msgid "" +"Version 2 of this protocol dumps more information, including the protocol " +"version, the APT configuration space and the packages, files and versions " +"being changed. Version 2 is enabled by setting <literal>DPkg::Tools::" +"options::cmd::Version</literal> to 2. <literal>cmd</literal> is a command " +"given to <literal>Pre-Install-Pkgs</literal>." +msgstr "" +"A versão 2 deste protocolo despeja mais informação, incluindo a versão de " +"protocolo, o espaço de configuração do APT e os pacotes, ficheiros e versões " +"que foram alteradas. A versão 2 é activada ao definir <literal>DPkg::Tools::" +"options::cmd::Version</literal> a 2. <literal>cmd</literal> é um comando " +"dado ao <literal>Pre-Install-Pkgs</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:551 +msgid "Run-Directory" +msgstr "Run-Directory" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:552 +msgid "" +"APT chdirs to this directory before invoking dpkg, the default is <filename>/" +"</filename>." +msgstr "" +"O APT muda para este directório (chdir) antes de invocar o dpkg, a " +"predefinição é <filename>/</filename>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:556 +msgid "Build-options" +msgstr "Build-options" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:557 +msgid "" +"These options are passed to &dpkg-buildpackage; when compiling packages, the " +"default is to disable signing and produce all binaries." +msgstr "" +"Estas opções são passadas ao &dpkg-buildpackage; quando compila pacotes, a " +"predefinição é desactivar a assinatura e produzir todos os binários." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt.conf.5.xml:562 +msgid "dpkg trigger usage (and related options)" +msgstr "Utilização trigger do dpkg (e opções relacionadas)" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt.conf.5.xml:563 +msgid "" +"APT can call dpkg in a way so it can make aggressive use of triggers over " +"multiply calls of dpkg. Without further options dpkg will use triggers only " +"in between his own run. Activating these options can therefore decrease the " +"time needed to perform the install / upgrade. Note that it is intended to " +"activate these options per default in the future, but as it changes the way " +"APT calling dpkg drastically it needs a lot more testing. <emphasis>These " +"options are therefore currently experimental and should not be used in " +"productive environments.</emphasis> Also it breaks the progress reporting so " +"all frontends will currently stay around half (or more) of the time in the " +"100% state while it actually configures all packages." +msgstr "" +"APT pode chamar o dpkg num modo que faz uso agressivo dos triggers sobre " +"múltiplas chamadas do dpkg. Sem mais opções o dpkg irá usar triggers apenas " +"entre a sua própria execução. Activando estas opções pode portanto diminuir " +"o tempo necessário para executar a instalação / actualização. Note que é " +"intenção futura activar estas opções por predefinição, mas como muda " +"drasticamente a maneira como o APT chama o dpkg, precisa de muitos mais " +"testes. <emphasis>Estas opções são portanto experimentais e não deve ser " +"usadas em ambientes produtivos.</emphasis> Também interrompe o relatório de " +"progresso, então todos os frontends irão permanecer a cerca de metade (ou " +"mais) do tempo no estado de 100% enquanto na realidade está a configurar " +"todos os pacotes." + +#. type: Content of: <refentry><refsect1><refsect2><para><literallayout> +#: apt.conf.5.xml:578 +#, no-wrap +msgid "" +"DPkg::NoTriggers \"true\";\n" +"PackageManager::Configure \"smart\";\n" +"DPkg::ConfigurePending \"true\";\n" +"DPkg::TriggersPending \"true\";" +msgstr "" +"DPkg::NoTriggers \"true\";\n" +"PackageManager::Configure \"smart\";\n" +"DPkg::ConfigurePending \"true\";\n" +"DPkg::TriggersPending \"true\";" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt.conf.5.xml:572 +msgid "" +"Note that it is not guaranteed that APT will support these options or that " +"these options will not cause (big) trouble in the future. If you have " +"understand the current risks and problems with these options, but are brave " +"enough to help testing them create a new configuration file and test a " +"combination of options. Please report any bugs, problems and improvements " +"you encounter and make sure to note which options you have used in your " +"reports. Asking dpkg for help could also be useful for debugging proposes, " +"see e.g. <command>dpkg --audit</command>. A defensive option combination " +"would be <placeholder type=\"literallayout\" id=\"0\"/>" +msgstr "" +"Note que não é garantido que o APT irá suportar estas opções ou que estas " +"opções não irão causar (grandes) problemas no futuro. Se você compreendeu os " +"riscos e problemas actuais com estas opções, mas tem coragem suficiente para " +"ajudar a testá-la, crie um novo ficheiro de configuração e teste uma " +"combinação de opções. Por favor reporte quaisquer bugs, problemas e " +"melhoramentos que encontre e certifique-se de anotar nos seus relatórios " +"quais as opções que usou. Pedir ajuda ao dpkg também pode ser útil para " +"propósitos de depuração, veja ex. <command>dpkg --audit</command>. Uma " +"combinação de opções defensiva seria <placeholder type=\"literallayout\" id=" +"\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt.conf.5.xml:584 +msgid "DPkg::NoTriggers" +msgstr "DPkg::NoTriggers" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:585 +msgid "" +"Add the no triggers flag to all dpkg calls (except the ConfigurePending " +"call). See &dpkg; if you are interested in what this actually means. In " +"short: dpkg will not run the triggers when this flag is present unless it is " +"explicitly called to do so in an extra call. Note that this option exists " +"(undocumented) also in older apt versions with a slightly different meaning: " +"Previously these option only append --no-triggers to the configure calls to " +"dpkg - now apt will add these flag also to the unpack and remove calls." +msgstr "" +"Adiciona a bandeira 'no triggers' a todas as chamadas do dpkg (excepto a " +"chamada ConfigurePending). Veja &dpkg; se está interessado no que isto " +"realmente representa. Em resumo: o dpkg não irá correr os triggers quando " +"esta bandeira está presente a menos que seja explicitamente chamado a fazê-" +"lo numa chamada extra. Note que esta opção existe (não documentada) também " +"em versões mais antigas do apt com um significado ligeiramente diferente: " +"Anteriormente esta opção apenas acrescentava --no-triggers às chamadas " +"configure para o dpkg - agora o apt irá adicionar esta bandeira também às " +"chamadas unpack e remove." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt.conf.5.xml:592 +msgid "PackageManager::Configure" +msgstr "PackageManager::Configure" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:593 +msgid "" +"Valid values are \"<literal>all</literal>\", \"<literal>smart</literal>\" " +"and \"<literal>no</literal>\". \"<literal>all</literal>\" is the default " +"value and causes APT to configure all packages explicit. The " +"\"<literal>smart</literal>\" way is it to configure only packages which need " +"to be configured before another package can be unpacked (Pre-Depends) and " +"let the rest configure by dpkg with a call generated by the next option. " +"\"<literal>no</literal>\" on the other hand will not configure anything and " +"totally rely on dpkg for configuration (which will at the moment fail if a " +"Pre-Depends is encountered). Setting this option to another than the all " +"value will implicitly activate also the next option per default as otherwise " +"the system could end in an unconfigured status which could be unbootable!" +msgstr "" +"Valores válidos são \"<literal>all</literal>\", \"<literal>smart</literal>\" " +"e \"<literal>no</literal>\". \"<literal>all</literal>\" é o valor " +"predefinido e faz com que o APT configure todos os pacotes explícitos. O " +"modo \"<literal>smart</literal>\" serve para configurar apenas pacotes que " +"precisam de ser configurados antes que outro pacote possa ser desempacotado " +"(pré-dependências) e o resto configurado pelo dpkg com uma chamada gerada " +"pela próxima opção. \"<literal>no</literal>\" por outro lado não irá " +"configurar nada e confiar no dpkg para configurações (o qual irá falhar se " +"encontrar uma pré-dependência). Definir esta opção para outra que não seja o " +"valor all irá implicitamente activar também a próxima opção predefinida, " +"caso contrário o sistema poderia acabar num estado não configurado o qual " +"poderia não arrancar!" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt.conf.5.xml:603 +msgid "DPkg::ConfigurePending" +msgstr "DPkg::ConfigurePending" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:604 +msgid "" +"If this option is set apt will call <command>dpkg --configure --pending</" +"command> to let dpkg handle all required configurations and triggers. This " +"option is activated automatic per default if the previous option is not set " +"to <literal>all</literal>, but deactivating could be useful if you want to " +"run APT multiple times in a row - e.g. in an installer. In these sceneries " +"you could deactivate this option in all but the last run." +msgstr "" +"Se esta opção for definida, o apt irá chamar <command>dpkg --configure --" +"pending</command> para permitir ao dpkg lidar como todas as configurações e " +"triggers requisitados. Esta opção é activada automaticamente por " +"predefinição se a opção anterior não for definida para <literal>all</" +"literal>, mas desactivá-la pode ser útil se deseja correr o APT múltiplas " +"vezes numa fila - ex. numa instalação. Nestes cenários você pode desactivar " +"esta opção em todas excepto na última execução." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt.conf.5.xml:610 +msgid "DPkg::TriggersPending" +msgstr "DPkg::TriggersPending" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:611 +msgid "" +"Useful for <literal>smart</literal> configuration as a package which has " +"pending triggers is not considered as <literal>installed</literal> and dpkg " +"treats them as <literal>unpacked</literal> currently which is a dealbreaker " +"for Pre-Dependencies (see debbugs #526774). Note that this will process all " +"triggers, not only the triggers needed to configure this package." +msgstr "" +"Útil para configuração <literal>smart</literal>, pois um pacote que tenha " +"triggers pendentes não é considerado como <literal>installed</literal> e o " +"dpkg trata-o como actualmente <literal>unpacked</literal> o que é um modo de " +"lidar com pré-dependências (veja debbugs #526774). Note que isto irá " +"processar todos os triggers, e não apenas os triggers necessários para " +"configurar este pacote." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt.conf.5.xml:616 +msgid "PackageManager::UnpackAll" +msgstr "PackageManager::UnpackAll" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:617 +msgid "" +"As the configuration can be deferred to be done at the end by dpkg it can be " +"tried to order the unpack series only by critical needs, e.g. by Pre-" +"Depends. Default is true and therefore the \"old\" method of ordering in " +"various steps by everything. While both method were present in earlier APT " +"versions the <literal>OrderCritical</literal> method was unused, so this " +"method is very experimental and needs further improvements before becoming " +"really useful." +msgstr "" +"Como a configuração pode ser diferida a ser feita no final pelo dpkg, pode " +"ser tentada a ordenar a série de desempacotamento apenas por necessidades " +"críticas, ex. por pré-dependências. A predefinição é verdadeiro e então o " +"método \"antigo\" de ordenar em vários passos por tudo. Enquanto ambos os " +"métodos estão presentes em versões jovens do APT, o método " +"<literal>OrderCritical</literal> não foi usado, portanto este método é muito " +"experimental e necessita de mais melhorias antes de se tornar realmente útil." + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><term> +#: apt.conf.5.xml:624 +msgid "OrderList::Score::Immediate" +msgstr "OrderList::Score::Immediate" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para><literallayout> +#: apt.conf.5.xml:632 +#, no-wrap +msgid "" +"OrderList::Score {\n" +"\tDelete 500;\n" +"\tEssential 200;\n" +"\tImmediate 10;\n" +"\tPreDepends 50;\n" +"};" +msgstr "" +"OrderList::Score {\n" +"\tDelete 500;\n" +"\tEssential 200;\n" +"\tImmediate 10;\n" +"\tPreDepends 50;\n" +"};" + +#. type: Content of: <refentry><refsect1><refsect2><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:625 +msgid "" +"Essential packages (and there dependencies) should be configured immediately " +"after unpacking. It will be a good idea to do this quite early in the " +"upgrade process as these these configure calls require currently also " +"<literal>DPkg::TriggersPending</literal> which will run quite a few triggers " +"(which maybe not needed). Essentials get per default a high score but the " +"immediate flag is relatively low (a package which has a Pre-Depends is " +"higher rated). These option and the others in the same group can be used to " +"change the scoring. The following example shows the settings with there " +"default values. <placeholder type=\"literallayout\" id=\"0\"/>" +msgstr "" +"Os pacotes essenciais ( e as suas dependências) deve ser configurados " +"imediatamente após a descompactação. Será uma boa ideia fazer isto bem cedo " +"no processo de actualização pois estas chamadas de configuração também " +"requerem actualmente <literal>DPkg::TriggersPending</literal> o que irá " +"correr alguns triggers (que talvez não sejam necessários). Os essenciais " +"obtêm por predefinição uma pontuação alta mas a bandeira 'imediato' é " +"relativamente baixa (um pacote que tenha uma pré-dependência tem pontuação " +"mais alta). Esta opção e as outras no mesmo grupo podem ser usadas para " +"alterar a pontuação. O exemplo seguinte mostra as definições que são valores " +"predefinidos. <placeholder type=\"literallayout\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><title> +#: apt.conf.5.xml:645 +msgid "Periodic and Archives options" +msgstr "Opções Periodic e Archives" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:646 +msgid "" +"<literal>APT::Periodic</literal> and <literal>APT::Archives</literal> groups " +"of options configure behavior of apt periodic updates, which is done by " +"<literal>/etc/cron.daily/apt</literal> script. See header of this script for " +"the brief documentation of these options." +msgstr "" +"Os grupos de opções <literal>APT::Periodic</literal> e <literal>APT::" +"Archives</literal> configuram o comportamento das actualizações periódicas " +"do APT, o que é feito pelo script <literal>/etc/cron.daily/apt</literal>. " +"Veja o cabeçalho deste script para uma breve documentação das suas opções." + +#. type: Content of: <refentry><refsect1><title> +#: apt.conf.5.xml:654 +msgid "Debug options" +msgstr "Opções de depuração" + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:656 +msgid "" +"Enabling options in the <literal>Debug::</literal> section will cause " +"debugging information to be sent to the standard error stream of the program " +"utilizing the <literal>apt</literal> libraries, or enable special program " +"modes that are primarily useful for debugging the behavior of <literal>apt</" +"literal>. Most of these options are not interesting to a normal user, but a " +"few may be:" +msgstr "" +"Activar opções na secção <literal>Debug::</literal> irá causar o envio de " +"informação de depuração para o fluxo de erros standard do programa " +"utilizando as bibliotecas do <literal>apt</literal>, ou activar modos " +"especiais do programa que são principalmente úteis para depurar o " +"comportamento do <literal>apt</literal>. A maioria destas opções não têm " +"interesse para o utilizador normal, mas algumas podem ter:" + +#. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para> +#: apt.conf.5.xml:667 +msgid "" +"<literal>Debug::pkgProblemResolver</literal> enables output about the " +"decisions made by <literal>dist-upgrade, upgrade, install, remove, purge</" +"literal>." +msgstr "" +"<literal>Debug::pkgProblemResolver</literal> activa mensagens na saída " +"acerca das decisões tomadas por <literal>dist-upgrade, upgrade, install, " +"remove, purge</literal>." + +#. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para> +#: apt.conf.5.xml:675 +msgid "" +"<literal>Debug::NoLocking</literal> disables all file locking. This can be " +"used to run some operations (for instance, <literal>apt-get -s install</" +"literal>) as a non-root user." +msgstr "" +"<literal>Debug::NoLocking</literal> desactiva o bloqueio de todos os " +"ficheiros. Isto pode ser usado para executar algumas operações (por exemplo, " +"<literal>apt-get -s install</literal>) como um utilizador não root." + +#. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para> +#: apt.conf.5.xml:684 +msgid "" +"<literal>Debug::pkgDPkgPM</literal> prints out the actual command line each " +"time that <literal>apt</literal> invokes &dpkg;." +msgstr "" +"<literal>Debug::pkgDPkgPM</literal> escreve a linha de comandos actual de " +"cada vez que o <literal>apt</literal> invoca o &dpkg;." + +#. TODO: provide a +#. motivating example, except I haven't a clue why you'd want +#. to do this. +#. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para> +#: apt.conf.5.xml:692 +msgid "" +"<literal>Debug::IdentCdrom</literal> disables the inclusion of statfs data " +"in CDROM IDs." +msgstr "" +"<literal>Debug::IdentCdrom</literal> desactiva a inclusão de dados statfs em " +"IDs de CDROM." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:702 +msgid "A full list of debugging options to apt follows." +msgstr "Segue-se uma lista completa de opções de depuração para o apt." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:707 +msgid "<literal>Debug::Acquire::cdrom</literal>" +msgstr "<literal>Debug::Acquire::cdrom</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:711 +msgid "" +"Print information related to accessing <literal>cdrom://</literal> sources." +msgstr "" +"Escreve informação relacionada com o acesso a fontes de <literal>cdrom://</" +"literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:718 +msgid "<literal>Debug::Acquire::ftp</literal>" +msgstr "<literal>Debug::Acquire::ftp</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:722 +msgid "Print information related to downloading packages using FTP." +msgstr "" +"Escreve informação relacionada com o descarregamento de pacotes usando FTP." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:729 +msgid "<literal>Debug::Acquire::http</literal>" +msgstr "<literal>Debug::Acquire::http</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:733 +msgid "Print information related to downloading packages using HTTP." +msgstr "" +"Escreve informação relacionada com o descarregamento de pacotes usando HTTP." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:740 +msgid "<literal>Debug::Acquire::https</literal>" +msgstr "<literal>Debug::Acquire::https</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:744 +msgid "Print information related to downloading packages using HTTPS." +msgstr "" +"Escreve informação relacionada com o descarregamento de pacotes usando HTTPS." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:751 +msgid "<literal>Debug::Acquire::gpgv</literal>" +msgstr "<literal>Debug::Acquire::gpgv</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:755 +msgid "" +"Print information related to verifying cryptographic signatures using " +"<literal>gpg</literal>." +msgstr "" +"Escreve informação relacionada com a verificação de assinaturas " +"criptográficas usando <literal>gpg</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:762 +msgid "<literal>Debug::aptcdrom</literal>" +msgstr "<literal>Debug::aptcdrom</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:766 +msgid "" +"Output information about the process of accessing collections of packages " +"stored on CD-ROMs." +msgstr "" +"Escreve informação acerca do processo de aceder a colecções de pacotes " +"armazenados em CD-ROMs." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:773 +msgid "<literal>Debug::BuildDeps</literal>" +msgstr "<literal>Debug::BuildDeps</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:776 +msgid "Describes the process of resolving build-dependencies in &apt-get;." +msgstr "" +"Descreve os processos de resolver dependências de compilação no &apt-get;." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:783 +msgid "<literal>Debug::Hashes</literal>" +msgstr "<literal>Debug::Hashes</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:786 +msgid "" +"Output each cryptographic hash that is generated by the <literal>apt</" +"literal> libraries." +msgstr "" +"Escreve cada hash criptográfico que é gerado pelas bibliotecas do " +"<literal>apt</literal>." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:793 +msgid "<literal>Debug::IdentCDROM</literal>" +msgstr "<literal>Debug::IdentCDROM</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:796 +msgid "" +"Do not include information from <literal>statfs</literal>, namely the number " +"of used and free blocks on the CD-ROM filesystem, when generating an ID for " +"a CD-ROM." +msgstr "" +"Não inclui informação de <literal>statfs</literal>, nomeadamente o número de " +"blocos usados e livres no sistema de ficheiros do CD-ROM, quando gera um ID " +"para um CD-ROM." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:804 +msgid "<literal>Debug::NoLocking</literal>" +msgstr "<literal>Debug::NoLocking</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:807 +msgid "" +"Disable all file locking. For instance, this will allow two instances of " +"<quote><literal>apt-get update</literal></quote> to run at the same time." +msgstr "" +"Desactiva o bloqueio de todos os ficheiros. Por exemplo, isto irá permitir o " +"funcionamento de duas instâncias do <quote><literal>apt-get update</" +"literal></quote> ao mesmo tempo." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:815 +msgid "<literal>Debug::pkgAcquire</literal>" +msgstr "<literal>Debug::pkgAcquire</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:819 +msgid "Log when items are added to or removed from the global download queue." +msgstr "" +"Regista no log quando os items são adicionados ou removidos da fila de " +"download global." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:826 +msgid "<literal>Debug::pkgAcquire::Auth</literal>" +msgstr "<literal>Debug::pkgAcquire::Auth</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:829 +msgid "" +"Output status messages and errors related to verifying checksums and " +"cryptographic signatures of downloaded files." +msgstr "" +"Escreve mensagens de estado e erros relacionados com a verificação de " +"checksums e assinaturas criptográficas dos ficheiros descarregados." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:836 +msgid "<literal>Debug::pkgAcquire::Diffs</literal>" +msgstr "<literal>Debug::pkgAcquire::Diffs</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:839 +msgid "" +"Output information about downloading and applying package index list diffs, " +"and errors relating to package index list diffs." +msgstr "" +"Escreve informação acerca do download e aplicação de diffs de lista de " +"índice do pacote, e erros relacionados com as diffs de lista de índice do " +"pacote." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:847 +msgid "<literal>Debug::pkgAcquire::RRed</literal>" +msgstr "<literal>Debug::pkgAcquire::RRed</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:851 +msgid "" +"Output information related to patching apt package lists when downloading " +"index diffs instead of full indices." +msgstr "" +"Escreve informação relacionada com a aplicação de patch na lista de pacotes " +"do apt quando se descarrega diffs de índice em vez de índices completos." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:858 +msgid "<literal>Debug::pkgAcquire::Worker</literal>" +msgstr "<literal>Debug::pkgAcquire::Worker</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:862 +msgid "" +"Log all interactions with the sub-processes that actually perform downloads." +msgstr "" +"Regista todas as interacções com os sub-processos que realmente executam os " +"downloads." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:869 +msgid "<literal>Debug::pkgAutoRemove</literal>" +msgstr "<literal>Debug::pkgAutoRemove</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:873 +msgid "" +"Log events related to the automatically-installed status of packages and to " +"the removal of unused packages." +msgstr "" +"Regista no log eventos relacionados com o estado instalado-automaticamente " +"de pacotes e com a remoção de pacotes não utilizados." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:880 +msgid "<literal>Debug::pkgDepCache::AutoInstall</literal>" +msgstr "<literal>Debug::pkgDepCache::AutoInstall</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:883 +msgid "" +"Generate debug messages describing which packages are being automatically " +"installed to resolve dependencies. This corresponds to the initial auto-" +"install pass performed in, e.g., <literal>apt-get install</literal>, and not " +"to the full <literal>apt</literal> dependency resolver; see <literal>Debug::" +"pkgProblemResolver</literal> for that." +msgstr "" +"Gera mensagens de depuração descrevendo quais pacotes estão a ser instalados " +"automaticamente para resolver dependências. Isto corresponde ao passo de " +"instalação-automática inicial executado em, ex, <literal>apt-get install</" +"literal>, e não ao resolvedor de dependências total do <literal>apt</" +"literal>; veja <literal>Debug::pkgProblemResolver</literal> para isso." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:894 +msgid "<literal>Debug::pkgDepCache::Marker</literal>" +msgstr "<literal>Debug::pkgDepCache::Marker</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:897 +msgid "" +"Generate debug messages describing which package is marked as keep/install/" +"remove while the ProblemResolver does his work. Each addition or deletion " +"may trigger additional actions; they are shown indented two additional space " +"under the original entry. The format for each line is <literal>MarkKeep</" +"literal>, <literal>MarkDelete</literal> or <literal>MarkInstall</literal> " +"followed by <literal>package-name <a.b.c -> d.e.f | x.y.z> (section)" +"</literal> where <literal>a.b.c</literal> is the current version of the " +"package, <literal>d.e.f</literal> is the version considered for installation " +"and <literal>x.y.z</literal> is a newer version, but not considered for " +"installation (because of a low pin score). The later two can be omitted if " +"there is none or if it is the same version as the installed. " +"<literal>section</literal> is the name of the section the package appears in." +msgstr "" +"Gera mensagens de depuração descrevendo qual pacote está marcado como manter/" +"instalar/remover enquanto o \"solucionador-de-problemas\" faz o seu " +"trabalho. Cada adição ou remoção pode activar acções adicionais; elas são " +"mostradas indentadas dois espaços adicionais sob da entrada original. O " +"formato de cada linha é <literal>MarkKeep</literal>, <literal>MarkDelete</" +"literal> ou <literal>MarkInstall</literal> seguido por <literal>package-name " +"<a.b.c -> d.e.f | x.y.z> (secção)</literal> onde <literal>a.b.c</" +"literal> é a versão actual do pacote, <literal>d.e.f</literal> é a versão " +"considerada para instalação e <literal>x.y.z</literal> é a versão mais " +"recente, mas não considerada para instalação (devido a baixa pontuação). Os " +"dois últimos podem ser omitidos se não existir nenhum ou for a mesma versão " +"que aquela instalada. <literal>section</literal> é o nome da secção onde o " +"pacote aparece." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:916 +msgid "<literal>Debug::pkgInitConfig</literal>" +msgstr "<literal>Debug::pkgInitConfig</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:919 +msgid "Dump the default configuration to standard error on startup." +msgstr "Despeja a configuração predefinida para o erro standard no arranque." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:926 +msgid "<literal>Debug::pkgDPkgPM</literal>" +msgstr "<literal>Debug::pkgDPkgPM</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:929 +msgid "" +"When invoking &dpkg;, output the precise command line with which it is being " +"invoked, with arguments separated by a single space character." +msgstr "" +"Ao invocar o &dpkg;, escreve com precisão a linha de comandos com a qual " +"está a ser invocado, com argumentos separados por um caractere de espaço " +"único." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:937 +msgid "<literal>Debug::pkgDPkgProgressReporting</literal>" +msgstr "<literal>Debug::pkgDPkgProgressReporting</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:940 +msgid "" +"Output all the data received from &dpkg; on the status file descriptor and " +"any errors encountered while parsing it." +msgstr "" +"Escreve todos os dados recebidos do &dpkg; no descritor de ficheiro de " +"estado e quaisquer erros encontrados enquanto os analisa." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:947 +msgid "<literal>Debug::pkgOrderList</literal>" +msgstr "<literal>Debug::pkgOrderList</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:951 +msgid "" +"Generate a trace of the algorithm that decides the order in which " +"<literal>apt</literal> should pass packages to &dpkg;." +msgstr "" +"Gera um rastro do algoritmo que decide a ordem na qual o <literal>apt</" +"literal> deve passar os pacotes ao &dpkg;." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:959 +msgid "<literal>Debug::pkgPackageManager</literal>" +msgstr "<literal>Debug::pkgPackageManager</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:963 +msgid "" +"Output status messages tracing the steps performed when invoking &dpkg;." +msgstr "" +"Escreve mensagens de estado seguindo os passos executados quando invoca o " +"&dpkg;." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:970 +msgid "<literal>Debug::pkgPolicy</literal>" +msgstr "<literal>Debug::pkgPolicy</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:974 +msgid "Output the priority of each package list on startup." +msgstr "Escreve a prioridade da cada lista de pacote no arranque." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:980 +msgid "<literal>Debug::pkgProblemResolver</literal>" +msgstr "<literal>Debug::pkgProblemResolver</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:984 +msgid "" +"Trace the execution of the dependency resolver (this applies only to what " +"happens when a complex dependency problem is encountered)." +msgstr "" +"Rastreia a execução do resolvedor de dependências (isto só se aplica ao que " +"acontece quando é encontrado um problema de dependências complexo)." + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:992 +msgid "<literal>Debug::pkgProblemResolver::ShowScores</literal>" +msgstr "<literal>Debug::pkgProblemResolver::ShowScores</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:995 +msgid "" +"Display a list of all installed packages with their calculated score used by " +"the pkgProblemResolver. The description of the package is the same as " +"described in <literal>Debug::pkgDepCache::Marker</literal>" +msgstr "" +"Mostra uma lista de todos os pacotes instalados com as suas pontuações " +"calculadas usadas pelo pkgProblemResolver. A descrição do do pacote é a " +"mesma que é descrita em <literal>Debug::pkgDepCache::Marker</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> +#: apt.conf.5.xml:1003 +msgid "<literal>Debug::sourceList</literal>" +msgstr "<literal>Debug::sourceList</literal>" + +#. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> +#: apt.conf.5.xml:1007 +msgid "" +"Print information about the vendors read from <filename>/etc/apt/vendors." +"list</filename>." +msgstr "" +"Escreve informação acerca dos fornecedores lida de <filename>/etc/apt/" +"vendors.list</filename>." + +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:1030 +msgid "" +"&configureindex; is a configuration file showing example values for all " +"possible options." +msgstr "" +"&configureindex; é um ficheiro de configuração que mostra valores exemplo " +"para todas as opções possíveis." + +#. type: Content of: <refentry><refsect1><variablelist> +#: apt.conf.5.xml:1037 +msgid "&file-aptconf;" +msgstr "&file-aptconf;" + +#. ? reading apt.conf +#. type: Content of: <refentry><refsect1><para> +#: apt.conf.5.xml:1042 +msgid "&apt-cache;, &apt-config;, &apt-preferences;." +msgstr "&apt-cache;, &apt-config;, &apt-preferences;." + +#. The last update date +#. type: Content of: <refentry><refentryinfo> +#: apt_preferences.5.xml:13 +msgid "" +"&apt-author.team; &apt-email; &apt-product; <date>16 February 2010</date>" +msgstr "" +"&apt-author.team; &apt-email; &apt-product; <date>16 Fevereiro 2010</date>" + +#. type: Content of: <refentry><refnamediv><refname> +#: apt_preferences.5.xml:21 apt_preferences.5.xml:28 +msgid "apt_preferences" +msgstr "apt_preferences" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: apt_preferences.5.xml:29 +msgid "Preference control file for APT" +msgstr "Ficheiro de controle de preferências para o APT" + +#. type: Content of: <refentry><refsect1><para> +#: apt_preferences.5.xml:34 +msgid "" +"The APT preferences file <filename>/etc/apt/preferences</filename> and the " +"fragment files in the <filename>/etc/apt/preferences.d/</filename> folder " +"can be used to control which versions of packages will be selected for " +"installation." +msgstr "" +"O ficheiro de preferências do APT <filename>/etc/apt/preferences</filename> " +"e os ficheiros fragmentados no directório <filename>/etc/apt/preferences.d/</" +"filename> podem ser usados para controlar quais as versões de pacotes irão " +"ser seleccionadas para instalação." + +#. type: Content of: <refentry><refsect1><para> +#: apt_preferences.5.xml:39 +msgid "" +"Several versions of a package may be available for installation when the " +"&sources-list; file contains references to more than one distribution (for " +"example, <literal>stable</literal> and <literal>testing</literal>). APT " +"assigns a priority to each version that is available. Subject to dependency " +"constraints, <command>apt-get</command> selects the version with the highest " +"priority for installation. The APT preferences file overrides the " +"priorities that APT assigns to package versions by default, thus giving the " +"user control over which one is selected for installation." +msgstr "" +"Várias versões de um pacote podem estar disponíveis para instalação quando o " +"ficheiro &sources-list; contém referências a mais do que uma distribuição " +"(por exemplo, <literal>stable</literal> e <literal>testing</literal>). O APT " +"atribui uma prioridade a cada versão que está disponível. Sujeito a " +"constrangimentos de dependências, o <command>apt-get</command> selecciona a " +"versão com a prioridade mais alta para instalação. O ficheiro de " +"preferências do APT sobrepõe as prioridades que o APT atribui às versões de " +"pacotes por predefinição, assim dando controle ao utilizador sobre qual é " +"seleccionado para instalação." + +#. type: Content of: <refentry><refsect1><para> +#: apt_preferences.5.xml:49 +msgid "" +"Several instances of the same version of a package may be available when the " +"&sources-list; file contains references to more than one source. In this " +"case <command>apt-get</command> downloads the instance listed earliest in " +"the &sources-list; file. The APT preferences file does not affect the " +"choice of instance, only the choice of version." +msgstr "" +"Podem estar disponíveis várias instâncias da mesma versão de um pacote " +"quando o ficheiro &sources-list; contém referências a mais do que uma fonte. " +"Neste caso o <command>apt-get</command> descarrega a instância listada mais " +"cedo no ficheiro &sources-list;. O ficheiro de preferências do APT não " +"afecta a escolha da instância, apenas a escolha da versão." + +#. type: Content of: <refentry><refsect1><para> +#: apt_preferences.5.xml:56 +msgid "" +"Preferences are a strong power in the hands of a system administrator but " +"they can become also their biggest nightmare if used without care! APT will " +"not questioning the preferences so wrong settings will therefore lead to " +"uninstallable packages or wrong decisions while upgrading packages. Even " +"more problems will arise if multiply distribution releases are mixed without " +"a good understanding of the following paragraphs. Packages included in a " +"specific release aren't tested in and therefore doesn't always work as " +"expected in older or newer releases or together with other packages from " +"different releases. You have been warned." +msgstr "" +"As preferências são um poder forte nas mãos de um administrador de sistemas " +"mas também se podem tornar no seu maior pesadelo se forem usadas sem " +"cuidado! O APT não irá questionar as preferências, portanto as definições " +"erradas irão acabar em pacotes não instaláveis ou decisões erradas ao " +"actualizar pacotes. Irão surgir ainda mais problemas se forem misturadas " +"múltiplas distribuições sem o perfeito entendimento dos parágrafos " +"seguintes. Os pacotes incluídos num lançamento específico não são testados e " +"por isso nem sempre funcionam como esperado nos lançamentos mais antigos ou " +"recentes ou em conjunto com outros pacotes de lançamentos diferentes. Você " +"foi avisado." + +#. type: Content of: <refentry><refsect1><para> +#: apt_preferences.5.xml:67 +msgid "" +"Note that the files in the <filename>/etc/apt/preferences.d</filename> " +"directory are parsed in alphanumeric ascending order and need to obey the " +"following naming convention: The files have no or \"<literal>pref</literal>" +"\" as filename extension and which only contain alphanumeric, hyphen (-), " +"underscore (_) and period (.) characters - otherwise they will be silently " +"ignored." +msgstr "" +"Note que os ficheiros no directório <filename>/etc/apt/preferences.d</" +"filename> são analisados em ordem alfanumérica ascendente e precisam " +"obedecer à convenção de nomes seguinte: Os ficheiros não têm extensão ou têm " +"\"<literal>pref</literal>\" na extensão do nome de ficheiro e os quais " +"apenas contêm caracteres alfanuméricos, traço (-), underscore (_) e ponto " +"(.) - caso contrário serão ignorados em silêncio." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt_preferences.5.xml:74 +msgid "APT's Default Priority Assignments" +msgstr "Atribuições de Prioridade Predefinidas do APT" + +#. type: Content of: <refentry><refsect1><refsect2><para><programlisting> +#: apt_preferences.5.xml:89 +#, no-wrap +msgid "<command>apt-get install -t testing <replaceable>some-package</replaceable></command>\n" +msgstr "<command>apt-get install -t testing <replaceable>algum-pacote</replaceable></command>\n" + +#. type: Content of: <refentry><refsect1><refsect2><para><programlisting> +#: apt_preferences.5.xml:92 +#, no-wrap +msgid "APT::Default-Release \"stable\";\n" +msgstr "APT::Default-Release \"stable\";\n" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:76 +msgid "" +"If there is no preferences file or if there is no entry in the file that " +"applies to a particular version then the priority assigned to that version " +"is the priority of the distribution to which that version belongs. It is " +"possible to single out a distribution, \"the target release\", which " +"receives a higher priority than other distributions do by default. The " +"target release can be set on the <command>apt-get</command> command line or " +"in the APT configuration file <filename>/etc/apt/apt.conf</filename>. Note " +"that this has precedence over any general priority you set in the <filename>/" +"etc/apt/preferences</filename> file described later, but not over " +"specifically pinned packages. For example, <placeholder type=" +"\"programlisting\" id=\"0\"/> <placeholder type=\"programlisting\" id=\"1\"/>" +msgstr "" +"Senão existir um ficheiro de preferências ou se não existe uma entrada no " +"ficheiro que se aplique a uma versão particular então a prioridade atribuída " +"a essa versão é a prioridade da distribuição à qual essa versão pertence. É " +"possível definir uma distribuição singular, \"o lançamento de destino\", a " +"qual recebe uma prioridade mais alta que as outras distribuições por " +"predefinição. O lançamento de destino pode ser definido na linha de comandos " +"do <command>apt-get</command> ou no ficheiro de configuração do APT " +"<filename>/etc/apt/apt.conf</filename>. Note que isto tem precedências sobre " +"qualquer prioridade geral que possa definir no ficheiro <filename>/etc/apt/" +"preferences</filename> descrito mais tarde, mas não sobre pacotes " +"especificamente imobilizados. Por exemplo, <placeholder type=\"programlisting" +"\" id=\"0\"/> <placeholder type=\"programlisting\" id=\"1\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:101 +msgid "priority 100" +msgstr "priority 100" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:102 +msgid "to the version that is already installed (if any)." +msgstr "para a versão que já está instalada (se alguma)." + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:106 +msgid "priority 500" +msgstr "priority 500" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:107 +msgid "" +"to the versions that are not installed and do not belong to the target " +"release." +msgstr "" +"para as versões que não estão instaladas e não pertencem ao lançamento " +"destinado." + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:111 +msgid "priority 990" +msgstr "priority 990" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:112 +msgid "" +"to the versions that are not installed and belong to the target release." +msgstr "" +"para as versões que não estão instaladas e pertencem ao lançamento destinado." + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:96 +msgid "" +"If the target release has been specified then APT uses the following " +"algorithm to set the priorities of the versions of a package. Assign: " +"<placeholder type=\"variablelist\" id=\"0\"/>" +msgstr "" +"Se o lançamento destinado foi especificado, então o APT usa o seguinte " +"algoritmo para definir as prioridades das versões de um pacote. Atribuir: " +"<placeholder type=\"variablelist\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:117 +msgid "" +"If the target release has not been specified then APT simply assigns " +"priority 100 to all installed package versions and priority 500 to all " +"uninstalled package versions." +msgstr "" +"Se o lançamento destinado não foi especificado, então o APT simplesmente " +"atribui prioridade 100 a todas as versões de pacotes instalados e prioridade " +"500 e todas as versões de pacotes não instalados." + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:121 +msgid "" +"APT then applies the following rules, listed in order of precedence, to " +"determine which version of a package to install." +msgstr "" +"O APT então aplica as seguintes regras, listadas em ordem de precedência, " +"para determinar qual versão de um pacote deve instalar." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:124 +msgid "" +"Never downgrade unless the priority of an available version exceeds 1000. " +"(\"Downgrading\" is installing a less recent version of a package in place " +"of a more recent version. Note that none of APT's default priorities " +"exceeds 1000; such high priorities can only be set in the preferences file. " +"Note also that downgrading a package can be risky.)" +msgstr "" +"Nunca faz downgrade a menos que uma versão disponível exceda 1000. " +"(\"Downgrading\" é instalar uma versão menos recente de um pacote no lugar " +"de uma versão mais recente. Note que nenhuma das prioridades predefinidas do " +"APT excede 1000; tais altas prioridades só podem ser definidas no ficheiro " +"de preferências. Note também que fazer o downgrade a um pacote pode ser " +"arriscado.)" + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:130 +msgid "Install the highest priority version." +msgstr "Instala a versão de prioridade mais alta." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:131 +msgid "" +"If two or more versions have the same priority, install the most recent one " +"(that is, the one with the higher version number)." +msgstr "" +"Se duas ou mais versões tiverem a mesma prioridade, instala a mais recente " +"(isto é, aquela com o número de versão mais alto)." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:134 +msgid "" +"If two or more versions have the same priority and version number but either " +"the packages differ in some of their metadata or the <literal>--reinstall</" +"literal> option is given, install the uninstalled one." +msgstr "" +"Se duas ou mais versões têm a mesma prioridade e o mesmo número de versão " +"mas ou os pacotes diferem em alguns dos seus metadados ou a opção <literal>--" +"reinstall</literal> é fornecida, instala a que foi desinstalada." + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:140 +msgid "" +"In a typical situation, the installed version of a package (priority 100) " +"is not as recent as one of the versions available from the sources listed in " +"the &sources-list; file (priority 500 or 990). Then the package will be " +"upgraded when <command>apt-get install <replaceable>some-package</" +"replaceable></command> or <command>apt-get upgrade</command> is executed." +msgstr "" +"Numa situação típica, a versão instalada de um pacote (prioridade 100) não é " +"tão recente como uma das versões disponíveis nas fontes listadas no ficheiro " +"&sources-list; (prioridade 500 ou 990). Então o pacote será actualizado " +"quando for executado <command>apt-get install <replaceable>algum-pacote</" +"replaceable></command> ou <command>apt-get upgrade</command>." + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:147 +msgid "" +"More rarely, the installed version of a package is <emphasis>more</emphasis> " +"recent than any of the other available versions. The package will not be " +"downgraded when <command>apt-get install <replaceable>some-package</" +"replaceable></command> or <command>apt-get upgrade</command> is executed." +msgstr "" +"Mais raramente, a versão instalada de um pacote é <emphasis>mais</emphasis> " +"recente que qualquer das outras versões disponíveis. O pacote não será " +"regredido para uma versão inferior quando for executado <command>apt-get " +"install <replaceable>algum-pacote</replaceable></command> ou <command>apt-" +"get upgrade</command>." + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:152 +msgid "" +"Sometimes the installed version of a package is more recent than the version " +"belonging to the target release, but not as recent as a version belonging to " +"some other distribution. Such a package will indeed be upgraded when " +"<command>apt-get install <replaceable>some-package</replaceable></command> " +"or <command>apt-get upgrade</command> is executed, because at least " +"<emphasis>one</emphasis> of the available versions has a higher priority " +"than the installed version." +msgstr "" +"Por vezes a versão instalada de um pacote é mais recente que a versão " +"pertencente ao lançamento de destino, mas não tão recente que uma versão " +"pertencente a alguma outra distribuição. Tal pacote será de facto " +"actualizado quando for executado <command>apt-get install <replaceable>algum-" +"pacote</replaceable></command> ou <command>apt-get upgrade</command>, porque " +"pelo menos <emphasis>uma</emphasis> das versões disponíveis tem uma " +"prioridade mais alta que a versão instalada." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt_preferences.5.xml:161 +msgid "The Effect of APT Preferences" +msgstr "O Efeito das Preferências do APT" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:163 +msgid "" +"The APT preferences file allows the system administrator to control the " +"assignment of priorities. The file consists of one or more multi-line " +"records separated by blank lines. Records can have one of two forms, a " +"specific form and a general form." +msgstr "" +"O ficheiro de preferências do APT permite ao administrador do sistema " +"controlar a atribuição de prioridades. O ficheiro consiste em um ou mais " +"registos de multi-linhas separados por linhas vazias. Os registos podem ter " +"um ou dois formatos, um formato específico e um formato geral." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:169 +msgid "" +"The specific form assigns a priority (a \"Pin-Priority\") to one or more " +"specified packages and specified version or version range. For example, the " +"following record assigns a high priority to all versions of the " +"<filename>perl</filename> package whose version number begins with " +"\"<literal>5.8</literal>\". Multiple packages can be separated by spaces." +msgstr "" +"O formato específico atribui um prioridade (um \"Pin-Priority\") a um ou " +"mais pacotes específicos e versão específica ou série de versões. Por " +"exemplo, o seguinte registo atribui uma alta prioridade a todas as versões " +"do pacote <filename>perl</filename> cujo número de versão começa com " +"\"<literal>5.8</literal>\". Múltiplos pacotes podem ser separados por " +"espaços." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><programlisting> +#: apt_preferences.5.xml:176 +#, no-wrap +msgid "" +"Package: perl\n" +"Pin: version 5.8*\n" +"Pin-Priority: 1001\n" +msgstr "" +"Package: perl\n" +"Pin: version 5.8*\n" +"Pin-Priority: 1001\n" + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:182 +msgid "" +"The general form assigns a priority to all of the package versions in a " +"given distribution (that is, to all the versions of packages that are listed " +"in a certain <filename>Release</filename> file) or to all of the package " +"versions coming from a particular Internet site, as identified by the site's " +"fully qualified domain name." +msgstr "" +"O formato geral atribui uma prioridade a todas as versões de pacotes numa " +"dada distribuição (isto é, a todas as versões de pacotes que estão listados " +"num certo ficheiro <filename>Release</filename>) ou a todas as versões de " +"pacotes vindos de um site de Internet particular, como identificado pelo " +"nome de domínio totalmente qualificado do site." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:188 +msgid "" +"This general-form entry in the APT preferences file applies only to groups " +"of packages. For example, the following record assigns a high priority to " +"all package versions available from the local site." +msgstr "" +"Esta entrada general-form no ficheiro de preferências do APT aplica-se " +"apenas a grupos de pacotes. Por exemplo, o seguinte registo atribui uma alta " +"prioridade a todas as versões de pacotes disponíveis a partir de um site " +"local." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><programlisting> +#: apt_preferences.5.xml:193 +#, no-wrap +msgid "" +"Package: *\n" +"Pin: origin \"\"\n" +"Pin-Priority: 999\n" +msgstr "" +"Package: *\n" +"Pin: origin \"\"\n" +"Pin-Priority: 999\n" + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:198 +msgid "" +"A note of caution: the keyword used here is \"<literal>origin</literal>\". " +"This should not be confused with the Origin of a distribution as specified " +"in a <filename>Release</filename> file. What follows the \"Origin:\" tag in " +"a <filename>Release</filename> file is not an Internet address but an author " +"or vendor name, such as \"Debian\" or \"Ximian\"." +msgstr "" +"Uma nota de atenção: a palavra chave usada aqui é \"<literal>origin</literal>" +"\". Isto não deve ser confundido com a Origem de uma distribuição como " +"especificada num ficheiro <filename>Release</filename>. O que representa a " +"etiqueta \"Origin:\" num ficheiro <filename>Release</filename> não é um " +"endereço de Internet mas um nome de autor ou marca, tal como \"Debian\" ou " +"\"Ximian\"." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:204 +msgid "" +"The following record assigns a low priority to all package versions " +"belonging to any distribution whose Archive name is \"<literal>unstable</" +"literal>\"." +msgstr "" +"O seguinte registo atribui uma baixa prioridade a todas as versões de " +"pacotes pertencentes a qualquer distribuição cujo nome de Arquivo é " +"\"<literal>unstable</literal>\"." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><programlisting> +#: apt_preferences.5.xml:208 +#, no-wrap +msgid "" +"Package: *\n" +"Pin: release a=unstable\n" +"Pin-Priority: 50\n" +msgstr "" +"Package: *\n" +"Pin: release a=unstable\n" +"Pin-Priority: 50\n" + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:213 +msgid "" +"The following record assigns a high priority to all package versions " +"belonging to any distribution whose Codename is \"<literal>squeeze</literal>" +"\"." +msgstr "" +"O seguinte registo atribui uma alta prioridade a todas as versões de pacotes " +"pertencentes a qualquer distribuição cujo nome de código é " +"\"<literal>squeeze</literal>\"." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><programlisting> +#: apt_preferences.5.xml:217 +#, no-wrap +msgid "" +"Package: *\n" +"Pin: release n=squeeze\n" +"Pin-Priority: 900\n" +msgstr "" +"Package: *\n" +"Pin: release n=squeeze\n" +"Pin-Priority: 900\n" + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:222 +msgid "" +"The following record assigns a high priority to all package versions " +"belonging to any release whose Archive name is \"<literal>stable</literal>\" " +"and whose release Version number is \"<literal>3.0</literal>\"." +msgstr "" +"O seguinte registo atribui alta prioridade a todas as versões de pacotes " +"pertencentes a qualquer lançamento cujo nome de Arquivo é \"<literal>stable</" +"literal>\" e cujo número de Versão de lançamento é \"<literal>3.0</literal>" +"\"." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><programlisting> +#: apt_preferences.5.xml:227 +#, no-wrap +msgid "" +"Package: *\n" +"Pin: release a=stable, v=3.0\n" +"Pin-Priority: 500\n" +msgstr "" +"Package: *\n" +"Pin: release a=stable, v=3.0\n" +"Pin-Priority: 500\n" + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt_preferences.5.xml:238 +msgid "How APT Interprets Priorities" +msgstr "Como o APT Interpreta as Prioridades" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:246 +msgid "P > 1000" +msgstr "P > 1000" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:247 +msgid "" +"causes a version to be installed even if this constitutes a downgrade of the " +"package" +msgstr "" +"provoca que uma versão seja instalada mesmo que isso constitua uma redução " +"na versão do pacote (downgrade)" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:251 +msgid "990 < P <=1000" +msgstr "990 < P <=1000" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:252 +msgid "" +"causes a version to be installed even if it does not come from the target " +"release, unless the installed version is more recent" +msgstr "" +"provoca que uma versão seja instalada mesmo que não venha do lançamento de " +"destino, a menos que a versão instalada seja mais recente" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:257 +msgid "500 < P <=990" +msgstr "500 < P <=990" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:258 +msgid "" +"causes a version to be installed unless there is a version available " +"belonging to the target release or the installed version is more recent" +msgstr "" +"provoca que uma versão seja instalada a menos que exista uma versão " +"disponível pertencente ao lançamento de destino ou se a versão instalada é " +"mais recente" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:263 +msgid "100 < P <=500" +msgstr "100 < P <=500" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:264 +msgid "" +"causes a version to be installed unless there is a version available " +"belonging to some other distribution or the installed version is more recent" +msgstr "" +"provoca que uma versão seja instalada a menos que exista uma versão " +"disponível pertencente a outra distribuição ou se a versão instalada é mais " +"recente" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:269 +msgid "0 < P <=100" +msgstr "0 < P <=100" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:270 +msgid "" +"causes a version to be installed only if there is no installed version of " +"the package" +msgstr "" +"provoca que uma versão seja instalada apenas se não existir nenhuma versão " +"instalada do pacote" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:274 +msgid "P < 0" +msgstr "P < 0" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:275 +msgid "prevents the version from being installed" +msgstr "previne a instalação da versão" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:241 +msgid "" +"Priorities (P) assigned in the APT preferences file must be positive or " +"negative integers. They are interpreted as follows (roughly speaking): " +"<placeholder type=\"variablelist\" id=\"0\"/>" +msgstr "" +"As prioridades (P) atribuídas no ficheiro de preferências do APT têm de ser " +"inteiros positivos ou negativos. Elas são interpretadas como o seguinte " +"(falando grosso): <placeholder type=\"variablelist\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:280 +msgid "" +"If any specific-form records match an available package version then the " +"first such record determines the priority of the package version. Failing " +"that, if any general-form records match an available package version then " +"the first such record determines the priority of the package version." +msgstr "" +"Se quaisquer registos de formato específico corresponder a uma versão de " +"pacote disponível então o primeiro tal registo determina a prioridade da " +"versão do pacote. Falhando isso, se quaisquer registos em formato geral " +"corresponder a uma versão de pacote disponível então o primeiro tal registo " +"determina a prioridade da versão de pacote." + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:286 +msgid "" +"For example, suppose the APT preferences file contains the three records " +"presented earlier:" +msgstr "" +"Por exemplo, suponha que o ficheiro de preferências do APT contém os três " +"registos apresentados atrás:" + +#. type: Content of: <refentry><refsect1><refsect2><programlisting> +#: apt_preferences.5.xml:290 +#, no-wrap +msgid "" +"Package: perl\n" +"Pin: version 5.8*\n" +"Pin-Priority: 1001\n" +"\n" +"Package: *\n" +"Pin: origin \"\"\n" +"Pin-Priority: 999\n" +"\n" +"Package: *\n" +"Pin: release unstable\n" +"Pin-Priority: 50\n" +msgstr "" +"Package: perl\n" +"Pin: version 5.8*\n" +"Pin-Priority: 1001\n" +"\n" +"Package: *\n" +"Pin: origin \"\"\n" +"Pin-Priority: 999\n" +"\n" +"Package: *\n" +"Pin: release unstable\n" +"Pin-Priority: 50\n" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:303 +msgid "Then:" +msgstr "Então:" + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:305 +msgid "" +"The most recent available version of the <literal>perl</literal> package " +"will be installed, so long as that version's version number begins with " +"\"<literal>5.8</literal>\". If <emphasis>any</emphasis> 5.8* version of " +"<literal>perl</literal> is available and the installed version is 5.9*, then " +"<literal>perl</literal> will be downgraded." +msgstr "" +"Será instalada a versão mais recente disponível do pacote <literal>perl</" +"literal>, desde que o número da versão comece com \"<literal>5.8</literal>" +"\". Se <emphasis>qualquer</emphasis> versão 5.8* do <literal>perl</literal> " +"estiver disponível e a versão instalada for 5.9*, então será feito um " +"downgrade ao <literal>perl</literal>." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:310 +msgid "" +"A version of any package other than <literal>perl</literal> that is " +"available from the local system has priority over other versions, even " +"versions belonging to the target release." +msgstr "" +"Uma versão de qualquer pacote que não seja o <literal>perl</literal> e que " +"esteja disponível a partir do sistema local tem prioridade sobre outras " +"versões, mesmo versões que pertencem ao lançamento de destino." + +#. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> +#: apt_preferences.5.xml:314 +msgid "" +"A version of a package whose origin is not the local system but some other " +"site listed in &sources-list; and which belongs to an <literal>unstable</" +"literal> distribution is only installed if it is selected for installation " +"and no version of the package is already installed." +msgstr "" +"Uma versão de um pacote cuja origem não é o sistema local mas qualquer outro " +"site listado em &sources-list; e o qual pertence a uma distribuição " +"<literal>unstable</literal> apenas é instalado se for seleccionado para " +"instalação e se nenhuma versão do pacote já estiver instalada." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt_preferences.5.xml:324 +msgid "Determination of Package Version and Distribution Properties" +msgstr "Determinação da Versão do Pacote e Propriedades da Distribuição" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:326 +msgid "" +"The locations listed in the &sources-list; file should provide " +"<filename>Packages</filename> and <filename>Release</filename> files to " +"describe the packages available at that location." +msgstr "" +"As localizações listadas no ficheiro &sources-list; devem fornecer os " +"ficheiros <filename>Packages</filename> e <filename>Release</filename> para " +"descrever os pacotes disponíveis nessa localização." + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:338 +msgid "the <literal>Package:</literal> line" +msgstr "a linha <literal>Package:</literal>" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:339 +msgid "gives the package name" +msgstr "fornece o nome do pacote" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:342 apt_preferences.5.xml:392 +msgid "the <literal>Version:</literal> line" +msgstr "a linha <literal>Version:</literal>" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:343 +msgid "gives the version number for the named package" +msgstr "fornece o número de versão do pacote nomeado" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:330 +msgid "" +"The <filename>Packages</filename> file is normally found in the directory " +"<filename>.../dists/<replaceable>dist-name</replaceable>/" +"<replaceable>component</replaceable>/<replaceable>arch</replaceable></" +"filename>: for example, <filename>.../dists/stable/main/binary-i386/" +"Packages</filename>. It consists of a series of multi-line records, one for " +"each package available in that directory. Only two lines in each record are " +"relevant for setting APT priorities: <placeholder type=\"variablelist\" id=" +"\"0\"/>" +msgstr "" +"O ficheiro <filename>Packages</filename> é normalmente encontrado no " +"directório <filename>.../dists/<replaceable>nome-da-distribuição</" +"replaceable>/<replaceable>componente</replaceable>/" +"<replaceable>arquitectura</replaceable></filename>: por exemplo, " +"<filename>.../dists/stable/main/binary-i386/Packages</filename>. Consiste " +"numa série de registos de várias linhas, um para cada pacote disponível " +"nesse directório. Apenas duas linhas em cada registo são relevantes para " +"definir prioridades do APT: <placeholder type=\"variablelist\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:359 +msgid "the <literal>Archive:</literal> or <literal>Suite:</literal> line" +msgstr "a linha <literal>Archive:</literal> ou <literal>Suite:</literal>" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:360 +msgid "" +"names the archive to which all the packages in the directory tree belong. " +"For example, the line \"Archive: stable\" or \"Suite: stable\" specifies " +"that all of the packages in the directory tree below the parent of the " +"<filename>Release</filename> file are in a <literal>stable</literal> " +"archive. Specifying this value in the APT preferences file would require " +"the line:" +msgstr "" +"nomeia o arquivo ao qual pertencem todos os pacotes na árvore de " +"directórios. Por exemplo, a linha \"Archive: stable\" ou \"Suite: stable\" " +"especifica que todos os pacotes na árvore de directórios abaixo do pai do " +"ficheiro <filename>Release</filename> estão num arquivo <literal>stable</" +"literal>. Especificar este valor no ficheiro de preferências do APT irá " +"requerer a linha:" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><programlisting> +#: apt_preferences.5.xml:370 +#, no-wrap +msgid "Pin: release a=stable\n" +msgstr "Pin: release a=stable\n" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:376 +msgid "the <literal>Codename:</literal> line" +msgstr "a linha <literal>Codename:</literal>" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:377 +msgid "" +"names the codename to which all the packages in the directory tree belong. " +"For example, the line \"Codename: squeeze\" specifies that all of the " +"packages in the directory tree below the parent of the <filename>Release</" +"filename> file belong to a version named <literal>squeeze</literal>. " +"Specifying this value in the APT preferences file would require the line:" +msgstr "" +"nomeia o nome de código a qual todos os pacotes na árvore de directórios " +"pertencem. Por exemplo, a linha \"Codename: squeeze\" especifica que todos " +"os pacotes na árvore de directórios abaixo do pai do ficheiro " +"<filename>Release</filename> pertencem a uma versão chamada " +"<literal>squeeze</literal>. Especificar este valor no ficheiro de " +"preferências do APT requer a linha:" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><programlisting> +#: apt_preferences.5.xml:386 +#, no-wrap +msgid "Pin: release n=squeeze\n" +msgstr "Pin: release n=squeeze\n" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:393 +msgid "" +"names the release version. For example, the packages in the tree might " +"belong to Debian GNU/Linux release version 3.0. Note that there is normally " +"no version number for the <literal>testing</literal> and <literal>unstable</" +"literal> distributions because they have not been released yet. Specifying " +"this in the APT preferences file would require one of the following lines." +msgstr "" +"nomeia a versão de lançamento. Por exemplo, os pacotes na árvore podem " +"pertencer ao lançamento de Debian GNU/Linux versão 3.0. Note que não há " +"normalmente um número de versão para as distribuições <literal>testing</" +"literal> e <literal>unstable</literal>. porque ainda não foram lançadas. " +"Especificar isto no ficheiro de preferências do APT irá requerer uma das " +"seguintes linhas:" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><programlisting> +#: apt_preferences.5.xml:402 +#, no-wrap +msgid "" +"Pin: release v=3.0\n" +"Pin: release a=stable, v=3.0\n" +"Pin: release 3.0\n" +msgstr "" +"Pin: release v=3.0\n" +"Pin: release a=stable, v=3.0\n" +"Pin: release 3.0\n" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:411 +msgid "the <literal>Component:</literal> line" +msgstr "a linha <literal>Component:</literal>" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:412 +msgid "" +"names the licensing component associated with the packages in the directory " +"tree of the <filename>Release</filename> file. For example, the line " +"\"Component: main\" specifies that all the packages in the directory tree " +"are from the <literal>main</literal> component, which entails that they are " +"licensed under terms listed in the Debian Free Software Guidelines. " +"Specifying this component in the APT preferences file would require the line:" +msgstr "" +"nomeia o componente de licenciamento associado com os pacotes na árvore de " +"directórios do ficheiro <filename>Release</filename>. Por exemplo, a linha " +"\"Component: main\" especifica que todos os pacotes na árvore de directórios " +"são do componente <literal>main</literal>, o que implica que estão " +"licenciados sob os termos listados em Debian Free Software Guidelines. " +"Especificar este componente no ficheiro de preferências do APT irá requerer " +"a linha:" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><programlisting> +#: apt_preferences.5.xml:421 +#, no-wrap +msgid "Pin: release c=main\n" +msgstr "Pin: release c=main\n" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:427 +msgid "the <literal>Origin:</literal> line" +msgstr "a linha <literal>Origin:</literal>" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:428 +msgid "" +"names the originator of the packages in the directory tree of the " +"<filename>Release</filename> file. Most commonly, this is <literal>Debian</" +"literal>. Specifying this origin in the APT preferences file would require " +"the line:" +msgstr "" +"nomeia a originador dos pacotes na árvore de directórios do ficheiro " +"<filename>Release</filename>. Geralmente, isto é <literal>Debian</literal>. " +"Especificar esta etiqueta no ficheiro de preferências do APT irá requerer a " +"linha:" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><programlisting> +#: apt_preferences.5.xml:434 +#, no-wrap +msgid "Pin: release o=Debian\n" +msgstr "Pin: release o=Debian\n" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><term> +#: apt_preferences.5.xml:440 +msgid "the <literal>Label:</literal> line" +msgstr "a linha <literal>Label:</literal>" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><simpara> +#: apt_preferences.5.xml:441 +msgid "" +"names the label of the packages in the directory tree of the " +"<filename>Release</filename> file. Most commonly, this is <literal>Debian</" +"literal>. Specifying this label in the APT preferences file would require " +"the line:" +msgstr "" +"nomeia a etiqueta dos pacotes na árvore de directórios do ficheiro " +"<filename>Release</filename>. Geralmente, isto é <literal>Debian</literal>. " +"Especificar esta etiqueta no ficheiro de preferências do APT irá requerer a " +"linha:" + +#. type: Content of: <refentry><refsect1><refsect2><para><variablelist><varlistentry><listitem><programlisting> +#: apt_preferences.5.xml:447 +#, no-wrap +msgid "Pin: release l=Debian\n" +msgstr "Pin: release l=Debian\n" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:348 +msgid "" +"The <filename>Release</filename> file is normally found in the directory " +"<filename>.../dists/<replaceable>dist-name</replaceable></filename>: for " +"example, <filename>.../dists/stable/Release</filename>, or <filename>.../" +"dists/woody/Release</filename>. It consists of a single multi-line record " +"which applies to <emphasis>all</emphasis> of the packages in the directory " +"tree below its parent. Unlike the <filename>Packages</filename> file, " +"nearly all of the lines in a <filename>Release</filename> file are relevant " +"for setting APT priorities: <placeholder type=\"variablelist\" id=\"0\"/>" +msgstr "" +"O ficheiro <filename>Release</filename> fica normalmente no directório " +"<filename>.../dists/<replaceable>nome da distribuição</replaceable></" +"filename>: por exemplo, <filename>.../dists/stable/Release</filename>, ou " +"<filename>.../dists/woody/Release</filename>. Consiste num único registo de " +"várias linhas que se aplica a <emphasis>todos</emphasis> os pacotes na " +"árvore de directórios sob o seu pai. Ao contrário do ficheiro " +"<filename>Packages</filename>, quase todas as linhas num ficheiro " +"<filename>Release</filename> são relevantes para definir as prioridades do " +"APT: <placeholder type=\"variablelist\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:454 +msgid "" +"All of the <filename>Packages</filename> and <filename>Release</filename> " +"files retrieved from locations listed in the &sources-list; file are stored " +"in the directory <filename>/var/lib/apt/lists</filename>, or in the file " +"named by the variable <literal>Dir::State::Lists</literal> in the " +"<filename>apt.conf</filename> file. For example, the file <filename>debian." +"lcs.mit.edu_debian_dists_unstable_contrib_binary-i386_Release</filename> " +"contains the <filename>Release</filename> file retrieved from the site " +"<literal>debian.lcs.mit.edu</literal> for <literal>binary-i386</literal> " +"architecture files from the <literal>contrib</literal> component of the " +"<literal>unstable</literal> distribution." +msgstr "" +"Todos os ficheiros <filename>Packages</filename> e <filename>Release</" +"filename> obtidos das localizações listadas no ficheiro &sources-list; são " +"armazenados no directório <filename>/var/lib/apt/lists</filename>, ou no " +"ficheiro nomeado pela variável <literal>Dir::State::Lists</literal> no " +"ficheiro <filename>apt.conf</filename>. Por exemplo, o ficheiro " +"<filename>debian.lcs.mit.edu_debian_dists_unstable_contrib_binary-" +"i386_Release</filename> contém o ficheiro <filename>Release</filename> " +"obtido do site <literal>debian.lcs.mit.edu</literal> para ficheiros da " +"arquitectura <literal>binary-i386</literal> do componente <literal>contrib</" +"literal> da distribuição <literal>unstable</literal>." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt_preferences.5.xml:467 +msgid "Optional Lines in an APT Preferences Record" +msgstr "Linhas Opcionais num Registo de Preferências do APT" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:469 +msgid "" +"Each record in the APT preferences file can optionally begin with one or " +"more lines beginning with the word <literal>Explanation:</literal>. This " +"provides a place for comments." +msgstr "" +"Cada registo no ficheiro de preferências do APT por começar opcionalmente " +"com uma ou mais linhas começadas com a palavra <literal>Explanation:</" +"literal>. Isto disponibiliza um espaço para comentários." + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:473 +msgid "" +"The <literal>Pin-Priority:</literal> line in each APT preferences record is " +"optional. If omitted, APT assigns a priority of 1 less than the last value " +"specified on a line beginning with <literal>Pin-Priority: release ...</" +"literal>." +msgstr "" +"A linha <literal>Pin-Priority:</literal> em cada registo de preferências do " +"APT é opcional. Se omitida, o APT atribui uma prioridade de 1 a menos do " +"último valor especificado numa linha que começa com <literal>Pin-Priority: " +"release ...</literal>." + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt_preferences.5.xml:482 +msgid "Tracking Stable" +msgstr "Acompanhando Stable" + +#. type: Content of: <refentry><refsect1><refsect2><para><programlisting> +#: apt_preferences.5.xml:490 +#, no-wrap +msgid "" +"Explanation: Uninstall or do not install any Debian-originated\n" +"Explanation: package versions other than those in the stable distro\n" +"Package: *\n" +"Pin: release a=stable\n" +"Pin-Priority: 900\n" +"\n" +"Package: *\n" +"Pin: release o=Debian\n" +"Pin-Priority: -10\n" +msgstr "" +"Explicação: Desinstala ou não instala quaisquer versões de pacotes originais\n" +"Explicação: Debian para além daquelas da distribuição stable\n" +"Package: *\n" +"Pin: release a=stable\n" +"Pin-Priority: 900\n" +"\n" +"Package: *\n" +"Pin: release o=Debian\n" +"Pin-Priority: -10\n" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:484 +msgid "" +"The following APT preferences file will cause APT to assign a priority " +"higher than the default (500) to all package versions belonging to a " +"<literal>stable</literal> distribution and a prohibitively low priority to " +"package versions belonging to other <literal>Debian</literal> " +"distributions. <placeholder type=\"programlisting\" id=\"0\"/>" +msgstr "" +"O seguinte ficheiro de preferências do APT irá fazer com que o APT atribua " +"uma prioridade mais alta que o predefinido (500) a todos as versões de " +"pacotes que pertencem a uma distribuição <literal>stable</literal> e uma " +"prioridade proibitivamente baixa a versões de pacotes pertencentes a outras " +"distribuições <literal>Debian</literal>. <placeholder type=\"programlisting" +"\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para><programlisting> +#: apt_preferences.5.xml:507 apt_preferences.5.xml:553 +#: apt_preferences.5.xml:611 +#, no-wrap +msgid "" +"apt-get install <replaceable>package-name</replaceable>\n" +"apt-get upgrade\n" +"apt-get dist-upgrade\n" +msgstr "" +"apt-get install <replaceable>nome-do-pacote</replaceable>\n" +"apt-get upgrade\n" +"apt-get dist-upgrade\n" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:502 +msgid "" +"With a suitable &sources-list; file and the above preferences file, any of " +"the following commands will cause APT to upgrade to the latest " +"<literal>stable</literal> version(s). <placeholder type=\"programlisting\" " +"id=\"0\"/>" +msgstr "" +"Com um ficheiro &sources-list; apropriado e o ficheiro de preferências " +"acima, qualquer dos seguintes comandos irá fazer com que o APT actualize " +"para as versões <literal>stable</literal> mais recentes. <placeholder type=" +"\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para><programlisting> +#: apt_preferences.5.xml:519 +#, no-wrap +msgid "apt-get install <replaceable>package</replaceable>/testing\n" +msgstr "apt-get install <replaceable>pacote</replaceable>/testing\n" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:513 +msgid "" +"The following command will cause APT to upgrade the specified package to the " +"latest version from the <literal>testing</literal> distribution; the package " +"will not be upgraded again unless this command is given again. <placeholder " +"type=\"programlisting\" id=\"0\"/>" +msgstr "" +"O seguinte comandos irá fazer com que o APT actualize o pacote especificado " +"para a versão mais recente da distribuição <literal>testing</literal>; o " +"pacote não será actualizado de novo a menos que seja executado este comando " +"outra vez. <placeholder type=\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt_preferences.5.xml:525 +msgid "Tracking Testing or Unstable" +msgstr "Acompanhando Testing ou Unstable" + +#. type: Content of: <refentry><refsect1><refsect2><para><programlisting> +#: apt_preferences.5.xml:534 +#, no-wrap +msgid "" +"Package: *\n" +"Pin: release a=testing\n" +"Pin-Priority: 900\n" +"\n" +"Package: *\n" +"Pin: release a=unstable\n" +"Pin-Priority: 800\n" +"\n" +"Package: *\n" +"Pin: release o=Debian\n" +"Pin-Priority: -10\n" +msgstr "" +"Package: *\n" +"Pin: release a=testing\n" +"Pin-Priority: 900\n" +"\n" +"Package: *\n" +"Pin: release a=unstable\n" +"Pin-Priority: 800\n" +"\n" +"Package: *\n" +"Pin: release o=Debian\n" +"Pin-Priority: -10\n" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:527 +msgid "" +"The following APT preferences file will cause APT to assign a high priority " +"to package versions from the <literal>testing</literal> distribution, a " +"lower priority to package versions from the <literal>unstable</literal> " +"distribution, and a prohibitively low priority to package versions from " +"other <literal>Debian</literal> distributions. <placeholder type=" +"\"programlisting\" id=\"0\"/>" +msgstr "" +"O seguinte ficheiro de preferências do APT irá fazer com que o APT atribua " +"uma prioridade alta a versões de pacotes da distribuição <literal>testing</" +"literal>, uma prioridade mais baixa a versões de pacotes da distribuição " +"<literal>unstable</literal>, e uma prioridade proibitivamente baixa a " +"versões de pacotes de outras distribuições <literal>Debian</literal>. " +"<placeholder type=\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:548 +msgid "" +"With a suitable &sources-list; file and the above preferences file, any of " +"the following commands will cause APT to upgrade to the latest " +"<literal>testing</literal> version(s). <placeholder type=\"programlisting\" " +"id=\"0\"/>" +msgstr "" +"Com um ficheiro &sources-list; apropriado e o ficheiro de preferências " +"acima, qualquer dos seguintes comandos irá fazer com que o APT actualize " +"para as versões <literal>testing</literal> mais recentes. <placeholder type=" +"\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para><programlisting> +#: apt_preferences.5.xml:568 +#, no-wrap +msgid "apt-get install <replaceable>package</replaceable>/unstable\n" +msgstr "apt-get install <replaceable>pacote</replaceable>/unstable\n" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:559 +msgid "" +"The following command will cause APT to upgrade the specified package to the " +"latest version from the <literal>unstable</literal> distribution. " +"Thereafter, <command>apt-get upgrade</command> will upgrade the package to " +"the most recent <literal>testing</literal> version if that is more recent " +"than the installed version, otherwise, to the most recent <literal>unstable</" +"literal> version if that is more recent than the installed version. " +"<placeholder type=\"programlisting\" id=\"0\"/>" +msgstr "" +"O comando seguinte irá fazer com que o APT actualize o pacote especificado " +"para a versão mais recente da distribuição <literal>unstable</literal>. " +"Posteriormente, o <command>apt-get upgrade</command> irá actualizar o pacote " +"para a versão <literal>testing</literal> mais recente se essa for mais " +"recente que a versão instalada, caso contrário, para a versão " +"<literal>unstable</literal> mais recente se essa for mais recente que a " +"versão instalada. <placeholder type=\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><title> +#: apt_preferences.5.xml:575 +msgid "Tracking the evolution of a codename release" +msgstr "Acompanhando a evolução de um nome de código de lançamento" + +#. type: Content of: <refentry><refsect1><refsect2><para><programlisting> +#: apt_preferences.5.xml:589 +#, no-wrap +msgid "" +"Explanation: Uninstall or do not install any Debian-originated package versions\n" +"Explanation: other than those in the distribution codenamed with squeeze or sid\n" +"Package: *\n" +"Pin: release n=squeeze\n" +"Pin-Priority: 900\n" +"\n" +"Explanation: Debian unstable is always codenamed with sid\n" +"Package: *\n" +"Pin: release a=sid\n" +"Pin-Priority: 800\n" +"\n" +"Package: *\n" +"Pin: release o=Debian\n" +"Pin-Priority: -10\n" +msgstr "" +"Explicação: Desinstala ou não instala nenhumas versões de pacotes originais Debian\n" +"Explicação: para além daquelas da distribuição com nome de código squeeze ou sid\n" +"Package: *\n" +"Pin: release n=squeeze\n" +"Pin-Priority: 900\n" +"\n" +"Explicação: Debian unstable tem sempre o nome de código sid\n" +"Package: *\n" +"Pin: release a=sid\n" +"Pin-Priority: 800\n" +"\n" +"Package: *\n" +"Pin: release o=Debian\n" +"Pin-Priority: -10\n" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:577 +msgid "" +"The following APT preferences file will cause APT to assign a priority " +"higher than the default (500) to all package versions belonging to a " +"specified codename of a distribution and a prohibitively low priority to " +"package versions belonging to other <literal>Debian</literal> distributions, " +"codenames and archives. Note that with this APT preference APT will follow " +"the migration of a release from the archive <literal>testing</literal> to " +"<literal>stable</literal> and later <literal>oldstable</literal>. If you " +"want to follow for example the progress in <literal>testing</literal> " +"notwithstanding the codename changes you should use the example " +"configurations above. <placeholder type=\"programlisting\" id=\"0\"/>" +msgstr "" +"O seguinte ficheiro de preferências do APT irá fazer com que o APT atribua " +"uma prioridade mais alta que a predefinida (500) a todas as versões de " +"pacotes pertencentes a um nome de código especificado de uma distribuição " +"com uma prioridade proibitivamente baixa a versões de pacotes pertencentes a " +"outras distribuições, nomes de código ou arquivos <literal>Debian</literal>. " +"Note que com estas preferências o APT irá seguir a migração de um lançamento " +"a partir do arquivo <literal>testing</literal> para <literal>stable</" +"literal> e mais tarde <literal>oldstable</literal>. Se você que seguir por " +"exemplo o progresso em <literal>testing</literal> não obstante as alterações " +"do nome de código, você deve usar as configurações exemplo acima. " +"<placeholder type=\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:606 +msgid "" +"With a suitable &sources-list; file and the above preferences file, any of " +"the following commands will cause APT to upgrade to the latest version(s) in " +"the release codenamed with <literal>squeeze</literal>. <placeholder type=" +"\"programlisting\" id=\"0\"/>" +msgstr "" +"Com um ficheiro &sources-list; apropriado e o ficheiro de preferências " +"acima, qualquer dos seguintes comandos fará com que o APT actualize para a " +"versão mais recente no lançamento com nome de código <literal>squeeze</" +"literal>. <placeholder type=\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><refsect2><para><programlisting> +#: apt_preferences.5.xml:626 +#, no-wrap +msgid "apt-get install <replaceable>package</replaceable>/sid\n" +msgstr "apt-get install <replaceable>pacote</replaceable>/sid\n" + +#. type: Content of: <refentry><refsect1><refsect2><para> +#: apt_preferences.5.xml:617 +msgid "" +"The following command will cause APT to upgrade the specified package to the " +"latest version from the <literal>sid</literal> distribution. Thereafter, " +"<command>apt-get upgrade</command> will upgrade the package to the most " +"recent <literal>squeeze</literal> version if that is more recent than the " +"installed version, otherwise, to the most recent <literal>sid</literal> " +"version if that is more recent than the installed version. <placeholder " +"type=\"programlisting\" id=\"0\"/>" +msgstr "" +"O seguinte comando irá fazer com que o APT actualize o pacote especificado " +"para a versão mais recente da distribuição <literal>sid</literal> " +"distribution. Posteriormente, <command>apt-get upgrade</command> irá " +"actualizar o pacote para a versão <literal>squeeze</literal> mais recente se " +"essa for mais recente que a versão instalada, caso contrário, para a versão " +"<literal>sid</literal> mais recente se essa for mais recente que a versão " +"instalada. <placeholder type=\"programlisting\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><variablelist> +#: apt_preferences.5.xml:635 +msgid "&file-preferences;" +msgstr "&file-preferences;" + +#. type: Content of: <refentry><refsect1><para> +#: apt_preferences.5.xml:641 +msgid "&apt-get; &apt-cache; &apt-conf; &sources-list;" +msgstr "&apt-get; &apt-cache; &apt-conf; &sources-list;" + +#. type: Content of: <refentry><refnamediv><refname> +#: sources.list.5.xml:22 sources.list.5.xml:29 +msgid "sources.list" +msgstr "sources.list" + +#. type: Content of: <refentry><refnamediv><refpurpose> +#: sources.list.5.xml:30 +msgid "Package resource list for APT" +msgstr "Lista de recursos de pacote para APT" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:34 +msgid "" +"The package resource list is used to locate archives of the package " +"distribution system in use on the system. At this time, this manual page " +"documents only the packaging system used by the Debian GNU/Linux system. " +"This control file is <filename>/etc/apt/sources.list</filename>." +msgstr "" +"A lista de recursos de pacote é usada para localizar arquivos do sistema de " +"distribuição de pacotes usado no sistema. Neste momento, este manual " +"documenta apenas o sistema de pacotes usado pelo sistema Debian GNU/Linux. " +"Este ficheiro de controle é <filename>/etc/apt/sources.list</filename>." + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:39 +msgid "" +"The source list is designed to support any number of active sources and a " +"variety of source media. The file lists one source per line, with the most " +"preferred source listed first. The format of each line is: <literal>type uri " +"args</literal> The first item, <literal>type</literal> determines the format " +"for <literal>args</literal>. <literal>uri</literal> is a Universal Resource " +"Identifier (URI), which is a superset of the more specific and well-known " +"Universal Resource Locator, or URL. The rest of the line can be marked as a " +"comment by using a #." +msgstr "" +"A lista de fontes é desenhada para suportar qualquer número de fontes " +"activas e uma variedade de médias fonte. O ficheiro lista uma fonte por " +"linha, com a fonte mais preferida listada em primeiro lugar. O formato para " +"cada linha é: <literal>tipo uri argumentos</literal>. O primeiro item, " +"<literal>tipo</literal> determina o formato para <literal>argumentos</" +"literal>. <literal>uri</literal> é um Universal Resource Identifier (URI), o " +"que é um super-conjunto para o mais específico e conhecido Universal " +"Resource Locator, ou URL. O resto da linha pode ser marcado como um " +"comentário usando um #." + +#. type: Content of: <refentry><refsect1><title> +#: sources.list.5.xml:50 +msgid "sources.list.d" +msgstr "sources.list.d" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:51 +msgid "" +"The <filename>/etc/apt/sources.list.d</filename> directory provides a way to " +"add sources.list entries in separate files. The format is the same as for " +"the regular <filename>sources.list</filename> file. File names need to end " +"with <filename>.list</filename> and may only contain letters (a-z and A-Z), " +"digits (0-9), underscore (_), hyphen (-) and period (.) characters. " +"Otherwise they will be silently ignored." +msgstr "" +"O directório <filename>/etc/apt/sources.list.d</filename> disponibiliza um " +"modo de adicionar entradas na sources.list em ficheiros separados. O formato " +"é o mesmo que para o ficheiro <filename>sources.list</filename> regular. Os " +"nomes de ficheiros precisam acabar com <filename>.list</filename> e apenas " +"podem conter letras (a-z e A-Z), dígitos (0-9), e os caracteres underscore " +"(_), menos (-) e ponto (.). De outro modo serão ignorados em silêncio." + +#. type: Content of: <refentry><refsect1><title> +#: sources.list.5.xml:60 +msgid "The deb and deb-src types" +msgstr "Os tipos deb e deb-src" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:61 +msgid "" +"The <literal>deb</literal> type describes a typical two-level Debian " +"archive, <filename>distribution/component</filename>. Typically, " +"<literal>distribution</literal> is generally one of <literal>stable</" +"literal> <literal>unstable</literal> or <literal>testing</literal> while " +"component is one of <literal>main</literal> <literal>contrib</literal> " +"<literal>non-free</literal> or <literal>non-us</literal>. The <literal>deb-" +"src</literal> type describes a debian distribution's source code in the same " +"form as the <literal>deb</literal> type. A <literal>deb-src</literal> line " +"is required to fetch source indexes." +msgstr "" +"O tipo <literal>deb</literal> descreve um arquivo Debian típico de dois " +"níveis, <filename>distribution/component</filename>. Tipicamente " +"<literal>distribution</literal> é geralmente um de <literal>stable</literal> " +"<literal>unstable</literal> ou <literal>testing</literal> enquanto component " +"é um de <literal>main</literal> <literal>contrib</literal> <literal>non-" +"free</literal> ou <literal>non-us</literal>. O tipo <literal>deb-src</" +"literal> descreve um código fonte de distribuição debian no mesmo formato " +"que o tipo <literal>deb</literal>. Uma linha <literal>deb-src</literal> é " +"necessária para obter índices fonte." + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:73 +msgid "" +"The format for a <filename>sources.list</filename> entry using the " +"<literal>deb</literal> and <literal>deb-src</literal> types is:" +msgstr "" +"O formato para uma entrada na <filename>sources.list</filename> usando os " +"tipos <literal>deb</literal> e <literal>deb-src</literal> é:" + +#. type: Content of: <refentry><refsect1><literallayout> +#: sources.list.5.xml:76 +#, no-wrap +msgid "deb uri distribution [component1] [component2] [...]" +msgstr "deb uri distribuição [componente1] [componente2] [...]" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:78 +msgid "" +"The URI for the <literal>deb</literal> type must specify the base of the " +"Debian distribution, from which APT will find the information it needs. " +"<literal>distribution</literal> can specify an exact path, in which case the " +"components must be omitted and <literal>distribution</literal> must end with " +"a slash (/). This is useful for when the case only a particular sub-section " +"of the archive denoted by the URI is of interest. If <literal>distribution</" +"literal> does not specify an exact path, at least one <literal>component</" +"literal> must be present." +msgstr "" +"O URI para o tipo <literal>deb</literal> tem de especificar a base da " +"distribuição Debian, a partir do qual o APT irá encontrar a informação que " +"precisa. <literal>distribution</literal> pode especificar um caminho exacto, " +"que no caso os componente têm de ser omitidos e <literal>distribution</" +"literal> deve terminar com uma barra (/). Isto é útil para o caso de apenas " +"ser de interesse uma sub-secção particular do arquivo denotado pelo URI. Se " +"<literal>distribution</literal> não especificar um caminho exacto, pelo " +"menos um <literal>component</literal> tem de estar presente." + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:87 +msgid "" +"<literal>distribution</literal> may also contain a variable, <literal>$(ARCH)" +"</literal> which expands to the Debian architecture (i386, m68k, " +"powerpc, ...) used on the system. This permits architecture-independent " +"<filename>sources.list</filename> files to be used. In general this is only " +"of interest when specifying an exact path, <literal>APT</literal> will " +"automatically generate a URI with the current architecture otherwise." +msgstr "" +"<literal>distribution</literal> também pode conter uma variável. <literal>" +"$(ARCH)</literal> a qual se expande à arquitectura Debian (i386, m68k, " +"powerpc, ...) usada no sistema. Isto permite que seja usados ficheiros " +"<filename>sources.list</filename> independentes da arquitectura. Em geral, " +"isto é apenas de interesse quando se especifica um caminho exacto. De outro " +"modo o <literal>APT</literal> irá gerar automaticamente um URI com a " +"arquitectura actual." + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:95 +msgid "" +"Since only one distribution can be specified per line it may be necessary to " +"have multiple lines for the same URI, if a subset of all available " +"distributions or components at that location is desired. APT will sort the " +"URI list after it has generated a complete set internally, and will collapse " +"multiple references to the same Internet host, for instance, into a single " +"connection, so that it does not inefficiently establish an FTP connection, " +"close it, do something else, and then re-establish a connection to that same " +"host. This feature is useful for accessing busy FTP sites with limits on the " +"number of simultaneous anonymous users. APT also parallelizes connections to " +"different hosts to more effectively deal with sites with low bandwidth." +msgstr "" +"Como apenas pode ser especificada por linha uma distribuição, pode ser " +"necessário ter várias linhas para o mesmo URI, se só for desejado um sub-" +"conjunto de todas as distribuições e componentes dessa localização. O APT " +"irá ordenar a lista de URI após ter gerado internamente um conjunto " +"completo, e irá desabar as várias referências à mesma máquina na Internet, " +"por exemplo, numa única ligação, para que não estabeleça uma ligação FTP " +"ineficiente, a feche, faça outra coisa, e depois volte a estabelecer ligação " +"à mesma máquina. Esta funcionalidade é útil para aceder a sites FTP ocupados " +"que limitam o número de utilizadores anónimos em simultâneo. O APT também " +"paraleliza ligações a máquinas diferentes para lidar mais eficientemente com " +"sites com baixa largura de banda." + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:107 +msgid "" +"It is important to list sources in order of preference, with the most " +"preferred source listed first. Typically this will result in sorting by " +"speed from fastest to slowest (CD-ROM followed by hosts on a local network, " +"followed by distant Internet hosts, for example)." +msgstr "" +"É importante listar as fontes por ordem de preferência, com a fonte mais " +"preferida listada em primeiro lugar. Tipicamente isto irá resultar numa " +"ordenação por velocidades desde o mais rápido até ao mais lento (CD-ROM " +"seguido por máquinas numa rede local, seguido por máquinas distantes na " +"Internet, por exemplo)." + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:112 +msgid "Some examples:" +msgstr "Alguns exemplos:" + +#. type: Content of: <refentry><refsect1><literallayout> +#: sources.list.5.xml:114 +#, no-wrap +msgid "" +"deb http://http.us.debian.org/debian stable main contrib non-free\n" +"deb http://http.us.debian.org/debian dists/stable-updates/\n" +" " +msgstr "" +"deb http://http.us.debian.org/debian stable main contrib non-free\n" +"deb http://http.us.debian.org/debian dists/stable-updates/\n" +" " + +#. type: Content of: <refentry><refsect1><title> +#: sources.list.5.xml:120 +msgid "URI specification" +msgstr "Especificação da URI" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: sources.list.5.xml:125 +msgid "file" +msgstr "file" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: sources.list.5.xml:127 +msgid "" +"The file scheme allows an arbitrary directory in the file system to be " +"considered an archive. This is useful for NFS mounts and local mirrors or " +"archives." +msgstr "" +"O esquema file permite que um directório arbitrário do sistema de ficheiros " +"seja considerado um arquivo. Isto é útil para montagens NFS e mirrors ou " +"arquivos locais." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: sources.list.5.xml:134 +msgid "" +"The cdrom scheme allows APT to use a local CDROM drive with media swapping. " +"Use the &apt-cdrom; program to create cdrom entries in the source list." +msgstr "" +"O esquema cdrom permite ao APT usar uma drive de CDROM local com mudança de " +"media. Use o programa &apt-cdrom; para criar entradas cdrom na lista de " +"fontes." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: sources.list.5.xml:141 +msgid "" +"The http scheme specifies an HTTP server for the archive. If an environment " +"variable <envar>http_proxy</envar> is set with the format http://server:" +"port/, the proxy server specified in <envar>http_proxy</envar> will be used. " +"Users of authenticated HTTP/1.1 proxies may use a string of the format " +"http://user:pass@server:port/. Note that this is an insecure method of " +"authentication." +msgstr "" +"O esquema http especifica um servidor HTTP para o arquivo. Se uma variável " +"de ambiente <envar>http_proxy</envar> estiver definida com o formato http://" +"server:port/, será usado o servidor proxy especificado em <envar>http_proxy</" +"envar>. Os utilizadores de proxies HTTP/1.1 autenticados pode usar uma " +"string do formato http://user:pass@server:port/. Note que este não é um " +"método de autenticação seguro." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: sources.list.5.xml:152 +msgid "" +"The ftp scheme specifies an FTP server for the archive. APT's FTP behavior " +"is highly configurable; for more information see the &apt-conf; manual page. " +"Please note that a ftp proxy can be specified by using the <envar>ftp_proxy</" +"envar> environment variable. It is possible to specify a http proxy (http " +"proxy servers often understand ftp urls) using this method and ONLY this " +"method. ftp proxies using http specified in the configuration file will be " +"ignored." +msgstr "" +"O esquema ftp especifica um servidor FTP para o arquivo. o comportamento FTP " +"do APT é altamente configurável; para mais informação veja o manual &apt-" +"conf;. Por favor note que um proxy ftp pode ser especificado ao usar a " +"variável de ambiente <envar>ftp_proxy</envar>. É possível especificar um " +"proxy http (os servidores de proxy http geralmente compreendem urls de ftp) " +"usando este método e APENAS este método. Os proxies ftp que usam http e seja " +"especificados no ficheiro de configuração serão ignorados." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: sources.list.5.xml:161 +msgid "copy" +msgstr "copy" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: sources.list.5.xml:163 +msgid "" +"The copy scheme is identical to the file scheme except that packages are " +"copied into the cache directory instead of used directly at their location. " +"This is useful for people using a zip disk to copy files around with APT." +msgstr "" +"O esquema copy é idêntico ao esquema file com a excepção que os pacotes são " +"copiados para o directório cache em vez serem usados directamente da sua " +"localização. Isto é útil para quem use um disco zip para copiar ficheiros " +"com o APT." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: sources.list.5.xml:168 +msgid "rsh" +msgstr "rsh" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: sources.list.5.xml:168 +msgid "ssh" +msgstr "ssh" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: sources.list.5.xml:170 +msgid "" +"The rsh/ssh method invokes rsh/ssh to connect to a remote host as a given " +"user and access the files. It is a good idea to do prior arrangements with " +"RSA keys or rhosts. Access to files on the remote uses standard " +"<command>find</command> and <command>dd</command> commands to perform the " +"file transfers from the remote." +msgstr "" +"O método rsh/ssh invoca rsh/ssh a ligar a uma máquina remota como um " +"utilizador fornecido e acede aos ficheiros. É uma boa ideia fazer " +"preparações prévias com chaves RSA ou rhosts. O acesso a ficheiros remotos " +"usa os comandos standard <command>find</command> e <command>dd</command> " +"para executar as transferências de ficheiros remotos." + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> +#: sources.list.5.xml:178 +msgid "more recognizable URI types" +msgstr "tipos de URI mais reconhecíveis" + +#. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> +#: sources.list.5.xml:180 +msgid "" +"APT can be extended with more methods shipped in other optional packages " +"which should follow the nameing scheme <literal>apt-transport-" +"<replaceable>method</replaceable></literal>. The APT team e.g. maintains " +"also the <literal>apt-transport-https</literal> package which provides " +"access methods for https-URIs with features similar to the http method, but " +"other methods for using e.g. debtorrent are also available, see " +"<citerefentry> <refentrytitle><filename>apt-transport-debtorrent</filename></" +"refentrytitle> <manvolnum>1</manvolnum></citerefentry>." +msgstr "" +"O APT pode ser estendido com mais métodos lançados em outros pacotes " +"opcionais que devem seguir o esquema de nomeação <literal>apt-transport-" +"<replaceable>método</replaceable></literal>. A equipa do APT, por exemplo, " +"mantém também o pacote <literal>apt-transport-https</literal> que " +"disponibiliza métodos de acesso para URIs https com funcionalidades " +"semelhantes ao método http, mas estão também disponíveis outros métodos para " +"usar por exemplo o debtorrent, veja <citerefentry> " +"<refentrytitle><filename>apt-transport-debtorrent</filename></refentrytitle> " +"<manvolnum>1</manvolnum></citerefentry>." + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:122 +msgid "" +"The currently recognized URI types are cdrom, file, http, ftp, copy, ssh, " +"rsh. <placeholder type=\"variablelist\" id=\"0\"/>" +msgstr "" +"Os tipos de URI actualmente reconhecidos são cdrom, file, http, ftp, copy, " +"ssh, rsh. <placeholder type=\"variablelist\" id=\"0\"/>" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:194 +msgid "" +"Uses the archive stored locally (or NFS mounted) at /home/jason/debian for " +"stable/main, stable/contrib, and stable/non-free." +msgstr "" +"Usa o arquivo armazenado localmente (ou montagem NFS) em /home/jason/debian " +"para stable/main, stable/contrib, e stable/non-free." + +#. type: Content of: <refentry><refsect1><literallayout> +#: sources.list.5.xml:196 +#, no-wrap +msgid "deb file:/home/jason/debian stable main contrib non-free" +msgstr "deb file:/home/jason/debian stable main contrib non-free" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:198 +msgid "As above, except this uses the unstable (development) distribution." +msgstr "" +"Como em cima, excepto que usa a distribuição unstable (de desenvolvimento)." + +#. type: Content of: <refentry><refsect1><literallayout> +#: sources.list.5.xml:199 +#, no-wrap +msgid "deb file:/home/jason/debian unstable main contrib non-free" +msgstr "deb file:/home/jason/debian unstable main contrib non-free" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:201 +msgid "Source line for the above" +msgstr "Linha de fonte para o referido acima" + +#. type: Content of: <refentry><refsect1><literallayout> +#: sources.list.5.xml:202 +#, no-wrap +msgid "deb-src file:/home/jason/debian unstable main contrib non-free" +msgstr "deb-src file:/home/jason/debian unstable main contrib non-free" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:204 +msgid "" +"Uses HTTP to access the archive at archive.debian.org, and uses only the " +"hamm/main area." +msgstr "" +"Usa HTTP para aceder ao arquivo em archive.debian.org, e usa apenas a área " +"hamm/main." + +#. type: Content of: <refentry><refsect1><literallayout> +#: sources.list.5.xml:206 +#, no-wrap +msgid "deb http://archive.debian.org/debian-archive hamm main" +msgstr "deb http://archive.debian.org/debian-archive hamm main" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:208 +msgid "" +"Uses FTP to access the archive at ftp.debian.org, under the debian " +"directory, and uses only the stable/contrib area." +msgstr "" +"Usa FTP para aceder ao arquivo em ftp.debian.org, sob o directório Debian, e " +"usa apenas a área stable/contrib." + +#. type: Content of: <refentry><refsect1><literallayout> +#: sources.list.5.xml:210 +#, no-wrap +msgid "deb ftp://ftp.debian.org/debian stable contrib" +msgstr "deb ftp://ftp.debian.org/debian stable contrib" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:212 +msgid "" +"Uses FTP to access the archive at ftp.debian.org, under the debian " +"directory, and uses only the unstable/contrib area. If this line appears as " +"well as the one in the previous example in <filename>sources.list</filename> " +"a single FTP session will be used for both resource lines." +msgstr "" +"Usa FTP para aceder ao arquivo em ftp.debian.org, sob o directório debian, e " +"usa apenas a área unstable/contrib. Se esta linha aparecer também como " +"aquela no exemplo anterior em <filename>sources.list</filename> será usada " +"uma única sessão FTP para ambas linhas de recurso." + +#. type: Content of: <refentry><refsect1><literallayout> +#: sources.list.5.xml:216 +#, no-wrap +msgid "deb ftp://ftp.debian.org/debian unstable contrib" +msgstr "deb ftp://ftp.debian.org/debian unstable contrib" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:218 +msgid "" +"Uses HTTP to access the archive at nonus.debian.org, under the debian-non-US " +"directory." +msgstr "" +"Usa HTTP para aceder ao arquivo em nonus.debian.org, sob o directório debian-" +"non-US." + +#. type: Content of: <refentry><refsect1><literallayout> +#: sources.list.5.xml:220 +#, no-wrap +msgid "deb http://nonus.debian.org/debian-non-US stable/non-US main contrib non-free" +msgstr "deb http://nonus.debian.org/debian-non-US stable/non-US main contrib non-free" + +#. type: Content of: <refentry><refsect1><para><literallayout> +#: sources.list.5.xml:229 +#, no-wrap +msgid "deb http://ftp.de.debian.org/debian-non-US unstable/binary-$(ARCH)/" +msgstr "deb http://ftp.de.debian.org/debian-non-US unstable/binary-$(ARCH)/" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:222 +msgid "" +"Uses HTTP to access the archive at nonus.debian.org, under the debian-non-US " +"directory, and uses only files found under <filename>unstable/binary-i386</" +"filename> on i386 machines, <filename>unstable/binary-m68k</filename> on " +"m68k, and so forth for other supported architectures. [Note this example " +"only illustrates how to use the substitution variable; non-us is no longer " +"structured like this] <placeholder type=\"literallayout\" id=\"0\"/>" +msgstr "" +"Usa HTTP para aceder ao arquivo em nonus.debian.org, sob o directório debian-" +"non-US, e usa apenas os ficheiros encontrados sob <filename>unstable/binary-" +"i386</filename> em máquinas i386, <filename>unstable/binary-m68k</filename> " +"em m68k, e assim por diante para outras arquitecturas suportadas. [Note que " +"este exemplo apenas mostra como usar a variável de substituição; non-us já " +"não é mais estruturado desta maneira] <placeholder type=\"literallayout\" id=" +"\"0\"/>" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:234 +msgid "&apt-cache; &apt-conf;" +msgstr "&apt-cache; &apt-conf;" + +#. type: <title> +#: guide.sgml:4 +msgid "APT User's Guide" +msgstr "Guia de Utilizador do APT" + +#. type: +#: guide.sgml:6 offline.sgml:6 +msgid "Jason Gunthorpe jgg@debian.org" +msgstr "Jason Gunthorpe jgg@debian.org" + +#. type: +#: guide.sgml:7 +msgid "$Id: guide.sgml,v 1.7 2003/04/26 23:26:13 doogie Exp $" +msgstr "$Id: guide.sgml,v 1.7 2003/04/26 23:26:13 doogie Exp $" + +#. type: +#: guide.sgml:11 +msgid "" +"This document provides an overview of how to use the the APT package manager." +msgstr "" +"Este documento disponibiliza uma visão geral de como usar o gestor de " +"pacotes APT." + +#. type: +#: guide.sgml:15 +msgid "Copyright © Jason Gunthorpe, 1998." +msgstr "Copyright © Jason Gunthorpe, 1998." + +#. type:

+#: guide.sgml:21 offline.sgml:22 +msgid "" +"\"APT\" and this document are free software; you can redistribute them and/" +"or modify them under the terms of the GNU General Public License as " +"published by the Free Software Foundation; either version 2 of the License, " +"or (at your option) any later version." +msgstr "" +"\"APT\" and this document are free software; you can redistribute them and/" +"or modify them under the terms of the GNU General Public License as " +"published by the Free Software Foundation; either version 2 of the License, " +"or (at your option) any later version." + +#. type:

+#: guide.sgml:24 offline.sgml:25 +msgid "" +"For more details, on Debian GNU/Linux systems, see the file /usr/share/" +"common-licenses/GPL for the full license." +msgstr "" +"Para mais detalhes em sistemas Debian GNU/Linux, veja o ficheiro /usr/share/" +"common-licenses/GPL para a licença completa." + +#. type: +#: guide.sgml:32 +msgid "General" +msgstr "Geral" + +#. type:

+#: guide.sgml:38 +msgid "" +"The APT package currently contains two sections, the APT dselect method and the apt-get command line user interface. Both " +"provide a way to install and remove packages as well as download new " +"packages from the Internet." +msgstr "" +"O pacote APT contém actualmente duas secções, o método dselect " +"do APT e a interface de utilizador de linha de comandos apt-get. Ambos disponibilizam uma maneira de instalar e remover pacotes assim " +"como descarregar novos pacotes da Internet." + +#. type: +#: guide.sgml:39 +msgid "Anatomy of the Package System" +msgstr "Anatomia do Sistema de Pacotes" + +#. type:

+#: guide.sgml:44 +msgid "" +"The Debian packaging system has a large amount of information associated " +"with each package to help assure that it integrates cleanly and easily into " +"the system. The most prominent of its features is the dependency system." +msgstr "" +"O sistema de pacotes Debian tem uma grande quantidade de informação " +"associada a cada pacote para ajudar a assegurar que este se integra de modo " +"limpo e fácil no sistema. A mais proeminente das suas funcionalidades é o " +"sistema de dependências." + +#. type:

+#: guide.sgml:52 +msgid "" +"The dependency system allows individual programs to make use of shared " +"elements in the system such as libraries. It simplifies placing infrequently " +"used portions of a program in separate packages to reduce the number of " +"things the average user is required to install. Also, it allows for choices " +"in mail transport agents, X servers and so on." +msgstr "" +"O sistema de dependências permite a programas individuais fazerem uso de " +"elementos partilhados no sistema tais como as bibliotecas. Facilita a " +"colocação de porções de um programa usadas raramente em pacotes separados " +"para reduzir o número de coisas que é necessário instalar ao utilizador " +"médio. Também permite opções em agentes de transporte de mail, servidores X " +"e mais." + +#. type:

+#: guide.sgml:57 +msgid "" +"The first step to understanding the dependency system is to grasp the " +"concept of a simple dependency. The meaning of a simple dependency is that a " +"package requires another package to be installed at the same time to work " +"properly." +msgstr "" +"O primeiro passo para compreender o sistema de dependências é pegar no " +"conceito de uma dependência simples. O significado de uma dependência " +"simples é que um pacote requer outro pacote seja instalado ao mesmo tempo " +"para funcionar correctamente." + +#. type:

+#: guide.sgml:63 +msgid "" +"For instance, mailcrypt is an emacs extension that aids in encrypting email " +"with GPG. Without GPGP installed mailcrypt is useless, so mailcrypt has a " +"simple dependency on GPG. Also, because it is an emacs extension it has a " +"simple dependency on emacs, without emacs it is completely useless." +msgstr "" +"Por exemplo, mailcrypt é uma extensão do emacs que ajuda a encriptar mail " +"com GPG. Sem o GPGP instalado o mailcrypt é inútil, então o mailcrypt tem " +"uma dependência simples do GPG. Também, porque é uma extensão do emacs, tem " +"uma dependência simples do emacs, e sem o emacs é completamente inútil." + +#. type:

+#: guide.sgml:73 +msgid "" +"The other important dependency to understand is a conflicting dependency. It " +"means that a package, when installed with another package, will not work and " +"may possibly be extremely harmful to the system. As an example consider a " +"mail transport agent such as sendmail, exim or qmail. It is not possible to " +"have two mail transport agents installed because both need to listen to the " +"network to receive mail. Attempting to install two will seriously damage the " +"system so all mail transport agents have a conflicting dependency with all " +"other mail transport agents." +msgstr "" +"A outra dependência importante a compreender é a dependência de conflito. " +"Significa que um pacote, quando instalado com outro pacote, não irá " +"funcionar e pode ser extremamente prejudicial para o sistema. Como exemplo " +"considere um agente de transporte de mail como o sendmail, exim ou qmail. " +"Não é possível ter dois agentes de transporte de mail instalados porque " +"ambos precisam de escutar na rede para receberem mail. Tentar instalar dois " +"irá danificar seriamente o sistema, por isso todos os agentes de transporte " +"de mail têm uma dependência de conflito com todos os outros agentes de " +"transporte de mail." + +#. type:

+#: guide.sgml:83 +msgid "" +"As an added complication there is the possibility for a package to pretend " +"to be another package. Consider that exim and sendmail for many intents are " +"identical, they both deliver mail and understand a common interface. Hence, " +"the package system has a way for them to declare that they are both mail-" +"transport-agents. So, exim and sendmail both declare that they provide a " +"mail-transport-agent and other packages that need a mail transport agent " +"depend on mail-transport-agent. This can add a great deal of confusion when " +"trying to manually fix packages." +msgstr "" +"Como uma complicação adicional existe a possibilidade de um pacote fingir " +"ser outro pacote. Considere que exim e sendmail para muitas intenções são " +"idênticos, ambos entregam mail e compreendem uma interface comum. Por isso, " +"o sistema de pacotes tem um modo para eles declararem que são ambos mail-" +"transport-agents. Portanto, ambos exim e sendmail declaram que " +"disponibilizam um mail-transport-agent e outros pacotes que precisam de um " +"agente de transporte de mail dependem de um mail-transport-agent. Isto pode " +"adicionar uma grande confusão quando se tenta corrigir pacotes manualmente." + +#. type:

+#: guide.sgml:88 +msgid "" +"At any given time a single dependency may be met by packages that are " +"already installed or it may not be. APT attempts to help resolve dependency " +"issues by providing a number of automatic algorithms that help in selecting " +"packages for installation." +msgstr "" +"Em qualquer altura uma única dependência pode ser satisfeita por pacotes que " +"já estão instalados ou podem não estar. O APT tenta ajudar a resolver " +"problemas com dependências ao disponibilizar um número de algoritmos " +"automáticos que ajudam a seleccionar os pacotes para instalação." + +#. type:

+#: guide.sgml:102 +msgid "" +"apt-get provides a simple way to install packages from the " +"command line. Unlike dpkg, apt-get does not " +"understand .deb files, it works with the package's proper name and can only " +"install .deb archives from a Source." +msgstr "" +"apt-get fornece uma maneira simples de instalar pacotes a " +"partir da linha de comandos. Ao contrário do dpkg, o apt-" +"get não compreende os ficheiros .deb, funciona com o nome próprio do " +"pacote e apenas pode instalar arquivos .deb a partir de uma Source." + +#. type:

+#: guide.sgml:109 +msgid "" +"The first

If you are using an http proxy server you must set " +"the http_proxy environment variable first, see sources.list(5)

thing that should be done before using apt-get is to " +"fetch the package lists from the Sources so that it knows what " +"packages are available. This is done with apt-get update. For " +"instance," +msgstr "" +"O primeira

se você está a usar um servidor proxy http você tem " +"que definir a variável de ambiente http_proxy primeiro, veja sources.list(5)" +"

coisa que deve ser feita antes de usar apt-get " +"é obter as listas de pacotes a partir das Sources para que ele " +"saiba que pacotes estão disponíveis. Isto é feito com apt-get update. Por exemplo," + +#. type: +#: guide.sgml:116 +#, no-wrap +msgid "" +"# apt-get update\n" +"Get http://ftp.de.debian.org/debian-non-US/ stable/binary-i386/ Packages\n" +"Get http://llug.sep.bnl.gov/debian/ testing/contrib Packages\n" +"Reading Package Lists... Done\n" +"Building Dependency Tree... Done" +msgstr "" +"# apt-get update\n" +"Get http://ftp.de.debian.org/debian-non-US/ stable/binary-i386/ Packages\n" +"Get http://llug.sep.bnl.gov/debian/ testing/contrib Packages\n" +"Reading Package Lists... Done\n" +"Building Dependency Tree... Done" + +#. type:

+#: guide.sgml:120 +msgid "Once updated there are several commands that can be used:" +msgstr "Uma vez actualizado existem vários comandos que podem ser usados:" + +#. type:

+#: guide.sgml:131 +msgid "" +"Upgrade will attempt to gently upgrade the whole system. Upgrade will never " +"install a new package or remove an existing package, nor will it ever " +"upgrade a package that might cause some other package to break. This can be " +"used daily to relatively safely upgrade the system. Upgrade will list all of " +"the packages that it could not upgrade, this usually means that they depend " +"on new packages or conflict with some other package. dselect or " +"apt-get install can be used to force these packages to install." +msgstr "" +"Upgrade irá tentar actualizar gentilmente todo o sistema. Upgrade nunca irá " +"instalar um pacote novo ou remover um pacote existente, nem nunca irá " +"actualizar um pacote que possa causar a quebra de outro pacote. Isto pode " +"ser usado diariamente para actualizar o sistema com relativa segurança. " +"Upgrade ira listar todos os pacotes que não pode actualizar, isto geralmente " +"significa que eles dependem de novos pacotes ou entram em conflito com algum " +"outro pacote. dselect ou apt-get install podem ser " +"usados para forçar estes pacotes a instalar." + +#. type:

+#: guide.sgml:140 +msgid "" +"Install is used to install packages by name. The package is automatically " +"fetched and installed. This can be useful if you already know the name of " +"the package to install and do not want to go into a GUI to select it. Any " +"number of packages may be passed to install, they will all be fetched. " +"Install automatically attempts to resolve dependency problems with the " +"listed packages and will print a summary and ask for confirmation if " +"anything other than its arguments are changed." +msgstr "" +"Install é usado para instalar pacotes pelo nome. O pacote é obtido " +"automaticamente e instalado. Isto pode ser útil se você já conhecer o nome " +"do pacote a instalar e não quer ir para uma GUI para o seleccionar. Podem " +"ser passados qualquer número de pacotes para instalar, todos eles serão " +"obtidos. Install tenta automaticamente resolver problemas de dependências " +"com os pacotes listados e irá escrever um sumário e pedir confirmação se " +"algo mais que os seus argumentos serão alterados." + +#. type:

+#: guide.sgml:149 +msgid "" +"Dist-upgrade is a complete upgrader designed to simplify upgrading between " +"releases of Debian. It uses a sophisticated algorithm to determine the best " +"set of packages to install, upgrade and remove to get as much of the system " +"to the newest release. In some situations it may be desired to use dist-" +"upgrade rather than spend the time manually resolving dependencies in " +"dselect. Once dist-upgrade has completed then dselect can be used to install any packages that may have been left out." +msgstr "" +"Dist-upgrade é um actualizador completo desenhado para simplificar a " +"actualização entre lançamentos da Debian. Usa um algoritmo sofisticado para " +"determinar o melhor conjunto de pacotes a instalar, actualizar ou remover " +"para obter o máximo do sistema para o novo lançamento. Em algumas situações " +"pode ser desejável usar o dist-upgrade em vez de passar o tempo a resolver " +"dependências manualmente no dselect. Assim que o dist-upgrade " +"tiver terminado então pode ser usado o dselect para instalar " +"quaisquer pacotes que tenham ficado de fora." + +#. type:

+#: guide.sgml:152 +msgid "" +"It is important to closely look at what dist-upgrade is going to do, its " +"decisions may sometimes be quite surprising." +msgstr "" +"É importante observar de perto o que o dist-upgrade vai fazer, as suas " +"decisões podem por vezes ser bastante surpreendentes." + +#. type:

+#: guide.sgml:163 +msgid "" +"apt-get has several command line options that are detailed in " +"its man page, . The most useful " +"option is -d which does not install the fetched files. If the " +"system has to download a large number of package it would be undesired to " +"start installing them in case something goes wrong. When -d is used " +"the downloaded archives can be installed by simply running the command that " +"caused them to be downloaded again without -d." +msgstr "" +"apt-get tem várias opções de linha de comandos que estão " +"detalhados no seu manual, . A opção " +"mais útil é -d que não instala os pacotes obtidos, Se o sistema " +"tiver que descarregar um grande número de pacotes seria indesejável começar " +"a instalá-los no caso de algo correr mal. Quando se usa -d os " +"arquivos descarregados podem ser instalados simplesmente ao correr de novo " +"comando que s descarregou mas sem o -d." + +#. type: +#: guide.sgml:168 +msgid "DSelect" +msgstr "DSelect" + +#. type:

+#: guide.sgml:173 +msgid "" +"The APT dselect method provides the complete APT system with " +"the dselect package selection GUI. dselect is used " +"to select the packages to be installed or removed and APT actually installs " +"them." +msgstr "" +"O método dselect do APT disponibiliza o sistema APT completo " +"com a GUI de selecção de pacotes dselect. O dselect é usado para seleccionar os pacotes a serem instalados ou removidos e " +"o APT instala-os." + +#. type:

+#: guide.sgml:184 +msgid "" +"To enable the APT method you need to select [A]ccess in dselect " +"and then choose the APT method. You will be prompted for a set of " +"Sources which are places to fetch archives from. These can be " +"remote Internet sites, local Debian mirrors or CDROMs. Each source can " +"provide a fragment of the total Debian archive, APT will automatically " +"combine them to form a complete set of packages. If you have a CDROM then it " +"is a good idea to specify it first and then specify a mirror so that you " +"have access to the latest bug fixes. APT will automatically use packages on " +"your CDROM before downloading from the Internet." +msgstr "" +"Para activar o método APT você precisa de seleccionar [A]ccess no " +"dselect e depois escolher o método APT. Ser-lhe-à perguntado " +"por um conjunto de Sources que são os lugares de onde obter os " +"arquivos. Estes podem ser sites remotos da Internet, mirrors Debian locais " +"ou CDROMs. Cada source pode disponibilizar um fragmento do arquivo Debian " +"total. O APT irá automaticamente combiná-los para formar um conjunto " +"completo de pacotes. Se tem um CDROM, então é boa ideia especificá-lo em " +"primeiro lugar e depois especificar um mirror para ter acesso às correcções " +"de bugs mais recentes. O APT irá automaticamente usar os pacotes no seu " +"CDROM antes de descarregar da Internet." + +#. type: +#: guide.sgml:198 +#, no-wrap +msgid "" +" Set up a list of distribution source locations\n" +"\t \n" +" Please give the base URL of the debian distribution.\n" +" The access schemes I know about are: http file\n" +"\t \n" +" For example:\n" +" file:/mnt/debian,\n" +" ftp://ftp.debian.org/debian,\n" +" http://ftp.de.debian.org/debian,\n" +" \n" +" \n" +" URL [http://llug.sep.bnl.gov/debian]:" +msgstr "" +" Configurar uma lista de localizações fonte da distribuição\n" +"\t \n" +" Por favor forneça o URL base da distribuição Debian.\n" +" Os esquemas de acesso que conheço são: http file\n" +"\t \n" +" Por exemplo:\n" +" file:/mnt/debian,\n" +" ftp://ftp.debian.org/debian,\n" +" http://ftp.de.debian.org/debian,\n" +" \n" +" \n" +" URL [http://llug.sep.bnl.gov/debian]:" + +#. type:

+#: guide.sgml:205 +msgid "" +"The Sources setup starts by asking for the base of the Debian " +"archive, defaulting to a HTTP mirror. Next it asks for the distribution to " +"get." +msgstr "" +"A configuração de Sources começa por perguntar pela base do arquivo " +"Debian, usando por predefinição um mirror HTTP. Depois pergunta qual a " +"distribuição a obter." + +#. type: +#: guide.sgml:212 +#, no-wrap +msgid "" +" Please give the distribution tag to get or a path to the\n" +" package file ending in a /. The distribution\n" +" tags are typically something like: stable unstable testing non-US\n" +" \n" +" Distribution [stable]:" +msgstr "" +" Por favor forneça a etiqueta da distribuição a obter ou um caminho para o\n" +" ficheiro package terminando com um /. As etiquetas da\n" +" distribuição são tipicamente algo como: stable unstable testing non-US\n" +" \n" +" Distribution [stable]:" + +#. type:

+#: guide.sgml:222 +msgid "" +"The distribution refers to the Debian version in the archive, stable refers to the latest released version and unstable refers to " +"the developmental version. non-US is only available on some mirrors " +"and refers to packages that contain encryption technology or other things " +"that cannot be exported from the United States. Importing these packages " +"into the US is legal however." +msgstr "" +"A distribuição refere-se à versão Debian no arquivo, stable refere-" +"se à última versão lançada e unstable refere-se à versão de " +"desenvolvimento. non-US apenas está disponível em alguns mirrors e " +"refere-se a pacotes que contém tecnologia de encriptação ou outras coisas " +"que não podem ser exportadas dos Estados Unidos. No entanto importar estes " +"pacotes para os US é legal." + +#. type: +#: guide.sgml:228 +#, no-wrap +msgid "" +" Please give the components to get\n" +" The components are typically something like: main contrib non-free\n" +" \n" +" Components [main contrib non-free]:" +msgstr "" +" Por favor forneça os componentes a obter\n" +" Tipicamente os componentes são algo como: main contrib non-free\n" +" \n" +" Componentes [main contrib non-free]:" + +#. type:

+#: guide.sgml:236 +msgid "" +"The components list refers to the list of sub distributions to fetch. The " +"distribution is split up based on software licenses, main being DFSG free " +"packages while contrib and non-free contain things that have various " +"restrictions placed on their use and distribution." +msgstr "" +"A lista de componentes refere-se à lista das sub-distribuições a obter. A " +"distribuição é dividida baseando-se nas licenças do software, sendo main " +"pacotes livres DFSG enquanto contrib e non-free contêm coisas que têm várias " +"restrições colocadas no seu uso e distribuição." + +#. type:

+#: guide.sgml:240 +msgid "" +"Any number of sources can be added, the setup script will continue to prompt " +"until you have specified all that you want." +msgstr "" +"Pode ser adicionado qualquer número de fontes, o script de configuração irá " +"continuar a perguntar-lhe até que tenha especificado todas as que deseja." + +#. type:

+#: guide.sgml:247 +msgid "" +"Before starting to use dselect it is necessary to update the " +"available list by selecting [U]pdate from the menu. This is a superset of " +"apt-get update that makes the fetched information available to " +"dselect. [U]pdate must be performed even if apt-get update has been run before." +msgstr "" +"Antes de começar a usar o dselect é necessário actualizar a " +"lista disponível ao seleccionar [U]pdate no menu. Isto é um super-conjunto " +"do apt-get update que torna a informação obtida disponível ao " +"dselect. Deve ser executado o [U]pdate mesmo que tenha sido " +"feito apt-get update antes." + +#. type:

+#: guide.sgml:253 +msgid "" +"You can then go on and make your selections using [S]elect and then perform " +"the installation using [I]nstall. When using the APT method the [C]onfig and " +"[R]emove commands have no meaning, the [I]nstall command performs both of " +"them together." +msgstr "" +"Você pode depois fazer as suas selecções usando [S]elect e depois executar a " +"instalação usando [I]nstall. Quando se usa o método APT os comandos [C]onfig " +"e [R]emove não fazem sentido, o comando [I]nstall executa ambos juntamente." + +#. type:

+#: guide.sgml:258 +msgid "" +"By default APT will automatically remove the package (.deb) files once they " +"have been successfully installed. To change this behavior place Dselect::" +"clean \"prompt\"; in /etc/apt/apt.conf." +msgstr "" +"Por predefinição o APT irá automaticamente remover o ficheiro de pacote (." +"deb) assim que ele tenha sido instalado com sucesso. Para alterar este " +"comportamento coloque Dselect::clean \"prompt\"; em /etc/apt/apt." +"conf." + +#. type: +#: guide.sgml:264 +msgid "The Interface" +msgstr "A Interface" + +#. type:

+#: guide.sgml:278 +msgid "" +"Both that APT dselect method and apt-get share the " +"same interface. It is a simple system that generally tells you what it will " +"do and then goes and does it.

The dselect method " +"actually is a set of wrapper scripts to apt-get. The method " +"actually provides more functionality than is present in apt-get " +"alone.

After printing out a summary of what will happen APT " +"then will print out some informative status messages so that you can " +"estimate how far along it is and how much is left to do." +msgstr "" +"Ambos método dselect do APT e apt-get partilham a " +"mesma interface. É um sistema simples que geralmente lhe diz o que vai fazer " +"e depois fá-lo.

O método dselect na verdade é um " +"conjunto de scripts wrapper para o apt-get. O método " +"disponibiliza mais funcionalidades que aquelas presentes no apt-get sozinho.

Após escrever um sumário do que vai acontecer, " +"o APT depois irá escrever algumas mensagens de estado informativo para que " +"você possa estimar o progresso e quanto falta fazer." + +#. type: +#: guide.sgml:280 +msgid "Startup" +msgstr "Arranque" + +#. type:

+#: guide.sgml:284 +msgid "" +"Before all operations except update, APT performs a number of actions to " +"prepare its internal state. It also does some checks of the system's state. " +"At any time these operations can be performed by running apt-get check." +msgstr "" +"Antes de todas as operações, excepto a update, o APT executa um número de " +"acções para preparar o seu estado interno. Também faz algumas verificações " +"do estado do sistema. A qualquer altura estas operações pode ser executadas " +"correndo apt-get check." + +#. type: +#: guide.sgml:289 +#, no-wrap +msgid "" +"# apt-get check\n" +"Reading Package Lists... Done\n" +"Building Dependency Tree... Done" +msgstr "" +"# apt-get check\n" +"Reading Package Lists... Done\n" +"Building Dependency Tree... Done" + +#. type:

+#: guide.sgml:297 +msgid "" +"The first thing it does is read all the package files into memory. APT uses " +"a caching scheme so this operation will be faster the second time it is run. " +"If some of the package files are not found then they will be ignored and a " +"warning will be printed when apt-get exits." +msgstr "" +"A primeira coisa que faz é ler todos os ficheiros de pacotes para a memória. " +"O APT usa um esquema de cache para que esta operação seja mais rápida na " +"segunda vez que é executada. Se alguns dos ficheiros de pacotes não forem " +"encontrados serão ignorados e será mostrado um aviso quando o apt-get " +"terminar." + +#. type:

+#: guide.sgml:303 +msgid "" +"The final operation performs a detailed analysis of the system's " +"dependencies. It checks every dependency of every installed or unpacked " +"package and considers if it is OK. Should this find a problem then a report " +"will be printed out and apt-get will refuse to run." +msgstr "" +"A operação final executa uma análise detalhada das dependências do sistema. " +"Verifica cada dependência de cada pacote instalado ou desempacotado e " +"considera se está OK. Caso isto encontre um problema, então é escrito um " +"relatório e o apt-get recusa-se a funcionar." + +#. type: +#: guide.sgml:320 +#, no-wrap +msgid "" +"# apt-get check\n" +"Reading Package Lists... Done\n" +"Building Dependency Tree... Done\n" +"You might want to run apt-get -f install' to correct these.\n" +"Sorry, but the following packages have unmet dependencies:\n" +" 9fonts: Depends: xlib6g but it is not installed\n" +" uucp: Depends: mailx but it is not installed\n" +" blast: Depends: xlib6g (>= 3.3-5) but it is not installed\n" +" adduser: Depends: perl-base but it is not installed\n" +" aumix: Depends: libgpmg1 but it is not installed\n" +" debiandoc-sgml: Depends: sgml-base but it is not installed\n" +" bash-builtins: Depends: bash (>= 2.01) but 2.0-3 is installed\n" +" cthugha: Depends: svgalibg1 but it is not installed\n" +" Depends: xlib6g (>= 3.3-5) but it is not installed\n" +" libreadlineg2: Conflicts:libreadline2 (<< 2.1-2.1)" +msgstr "" +"# apt-get check\n" +"Reading Package Lists... Done\n" +"Building Dependency Tree... Done\n" +"You might want to run apt-get -f install' to correct these.\n" +"Sorry, but the following packages have unmet dependencies:\n" +" 9fonts: Depends: xlib6g but it is not installed\n" +" uucp: Depends: mailx but it is not installed\n" +" blast: Depends: xlib6g (>= 3.3-5) but it is not installed\n" +" adduser: Depends: perl-base but it is not installed\n" +" aumix: Depends: libgpmg1 but it is not installed\n" +" debiandoc-sgml: Depends: sgml-base but it is not installed\n" +" bash-builtins: Depends: bash (>= 2.01) but 2.0-3 is installed\n" +" cthugha: Depends: svgalibg1 but it is not installed\n" +" Depends: xlib6g (>= 3.3-5) but it is not installed\n" +" libreadlineg2: Conflicts:libreadline2 (<< 2.1-2.1)" + +#. type:

+#: guide.sgml:329 +msgid "" +"In this example the system has many problems, including a serious problem " +"with libreadlineg2. For each package that has unmet dependencies a line is " +"printed out indicating the package with the problem and the dependencies " +"that are unmet. A short explanation of why the package has a dependency " +"problem is also included." +msgstr "" +"Neste exemplo o sistema tem muitos problemas, incluindo um sério problema " +"com libreadlineg2. Para cada pacote que tem dependências não satisfeitas, é " +"escrita uma linha indicando o pacote com o problema e as dependências que " +"não estão satisfeitas. É também incluída uma explicação curta de porquê o " +"pacote tem um problema de dependência." + +#. type:

+#: guide.sgml:337 +msgid "" +"There are two ways a system can get into a broken state like this. The first " +"is caused by dpkg missing some subtle relationships between " +"packages when performing upgrades.

APT however considers all " +"known dependencies and attempts to prevent broken packages

. " +"The second is if a package installation fails during an operation. In this " +"situation a package may have been unpacked without its dependents being " +"installed." +msgstr "" +"Existem duas maneiras de um sistema entrar num estado de quebra como este. A " +"primeira é causada pelo dpkg que não vê algumas relações subtis " +"entre pacotes quando executa actualizações.

No entanto o APT " +"considera todas as dependências conhecidas e tenta prevenir pacotes " +"quebrados

. A segunda é se uma instalação de pacote falha " +"durante uma operação. Nesta situação um pacote pode ter sido desempacotado " +"sem que as suas dependências tenham sido instaladas." + +#. type:

+#: guide.sgml:345 +msgid "" +"The second situation is much less serious than the first because APT places " +"certain constraints on the order that packages are installed. In both cases " +"supplying the -f option to apt-get will cause APT to " +"deduce a possible solution to the problem and then continue on. The APT " +"dselect method always supplies the -f option to allow " +"for easy continuation of failed maintainer scripts." +msgstr "" +"A segunda situação é muito menos séria que a primeira porque o APT coloca " +"certos constrangimentos na ordem que os pacotes são instalados. Em ambos os " +"casos, fornecer a opção -f ao apt-get irá fazer com " +"que o APT deduza uma solução possível para o problema e depois continue. O " +"método dselect do APT fornece sempre a opção -f para " +"permitir uma continuação fácil de scripts do responsável com falhas." + +#. type:

+#: guide.sgml:351 +msgid "" +"However, if the -f option is used to correct a seriously broken " +"system caused by the first case then it is possible that it will either fail " +"immediately or the installation sequence will fail. In either case it is " +"necessary to manually use dpkg (possibly with forcing options) to correct " +"the situation enough to allow APT to proceed." +msgstr "" +"No entanto, se for usada a opção -f para corrigir um sistema " +"seriamente quebrado causado pelo primeiro caso, então é possível que ou " +"falhe imediatamente ou falhe na sequência de instalação. Em qualquer dos " +"casos é necessário usar o dpkg manualmente (possivelmente com opções de " +"forçar) para corrigir a situação o suficiente para permitir ao APT continuar." + +#. type: +#: guide.sgml:356 +msgid "The Status Report" +msgstr "O Relatório de Estado" + +#. type:

+#: guide.sgml:363 +msgid "" +"Before proceeding apt-get will present a report on what will " +"happen. Generally the report reflects the type of operation being performed " +"but there are several common elements. In all cases the lists reflect the " +"final state of things, taking into account the -f option and any " +"other relevant activities to the command being executed." +msgstr "" +"Antes de prosseguir, o apt-get irá apresentar um relatório do " +"que irá acontecer. Geralmente o relatório reflecte o tipo de operações a ser " +"executadas mas há vários elementos comuns. Em todos os casos a lista " +"reflecte o estado final das coisas, tendo em conta a opção -f e " +"quaisquer outras actividades relevantes ao comando que vai ser executado." + +#. type: +#: guide.sgml:364 +msgid "The Extra Package list" +msgstr "A lista de Pacotes Extra" + +#. type: +#: guide.sgml:372 +#, no-wrap +msgid "" +"The following extra packages will be installed:\n" +" libdbd-mysql-perl xlib6 zlib1 xzx libreadline2 libdbd-msql-perl\n" +" mailpgp xdpkg fileutils pinepgp zlib1g xlib6g perl-base\n" +" bin86 libgdbm1 libgdbmg1 quake-lib gmp2 bcc xbuffy\n" +" squake pgp-i python-base debmake ldso perl libreadlineg2\n" +" ssh" +msgstr "" +"Os seguinte pacotes extra serão instalados:\n" +" libdbd-mysql-perl xlib6 zlib1 xzx libreadline2 libdbd-msql-perl\n" +" mailpgp xdpkg fileutils pinepgp zlib1g xlib6g perl-base\n" +" bin86 libgdbm1 libgdbmg1 quake-lib gmp2 bcc xbuffy\n" +" squake pgp-i python-base debmake ldso perl libreadlineg2\n" +" ssh" + +#. type:

+#: guide.sgml:379 +msgid "" +"The Extra Package list shows all of the packages that will be installed or " +"upgraded in excess of the ones mentioned on the command line. It is only " +"generated for an install command. The listed packages are often the " +"result of an Auto Install." +msgstr "" +"A lista de Pacotes Extra mostra todos os pacotes que irão ser instalados ou " +"actualizados em excesso daqueles mencionados na linha de comandos. É apenas " +"gerada para um comando install. Os pacotes listados são geralmente " +"o resultado de uma Auto instalação." + +#. type: +#: guide.sgml:382 +msgid "The Packages to Remove" +msgstr "Os Pacotes para Remover" + +#. type: +#: guide.sgml:389 +#, no-wrap +msgid "" +"The following packages will be REMOVED:\n" +" xlib6-dev xpat2 tk40-dev xkeycaps xbattle xonix\n" +" xdaliclock tk40 tk41 xforms0.86 ghostview xloadimage xcolorsel\n" +" xadmin xboard perl-debug tkined xtetris libreadline2-dev perl-suid\n" +" nas xpilot xfig" +msgstr "" +"Os seguintes pacotes irão ser REMOVIDOS:\n" +" xlib6-dev xpat2 tk40-dev xkeycaps xbattle xonix\n" +" xdaliclock tk40 tk41 xforms0.86 ghostview xloadimage xcolorsel\n" +" xadmin xboard perl-debug tkined xtetris libreadline2-dev perl-suid\n" +" nas xpilot xfig" + +#. type:

+#: guide.sgml:399 +msgid "" +"The Packages to Remove list shows all of the packages that will be removed " +"from the system. It can be shown for any of the operations and should be " +"given a careful inspection to ensure nothing important is to be taken off. " +"The -f option is especially good at generating packages to remove " +"so extreme care should be used in that case. The list may contain packages " +"that are going to be removed because they are only partially installed, " +"possibly due to an aborted installation." +msgstr "" +"A lista Pacotes para Remover mostra todos os pacotes que irão ser removidos " +"do sistema. Pode ser mostrada para qualquer das operações e deve ser-lhe " +"dada uma inspecção cuidadosa para assegurar que nada de importante vai ser " +"removido. A opção -f é especialmente boa a gerar pacotes para " +"remover, portanto neste caso deve-se usar cuidados extremos. A lista pode " +"conter pacotes que vão ser removidos porque estão apenas parcialmente " +"instalados, possivelmente devido a uma instalação abortada." + +#. type: +#: guide.sgml:402 +msgid "The New Packages list" +msgstr "A lista de Novos Pacotes" + +#. type: +#: guide.sgml:406 +#, no-wrap +msgid "" +"The following NEW packages will installed:\n" +" zlib1g xlib6g perl-base libgdbmg1 quake-lib gmp2 pgp-i python-base" +msgstr "" +"Os seguintes pacotes NOVOS irão ser instalados:\n" +" zlib1g xlib6g perl-base libgdbmg1 quake-lib gmp2 pgp-i python-base" + +#. type:

+#: guide.sgml:411 +msgid "" +"The New Packages list is simply a reminder of what will happen. The packages " +"listed are not presently installed in the system but will be when APT is " +"done." +msgstr "" +"A lista de Novos Pacotes é simplesmente um lembrete do que vai acontecer. Os " +"pacotes listados não estão instalados presentemente no sistema mas irão " +"estar quando o APT terminar." + +#. type: +#: guide.sgml:414 +msgid "The Kept Back list" +msgstr "A lista Kept Back" + +#. type: +#: guide.sgml:419 +#, no-wrap +msgid "" +"The following packages have been kept back\n" +" compface man-db tetex-base msql libpaper svgalib1\n" +" gs snmp arena lynx xpat2 groff xscreensaver" +msgstr "" +"Os seguintes pacotes formam mantidos na versão antiga\n" +" compface man-db tetex-base msql libpaper svgalib1\n" +" gs snmp arena lynx xpat2 groff xscreensaver" + +#. type:

+#: guide.sgml:428 +msgid "" +"Whenever the whole system is being upgraded there is the possibility that " +"new versions of packages cannot be installed because they require new things " +"or conflict with already installed things. In this case the package will " +"appear in the Kept Back list. The best way to convince packages listed there " +"to install is with apt-get install or by using dselect " +"to resolve their problems." +msgstr "" +"Sempre que todo o sistema é actualizado existe a possibilidade que novas " +"versões de pacotes não possam ser instaladas porque requerem coisas novas ou " +"entram em conflito com coisas já instaladas. Nestes casos o pacote irá " +"aparecer na lista Kept Back. A melhor maneira de convencer os pacotes " +"listados aqui a instalarem é com o apt-get install ou usando o " +"dselect para resolver os seus problemas." + +#. type: +#: guide.sgml:431 +msgid "Held Packages warning" +msgstr "Aviso de Pacotes Mantidos" + +#. type: +#: guide.sgml:435 +#, no-wrap +msgid "" +"The following held packages will be changed:\n" +" cvs" +msgstr "" +"Os seguintes pacotes mantidos irão ser alterados:\n" +" cvs" + +#. type:

+#: guide.sgml:441 +msgid "" +"Sometimes you can ask APT to install a package that is on hold, in such a " +"case it prints out a warning that the held package is going to be changed. " +"This should only happen during dist-upgrade or install." +msgstr "" +"Por vezes você pode pedir ao APT para instalar um pacote que está retido, " +"nestes casos ele mostra um aviso que o pacote retido vai ser alterado. Isto " +"apenas deve acontecer durante um dist-upgrade ou install." + +#. type: +#: guide.sgml:444 +msgid "Final summary" +msgstr "Sumário final" + +#. type:

+#: guide.sgml:447 +msgid "" +"Finally, APT will print out a summary of all the changes that will occur." +msgstr "" +"Finalmente, o APT irá escrever um sumário de todas as alterações que irão " +"acontecer." + +#. type: +#: guide.sgml:452 +#, no-wrap +msgid "" +"206 packages upgraded, 8 newly installed, 23 to remove and 51 not upgraded.\n" +"12 packages not fully installed or removed.\n" +"Need to get 65.7M/66.7M of archives. After unpacking 26.5M will be used." +msgstr "" +"206 pacotes actualizados, 8 instalados de novo, 23 para remover e 51 não actualizados.\n" +"12 pacotes não totalmente instalados ou removidos.\n" +"É necessário obter 65.7M/66.7M de arquivos. Após desempacotamento será usado 26.5M." + +#. type:

+#: guide.sgml:470 +msgid "" +"The first line of the summary simply is a reduced version of all of the " +"lists and includes the number of upgrades - that is packages already " +"installed that have new versions available. The second line indicates the " +"number of poorly configured packages, possibly the result of an aborted " +"installation. The final line shows the space requirements that the " +"installation needs. The first pair of numbers refer to the size of the " +"archive files. The first number indicates the number of bytes that must be " +"fetched from remote locations and the second indicates the total size of all " +"the archives required. The next number indicates the size difference between " +"the presently installed packages and the newly installed packages. It is " +"roughly equivalent to the space required in /usr after everything is done. " +"If a large number of packages are being removed then the value may indicate " +"the amount of space that will be freed." +msgstr "" +"A primeira linha do sumário é simplesmente uma versão reduzida de todas as " +"listas e inclui o número de actualizações - que é os pacotes já instalados " +"que têm novas versões disponíveis. A segunda linha indica o número de " +"pacotes mal configurados, possivelmente o resultado de uma instalação " +"abortada. A linha final mostra os requisitos de espaço que a instalação " +"precisa. O primeiro par de número refere-se ao tamanho dos ficheiros de " +"arquivos. O primeiro número indica o número de bytes que precisam ser " +"obtidos a partir das localizações remotas e o segundo indica o tamanho total " +"do todos os arquivos necessários. O número seguinte indica a diferença de " +"tamanho entre os pacotes presentemente instalados e os pacotes instalados de " +"fresco. É aproximadamente equivalente ao espaço requerido em /usr após tudo " +"estar feito. Se forem removidos um grande número de pacotes então o valor " +"pode indicar a quantidade de espaço que irá ser libertado." + +#. type:

+#: guide.sgml:473 +msgid "" +"Some other reports can be generated by using the -u option to show packages " +"to upgrade, they are similar to the previous examples." +msgstr "" +"Outros relatórios podem ser gerados ao usar a opção -u para mostrar os " +"pacotes a actualizar, e são semelhantes aos exemplos prévios." + +#. type: +#: guide.sgml:477 +msgid "The Status Display" +msgstr "O Mostrador de Estado" + +#. type:

+#: guide.sgml:481 +msgid "" +"During the download of archives and package files APT prints out a series of " +"status messages." +msgstr "" +"Durante a descarga dos arquivos e ficheiros de pacotes, o APT escreve uma " +"série de mensagens de estado." + +#. type: +#: guide.sgml:490 +#, no-wrap +msgid "" +"# apt-get update\n" +"Get:1 http://ftp.de.debian.org/debian-non-US/ stable/non-US/ Packages\n" +"Get:2 http://llug.sep.bnl.gov/debian/ testing/contrib Packages\n" +"Hit http://llug.sep.bnl.gov/debian/ testing/main Packages\n" +"Get:4 http://ftp.de.debian.org/debian-non-US/ unstable/binary-i386/ Packages\n" +"Get:5 http://llug.sep.bnl.gov/debian/ testing/non-free Packages\n" +"11% [5 testing/non-free `Waiting for file' 0/32.1k 0%] 2203b/s 1m52s" +msgstr "" +"# apt-get update\n" +"Get:1 http://ftp.de.debian.org/debian-non-US/ stable/non-US/ Packages\n" +"Get:2 http://llug.sep.bnl.gov/debian/ testing/contrib Packages\n" +"Hit http://llug.sep.bnl.gov/debian/ testing/main Packages\n" +"Get:4 http://ftp.de.debian.org/debian-non-US/ unstable/binary-i386/ Packages\n" +"Get:5 http://llug.sep.bnl.gov/debian/ testing/non-free Packages\n" +"11% [5 testing/non-free `Waiting for file' 0/32.1k 0%] 2203b/s 1m52s" + +#. type:

+#: guide.sgml:500 +msgid "" +"The lines starting with Get are printed out when APT begins to " +"fetch a file while the last line indicates the progress of the download. The " +"first percent value on the progress line indicates the total percent done of " +"all files. Unfortunately since the size of the Package files is unknown " +"apt-get update estimates the percent done which causes some " +"inaccuracies." +msgstr "" +"A linhas iniciadas com Get são escritas quando o APT começa a obter " +"um ficheiro enquanto a última linha indica o progresso da descarga. O " +"primeiro valor percentual na linha de progresso indica a percentagem total " +"completa de todos os ficheiros. Infelizmente como o tamanho dos ficheiros de " +"Pacotes é desconhecido o apt-get update estima a percentagem de " +"pronto o que causa algumas imprecisões." + +#. type:

+#: guide.sgml:509 +msgid "" +"The next section of the status line is repeated once for each download " +"thread and indicates the operation being performed and some useful " +"information about what is happening. Sometimes this section will simply read " +"Forking which means the OS is loading the download module. The " +"first word after the [ is the fetch number as shown on the history lines. " +"The next word is the short form name of the object being downloaded. For " +"archives it will contain the name of the package that is being fetched." +msgstr "" +"A secção seguinte da linha de estado é repetida para cada processo de " +"descarga e indica a operação a ser executada e alguma informação útil acerca " +"do que está a acontecer. Por vezes esta secção irá simplesmente ler " +"Forking o que representa que o SO está a carregar o módulo de " +"download. A primeira palavra após o [ é o número de obtenção como mostrado " +"nas linhas de histórico. A palavra seguinte é o nome em formato curto do " +"objecto a ser descarregado. Para os arquivos irá conter o nome do pacote que " +"está a ser descarregado." + +#. type:

+#: guide.sgml:524 +msgid "" +"Inside of the single quote is an informative string indicating the progress " +"of the negotiation phase of the download. Typically it progresses from " +"Connecting to Waiting for file to Downloading or " +"Resuming. The final value is the number of bytes downloaded from " +"the remote site. Once the download begins this is represented as " +"102/10.2k indicating that 102 bytes have been fetched and 10.2 " +"kilobytes is expected. The total size is always shown in 4 figure notation " +"to preserve space. After the size display is a percent meter for the file " +"itself. The second last element is the instantaneous average speed. This " +"values is updated every 5 seconds and reflects the rate of data transfer for " +"that period. Finally is shown the estimated transfer time. This is updated " +"regularly and reflects the time to complete everything at the shown transfer " +"rate." +msgstr "" +"Dentro da única citação está uma string de informação que indica o progresso " +"da fase de negociação do download. Progride tipicamente de A Ligar " +"para À espera do ficheiro para A descarregar ou A " +"resumir. O valor final é o número de bytes descarregados a partir do " +"site remoto. Uma vez começado a descarga isto é representado como " +"102/10.2k indicando que 102 bytes foram obtidos e são esperados " +"10.2kilobytes. O tamanho total é sempre representado numa anotação de 4 " +"figuras para preservar espaço. Após a amostragem do tamanho está um medidor " +"de percentagem para o próprio ficheiro. O segundo último elemento é a " +"velocidade média instantânea. Estes valores são actualizados a cada 5 " +"segundos e reflectem a taxa de dados transferidos para esse período. " +"Finalmente é mostrado o tempo estimado de transferência. Isto é actualizado " +"regularmente e reflecte o tempo para completar tudo ao ritmo de " +"transferência mostrado." + +#. type:

+#: guide.sgml:530 +msgid "" +"The status display updates every half second to provide a constant feedback " +"on the download progress while the Get lines scroll back whenever a new file " +"is started. Since the status display is constantly updated it is unsuitable " +"for logging to a file, use the -q option to remove the status " +"display." +msgstr "" +"O mostrador de estado actualiza-se a cada meio segundo para disponibilizar " +"uma informação de retorno constante do progresso de descarga enquanto as " +"linhas Get deslocam-se para trás sempre que uma nova linha é iniciada. Como " +"o mostrador de estado é constantemente actualizado não é apropriado para " +"registar num ficheiro, use a opção -q para remover o mostrador de " +"estado." + +#. type: +#: guide.sgml:535 +msgid "Dpkg" +msgstr "Dpkg" + +#. type:

+#: guide.sgml:542 +msgid "" +"APT uses dpkg for installing the archives and will switch over " +"to the dpkg interface once downloading is completed. " +"dpkg will also ask a number of questions as it processes the " +"packages and the packages themselves may also ask several questions. Before " +"each question there is usually a description of what it is asking and the " +"questions are too varied to discuss completely here." +msgstr "" +"O APT usa o dpkg para instalar os arquivos e irá mudar para a " +"interface do dpkg assim que a descarga estiver completa. O " +"dpkg irá também fazer um número de perguntas conforme vai " +"processando os pacotes e os próprios pacotes podem também fazer várias " +"questões. Antes de cada pergunta há geralmente uma descrição do que se está " +"a perguntar e as perguntas são demasiado variadas para serem discutidas aqui." + +#. type: +#: offline.sgml:4 +msgid "Using APT Offline" +msgstr "Usando o APT Offline" + +#. type: +#: offline.sgml:7 +msgid "$Id: offline.sgml,v 1.8 2003/02/12 15:06:41 doogie Exp $" +msgstr "$Id: offline.sgml,v 1.8 2003/02/12 15:06:41 doogie Exp $" + +#. type: +#: offline.sgml:12 +msgid "" +"This document describes how to use APT in a non-networked environment, " +"specifically a 'sneaker-net' approach for performing upgrades." +msgstr "" +"Este documento descreve como usar o APT num ambiente sem rede, " +"especificamente uma aproximação 'sneaker-net' para executar actualizações." + +#. type: +#: offline.sgml:16 +msgid "Copyright © Jason Gunthorpe, 1999." +msgstr "Copyright © Jason Gunthorpe, 1999." + +#. type: +#: offline.sgml:32 +msgid "Introduction" +msgstr "Introdução" + +#. type: +#: offline.sgml:34 offline.sgml:65 offline.sgml:180 +msgid "Overview" +msgstr "Visão geral" + +#. type:

+#: offline.sgml:40 +msgid "" +"Normally APT requires direct access to a Debian archive, either from a local " +"media or through a network. Another common complaint is that a Debian " +"machine is on a slow link, such as a modem and another machine has a very " +"fast connection but they are physically distant." +msgstr "" +"Normalmente o APT requer acesso directo a um arquivo Debian, seja duma media " +"local ou através de rede. Outra queixa comum e que uma máquina Debian está " +"numa ligação lenta, como um modem e outra máquina tem uma ligação muito " +"rápida mas estão fisicamente distantes." + +#. type:

+#: offline.sgml:51 +msgid "" +"The solution to this is to use large removable media such as a Zip disc or a " +"SuperDisk disc. These discs are not large enough to store the entire Debian " +"archive but can easily fit a subset large enough for most users. The idea is " +"to use APT to generate a list of packages that are required and then fetch " +"them onto the disc using another machine with good connectivity. It is even " +"possible to use another Debian machine with APT or to use a completely " +"different OS and a download tool like wget. Let remote host mean " +"the machine downloading the packages, and target host the one with " +"bad or no connection." +msgstr "" +"A solução para isto é usar grandes médias amovíveis como um disco Zip ou um " +"disco SuperDisk. Estes discos não são suficientemente grandes para armazenar " +"o arquivo Debian inteiro mas podem facilmente conter um subconjunto " +"suficientemente grande para a maioria dos utilizadores. A ideia é usar o APT " +"para gerar uma lista de pacotes que são necessários e depois obter-los para " +"o disco usando outra máquina com boa ligação. É até possível usar outra " +"máquina Debian com APT ou usar um SO completamente diferente e uma " +"ferramenta de download como o wget. Deixe remote host representar a " +"máquina que descarrega os pacotes, e target host aquela com má ou " +"nenhuma ligação." + +#. type:

+#: offline.sgml:57 +msgid "" +"This is achieved by creatively manipulating the APT configuration file. The " +"essential premise to tell APT to look on a disc for it's archive files. Note " +"that the disc should be formated with a filesystem that can handle long file " +"names such as ext2, fat32 or vfat." +msgstr "" +"Isto é conseguido ao manipular criativamente o ficheiro de configuração do " +"APT. A premissa essencial para dizer ao APT para procurar num disco pelos " +"seus ficheiros de arquivo. Note que o disco deve estar formatado com um " +"sistema de ficheiros que saiba lidar com nomes de ficheiros longos como o " +"ext2, fat32 ou vfat." + +#. type: +#: offline.sgml:63 +msgid "Using APT on both machines" +msgstr "Usando o APT em ambas máquinas" + +#. type:

+#: offline.sgml:71 +msgid "" +"APT being available on both machines gives the simplest configuration. The " +"basic idea is to place a copy of the status file on the disc and use the " +"remote machine to fetch the latest package files and decide which packages " +"to download. The disk directory structure should look like:" +msgstr "" +"Estando o APT disponível em ambas máquinas dá a configuração mais simples. A " +"ideia básica é colocar uma cópia do ficheiro de estado no disco e usar a " +"máquina remota para obter os ficheiros de pacotes mais recentes e decidir " +"quais pacotes descarregar. A estrutura de directórios do disco deverá " +"parecer-se com:" + +#. type: +#: offline.sgml:80 +#, no-wrap +msgid "" +" /disc/\n" +" archives/\n" +" partial/\n" +" lists/\n" +" partial/\n" +" status\n" +" sources.list\n" +" apt.conf" +msgstr "" +" /disc/\n" +" archives/\n" +" partial/\n" +" lists/\n" +" partial/\n" +" status\n" +" sources.list\n" +" apt.conf" + +#. type: +#: offline.sgml:88 +msgid "The configuration file" +msgstr "O ficheiro de configuração" + +#. type:

+#: offline.sgml:96 +msgid "" +"The configuration file should tell APT to store its files on the disc and to " +"use the configuration files on the disc as well. The sources.list should " +"contain the proper sites that you wish to use from the remote machine, and " +"the status file should be a copy of /var/lib/dpkg/status from the " +"target host. Please note, if you are using a local archive you must " +"use copy URIs, the syntax is identical to file URIs." +msgstr "" +"O ficheiro de configuração deve dizer ao APT para armazenar os seus ficheiro " +"no disco e usar os ficheiros de configuração do disco também. O sources.list " +"deve conter os sites apropriados que deseja usar a partir da máquina remota, " +"e o ficheiro de estado deve ser uma cópia de /var/lib/dpkg/status a " +"partir do target host. Por favor note, se está a usar um arquivo " +"local você deve usar copy URIs, a sintaxe é idêntica a file URIs." + +#. type:

+#: offline.sgml:100 +msgid "" +"apt.conf must contain the necessary information to make APT use the " +"disc:" +msgstr "" +"apt.conf tem de conter a informação necessária para fazer o APT " +"usar o disco:" + +#. type: +#: offline.sgml:124 +#, no-wrap +msgid "" +" APT\n" +" {\n" +" /* This is not necessary if the two machines are the same arch, it tells\n" +" the remote APT what architecture the target machine is */\n" +" Architecture \"i386\";\n" +" \n" +" Get::Download-Only \"true\";\n" +" };\n" +" \n" +" Dir\n" +" {\n" +" /* Use the disc for state information and redirect the status file from\n" +" the /var/lib/dpkg default */\n" +" State \"/disc/\";\n" +" State::status \"status\";\n" +"\n" +" // Binary caches will be stored locally\n" +" Cache::archives \"/disc/archives/\";\n" +" Cache \"/tmp/\";\n" +" \n" +" // Location of the source list.\n" +" Etc \"/disc/\";\n" +" };" +msgstr "" +" APT\n" +" {\n" +" /* Isto não é necessário se as duas máquinas forem da mesma arquitectura, diz\n" +" ao APT remoto que arquitectura tem a máquina de destino */\n" +" Architecture \"i386\";\n" +" \n" +" Get::Download-Only \"true\";\n" +" };\n" +" \n" +" Dir\n" +" {\n" +" /* Usa o disco para informação de estado e redirecciona o ficheiro de estado a partir de\n" +" the /var/lib/dpkg default */\n" +" State \"/disc/\";\n" +" State::status \"status\";\n" +"\n" +" // Caches binárias serão armazenadas localmente\n" +" Cache::archives \"/disc/archives/\";\n" +" Cache \"/tmp/\";\n" +" \n" +" // Localização da lista de fontes.\n" +" Etc \"/disc/\";\n" +" };" + +#. type:

+#: offline.sgml:129 +msgid "" +"More details can be seen by examining the apt.conf man page and the sample " +"configuration file in /usr/share/doc/apt/examples/apt.conf." +msgstr "" +"Mais detalhes podem ser vistos ao examinar o manual do apt.conf e o exemplo " +"de ficheiro de configuração em /usr/share/doc/apt/examples/apt.conf." + +#. type:

+#: offline.sgml:136 +msgid "" +"On the target machine the first thing to do is mount the disc and copy /" +"var/lib/dpkg/status to it. You will also need to create the directories " +"outlined in the Overview, archives/partial/ and lists/partial/. Then take the disc to the remote machine and configure the sources." +"list. On the remote machine execute the following:" +msgstr "" +"Na máquina de destino a primeira coisa a fazer é montar o disco e copiar " +"/var/lib/dpkg/status para ele. Você também precisa de criar os " +"directórios delineados na Visão Geral, archives/partial/ e " +"lists/partial/. Depois leve o disco até à máquina remota e " +"configure o sources.list. Na máquina remota execute o seguinte:" + +#. type: +#: offline.sgml:142 +#, no-wrap +msgid "" +" # export APT_CONFIG=\"/disc/apt.conf\"\n" +" # apt-get update\n" +" [ APT fetches the package files ]\n" +" # apt-get dist-upgrade\n" +" [ APT fetches all the packages needed to upgrade the target machine ]" +msgstr "" +" # export APT_CONFIG=\"/disc/apt.conf\"\n" +" # apt-get update\n" +" [ APT obtém os ficheiros de pacotes ]\n" +" # apt-get dist-upgrade\n" +" [ APT obtém todos os pacotes necessários para actualizar a máquina de destino ]" + +#. type:

+#: offline.sgml:149 +msgid "" +"The dist-upgrade command can be replaced with any other standard APT " +"commands, particularly dselect-upgrade. You can even use an APT front end " +"such as dselect. However this presents a problem in communicating " +"your selections back to the local computer." +msgstr "" +"O comando dist-upgrade pode ser substituído por qualquer outro comando APT " +"standard, particularmente dselect-upgrade. Você até pode usar um front-end " +"do APT como o dselect. No entanto isto apresenta um problema ao " +"comunicar as suas selecções de volta ao computador local." + +#. type:

+#: offline.sgml:153 +msgid "" +"Now the disc contains all of the index files and archives needed to upgrade " +"the target machine. Take the disc back and run:" +msgstr "" +"Agora o disco contém todos os ficheiros de índice e os arquivos necessários " +"para actualizar a máquina de destino. Devolva o disco e corra:" + +#. type: +#: offline.sgml:159 +#, no-wrap +msgid "" +" # export APT_CONFIG=\"/disc/apt.conf\"\n" +" # apt-get check\n" +" [ APT generates a local copy of the cache files ]\n" +" # apt-get --no-d -o dir::state::status=/var/lib/dpkg/status dist-upgrade\n" +" [ Or any other APT command ]" +msgstr "" +" # export APT_CONFIG=\"/disc/apt.conf\"\n" +" # apt-get check\n" +" [ APT gera uma cópia local dos ficheiros de cache ]\n" +" # apt-get --no-d -o dir::state::status=/var/lib/dpkg/status dist-upgrade\n" +" [ Ou qualquer outro comando APT ]" + +#. type:

+#: offline.sgml:165 +msgid "" +"It is necessary for proper function to re-specify the status file to be the " +"local one. This is very important!" +msgstr "" +"Para uma função apropriada é necessário re-especificar que o ficheiro de " +"estado seja o ficheiro local. Isto é muito importante!" + +#. type:

+#: offline.sgml:172 +msgid "" +"If you are using dselect you can do the very risky operation of copying disc/" +"status to /var/lib/dpkg/status so that any selections you made on the remote " +"machine are updated. I highly recommend that people only make selections on " +"the local machine - but this may not always be possible. DO NOT copy the " +"status file if dpkg or APT have been run in the mean time!!" +msgstr "" +"Se está a usar dselect você pode fazer a operação muito arriscada de copiar " +"disc/status para /var/lib/dpkg/status para que quaisquer selecções que faça " +"na máquina remota sejam actualizadas. Eu recomendo altamente que as pessoas " +"apenas façam selecções na máquina local - mas isto pode nem sempre ser " +"possível. NÃO copie o ficheiro de estado se entretanto correu o dpkg ou o " +"APT!!" + +#. type: +#: offline.sgml:178 +msgid "Using APT and wget" +msgstr "Usando APT e wget" + +#. type:

+#: offline.sgml:185 +msgid "" +"wget is a popular and portable download tool that can run on nearly " +"any machine. Unlike the method above this requires that the Debian machine " +"already has a list of available packages." +msgstr "" +"wget é uma ferramenta popular e portável de download que pode " +"correr praticamente em qualquer máquina. Ao contrário do método acima, este " +"requer que a máquina Debian já tenha uma lista de pacotes disponíveis." + +#. type:

+#: offline.sgml:190 +msgid "" +"The basic idea is to create a disc that has only the archive files " +"downloaded from the remote site. This is done by using the --print-uris " +"option to apt-get and then preparing a wget script to actually fetch the " +"packages." +msgstr "" +"A ideia básica é criar um disco que tem apenas os ficheiros de arquivo " +"descarregados do site remoto. Isto é feito ao usar a opção --print-uris no " +"apt-get e depois preparar um script wget para realmente ir buscar os pacotes." + +#. type: +#: offline.sgml:196 +msgid "Operation" +msgstr "Operação" + +#. type:

+#: offline.sgml:200 +msgid "" +"Unlike the previous technique no special configuration files are required. " +"We merely use the standard APT commands to generate the file list." +msgstr "" +"Ao contrário da técnica anterior, não são necessários ficheiros de " +"configuração especiais. Nós usamos meramente os comandos standard do APT " +"para gerar a lista de ficheiros." + +#. type: +#: offline.sgml:205 +#, no-wrap +msgid "" +" # apt-get dist-upgrade \n" +" [ Press no when prompted, make sure you are happy with the actions ]\n" +" # apt-get -qq --print-uris dist-upgrade > uris\n" +" # awk '{print \"wget -O \" $2 \" \" $1}' < uris > /disc/wget-script" +msgstr "" +" # apt-get dist-upgrade \n" +" [ Escolha não quando perguntado, certifique-se que está contente com as acções ]\n" +" # apt-get -qq --print-uris dist-upgrade > uris\n" +" # awk '{print \"wget -O \" $2 \" \" $1}' < uris > /disc/wget-script" + +#. type:

+#: offline.sgml:210 +msgid "" +"Any command other than dist-upgrade could be used here, including dselect-" +"upgrade." +msgstr "" +"Qualquer comando além do dist-upgrade pode ser usado aqui, incluindo dselect-" +"upgrade." + +#. type:

+#: offline.sgml:216 +msgid "" +"The /disc/wget-script file will now contain a list of wget commands to " +"execute in order to fetch the necessary archives. This script should be run " +"with the current directory as the disc's mount point so as to save the " +"output on the disc." +msgstr "" +"O ficheiro /disc/wget-script irá agora conter uma lista de comandos do wget " +"para executar de modo a obter os arquivos necessários. Este script deve ser " +"corrido com o directório actual sendo o ponto de montagem do disco para que " +"grave os resultados no disco." + +#. type:

+#: offline.sgml:219 +msgid "The remote machine would do something like" +msgstr "A máquina remota deverá fazer algo como" + +#. type: +#: offline.sgml:223 +#, no-wrap +msgid "" +" # cd /disc\n" +" # sh -x ./wget-script\n" +" [ wait.. ]" +msgstr "" +" # cd /disc\n" +" # sh -x ./wget-script\n" +" [ wait.. ]" + +#. type: +#: offline.sgml:228 +msgid "" +"Once the archives are downloaded and the disc returned to the Debian machine " +"installation can proceed using," +msgstr "" +"Após os arquivos serem descarregados e o disco retornado à máquina Debian, a " +"instalação pode prosseguir usando," + +#. type: +#: offline.sgml:230 +#, no-wrap +msgid " # apt-get -o dir::cache::archives=\"/disc/\" dist-upgrade" +msgstr " # apt-get -o dir::cache::archives=\"/disc/\" dist-upgrade" + +#. type:

+#: offline.sgml:234 +msgid "Which will use the already fetched archives on the disc." +msgstr "O qual irá usar os arquivos já obtidos e que estão no disco." + +#~ msgid "/etc/apt/trusted.gpg" +#~ msgstr "/etc/apt/trusted.gpg" + +#~ msgid "Keyring of local trusted keys, new keys will be added here." +#~ msgstr "" +#~ "Chaveiro das chaves de confiança locais, as novas chaves serão " +#~ "adicionadas aqui." + +#~ msgid "" +#~ "apt.conf is the main configuration file for the APT " +#~ "suite of tools, all tools make use of the configuration file and a common " +#~ "command line parser to provide a uniform environment. When an APT tool " +#~ "starts up it will read the configuration specified by the " +#~ "APT_CONFIG environment variable (if any) and then read the " +#~ "files in Dir::Etc::Parts then read the main " +#~ "configuration file specified by Dir::Etc::main then " +#~ "finally apply the command line options to override the configuration " +#~ "directives, possibly loading even more config files." +#~ msgstr "" +#~ "apt.conf é o ficheiro de configuração principal para " +#~ "a suite de ferramentas do APT, todas as ferramentas usam o ficheiro de " +#~ "configuração e um analisador de linha de comandos comum para " +#~ "disponibilizar um ambiente uniforme. Quando uma ferramenta do APT arranca " +#~ "lê a configuração especificada pela variável de ambiente " +#~ "APT_CONFIG (se existir alguma) e depois lê os ficheiros em " +#~ "Dir::Etc::Parts, depois lê o ficheiro de configuração " +#~ "principal especificado por Dir::Etc::main e finalmente " +#~ "aplica as opções de linha de comandos para sobrepor as directivas de " +#~ "configuração, possivelmente carregando ainda mais ficheiros de " +#~ "configuração." -- cgit v1.2.3 From d8b3cbb61d93228ec984befefa1abfb16555f12a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 19 Mar 2010 12:36:20 +0100 Subject: modify and clarify the comments for the translation placeholders a bit and as it was only a comment change unfuzzy the translations. --- doc/apt.ent | 9 +++++++-- doc/po/apt-doc.pot | 26 +++++++++++++++++++------- doc/po/de.po | 23 +++++++++++++++-------- doc/po/es.po | 21 ++++++++++++++------- doc/po/fr.po | 23 +++++++++++++++-------- doc/po/it.po | 21 ++++++++++++++------- doc/po/ja.po | 23 +++++++++++++++-------- doc/po/pl.po | 26 ++++++++++++++------------ doc/po/pt.po | 23 +++++++++++++++-------- doc/po/pt_BR.po | 26 ++++++++++++++++---------- 10 files changed, 144 insertions(+), 77 deletions(-) diff --git a/doc/apt.ent b/doc/apt.ent index c23d906e2..19da4429e 100644 --- a/doc/apt.ent +++ b/doc/apt.ent @@ -367,9 +367,11 @@ "> + - + in a shipped manpage newer/modified paragraphs will maybe appear in english in + the generated manpage. This sentence is therefore here to tell the reader that this + is not a mistake by the translator - obviously the target is that at least for stable + releases this sentence is not needed. :) --> \n" "Language-Team: LANGUAGE \n" @@ -799,16 +799,22 @@ msgid "" msgstr "" #. type: Plain text -#: apt.ent:371 -msgid "" +#: apt.ent:373 +#, no-wrap +msgid "" +"\n" +"\n" msgstr "" #. type: Plain text -#: apt.ent:380 +#: apt.ent:382 #, no-wrap msgid "" "\n" @@ -823,12 +829,18 @@ msgid "" msgstr "" #. type: Plain text -#: apt.ent:387 +#: apt.ent:392 #, no-wrap msgid "" "\n" +" in a shipped manpage newer/modified paragraphs will maybe appear in " +"english in\n" +" the generated manpage. This sentence is therefore here to tell the " +"reader that this\n" +" is not a mistake by the translator - obviously the target is that at " +"least for stable\n" +" releases this sentence is not needed. :) -->\n" "\n" -"POT-Creation-Date: 2010-03-14 16:41+0100\n" +"POT-Creation-Date: 2010-03-19 11:14+0100\n" "PO-Revision-Date: 2009-12-31 17:41+GMT\n" "Last-Translator: Chris Leick \n" "Language-Team: German \n" @@ -1097,15 +1097,19 @@ msgstr "" "\">\n" #. type: Plain text -#: apt.ent:371 -msgid "" -msgstr "" +#: apt.ent:373 +#, no-wrap +msgid "" +"\n" +"\n" +msgstr "\n" #. type: Plain text -#: apt.ent:380 +#: apt.ent:382 #, no-wrap msgid "" -"\n" "\n" #. type: Plain text -#: apt.ent:387 +#: apt.ent:392 #, no-wrap msgid "" "\n" +" in a shipped manpage newer/modified paragraphs will maybe appear in english in\n" +" the generated manpage. This sentence is therefore here to tell the reader that this\n" +" is not a mistake by the translator - obviously the target is that at least for stable\n" +" releases this sentence is not needed. :) -->\n" "\n" "Language-Team: Debian Spanish l10n \n" @@ -1131,15 +1131,19 @@ msgstr "" "\">\n" #. type: Plain text -#: apt.ent:371 -msgid "" +#: apt.ent:373 +#, no-wrap +msgid "" +"\n" +"\n" msgstr "" #. type: Plain text -#: apt.ent:380 +#: apt.ent:382 #, no-wrap msgid "" -"\n" "\n" +" in a shipped manpage newer/modified paragraphs will maybe appear in english in\n" +" the generated manpage. This sentence is therefore here to tell the reader that this\n" +" is not a mistake by the translator - obviously the target is that at least for stable\n" +" releases this sentence is not needed. :) -->\n" "\n" "Language-Team: French \n" @@ -1096,15 +1096,19 @@ msgstr "" "\">\n" #. type: Plain text -#: apt.ent:371 -msgid "" -msgstr "" +#: apt.ent:373 +#, no-wrap +msgid "" +"\n" +"\n" +msgstr "\n" #. type: Plain text -#: apt.ent:380 +#: apt.ent:382 #, no-wrap msgid "" -"\n" "\n" #. type: Plain text -#: apt.ent:387 +#: apt.ent:392 #, no-wrap msgid "" "\n" +" in a shipped manpage newer/modified paragraphs will maybe appear in english in\n" +" the generated manpage. This sentence is therefore here to tell the reader that this\n" +" is not a mistake by the translator - obviously the target is that at least for stable\n" +" releases this sentence is not needed. :) -->\n" "\n" "Language-Team: \n" @@ -773,15 +773,19 @@ msgid "" msgstr "" #. type: Plain text -#: apt.ent:371 -msgid "" +#: apt.ent:373 +#, no-wrap +msgid "" +"\n" +"\n" msgstr "" #. type: Plain text -#: apt.ent:380 +#: apt.ent:382 #, no-wrap msgid "" -"\n" "\n" +" in a shipped manpage newer/modified paragraphs will maybe appear in english in\n" +" the generated manpage. This sentence is therefore here to tell the reader that this\n" +" is not a mistake by the translator - obviously the target is that at least for stable\n" +" releases this sentence is not needed. :) -->\n" "\n" "Language-Team: LANGUAGE \n" @@ -1100,15 +1100,19 @@ msgid "" msgstr "取得中状態情報格納エリア。設定項目 - Dir::State::Lists (必然的に不完全)" #. type: Plain text -#: apt.ent:371 -msgid "" -msgstr "" +#: apt.ent:373 +#, no-wrap +msgid "" +"\n" +"\n" +msgstr "\n" #. type: Plain text -#: apt.ent:380 +#: apt.ent:382 #, no-wrap msgid "" -"\n" "\n" #. type: Plain text -#: apt.ent:387 +#: apt.ent:392 #, no-wrap msgid "" "\n" +" in a shipped manpage newer/modified paragraphs will maybe appear in english in\n" +" the generated manpage. This sentence is therefore here to tell the reader that this\n" +" is not a mistake by the translator - obviously the target is that at least for stable\n" +" releases this sentence is not needed. :) -->\n" "\n" "Language-Team: \n" @@ -1105,15 +1105,19 @@ msgstr "" "\">\n" #. type: Plain text -#: apt.ent:371 -msgid "" +#: apt.ent:373 +#, no-wrap +msgid "" +"\n" +"\n" msgstr "" #. type: Plain text -#: apt.ent:380 +#: apt.ent:382 #, no-wrap msgid "" -"\n" "debian-l10n-dummy@lists.debian.org.\n" "\">\n" msgstr "" -"\n" "robert@debian.org, 2000-2010.\n" " Tłumaczenie przewodnika offline: Krzysztof Fiertek akfedux@megapolis.pl, 2004\n" "\">\n" #. type: Plain text -#: apt.ent:387 +#: apt.ent:392 #, no-wrap msgid "" "\n" +" in a shipped manpage newer/modified paragraphs will maybe appear in english in\n" +" the generated manpage. This sentence is therefore here to tell the reader that this\n" +" is not a mistake by the translator - obviously the target is that at least for stable\n" +" releases this sentence is not needed. :) -->\n" "\n" msgstr "" -"\n" "\n" "Language-Team: Portuguese \n" @@ -1089,15 +1089,19 @@ msgstr "" "\">\n" #. type: Plain text -#: apt.ent:371 -msgid "" -msgstr "" +#: apt.ent:373 +#, no-wrap +msgid "" +"\n" +"\n" +msgstr "\n" #. type: Plain text -#: apt.ent:380 +#: apt.ent:382 #, no-wrap msgid "" -"\n" "\n" #. type: Plain text -#: apt.ent:387 +#: apt.ent:392 #, no-wrap msgid "" "\n" +" in a shipped manpage newer/modified paragraphs will maybe appear in english in\n" +" the generated manpage. This sentence is therefore here to tell the reader that this\n" +" is not a mistake by the translator - obviously the target is that at least for stable\n" +" releases this sentence is not needed. :) -->\n" "\n" "Language-Team: \n" @@ -816,16 +816,19 @@ msgid "" msgstr "" #. type: Plain text -#: apt.ent:371 -#, fuzzy -msgid "" -msgstr "" +#: apt.ent:373 +#, no-wrap +msgid "" +"\n" +"\n" +msgstr "\n" #. type: Plain text -#: apt.ent:380 -#, fuzzy, no-wrap +#: apt.ent:382 +#, no-wrap msgid "" -"\n" "\n" #. type: Plain text -#: apt.ent:387 +#: apt.ent:392 #, no-wrap msgid "" "\n" +" in a shipped manpage newer/modified paragraphs will maybe appear in english in\n" +" the generated manpage. This sentence is therefore here to tell the reader that this\n" +" is not a mistake by the translator - obviously the target is that at least for stable\n" +" releases this sentence is not needed. :) -->\n" " Date: Fri, 19 Mar 2010 13:06:48 +0100 Subject: add a missing non-const & Accessors to the Iterator class --- apt-pkg/cacheiterators.h | 1 + 1 file changed, 1 insertion(+) diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 28e062f3c..e2ca74683 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -62,6 +62,7 @@ template class pkgCache::Iterator { inline Str const *operator ->() const {return S;}; inline operator Str *() {return S == OwnerPointer() ? 0 : S;}; inline operator Str const *() const {return S == OwnerPointer() ? 0 : S;}; + inline Str &operator *() {return *S;}; inline Str const &operator *() const {return *S;}; inline pkgCache *Cache() {return Owner;}; -- cgit v1.2.3 From 22d1b5c9bcfa69cfc4279370a5e8938079d28773 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 19 Mar 2010 16:29:40 +0100 Subject: first-time build the translated manpages and remove the directories in the veryclean target to get right of all autogenerated files. --- doc/makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/makefile b/doc/makefile index 93504e23e..8a889c94c 100644 --- a/doc/makefile +++ b/doc/makefile @@ -51,10 +51,7 @@ doc: for i in $(shell ls po/*.po | sed -r 's#po/([a-z]+[A-Z_]*).po#\1#'); do \ test -d $$i || mkdir $$i; \ test -f $$i/makefile || sed "s#@@LANG@@#$$i#" lang.makefile > $$i/makefile; \ - done - # it is likely that we have changed the list, so SUBDIRS is incorrect - for dir in $(dir $(wildcard */makefile)); do\ - $(MAKE) -C $$dir $@; \ + $(MAKE) -C $$i $@; \ done clean: clean-subdirs @@ -67,7 +64,7 @@ clean-subdirs: veryclean-subdirs: for dir in $(SUBDIRS); do\ - $(MAKE) -C $$dir veryclean; \ + rm -rf $$dir; \ done ifdef PO4A -- cgit v1.2.3 From aa85a4e2a7ef7c057d979f4e115f92993e04bbe8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 19 Mar 2010 16:41:35 +0100 Subject: add a missing \n to pl translation i had removed previously by accident --- doc/po/pl.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/po/pl.po b/doc/po/pl.po index 78b2faba6..577a002a0 100644 --- a/doc/po/pl.po +++ b/doc/po/pl.po @@ -1111,7 +1111,7 @@ msgid "" "\n" "\n" -msgstr "" +msgstr "\n" #. type: Plain text #: apt.ent:382 -- cgit v1.2.3 From 6bc703c22970055d9e1a1b4e3e0efe74f4cefda5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 21 Mar 2010 21:48:09 +0100 Subject: =?UTF-8?q?Add=20with=20pkgCacheGen::Essential=20a=20way=20to=20co?= =?UTF-8?q?ntrol=20which=20packages=20get=20the=20essential=20flag:=20*=20?= =?UTF-8?q?native=20is=20the=20default=20and=20will=20only=20mark=20packag?= =?UTF-8?q?es=20of=20the=20main=20arch=20*=20all=20will=20mark=20all=20pac?= =?UTF-8?q?kages=20which=20have=20these=20flag=20in=20Packages=20*=20none?= =?UTF-8?q?=20will=20obviously=20do=20the=20opposite=20*=20installed=20wil?= =?UTF-8?q?l=20only=20mark=20packages=20which=20are=20installed=20as=20ess?= =?UTF-8?q?ential,=20=20=20so=20it=20will=20behave=20in=20the=20same=20way?= =?UTF-8?q?=20as=20dpkg=20does=20it.=20It=20is=20mostly=20needed=20sometim?= =?UTF-8?q?es=20for=20debugging=20but=20some=20users=20with=20special=20ne?= =?UTF-8?q?eds=20might=20like=20to=20switch=20the=20mode=20as=20well=20und?= =?UTF-8?q?er=20the=20expense=20to=20be=20on=20their=20own=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apt-pkg/deb/deblistparser.cc | 16 +++++++++++++--- doc/examples/configure-index | 2 ++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 5c9cf6d4b..947e060e3 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -255,9 +255,13 @@ bool debListParser::UsePackage(pkgCache::PkgIterator Pkg, if (Pkg->Section == 0) Pkg->Section = UniqFindTagWrite("Section"); - // Packages which are not from "our" arch doesn't get the essential flag + // Packages which are not from the "native" arch doesn't get the essential flag + // in the default "native" mode - it is also possible to mark "all" or "none". + // The "installed" mode is handled by ParseStatus(), See #544481 and friends. string const static myArch = _config->Find("APT::Architecture"); - if (Pkg->Arch != 0 && myArch == Pkg.Arch()) + string const static essential = _config->Find("pkgCacheGen::Essential", "native"); + if ((essential == "native" && Pkg->Arch != 0 && myArch == Pkg.Arch()) || + essential == "all") if (Section.FindFlag("Essential",Pkg->Flags,pkgCache::Flag::Essential) == false) return false; if (Section.FindFlag("Important",Pkg->Flags,pkgCache::Flag::Important) == false) @@ -333,7 +337,13 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator Pkg, const char *Stop; if (Section.Find("Status",Start,Stop) == false) return true; - + + // UsePackage() is responsible for setting the flag in the default case + bool const static essential = _config->Find("pkgCacheGen::Essential", "") == "installed"; + if (essential == true && + Section.FindFlag("Essential",Pkg->Flags,pkgCache::Flag::Essential) == false) + return false; + // Isolate the first word const char *I = Start; for(; I < Stop && *I != ' '; I++); diff --git a/doc/examples/configure-index b/doc/examples/configure-index index f07302efd..f08a42ec7 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -432,6 +432,8 @@ Debug } +pkgCacheGen::Essential "native"; // other modes: all, none, installed + /* Whatever you do, do not use this configuration file!! Take out ONLY the portions you need! */ This Is Not A Valid Config File -- cgit v1.2.3 From 66905344357d03c206d99964a0d941b261f7146c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 22 Mar 2010 18:25:37 +0100 Subject: * ftparchive/writer.cc: - write LongDescriptions if they shouldn't be included in Packages file into i18n/Translation-en by default. It is ensured that each package+description is listed only ones in the Translation file even if we generate multiple Packages file in one run. The file is only generated in "generate" - the simple file commands can't create it by now. Also, the LongDescription is currently a global setting, so generating archives with and without LongDescriptions in the Packages file in the same run are currently not possible. --- debian/changelog | 3 +++ ftparchive/apt-ftparchive.cc | 47 +++++++++++++++++++++++++++++++++------- ftparchive/writer.cc | 51 ++++++++++++++++++++++++++++++++++++++++++-- ftparchive/writer.h | 19 +++++++++++++++++ 4 files changed, 110 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index d08bfb20c..d8b8244bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -51,6 +51,9 @@ apt (0.7.26) UNRELEASED; urgency=low - merge versions correctly even if multiple different versions with the same version number are available. Thanks to Magnus Holmgren for the patch! (Closes: #351056) + * ftparchive/writer.cc: + - write LongDescriptions if they shouldn't be included in Packages + file into i18n/Translation-en by default. [ Julian Andres Klode ] * cmdline/apt-mark: diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index f1a182e52..e69c88ddd 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -62,6 +62,9 @@ struct PackageMap string SrcOverride; string SrcExtraOverride; + // Translation master file + TranslationWriter *TransWriter; + // Contents string Contents; string ContentsHead; @@ -100,8 +103,9 @@ struct PackageMap vector::iterator End, unsigned long &Left); - PackageMap() : DeLinkLimit(0), Permissions(1), ContentsDone(false), - PkgDone(false), SrcDone(false), ContentsMTime(0) {}; + PackageMap() : TransWriter(NULL), DeLinkLimit(0), Permissions(1), + ContentsDone(false), PkgDone(false), SrcDone(false), + ContentsMTime(0) {}; }; /*}}}*/ @@ -169,6 +173,8 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats) Packages.DirStrip = ArchiveDir; Packages.InternalPrefix = flCombine(ArchiveDir,InternalPrefix); + Packages.TransWriter = TransWriter; + Packages.Stats.DeLinkBytes = Stats.DeLinkBytes; Packages.DeLinkLimit = DeLinkLimit; @@ -436,6 +442,8 @@ void LoadTree(vector &PkgList,Configuration &Setup) "$(DIST)/$(SECTION)/source/"); string DPkg = Setup.Find("TreeDefault::Packages", "$(DIST)/$(SECTION)/binary-$(ARCH)/Packages"); + string DTrans = Setup.Find("TreeDefault::Translation", + "$(DIST)/$(SECTION)/i18n/Translation-en"); string DIPrfx = Setup.Find("TreeDefault::InternalPrefix", "$(DIST)/$(SECTION)/"); string DContents = Setup.Find("TreeDefault::Contents", @@ -461,15 +469,25 @@ void LoadTree(vector &PkgList,Configuration &Setup) string Section; while (ParseQuoteWord(Sections,Section) == true) { - string Tmp2 = Block.Find("Architectures"); string Arch; + struct SubstVar const Vars[] = {{"$(DIST)",&Dist}, + {"$(SECTION)",&Section}, + {"$(ARCH)",&Arch}, + {}}; + TranslationWriter *TransWriter; + if (DTrans.empty() == false) + { + string const TranslationFile = flCombine(Setup.FindDir("Dir::ArchiveDir"), + SubstVar(Block.Find("Translation", DTrans.c_str()), Vars)); + TransWriter = new TranslationWriter(TranslationFile); + } + else + TransWriter = NULL; + + string const Tmp2 = Block.Find("Architectures"); const char *Archs = Tmp2.c_str(); while (ParseQuoteWord(Archs,Arch) == true) { - struct SubstVar Vars[] = {{"$(DIST)",&Dist}, - {"$(SECTION)",&Section}, - {"$(ARCH)",&Arch}, - {}}; PackageMap Itm; Itm.BinOverride = SubstVar(Block.Find("BinOverride"),Vars); @@ -491,6 +509,11 @@ void LoadTree(vector &PkgList,Configuration &Setup) Itm.PkgFile = SubstVar(Block.Find("Packages",DPkg.c_str()),Vars); Itm.Tag = SubstVar("$(DIST)/$(SECTION)/$(ARCH)",Vars); Itm.Arch = Arch; + if (TransWriter != NULL) + { + TransWriter->IncreaseRefCounter(); + Itm.TransWriter = TransWriter; + } Itm.Contents = SubstVar(Block.Find("Contents",DContents.c_str()),Vars); Itm.ContentsHead = SubstVar(Block.Find("Contents::Header",DContentsH.c_str()),Vars); Itm.FLFile = SubstVar(Block.Find("FileList",DFLFile.c_str()),Vars); @@ -500,6 +523,9 @@ void LoadTree(vector &PkgList,Configuration &Setup) Itm.GetGeneral(Setup,Block); PkgList.push_back(Itm); } + // we didn't use this TransWriter, so we can release it + if (TransWriter != NULL && TransWriter->GetRefCounter() == 0) + delete TransWriter; } Top = Top->Next; @@ -788,7 +814,12 @@ bool Generate(CommandLine &CmdL) delete [] List; } - + + // close the Translation master files + for (vector::iterator I = PkgList.begin(); I != PkgList.end(); I++) + if (I->TransWriter != NULL && I->TransWriter->DecreaseRefCounter() == 0) + delete I->TransWriter; + if (_config->FindB("APT::FTPArchive::Contents",true) == false) return true; diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 9e5b7d4f3..b395903b7 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -300,7 +300,7 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath, /* */ PackagesWriter::PackagesWriter(string const &DB,string const &Overrides,string const &ExtOverrides, string const &Arch) : - FTWScanner(Arch), Db(DB), Stats(Db.Stats) + FTWScanner(Arch), Db(DB), Stats(Db.Stats), TransWriter(NULL) { Output = stdout; SetExts(".deb .udeb"); @@ -317,7 +317,7 @@ PackagesWriter::PackagesWriter(string const &DB,string const &Overrides,string c if (Db.Loaded() == false) DoContents = false; - + // Read the override file if (Overrides.empty() == false && Over.ReadOverride(Overrides) == false) return; @@ -448,6 +448,8 @@ bool PackagesWriter::DoPackage(string FileName) descmd5.Add(desc.c_str()); DescriptionMd5 = descmd5.Result().Value(); SetTFRewriteData(Changes[End++], "Description-md5", DescriptionMd5.c_str()); + if (TransWriter != NULL) + TransWriter->DoPackage(Package, desc, DescriptionMd5); } // Rewrite the maintainer field if necessary @@ -494,6 +496,51 @@ bool PackagesWriter::DoPackage(string FileName) } /*}}}*/ +// TranslationWriter::TranslationWriter - Constructor /*{{{*/ +// --------------------------------------------------------------------- +/* Create a Translation-Master file for this Packages file */ +TranslationWriter::TranslationWriter(string const &File) : Output(NULL), + RefCounter(0) +{ + if (File.empty() == true) + return; + + Output = fopen(File.c_str(), "w"); +} + /*}}}*/ +// TranslationWriter::DoPackage - Process a single package /*{{{*/ +// --------------------------------------------------------------------- +/* Create a Translation-Master file for this Packages file */ +bool TranslationWriter::DoPackage(string const &Pkg, string const &Desc, + string const &MD5) +{ + if (Output == NULL) + return true; + + // Different archs can include different versions and therefore + // different descriptions - so we need to check for both name and md5. + string const Record = Pkg + ":" + MD5; + + if (Included.find(Record) != Included.end()) + return true; + + fprintf(Output, "Package: %s\nDescription-md5: %s\nDescription-en: %s\n", + Pkg.c_str(), MD5.c_str(), Desc.c_str()); + + Included.insert(Record); + return true; +} + /*}}}*/ +// TranslationWriter::~TranslationWriter - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +TranslationWriter::~TranslationWriter() +{ + if (Output != NULL) + fclose(Output); +} + /*}}}*/ + // SourcesWriter::SourcesWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/ftparchive/writer.h b/ftparchive/writer.h index af7ba4edd..2afd1af1f 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -19,6 +19,7 @@ #include #include #include +#include #include "cachedb.h" #include "override.h" @@ -72,6 +73,23 @@ class FTWScanner FTWScanner(string const &Arch = string()); }; +class TranslationWriter +{ + FILE *Output; + std::set Included; + unsigned short RefCounter; + + public: + void IncreaseRefCounter() { ++RefCounter; }; + unsigned short DecreaseRefCounter() { return (RefCounter == 0) ? 0 : --RefCounter; }; + unsigned short GetRefCounter() const { return RefCounter; }; + bool DoPackage(string const &Pkg, string const &Desc, string const &MD5); + + TranslationWriter(string const &File); + TranslationWriter() : Output(NULL), RefCounter(0) {}; + ~TranslationWriter(); +}; + class PackagesWriter : public FTWScanner { Override Over; @@ -93,6 +111,7 @@ class PackagesWriter : public FTWScanner string DirStrip; FILE *Output; struct CacheDB::Stats &Stats; + TranslationWriter *TransWriter; inline bool ReadOverride(string const &File) {return Over.ReadOverride(File);}; inline bool ReadExtraOverride(string const &File) -- cgit v1.2.3 From 4e794c509becfd7e2bddfddc1205dc81397a48bd Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 26 Mar 2010 19:18:21 +0100 Subject: Inclusion of Long Descriptions in the Packages files can be set now also in TreeDefaults and Tree to support generation of archives which should support and which shouldn't support splitted out Translation-en files in the same run. --- doc/apt-ftparchive.1.xml | 27 +++++++++++++++++++++++---- ftparchive/apt-ftparchive.cc | 11 +++++++++-- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/doc/apt-ftparchive.1.xml b/doc/apt-ftparchive.1.xml index f88dbe631..e639924ce 100644 --- a/doc/apt-ftparchive.1.xml +++ b/doc/apt-ftparchive.1.xml @@ -289,7 +289,20 @@ Sets the output Sources file. Defaults to $(DIST)/$(SECTION)/source/Sources - + + Translation + + Set the output Translation-en master file with the long descriptions if they + should be not included in the Packages file. Defaults to + $(DIST)/$(SECTION)/i18n/Translation-en + + + LongDescription + + Sets if long descriptions should be included in the Packages file or split + out into a master Translation-en file. + + InternalPrefix Sets the path prefix that causes a symlink to be @@ -371,7 +384,13 @@ for i in Sections do architectures that appear under search section. The special architecture 'source' is used to indicate that this tree has a source archive. - + + LongDescription + + Sets if long descriptions should be included in the Packages file or split + out into a master Translation-en file. + + BinOverride Sets the binary override file. The override file @@ -568,8 +587,8 @@ for i in Sections do This configuration option defaults to "true" and should only be set to "false" if the Archive generated with &apt-ftparchive; also provides - Translation files. Note that it is currently not possible to create these - files with apt-ftparchive. + Translation files. Note that the Translation-en + master file can only be created in the generate command. diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index e69c88ddd..f3e91d90d 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -63,6 +63,7 @@ struct PackageMap string SrcExtraOverride; // Translation master file + bool LongDesc; TranslationWriter *TransWriter; // Contents @@ -103,7 +104,7 @@ struct PackageMap vector::iterator End, unsigned long &Left); - PackageMap() : TransWriter(NULL), DeLinkLimit(0), Permissions(1), + PackageMap() : LongDesc(true), TransWriter(NULL), DeLinkLimit(0), Permissions(1), ContentsDone(false), PkgDone(false), SrcDone(false), ContentsMTime(0) {}; }; @@ -174,6 +175,7 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats) Packages.InternalPrefix = flCombine(ArchiveDir,InternalPrefix); Packages.TransWriter = TransWriter; + Packages.LongDescription = LongDesc; Packages.Stats.DeLinkBytes = Stats.DeLinkBytes; Packages.DeLinkLimit = DeLinkLimit; @@ -456,6 +458,9 @@ void LoadTree(vector &PkgList,Configuration &Setup) string DFLFile = Setup.Find("TreeDefault::FileList", ""); string DSFLFile = Setup.Find("TreeDefault::SourceFileList", ""); + bool const LongDescription = Setup.FindB("TreeDefault::LongDescription", + _config->FindB("APT::FTPArchive::LongDescription", true)); + // Process 'tree' type sections const Configuration::Item *Top = Setup.Tree("tree"); for (Top = (Top == 0?0:Top->Child); Top != 0;) @@ -474,8 +479,9 @@ void LoadTree(vector &PkgList,Configuration &Setup) {"$(SECTION)",&Section}, {"$(ARCH)",&Arch}, {}}; + bool const LongDesc = Block.FindB("LongDescription", LongDescription); TranslationWriter *TransWriter; - if (DTrans.empty() == false) + if (DTrans.empty() == false && LongDesc == false) { string const TranslationFile = flCombine(Setup.FindDir("Dir::ArchiveDir"), SubstVar(Block.Find("Translation", DTrans.c_str()), Vars)); @@ -509,6 +515,7 @@ void LoadTree(vector &PkgList,Configuration &Setup) Itm.PkgFile = SubstVar(Block.Find("Packages",DPkg.c_str()),Vars); Itm.Tag = SubstVar("$(DIST)/$(SECTION)/$(ARCH)",Vars); Itm.Arch = Arch; + Itm.LongDesc = LongDesc; if (TransWriter != NULL) { TransWriter->IncreaseRefCounter(); -- cgit v1.2.3 From 34f1d96cf5657b5e34cd9880dccfa2028fa16b13 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 26 Mar 2010 22:38:50 +0100 Subject: Switch the TranslationWriter to use MultiCompress to be able to generate the compressed files as we want them and to prevent the file to be replaced without a reason which could save us from steady redownloads of a file with the same content. --- doc/apt-ftparchive.1.xml | 20 +++++++++++++------- ftparchive/apt-ftparchive.cc | 13 ++++++++----- ftparchive/writer.cc | 12 ++++++++---- ftparchive/writer.h | 6 ++++-- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/doc/apt-ftparchive.1.xml b/doc/apt-ftparchive.1.xml index e639924ce..5bf47f32a 100644 --- a/doc/apt-ftparchive.1.xml +++ b/doc/apt-ftparchive.1.xml @@ -224,7 +224,13 @@ This is similar to Packages::Compress except that it controls the compression for the Contents files. - + + Translation::Compress + + This is similar to Packages::Compress + except that it controls the compression for the Translation-en master file. + + DeLinkLimit Specifies the number of kilobytes to delink (and @@ -238,6 +244,12 @@ defaults to 0644. All index files are set to this mode with no regard to the umask. + + LongDescription + + Sets if long descriptions should be included in the Packages file or split + out into a master Translation-en file. + @@ -297,12 +309,6 @@ $(DIST)/$(SECTION)/i18n/Translation-en - LongDescription - - Sets if long descriptions should be included in the Packages file or split - out into a master Translation-en file. - - InternalPrefix Sets the path prefix that causes a symlink to be diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index f3e91d90d..46831b385 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -134,8 +134,6 @@ void PackageMap::GetGeneral(Configuration &Setup,Configuration &Block) PkgExt = Block.Find("Packages::Extensions", Setup.Find("Default::Packages::Extensions",".deb").c_str()); - Permissions = Setup.FindI("Default::FileMode",0644); - if (FLFile.empty() == false) FLFile = flCombine(Setup.Find("Dir::FileListDir"),FLFile); @@ -458,8 +456,11 @@ void LoadTree(vector &PkgList,Configuration &Setup) string DFLFile = Setup.Find("TreeDefault::FileList", ""); string DSFLFile = Setup.Find("TreeDefault::SourceFileList", ""); - bool const LongDescription = Setup.FindB("TreeDefault::LongDescription", + int const Permissions = Setup.FindI("Default::FileMode",0644); + + bool const LongDescription = Setup.FindB("Default::LongDescription", _config->FindB("APT::FTPArchive::LongDescription", true)); + string const TranslationCompress = Setup.Find("Default::Translation::Compress",". gzip").c_str(); // Process 'tree' type sections const Configuration::Item *Top = Setup.Tree("tree"); @@ -479,13 +480,15 @@ void LoadTree(vector &PkgList,Configuration &Setup) {"$(SECTION)",&Section}, {"$(ARCH)",&Arch}, {}}; + mode_t const Perms = Block.FindI("FileMode", Permissions); bool const LongDesc = Block.FindB("LongDescription", LongDescription); TranslationWriter *TransWriter; if (DTrans.empty() == false && LongDesc == false) { string const TranslationFile = flCombine(Setup.FindDir("Dir::ArchiveDir"), SubstVar(Block.Find("Translation", DTrans.c_str()), Vars)); - TransWriter = new TranslationWriter(TranslationFile); + string const TransCompress = Block.Find("Translation::Compress", TranslationCompress); + TransWriter = new TranslationWriter(TranslationFile, TransCompress, Perms); } else TransWriter = NULL; @@ -495,7 +498,7 @@ void LoadTree(vector &PkgList,Configuration &Setup) while (ParseQuoteWord(Archs,Arch) == true) { PackageMap Itm; - + Itm.Permissions = Perms; Itm.BinOverride = SubstVar(Block.Find("BinOverride"),Vars); Itm.InternalPrefix = SubstVar(Block.Find("InternalPrefix",DIPrfx.c_str()),Vars); diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index b395903b7..45a8d212b 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -499,13 +499,15 @@ bool PackagesWriter::DoPackage(string FileName) // TranslationWriter::TranslationWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Create a Translation-Master file for this Packages file */ -TranslationWriter::TranslationWriter(string const &File) : Output(NULL), +TranslationWriter::TranslationWriter(string const &File, string const &TransCompress, + mode_t const &Permissions) : Output(NULL), RefCounter(0) { if (File.empty() == true) return; - Output = fopen(File.c_str(), "w"); + Comp = new MultiCompress(File, TransCompress, Permissions); + Output = Comp->Input; } /*}}}*/ // TranslationWriter::DoPackage - Process a single package /*{{{*/ @@ -536,8 +538,10 @@ bool TranslationWriter::DoPackage(string const &Pkg, string const &Desc, /* */ TranslationWriter::~TranslationWriter() { - if (Output != NULL) - fclose(Output); + if (Comp == NULL) + return; + + delete Comp; } /*}}}*/ diff --git a/ftparchive/writer.h b/ftparchive/writer.h index 2afd1af1f..3123a7f46 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -22,6 +22,7 @@ #include #include "cachedb.h" +#include "multicompress.h" #include "override.h" #include "apt-ftparchive.h" @@ -75,6 +76,7 @@ class FTWScanner class TranslationWriter { + MultiCompress *Comp; FILE *Output; std::set Included; unsigned short RefCounter; @@ -85,8 +87,8 @@ class TranslationWriter unsigned short GetRefCounter() const { return RefCounter; }; bool DoPackage(string const &Pkg, string const &Desc, string const &MD5); - TranslationWriter(string const &File); - TranslationWriter() : Output(NULL), RefCounter(0) {}; + TranslationWriter(string const &File, string const &TransCompress, mode_t const &Permissions); + TranslationWriter() : Comp(NULL), Output(NULL), RefCounter(0) {}; ~TranslationWriter(); }; -- cgit v1.2.3 From 4a2bb9e60e942b6749c7dbb3763ddf0e3663d5f1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 26 Mar 2010 22:48:09 +0100 Subject: * doc/apt_preferences.5.xml: - fix a=sid vs. n=sid typo, thanks Ansgar Burchardt! --- debian/changelog | 1 + doc/apt_preferences.5.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d8b8244bf..787a97e3f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,6 +34,7 @@ apt (0.7.26) UNRELEASED; urgency=low * doc/apt_preferences.5.xml: - fix two typos and be more verbose in the novice warning. Thanks to Osamu Aoki for pointing it out! (Closes: #567669) + - fix a=sid vs. n=sid typo, thanks Ansgar Burchardt! * apt-pkg/deb/dpkgpm.cc: - fix error message construction in OpenLog() - if available store the Commandline in the history diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index e773ad144..c4f18d90a 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -594,7 +594,7 @@ Pin-Priority: 900 Explanation: Debian unstable is always codenamed with sid Package: * -Pin: release a=sid +Pin: release n=sid Pin-Priority: 800 Package: * -- cgit v1.2.3 From 5b71abddc4c7dc5b8e2176319814da586eac839a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 26 Mar 2010 23:24:13 +0100 Subject: * doc/po/de.po: - correct a few typos in the german manpage translation. Thanks to Chris Leick and Georg Koppen! (Closes: #574962) --- debian/changelog | 3 +++ doc/po/de.po | 68 ++++++++++++++++++-------------------------------------- 2 files changed, 25 insertions(+), 46 deletions(-) diff --git a/debian/changelog b/debian/changelog index 787a97e3f..f48cbf275 100644 --- a/debian/changelog +++ b/debian/changelog @@ -55,6 +55,9 @@ apt (0.7.26) UNRELEASED; urgency=low * ftparchive/writer.cc: - write LongDescriptions if they shouldn't be included in Packages file into i18n/Translation-en by default. + * doc/po/de.po: + - correct a few typos in the german manpage translation. + Thanks to Chris Leick and Georg Koppen! (Closes: #574962) [ Julian Andres Klode ] * cmdline/apt-mark: diff --git a/doc/po/de.po b/doc/po/de.po index c431178fb..9270ecef3 100644 --- a/doc/po/de.po +++ b/doc/po/de.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: apt-doc 0.7.24\n" "Report-Msgid-Bugs-To: APT Development Team \n" "POT-Creation-Date: 2010-03-19 11:14+0100\n" -"PO-Revision-Date: 2009-12-31 17:41+GMT\n" +"PO-Revision-Date: 2010-03-22 07:41+0100\n" "Last-Translator: Chris Leick \n" "Language-Team: German \n" "MIME-Version: 1.0\n" @@ -8046,7 +8046,7 @@ msgid "" msgstr "" "Die APT-Einstellungsdatei /etc/apt/preferences und " "Teildateien im Verzeichnis /etc/apt/preferences.d/ " -"können benutzt werden, um zu steuern, welcher Versionen von Paketen zur " +"können benutzt werden, um zu steuern, welche Versionen von Paketen zur " "Installation ausgewählt werden." #. type: Content of: @@ -8064,8 +8064,8 @@ msgstr "" "Es könnten mehrere Versionen eines Pakets zur Installation verfügbar sein, " "wenn die Datei &sources-list; Bezüge zu mehr als einer Distribution enthält " "(zum Beispiel stable und testing). APT " -"weist jeder verfügbaren Version eine Priorität zu. Abhängig von " -"Abhängigkeitsbedingungen, wählt apt-get die Version mit " +"weist jeder verfügbaren Version eine Priorität zu. Je nach " +"Abhängigkeitsbedingungen wählt apt-get die Version mit " "der höchsten Priorität zur Installation aus. Die APT-Einstellungsdatei " "überschreibt die Prioritäten, die APT den Paketversionen standardmäßig " "zuweist, was dem Anwender die Kontrolle darüber gibt, welche zur " @@ -8111,6 +8111,12 @@ msgid "" "underscore (_) and period (.) characters - otherwise they will be silently " "ignored." msgstr "" +"Beachten Sie, dass die Dateien im Verzeichnis /etc/apt/preferences.d in " +"alphanumerisch aufsteigender Richtung ausgewertet werden und der folgenden " +"Namenskonvention unterliegen: Die Dateien haben keine oder »pref« als " +"Dateierweiterung und sie enthalten nur alphanumerische Zeichen, Bindestriche " +"(-), Unterstriche (_) oder Punkte (.). Wenn dies nicht der Fall ist, werden " +"sie stillschweigend ignoriert." #. type: Content of: #: apt_preferences.5.xml:74 @@ -8278,7 +8284,7 @@ msgid "" msgstr "" "In einer typischen Situation ist die Version eines Paketes (Priorität 100) " "nicht so aktuell, wie eine der verfügbaren Versionen, die in der Quellliste " -"der Datei &sources-list; steht (Priorität 500 oder 900). Dann wird ein " +"der Datei &sources-list; steht (Priorität 500 oder 990). Dann wird ein " "Upgrade des Pakets durchgeführt, wenn <command>apt-get install " "<replaceable>irgendein_Paket</replaceable></command> oder <command>apt-get " "upgrade</command> ausgeführt wird." @@ -8374,7 +8380,7 @@ msgid "" "fully qualified domain name." msgstr "" "Die allgemeine Form weist allen Paketversionen in einer gegebenen " -"Distribution (d.h. alle Versionen von Paketen, die in einer bestimmten " +"Distribution (d.h. allen Versionen von Paketen, die in einer bestimmten " "<filename>Release</filename>-Datei gelistet sind) oder allen Paketversionen, " "die von einer speziellen Internet-Site kommen, die durch ihren voll " "ausgebildeten Domänennamen identifiziert wird, eine Priorität zu." @@ -8653,7 +8659,7 @@ msgstr "" "Es wird die aktuellste verfügbare Version des Pakets <literal>perl</literal> " "installiert, so lange die Versionsnummer mit »<literal>5.8</literal>« " "anfängt. Wenn <emphasis>irgendeine</emphasis> 5.8*-Version von " -"<literal>perl</literal>verfügbar ist und die installierte Version 5.9* ist, " +"<literal>perl</literal> verfügbar ist und die installierte Version 5.9* ist, " "dann wird von <literal>perl</literal> ein Downgrade durchgeführt." #. type: Content of: <refentry><refsect1><refsect2><para><itemizedlist><listitem><simpara> @@ -8912,12 +8918,12 @@ msgstr "" "Die <filename>Release</filename>-Datei ist normalerweise im Verzeichnis " "<filename>.../dists/<replaceable>Distributionsname</replaceable></filename> " "zu finden, zum Beispiel <filename>.../dists/stable/Release</filename> oder " -"<filename>.../dists/woody/Release</filename>. Es besteht aus einem einzelnen " -"mehrzeiligen Datensatz, der auf <emphasis>alle</emphasis> Pakete im " -"Verzeichnisbaum unterhalb des übergeordneten Verzeichnisses zutrifft. Anders " -"als die <filename>Packages</filename>-Datei sind nahezu alle Zeilen in einer " -"<filename>Release</filename>-Datei für das Setzen von APT-Prioritäten " -"relevant: <placeholder type=\"variablelist\" id=\"0\"/>" +"<filename>.../dists/woody/Release</filename>. Sie besteht aus einem " +"einzelnen mehrzeiligen Datensatz, der auf <emphasis>alle</emphasis> Pakete " +"im Verzeichnisbaum unterhalb des übergeordneten Verzeichnisses zutrifft. " +"Anders als die <filename>Packages</filename>-Datei sind nahezu alle Zeilen " +"in einer <filename>Release</filename>-Datei für das Setzen von " +"APT-Prioritäten relevant: <placeholder type=\"variablelist\" id=\"0\"/>" #. type: Content of: <refentry><refsect1><refsect2><para> #: apt_preferences.5.xml:454 @@ -8957,7 +8963,7 @@ msgid "" "more lines beginning with the word <literal>Explanation:</literal>. This " "provides a place for comments." msgstr "" -"Optional kann jeder Datensatz im der APT-Einstellungsdatei mit einer oder " +"Optional kann jeder Datensatz in der APT-Einstellungsdatei mit einer oder " "mehreren Zeilen beginnen, die mit dem Wort <literal>Explanation:</literal> " "anfangen. Dieses stellt einen Platz für Kommentare bereit." @@ -8995,7 +9001,7 @@ msgid "" "Pin-Priority: -10\n" msgstr "" "Explanation: Deinstallieren oder nicht installieren von anderen von Debian\n" -"Explanation: stammenden Paketversionen, als denen der Stable-Distribution\n" +"Explanation: stammenden Paketversionen als denen der Stable-Distribution\n" "Package: *\n" "Pin: release a=stable\n" "Pin-Priority: 900\n" @@ -9179,7 +9185,7 @@ msgid "" "Pin-Priority: -10\n" msgstr "" "Explanation: Deinstallieren oder nicht installieren von anderen von Debian\n" -"Explanation: stammenden Paketversionen, als denen der Squeeze- oder Sid-Distribution\n" +"Explanation: stammenden Paketversionen als denen der Squeeze- oder Sid-Distribution\n" "Package: *\n" "Pin: release n=squeeze\n" "Pin-Priority: 900\n" @@ -11372,33 +11378,3 @@ msgstr " # apt-get -o dir::cache::archives=\"/Platte/\" dist-upgrade" #: offline.sgml:234 msgid "Which will use the already fetched archives on the disc." msgstr "Es wird die bereits auf die Platte heruntergeladenen Archive benutzen." - -#~ msgid "" -#~ "<filename>apt.conf</filename> is the main configuration file for the APT " -#~ "suite of tools, all tools make use of the configuration file and a common " -#~ "command line parser to provide a uniform environment. When an APT tool " -#~ "starts up it will read the configuration specified by the " -#~ "<envar>APT_CONFIG</envar> environment variable (if any) and then read the " -#~ "files in <literal>Dir::Etc::Parts</literal> then read the main " -#~ "configuration file specified by <literal>Dir::Etc::main</literal> then " -#~ "finally apply the command line options to override the configuration " -#~ "directives, possibly loading even more config files." -#~ msgstr "" -#~ "<filename>apt.conf</filename> ist die Hauptkonfigurationsdatei für die " -#~ "APT-Werkzeugsammlung. Alle Werkzeuge benutzen die Konfigurationsdatei und " -#~ "einen gemeinsamen Befehlszeilenauswerter, um eine einheitliche Umgebung " -#~ "bereitzustellen. Wenn ein APT-Werkzeug startet, liest es die in der " -#~ "Umgebungsvariablen <envar>APT_CONFIG</envar> (falls vorhanden) angegebene " -#~ "Konfiguration, dann die Dateien in <literal>Dir::Etc::Parts</literal>, " -#~ "dann die durch <literal>Dir::Etc::main</literal> angegebene " -#~ "Konfigurationsdatei und übernimmt am Ende die Befehlszeilenoptionen, um " -#~ "Konfigurationsdirektiven zu überschreiben und möglicherweise sogar " -#~ "weitere Konfigurationsdateien zu laden." - -#~ msgid "<filename>/etc/apt/trusted.gpg</filename>" -#~ msgstr "<filename>/etc/apt/trusted.gpg</filename>" - -#~ msgid "Keyring of local trusted keys, new keys will be added here." -#~ msgstr "" -#~ "Schlüsselring der lokalen vertrauenswürdigen Schlüssel, neue Schlüssel " -#~ "werden hier hinzugefügt." -- cgit v1.2.3 From 4fb6fdaf95de3db51ef386de7b494ed4c889bedc Mon Sep 17 00:00:00 2001 From: David Kalnischkies <kalnischkies@gmail.com> Date: Fri, 26 Mar 2010 23:51:14 +0100 Subject: origin can be used to match a hostname (Closes: #352667) --- debian/changelog | 1 + doc/apt_preferences.5.xml | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f48cbf275..9bae5210e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,7 @@ apt (0.7.26) UNRELEASED; urgency=low - fix two typos and be more verbose in the novice warning. Thanks to Osamu Aoki for pointing it out! (Closes: #567669) - fix a=sid vs. n=sid typo, thanks Ansgar Burchardt! + - origin can be used to match a hostname (Closes: #352667) * apt-pkg/deb/dpkgpm.cc: - fix error message construction in OpenLog() - if available store the Commandline in the history diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index c4f18d90a..c927f327a 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -195,8 +195,15 @@ Pin: origin "" Pin-Priority: 999 </programlisting> -<simpara>A note of caution: the keyword used here is "<literal>origin</literal>". -This should not be confused with the Origin of a distribution as +<simpara>A note of caution: the keyword used here is "<literal>origin</literal>" +which can be used to match a hostname. The following record will assign a high priority +to all versions available from the server identified by the hostname "ftp.de.debian.org"</simpara> +<programlisting> +Package: * +Pin: origin "ftp.de.debian.org" +Pin-Priority: 999 +</programlisting> +<simpara>This should <emphasis>not</emphasis> be confused with the Origin of a distribution as specified in a <filename>Release</filename> file. What follows the "Origin:" tag in a <filename>Release</filename> file is not an Internet address but an author or vendor name, such as "Debian" or "Ximian".</simpara> -- cgit v1.2.3 From b569b4650c647c3aef5341c40d208a37211b57aa Mon Sep 17 00:00:00 2001 From: David Kalnischkies <kalnischkies@gmail.com> Date: Sat, 27 Mar 2010 00:01:34 +0100 Subject: remove wrong pin-priority is optional remark (Closes: #574944) --- debian/changelog | 1 + doc/apt_preferences.5.xml | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9bae5210e..17affee4f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -36,6 +36,7 @@ apt (0.7.26) UNRELEASED; urgency=low Thanks to Osamu Aoki for pointing it out! (Closes: #567669) - fix a=sid vs. n=sid typo, thanks Ansgar Burchardt! - origin can be used to match a hostname (Closes: #352667) + - remove wrong pin-priority is optional remark (Closes: #574944) * apt-pkg/deb/dpkgpm.cc: - fix error message construction in OpenLog() - if available store the Commandline in the history diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index c927f327a..77b7776e8 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -476,10 +476,6 @@ distribution.</para> <para>Each record in the APT preferences file can optionally begin with one or more lines beginning with the word <literal>Explanation:</literal>. This provides a place for comments.</para> - -<para>The <literal>Pin-Priority:</literal> line in each APT preferences record is -optional. If omitted, APT assigns a priority of 1 less than the last value -specified on a line beginning with <literal>Pin-Priority: release ...</literal>.</para> </refsect2> </refsect1> -- cgit v1.2.3 From 6dc60370a750334cb701386cfa4ef9719db9078a Mon Sep 17 00:00:00 2001 From: David Kalnischkies <kalnischkies@gmail.com> Date: Tue, 30 Mar 2010 12:38:38 +0200 Subject: replace every call to toupper with one to our own tolower_ascii This sounds like a premature optimization and since Mr. Knuth we all know that they are the root of all evil - but, and here it starts to be interesting: As the tolower_ascii method is by far the most called method we have (~60 Mio. times) and as we compare only strings containing ascii characters (package names, configuration options) using our own method reduces execution time of APT by 4% plus it avoids that the locale settings can influence us. --- apt-pkg/contrib/error.h | 8 ++++---- apt-pkg/contrib/macros.h | 10 ++++++---- apt-pkg/contrib/strutl.cc | 49 +++++++++++++++++++++++++---------------------- apt-pkg/contrib/strutl.h | 21 ++++++-------------- debian/changelog | 2 ++ 5 files changed, 44 insertions(+), 46 deletions(-) diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h index 90747ff7e..8d5ec05ea 100644 --- a/apt-pkg/contrib/error.h +++ b/apt-pkg/contrib/error.h @@ -60,13 +60,13 @@ class GlobalError public: // Call to generate an error from a library call. - bool Errno(const char *Function,const char *Description,...) __like_printf_2 __cold; - bool WarningE(const char *Function,const char *Description,...) __like_printf_2 __cold; + bool Errno(const char *Function,const char *Description,...) __like_printf(3) __cold; + bool WarningE(const char *Function,const char *Description,...) __like_printf(3) __cold; /* A warning should be considered less severe than an error, and may be ignored by the client. */ - bool Error(const char *Description,...) __like_printf_1 __cold; - bool Warning(const char *Description,...) __like_printf_1 __cold; + bool Error(const char *Description,...) __like_printf(2) __cold; + bool Warning(const char *Description,...) __like_printf(2) __cold; // Simple accessors inline bool PendingError() {return PendingFlag;}; diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h index c39caf198..62e7b65db 100644 --- a/apt-pkg/contrib/macros.h +++ b/apt-pkg/contrib/macros.h @@ -58,6 +58,7 @@ #if __GNUC__ >= 3 #define __must_check __attribute__ ((warn_unused_result)) #define __deprecated __attribute__ ((deprecated)) + #define __attrib_const __attribute__ ((__const__)) /* likely() and unlikely() can be used to mark boolean expressions as (not) likely true which will help the compiler to optimise */ #define likely(x) __builtin_expect (!!(x), 1) @@ -65,6 +66,7 @@ #else #define __must_check /* no warn_unused_result */ #define __deprecated /* no deprecated */ + #define __attrib_const /* no const attribute */ #define likely(x) (x) #define unlikely(x) (x) #endif @@ -72,17 +74,17 @@ // cold functions are unlikely() to be called #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4 #define __cold __attribute__ ((__cold__)) + #define __hot __attribute__ ((__hot__)) #else #define __cold /* no cold marker */ + #define __hot /* no hot marker */ #endif #ifdef __GNUG__ // Methods have a hidden this parameter that is visible to this attribute - #define __like_printf_1 __attribute__ ((format (printf, 2, 3))) - #define __like_printf_2 __attribute__ ((format (printf, 3, 4))) + #define __like_printf(n) __attribute__((format(printf, n, n + 1))) #else - #define __like_printf_1 /* no like-printf */ - #define __like_printf_2 /* no like-printf */ + #define __like_printf(n) /* no like-printf */ #endif #endif diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 1b9922a31..ab47cdede 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -566,7 +566,7 @@ int stringcmp(string::const_iterator A,string::const_iterator AEnd, int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd) { for (; A != AEnd && B != BEnd; A++, B++) - if (toupper(*A) != toupper(*B)) + if (tolower_ascii(*A) != tolower_ascii(*B)) break; if (A == AEnd && B == BEnd) @@ -575,7 +575,7 @@ int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd) return 1; if (B == BEnd) return -1; - if (toupper(*A) < toupper(*B)) + if (tolower_ascii(*A) < tolower_ascii(*B)) return -1; return 1; } @@ -584,7 +584,7 @@ int stringcasecmp(string::const_iterator A,string::const_iterator AEnd, const char *B,const char *BEnd) { for (; A != AEnd && B != BEnd; A++, B++) - if (toupper(*A) != toupper(*B)) + if (tolower_ascii(*A) != tolower_ascii(*B)) break; if (A == AEnd && B == BEnd) @@ -593,7 +593,7 @@ int stringcasecmp(string::const_iterator A,string::const_iterator AEnd, return 1; if (B == BEnd) return -1; - if (toupper(*A) < toupper(*B)) + if (tolower_ascii(*A) < tolower_ascii(*B)) return -1; return 1; } @@ -601,7 +601,7 @@ int stringcasecmp(string::const_iterator A,string::const_iterator AEnd, string::const_iterator B,string::const_iterator BEnd) { for (; A != AEnd && B != BEnd; A++, B++) - if (toupper(*A) != toupper(*B)) + if (tolower_ascii(*A) != tolower_ascii(*B)) break; if (A == AEnd && B == BEnd) @@ -610,7 +610,7 @@ int stringcasecmp(string::const_iterator A,string::const_iterator AEnd, return 1; if (B == BEnd) return -1; - if (toupper(*A) < toupper(*B)) + if (tolower_ascii(*A) < tolower_ascii(*B)) return -1; return 1; } @@ -789,28 +789,28 @@ bool ReadMessages(int Fd, vector<string> &List) // MonthConv - Converts a month string into a number /*{{{*/ // --------------------------------------------------------------------- /* This was lifted from the boa webserver which lifted it from 'wn-v1.07' - Made it a bit more robust with a few touppers though. */ + Made it a bit more robust with a few tolower_ascii though. */ static int MonthConv(char *Month) { - switch (toupper(*Month)) + switch (tolower_ascii(*Month)) { - case 'A': - return toupper(Month[1]) == 'P'?3:7; - case 'D': + case 'a': + return tolower_ascii(Month[1]) == 'p'?3:7; + case 'd': return 11; - case 'F': + case 'f': return 1; - case 'J': - if (toupper(Month[1]) == 'A') + case 'j': + if (tolower_ascii(Month[1]) == 'a') return 0; - return toupper(Month[2]) == 'N'?5:6; - case 'M': - return toupper(Month[2]) == 'R'?2:4; - case 'N': + return tolower_ascii(Month[2]) == 'n'?5:6; + case 'm': + return tolower_ascii(Month[2]) == 'r'?2:4; + case 'n': return 10; - case 'O': + case 'o': return 9; - case 'S': + case 's': return 8; // Pretend it is January.. @@ -1133,10 +1133,13 @@ char *safe_snprintf(char *Buffer,char *End,const char *Format,...) // tolower_ascii - tolower() function that ignores the locale /*{{{*/ // --------------------------------------------------------------------- -/* */ -int tolower_ascii(int c) +/* This little function is the most called method we have and tries + therefore to do the absolut minimum - and is noteable faster than + standard tolower/toupper and as a bonus avoids problems with different + locales - we only operate on ascii chars anyway. */ +int tolower_ascii(int const c) { - if (c >= 'A' and c <= 'Z') + if (c >= 'A' && c <= 'Z') return c + 32; return c; } diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index e72288f4c..cdf78f317 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -25,19 +25,12 @@ #include <iostream> #include <time.h> +#include "macros.h" + using std::string; using std::vector; using std::ostream; -#ifdef __GNUG__ -// Methods have a hidden this parameter that is visible to this attribute -#define APT_FORMAT2 __attribute__ ((format (printf, 2, 3))) -#define APT_FORMAT3 __attribute__ ((format (printf, 3, 4))) -#else -#define APT_FORMAT2 -#define APT_FORMAT3 -#endif - bool UTF8ToCodeset(const char *codeset, const string &orig, string *dest); char *_strstrip(char *String); char *_strtabexpand(char *String,size_t Len); @@ -60,11 +53,11 @@ bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length); bool TokSplitString(char Tok,char *Input,char **List, unsigned long ListMax); vector<string> ExplodeString(string const &haystack, char const &split); -void ioprintf(ostream &out,const char *format,...) APT_FORMAT2; -void strprintf(string &out,const char *format,...) APT_FORMAT2; -char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_FORMAT3; +void ioprintf(ostream &out,const char *format,...) __like_printf(2); +void strprintf(string &out,const char *format,...) __like_printf(2); +char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_printf(3); bool CheckDomainList(const string &Host, const string &List); -int tolower_ascii(int c); +int tolower_ascii(int const c) __attrib_const __hot; #define APT_MKSTRCMP(name,func) \ inline int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B+strlen(B));}; \ @@ -144,6 +137,4 @@ struct RxChoiceList unsigned long RegexChoice(RxChoiceList *Rxs,const char **ListBegin, const char **ListEnd); -#undef APT_FORMAT2 - #endif diff --git a/debian/changelog b/debian/changelog index 17affee4f..bd1fda316 100644 --- a/debian/changelog +++ b/debian/changelog @@ -60,6 +60,8 @@ apt (0.7.26) UNRELEASED; urgency=low * doc/po/de.po: - correct a few typos in the german manpage translation. Thanks to Chris Leick and Georg Koppen! (Closes: #574962) + * apt-pkg/contrib/strutl.cc: + - convert all toupper calls to tolower_ascii for a little speedup [ Julian Andres Klode ] * cmdline/apt-mark: -- cgit v1.2.3 From c408e01e546e641a0906f188ca6bb924a2f17b40 Mon Sep 17 00:00:00 2001 From: David Kalnischkies <kalnischkies@gmail.com> Date: Tue, 30 Mar 2010 12:39:33 +0200 Subject: Group packages in the same group together in the package list so it is easier to find them later on as we have no "noice" anymore between them. --- apt-pkg/pkgcache.cc | 17 +++++------------ apt-pkg/pkgcachegen.cc | 26 +++++++++++++++++--------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index fe8757ded..1bbd74bd9 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -343,24 +343,17 @@ pkgCache::PkgIterator pkgCache::GrpIterator::FindPkg(string Arch) { // GrpIterator::NextPkg - Locate the next package in the group /*{{{*/ // --------------------------------------------------------------------- /* Returns an End-Pointer on error, pointer to the package otherwise. - We can't simply ++ to the next as the list of packages includes - "package noise" (= packages with the same hash value but different name) */ + We can't simply ++ to the next as the next package of the last will + be from a different group (with the same hash value) */ pkgCache::PkgIterator pkgCache::GrpIterator::NextPkg(pkgCache::PkgIterator const &LastPkg) { if (unlikely(IsGood() == false || S->FirstPackage == 0 || LastPkg.end() == true)) return PkgIterator(*Owner, 0); - // Iterate over the list to find the next package - pkgCache::Package *Pkg = Owner->PkgP + LastPkg.Index(); - Pkg = Owner->PkgP + Pkg->NextPackage; - for (; Pkg != Owner->PkgP; Pkg = Owner->PkgP + Pkg->NextPackage) { - if (S->Name == Pkg->Name) - return PkgIterator(*Owner, Pkg); - if ((Owner->PkgP + S->LastPackage) == Pkg) - break; - } + if (S->LastPackage == LastPkg.Index()) + return PkgIterator(*Owner, 0); - return PkgIterator(*Owner, 0); + return PkgIterator(*Owner, Owner->PkgP + LastPkg->NextPackage); } /*}}}*/ // GrpIterator::operator ++ - Postfix incr /*{{{*/ diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 8187b3950..577e2f1d4 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -379,15 +379,23 @@ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg,const string &Name return false; Pkg = pkgCache::PkgIterator(Cache,Cache.PkgP + Package); - // Insert it into the hash table - unsigned long const Hash = Cache.Hash(Name); - Pkg->NextPackage = Cache.HeaderP->PkgHashTable[Hash]; - Cache.HeaderP->PkgHashTable[Hash] = Package; - - // remember the packages in the group - Grp->FirstPackage = Package; - if (Grp->LastPackage == 0) - Grp->LastPackage = Package; + // Insert the package into our package list + if (Grp->FirstPackage == 0) // the group is new + { + // Insert it into the hash table + unsigned long const Hash = Cache.Hash(Name); + Pkg->NextPackage = Cache.HeaderP->PkgHashTable[Hash]; + Cache.HeaderP->PkgHashTable[Hash] = Package; + Grp->FirstPackage = Package; + } + else // Group the Packages together + { + // this package is the new last package + pkgCache::PkgIterator LastPkg(Cache, Cache.PkgP + Grp->LastPackage); + Pkg->NextPackage = LastPkg->NextPackage; + LastPkg->NextPackage = Package; + } + Grp->LastPackage = Package; // Set the name, arch and the ID Pkg->Name = Grp->Name; -- cgit v1.2.3 From 3f42500d6b9eb318c46cacafdcfd6beb707ef9e9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies <kalnischkies@gmail.com> Date: Tue, 30 Mar 2010 14:25:57 +0200 Subject: rename ExplodeString to VectorizeString --- apt-pkg/aptconfiguration.cc | 2 +- apt-pkg/contrib/strutl.cc | 6 +++--- apt-pkg/contrib/strutl.h | 2 +- apt-pkg/deb/debmetaindex.cc | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index a1379ce7d..2acf8dd9f 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -221,7 +221,7 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All, const char *language_env = getenv("LANGUAGE") == 0 ? "" : getenv("LANGUAGE"); string envLang = Locale == 0 ? language_env : *(Locale+1); if (envLang.empty() == false) { - std::vector<string> env = ExplodeString(envLang,':'); + std::vector<string> env = VectorizeString(envLang,':'); short addedLangs = 0; // add a maximum of 3 fallbacks from the environment for (std::vector<string>::const_iterator e = env.begin(); e != env.end() && addedLangs < 3; ++e) { diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index ab47cdede..7eb986ac0 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1000,12 +1000,12 @@ bool TokSplitString(char Tok,char *Input,char **List, return true; } /*}}}*/ -// ExplodeString - Split a string up into a vector /*{{{*/ +// VectorizeString - Split a string up into a vector of strings /*{{{*/ // --------------------------------------------------------------------- /* This can be used to split a given string up into a vector, so the propose is the same as in the method above and this one is a bit slower - also, but the advantage is that we an iteratable vector */ -vector<string> ExplodeString(string const &haystack, char const &split) + also, but the advantage is that we have an iteratable vector */ +vector<string> VectorizeString(string const &haystack, char const &split) { string::const_iterator start = haystack.begin(); string::const_iterator end = start; diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index cdf78f317..d8070d3f5 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -52,7 +52,7 @@ bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0) bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length); bool TokSplitString(char Tok,char *Input,char **List, unsigned long ListMax); -vector<string> ExplodeString(string const &haystack, char const &split); +vector<string> VectorizeString(string const &haystack, char const &split) __attrib_const; void ioprintf(ostream &out,const char *format,...) __like_printf(2); void strprintf(string &out,const char *format,...) __like_printf(2); char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_printf(3); diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 947a7f04b..8df3ed18d 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -313,7 +313,7 @@ class debSLTypeDebian : public pkgSourceList::Type { map<string, string>::const_iterator const arch = Options.find("arch"); vector<string> const Archs = - (arch != Options.end()) ? ExplodeString(arch->second, ',') : + (arch != Options.end()) ? VectorizeString(arch->second, ',') : APT::Configuration::getArchitectures(); for (vector<metaIndex *>::const_iterator I = List.begin(); -- cgit v1.2.3 From 33dd02e3a95141d4e16677048614c3171c4c4ffc Mon Sep 17 00:00:00 2001 From: David Kalnischkies <kalnischkies@gmail.com> Date: Tue, 30 Mar 2010 14:45:38 +0200 Subject: convert some tabs to spaces to respect the style guide --- apt-pkg/deb/deblistparser.cc | 39 +++++----- apt-pkg/pkgcachegen.cc | 169 +++++++++++++++++++++++-------------------- 2 files changed, 109 insertions(+), 99 deletions(-) diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 947e060e3..0551a5f7c 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -36,8 +36,8 @@ static debListParser::WordList PrioList[] = {{"important",pkgCache::State::Impor we would accept in general with checkArchitecture() */ debListParser::debListParser(FileFd *File, string const &Arch) : Tags(File), Arch(Arch) { - if (Arch == "native") - this->Arch = _config->Find("APT::Architecture"); + if (Arch == "native") + this->Arch = _config->Find("APT::Architecture"); } /*}}}*/ // ListParser::UniqFindTagWrite - Find the tag and write a unq string /*{{{*/ @@ -56,10 +56,10 @@ unsigned long debListParser::UniqFindTagWrite(const char *Tag) // --------------------------------------------------------------------- /* This is to return the name of the package this section describes */ string debListParser::Package() { - string const Result = Section.FindS("Package"); - if(unlikely(Result.empty() == true)) - _error->Error("Encountered a section with no Package: header"); - return Result; + string const Result = Section.FindS("Package"); + if(unlikely(Result.empty() == true)) + _error->Error("Encountered a section with no Package: header"); + return Result; } /*}}}*/ // ListParser::Architecture - Return the package arch /*{{{*/ @@ -68,25 +68,26 @@ string debListParser::Package() { Note that architecture "all" packages will get the architecture of the Packages file parsed here. */ string debListParser::Architecture() { - string const Result = Section.FindS("Architecture"); - if (Result.empty() == true || Result == "all") { - if (Arch.empty() == true) - /* FIXME: this is a problem for installed arch all - packages as we don't know from which arch this - package was installed - and therefore which - dependency this package resolves. */ - return _config->Find("APT::Architecture"); - else - return Arch; - } - return Result; + string const Result = Section.FindS("Architecture"); + if (Result.empty() == true || Result == "all") + { + if (Arch.empty() == true) + /* FIXME: this is a problem for installed arch all + packages as we don't know from which arch this + package was installed - and therefore which + dependency this package resolves. */ + return _config->Find("APT::Architecture"); + else + return Arch; + } + return Result; } /*}}}*/ // ListParser::ArchitectureAll /*{{{*/ // --------------------------------------------------------------------- /* */ bool debListParser::ArchitectureAll() { - return Section.FindS("Architecture") == "all"; + return Section.FindS("Architecture") == "all"; } /*}}}*/ // ListParser::Version - Return the version string /*{{{*/ diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 577e2f1d4..21240b951 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -335,29 +335,30 @@ bool pkgCacheGenerator::MergeFileProvides(ListParser &List) // CacheGenerator::NewGroup - Add a new group /*{{{*/ // --------------------------------------------------------------------- /* This creates a new group structure and adds it to the hash table */ -bool pkgCacheGenerator::NewGroup(pkgCache::GrpIterator &Grp, const string &Name) { - Grp = Cache.FindGrp(Name); - if (Grp.end() == false) - return true; +bool pkgCacheGenerator::NewGroup(pkgCache::GrpIterator &Grp, const string &Name) +{ + Grp = Cache.FindGrp(Name); + if (Grp.end() == false) + return true; - // Get a structure - unsigned long const Group = Map.Allocate(sizeof(pkgCache::Group)); - if (unlikely(Group == 0)) - return false; + // Get a structure + unsigned long const Group = Map.Allocate(sizeof(pkgCache::Group)); + if (unlikely(Group == 0)) + return false; - Grp = pkgCache::GrpIterator(Cache, Cache.GrpP + Group); - Grp->Name = Map.WriteString(Name); - if (unlikely(Grp->Name == 0)) - return false; + Grp = pkgCache::GrpIterator(Cache, Cache.GrpP + Group); + Grp->Name = Map.WriteString(Name); + if (unlikely(Grp->Name == 0)) + return false; - // Insert it into the hash table - unsigned long const Hash = Cache.Hash(Name); - Grp->Next = Cache.HeaderP->GrpHashTable[Hash]; - Cache.HeaderP->GrpHashTable[Hash] = Group; + // Insert it into the hash table + unsigned long const Hash = Cache.Hash(Name); + Grp->Next = Cache.HeaderP->GrpHashTable[Hash]; + Cache.HeaderP->GrpHashTable[Hash] = Group; - Cache.HeaderP->GroupCount++; + Cache.HeaderP->GroupCount++; - return true; + return true; } /*}}}*/ // CacheGenerator::NewPackage - Add a new package /*{{{*/ @@ -526,68 +527,76 @@ map_ptrloc pkgCacheGenerator::NewDescription(pkgCache::DescIterator &Desc, // CacheGenerator::FinishCache - do various finish operations /*{{{*/ // --------------------------------------------------------------------- /* This prepares the Cache for delivery */ -bool pkgCacheGenerator::FinishCache(OpProgress &Progress) { - // FIXME: add progress reporting for this operation - // Do we have different architectures in your groups ? - vector<string> archs = APT::Configuration::getArchitectures(); - if (archs.size() > 1) { - // Create Conflicts in between the group - for (pkgCache::GrpIterator G = GetCache().GrpBegin(); G.end() != true; G++) { - string const PkgName = G.Name(); - for (pkgCache::PkgIterator P = G.PackageList(); P.end() != true; P = G.NextPkg(P)) { - if (strcmp(P.Arch(),"all") == 0) - continue; - pkgCache::PkgIterator allPkg; - for (pkgCache::VerIterator V = P.VersionList(); V.end() != true; V++) { - string const Arch = V.Arch(true); - map_ptrloc *OldDepLast = NULL; - /* MultiArch handling introduces a lot of implicit Dependencies: - - MultiArch: same → Co-Installable if they have the same version - - Architecture: all → Need to be Co-Installable for internal reasons - - All others conflict with all other group members */ - bool const coInstall = (V->MultiArch == pkgCache::Version::All || - V->MultiArch == pkgCache::Version::Same); - if (V->MultiArch == pkgCache::Version::All && allPkg.end() == true) - allPkg = G.FindPkg("all"); - for (vector<string>::const_iterator A = archs.begin(); A != archs.end(); ++A) { - if (*A == Arch) - continue; - /* We allow only one installed arch at the time - per group, therefore each group member conflicts - with all other group members */ - pkgCache::PkgIterator D = G.FindPkg(*A); - if (D.end() == true) - continue; - if (coInstall == true) { - // Replaces: ${self}:other ( << ${binary:Version}) - NewDepends(D, V, V.VerStr(), - pkgCache::Dep::Less, pkgCache::Dep::Replaces, - OldDepLast); - // Breaks: ${self}:other (!= ${binary:Version}) - NewDepends(D, V, V.VerStr(), - pkgCache::Dep::Less, pkgCache::Dep::DpkgBreaks, - OldDepLast); - NewDepends(D, V, V.VerStr(), - pkgCache::Dep::Greater, pkgCache::Dep::DpkgBreaks, - OldDepLast); - if (V->MultiArch == pkgCache::Version::All) { - // Depend on ${self}:all which does depend on nothing - NewDepends(allPkg, V, V.VerStr(), - pkgCache::Dep::Equals, pkgCache::Dep::Depends, - OldDepLast); - } - } else { - // Conflicts: ${self}:other - NewDepends(D, V, "", - pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts, - OldDepLast); - } - } - } - } - } - } - return true; +bool pkgCacheGenerator::FinishCache(OpProgress &Progress) +{ + // FIXME: add progress reporting for this operation + // Do we have different architectures in your groups ? + vector<string> archs = APT::Configuration::getArchitectures(); + if (archs.size() > 1) + { + // Create Conflicts in between the group + for (pkgCache::GrpIterator G = GetCache().GrpBegin(); G.end() != true; G++) + { + string const PkgName = G.Name(); + for (pkgCache::PkgIterator P = G.PackageList(); P.end() != true; P = G.NextPkg(P)) + { + if (strcmp(P.Arch(),"all") == 0) + continue; + pkgCache::PkgIterator allPkg; + for (pkgCache::VerIterator V = P.VersionList(); V.end() != true; V++) + { + string const Arch = V.Arch(true); + map_ptrloc *OldDepLast = NULL; + /* MultiArch handling introduces a lot of implicit Dependencies: + - MultiArch: same → Co-Installable if they have the same version + - Architecture: all → Need to be Co-Installable for internal reasons + - All others conflict with all other group members */ + bool const coInstall = (V->MultiArch == pkgCache::Version::All || + V->MultiArch == pkgCache::Version::Same); + if (V->MultiArch == pkgCache::Version::All && allPkg.end() == true) + allPkg = G.FindPkg("all"); + for (vector<string>::const_iterator A = archs.begin(); A != archs.end(); ++A) + { + if (*A == Arch) + continue; + /* We allow only one installed arch at the time + per group, therefore each group member conflicts + with all other group members */ + pkgCache::PkgIterator D = G.FindPkg(*A); + if (D.end() == true) + continue; + if (coInstall == true) + { + // Replaces: ${self}:other ( << ${binary:Version}) + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::Less, pkgCache::Dep::Replaces, + OldDepLast); + // Breaks: ${self}:other (!= ${binary:Version}) + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::Less, pkgCache::Dep::DpkgBreaks, + OldDepLast); + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::Greater, pkgCache::Dep::DpkgBreaks, + OldDepLast); + if (V->MultiArch == pkgCache::Version::All) + { + // Depend on ${self}:all which does depend on nothing + NewDepends(allPkg, V, V.VerStr(), + pkgCache::Dep::Equals, pkgCache::Dep::Depends, + OldDepLast); + } + } else { + // Conflicts: ${self}:other + NewDepends(D, V, "", + pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts, + OldDepLast); + } + } + } + } + } + } + return true; } /*}}}*/ // CacheGenerator::NewDepends - Create a dependency element /*{{{*/ -- cgit v1.2.3 From e84adb76c87f419ed5bad8f7d08a4132de2bc406 Mon Sep 17 00:00:00 2001 From: David Kalnischkies <kalnischkies@gmail.com> Date: Tue, 30 Mar 2010 17:47:19 +0200 Subject: try version match in FindSrc first exact than fuzzy (LP: #551178) --- cmdline/apt-get.cc | 32 +++++++++++++++++++++----------- debian/changelog | 1 + 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 7875ae20f..5af2dca04 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1291,12 +1291,26 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, { if(VerTag.empty() == false || DefRel.empty() == false) { + bool fuzzy = false; // we have a default release, try to locate the pkg. we do it like // this because GetCandidateVer() will not "downgrade", that means // "apt-get source -t stable apt" won't work on a unstable system - for (pkgCache::VerIterator Ver = Pkg.VersionList(); - Ver.end() == false; Ver++) + for (pkgCache::VerIterator Ver = Pkg.VersionList();; Ver++) { + // try first only exact matches, later fuzzy matches + if (Ver.end() == true) + { + if (fuzzy == true) + break; + fuzzy = true; + Ver = Pkg.VersionList(); + } + // We match against a concrete version (or a part of this version) + if (VerTag.empty() == false && + (fuzzy == true || Cache.VS().CmpVersion(VerTag, Ver.VerStr()) != 0) && // exact match + (fuzzy == false || strncmp(VerTag.c_str(), Ver.VerStr(), VerTag.size()) != 0)) // fuzzy match + continue; + for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; VF++) { @@ -1309,10 +1323,6 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, pkgCache::Flag::NotSource && Pkg.CurrentVer() != Ver) continue; - // We match against a concrete version (or a part of this version) - if (VerTag.empty() == false && strncmp(VerTag.c_str(), Ver.VerStr(), VerTag.size()) != 0) - continue; - // or we match against a release if(VerTag.empty() == false || (VF.File().Archive() != 0 && VF.File().Archive() == DefRel) || @@ -1323,10 +1333,9 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, // no SourcePkg name, so it is the "binary" name if (Src.empty() == true) Src = TmpSrc; - // no Version, so we try the Version of the SourcePkg - - // and after that the version of the binary package - if (VerTag.empty() == true) - VerTag = Parse.SourceVer(); + // the Version we have is possibly fuzzy or includes binUploads, + // so we use the Version of the SourcePkg (empty if same as package) + VerTag = Parse.SourceVer(); if (VerTag.empty() == true) VerTag = Ver.VerStr(); break; @@ -1390,7 +1399,8 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, const string Ver = Parse->Version(); // Ignore all versions which doesn't fit - if (VerTag.empty() == false && strncmp(VerTag.c_str(), Ver.c_str(), VerTag.size()) != 0) + if (VerTag.empty() == false && + Cache.VS().CmpVersion(VerTag, Ver) != 0) // exact match continue; // Newer version or an exact match? Save the hit diff --git a/debian/changelog b/debian/changelog index bd1fda316..61a4dc618 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,6 +43,7 @@ apt (0.7.26) UNRELEASED; urgency=low * cmdline/apt-get.cc: - add a --only-upgrade flag to install command (Closes: #572259) - fix memory leaks in error conditions in DoSource() + - try version match in FindSrc first exact than fuzzy (LP: #551178) * apt-pkg/contrib/cmndline.cc: - save Commandline in Commandline::AsString for logging * apt-pkg/deb/debversion.cc: -- cgit v1.2.3 From 436d7eab92bb8f9cc6498acfbf2055e717be6fd0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies <kalnischkies@gmail.com> Date: Wed, 31 Mar 2010 17:19:10 +0200 Subject: Userinfo is urlencoded in URIs (RFC 3986) Thanks to Jean-Baptiste Lallement for spotting and fixing it! * apt-pkg/contrib/strutl.cc: - always escape '%' (LP: #130289) (Closes: #500560) - unescape '%' sequence only if followed by 2 hex digit - username/password are urlencoded in proxy string (RFC 3986) --- apt-pkg/contrib/strutl.cc | 21 +++++++++++++++------ apt-pkg/contrib/strutl.h | 1 + debian/changelog | 6 ++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 7eb986ac0..c7d63ce8a 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -198,7 +198,8 @@ bool ParseQuoteWord(const char *&String,string &Res) char *I; for (I = Buffer; I < Buffer + sizeof(Buffer) && Start != C; I++) { - if (*Start == '%' && Start + 2 < C) + if (*Start == '%' && Start + 2 < C && + isxdigit(Start[1]) && isxdigit(Start[2])) { Tmp[0] = Start[1]; Tmp[1] = Start[2]; @@ -273,7 +274,8 @@ string QuoteString(const string &Str, const char *Bad) for (string::const_iterator I = Str.begin(); I != Str.end(); I++) { if (strchr(Bad,*I) != 0 || isprint(*I) == 0 || - *I <= 0x20 || *I >= 0x7F) + *I == 0x25 || // percent '%' char + *I <= 0x20 || *I >= 0x7F) // control chars { char Buf[10]; sprintf(Buf,"%%%02x",(int)*I); @@ -289,11 +291,17 @@ string QuoteString(const string &Str, const char *Bad) // --------------------------------------------------------------------- /* This undoes QuoteString */ string DeQuoteString(const string &Str) +{ + return DeQuoteString(Str.begin(),Str.end()); +} +string DeQuoteString(string::const_iterator const &begin, + string::const_iterator const &end) { string Res; - for (string::const_iterator I = Str.begin(); I != Str.end(); I++) + for (string::const_iterator I = begin; I != end; I++) { - if (*I == '%' && I + 2 < Str.end()) + if (*I == '%' && I + 2 < end && + isxdigit(I[1]) && isxdigit(I[2])) { char Tmp[3]; Tmp[0] = I[1]; @@ -1238,9 +1246,10 @@ void URI::CopyFrom(const string &U) else { Host.assign(At+1,SingleSlash); - User.assign(FirstColon,SecondColon); + // username and password must be encoded (RFC 3986) + User.assign(DeQuoteString(FirstColon,SecondColon)); if (SecondColon < At) - Password.assign(SecondColon+1,At); + Password.assign(DeQuoteString(SecondColon+1,At)); } // Now we parse the RFC 2732 [] hostnames. diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index d8070d3f5..e509145f9 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -38,6 +38,7 @@ bool ParseQuoteWord(const char *&String,string &Res); bool ParseCWord(const char *&String,string &Res); string QuoteString(const string &Str,const char *Bad); string DeQuoteString(const string &Str); +string DeQuoteString(string::const_iterator const &begin, string::const_iterator const &end); string SizeToStr(double Bytes); string TimeToStr(unsigned long Sec); string Base64Encode(const string &Str); diff --git a/debian/changelog b/debian/changelog index 61a4dc618..205db85e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -64,6 +64,12 @@ apt (0.7.26) UNRELEASED; urgency=low * apt-pkg/contrib/strutl.cc: - convert all toupper calls to tolower_ascii for a little speedup + [ Jean-Baptiste Lallement ] + * apt-pkg/contrib/strutl.cc: + - always escape '%' (LP: #130289) (Closes: #500560) + - unescape '%' sequence only if followed by 2 hex digit + - username/password are urlencoded in proxy string (RFC 3986) + [ Julian Andres Klode ] * cmdline/apt-mark: - Use the new python-apt API (and conflict with python-apt << 0.7.93.2). -- cgit v1.2.3