From 4cbf323fabcc44946001a215c224ce5b080519ca Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 30 Jul 2010 17:40:01 +0200 Subject: * apt-pkg/pkgcache.cc: - re-evaluate the architectures cache when the cache is (re)opened --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 33bd66b1c..cd0f4d7f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.7.26~exp13) UNRELEASEDexperimental; urgency=low + + [ Michael Vogt ] + * apt-pkg/pkgcache.cc: + - re-evaluate the architectures cache when the cache is (re)opened + + -- Michael Vogt Fri, 30 Jul 2010 17:37:14 +0200 + apt (0.7.26~exp12) experimental; urgency=low [ Michael Vogt ] -- cgit v1.2.3-70-g09d2 From 73dfa041545d34b79a4dd25a0baa3e64f5564a62 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 2 Aug 2010 21:02:01 +0200 Subject: * apt-pkg/cdrom.cc: - fix off-by-one error in DropBinaryArch --- apt-pkg/cdrom.cc | 2 +- debian/changelog | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index e3e0027fc..0e36f44a2 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -229,7 +229,7 @@ bool pkgCdrom::DropBinaryArch(vector &List) // Between Start and End is the architecture Start += 8; if ((End = strstr(Start,"/")) != 0 && Start != End && - APT::Configuration::checkArchitecture(string(Start, --End)) == true) + APT::Configuration::checkArchitecture(string(Start, End)) == true) continue; // okay, architecture is accepted // not accepted -> Erase it diff --git a/debian/changelog b/debian/changelog index cd0f4d7f6..1d76736a3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,10 @@ apt (0.7.26~exp13) UNRELEASEDexperimental; urgency=low * apt-pkg/pkgcache.cc: - re-evaluate the architectures cache when the cache is (re)opened + [ Colin Watson ] + * apt-pkg/cdrom.cc: + - fix off-by-one error in DropBinaryArch + -- Michael Vogt Fri, 30 Jul 2010 17:37:14 +0200 apt (0.7.26~exp12) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From 736f67512b4c2c8069011116217a6ffdcd374500 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 6 Aug 2010 23:33:55 +0200 Subject: * apt-pkg/depcache.cc: - Only try upgrade for Breaks if there is a newer version, otherwise handle it as Conflicts (by removing it) (helps for #591881). --- apt-pkg/depcache.cc | 9 ++++++--- debian/changelog | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index bc663a8e9..043185dbc 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1425,10 +1425,13 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, VerIterator Ver(*this,*I); PkgIterator Pkg = Ver.ParentPkg(); - if (Start->Type != Dep::DpkgBreaks) - MarkDelete(Pkg,false,Depth + 1, false); - else if (PkgState[Pkg->ID].CandidateVer != *I) + + + if (PkgState[Pkg->ID].CandidateVer != *I && + Start->Type == Dep::DpkgBreaks) MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps); + else + MarkDelete(Pkg,false,Depth + 1, false); } continue; } diff --git a/debian/changelog b/debian/changelog index 1d76736a3..4e453040f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,11 @@ apt (0.7.26~exp13) UNRELEASEDexperimental; urgency=low * apt-pkg/cdrom.cc: - fix off-by-one error in DropBinaryArch + [ Julian Andres Klode ] + * apt-pkg/depcache.cc: + - Only try upgrade for Breaks if there is a newer version, otherwise + handle it as Conflicts (by removing it) (helps for #591881). + -- Michael Vogt Fri, 30 Jul 2010 17:37:14 +0200 apt (0.7.26~exp12) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From beeaac3e93818e1d3434ca46d2e98f9a3250eeaa Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 7 Aug 2010 00:34:49 +0200 Subject: Fix changelog. --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4e453040f..af6eeb9ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,7 +11,7 @@ apt (0.7.26~exp13) UNRELEASEDexperimental; urgency=low [ Julian Andres Klode ] * apt-pkg/depcache.cc: - Only try upgrade for Breaks if there is a newer version, otherwise - handle it as Conflicts (by removing it) (helps for #591881). + handle it as Conflicts (by removing it) (helps for #591882). -- Michael Vogt Fri, 30 Jul 2010 17:37:14 +0200 -- cgit v1.2.3-70-g09d2 From c6391a3bb2352abd011435e5122479344b0edf0e Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 7 Aug 2010 16:16:12 +0200 Subject: * debian/control: - Add dependency on gnupg to apt, apt-key uses it. --- debian/changelog | 2 ++ debian/control | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index af6eeb9ea..1927ef898 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ apt (0.7.26~exp13) UNRELEASEDexperimental; urgency=low * apt-pkg/depcache.cc: - Only try upgrade for Breaks if there is a newer version, otherwise handle it as Conflicts (by removing it) (helps for #591882). + * debian/control: + - Add dependency on gnupg to apt, apt-key uses it. -- Michael Vogt Fri, 30 Jul 2010 17:37:14 +0200 diff --git a/debian/control b/debian/control index dba0933b1..f03b96f67 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/ Package: apt Architecture: any -Depends: ${shlibs:Depends}, debian-archive-keyring, ${misc:Depends} +Depends: ${shlibs:Depends}, debian-archive-keyring, ${misc:Depends}, gnupg Replaces: manpages-pl (<< 20060617-3~) Provides: ${libapt-pkg:provides} Conflicts: python-apt (<< 0.7.93.2~) -- cgit v1.2.3-70-g09d2 From 4a9db82795a64fce22128f8dc06596421ce2d865 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 10 Aug 2010 14:53:12 +0200 Subject: apt-pkg/contrib/fileutl.cc: Add WriteAtomic mode. --- apt-pkg/contrib/fileutl.cc | 2 ++ apt-pkg/contrib/fileutl.h | 3 ++- debian/changelog | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 2a3b8a87d..f86bf2942 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -669,6 +669,7 @@ bool FileFd::Open(string FileName,OpenMode Mode, unsigned long Perms) } break; + case WriteAtomic: case WriteEmpty: { Flags |= Replace; @@ -678,6 +679,7 @@ bool FileFd::Open(string FileName,OpenMode Mode, unsigned long Perms) free(name); break; } + case WriteExists: iFd = open(FileName.c_str(),O_RDWR); diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 62705478d..cb4655798 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -46,7 +46,8 @@ class FileFd gzFile gz; public: - enum OpenMode {ReadOnly,WriteEmpty,WriteExists,WriteAny,WriteTemp,ReadOnlyGzip}; + enum OpenMode {ReadOnly,WriteEmpty,WriteExists,WriteAny,WriteTemp,ReadOnlyGzip, + WriteAtomic}; inline bool Read(void *To,unsigned long Size,bool AllowEof) { diff --git a/debian/changelog b/debian/changelog index 1927ef898..9f3d1df85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ apt (0.7.26~exp13) UNRELEASEDexperimental; urgency=low - fix off-by-one error in DropBinaryArch [ Julian Andres Klode ] + * apt-pkg/contrib/fileutl.cc: + - Add WriteAtomic mode. * apt-pkg/depcache.cc: - Only try upgrade for Breaks if there is a newer version, otherwise handle it as Conflicts (by removing it) (helps for #591882). -- cgit v1.2.3-70-g09d2 From fc81e8f2deff3b86738cad78aa491b1b514b3c59 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 10 Aug 2010 14:55:36 +0200 Subject: apt-pkg/contrib/fileutl.cc: Revert WriteEmpty to old behavior (LP: #613211) --- apt-pkg/contrib/fileutl.cc | 9 ++++++++- debian/changelog | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index f86bf2942..91aecee65 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -670,7 +670,6 @@ bool FileFd::Open(string FileName,OpenMode Mode, unsigned long Perms) break; case WriteAtomic: - case WriteEmpty: { Flags |= Replace; char *name = strdup((FileName + ".XXXXXX").c_str()); @@ -680,6 +679,14 @@ bool FileFd::Open(string FileName,OpenMode Mode, unsigned long Perms) break; } + case WriteEmpty: + { + struct stat Buf; + if (lstat(FileName.c_str(),&Buf) == 0 && S_ISLNK(Buf.st_mode)) + unlink(FileName.c_str()); + iFd = open(FileName.c_str(),O_RDWR | O_CREAT | O_TRUNC,Perms); + break; + } case WriteExists: iFd = open(FileName.c_str(),O_RDWR); diff --git a/debian/changelog b/debian/changelog index 9f3d1df85..0f3d0d499 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ apt (0.7.26~exp13) UNRELEASEDexperimental; urgency=low [ Julian Andres Klode ] * apt-pkg/contrib/fileutl.cc: - Add WriteAtomic mode. + - Revert WriteEmpty to old behavior (LP: #613211) * apt-pkg/depcache.cc: - Only try upgrade for Breaks if there is a newer version, otherwise handle it as Conflicts (by removing it) (helps for #591882). -- cgit v1.2.3-70-g09d2 From 22041bd2864b8d0b401b45dde9eda4003a11fec4 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 10 Aug 2010 14:59:56 +0200 Subject: apt-pkg, methods: Convert users of WriteEmpty to WriteAtomic. --- apt-pkg/depcache.cc | 2 +- apt-pkg/indexcopy.cc | 6 +++--- apt-pkg/pkgcachegen.cc | 4 ++-- debian/changelog | 2 ++ methods/bzip2.cc | 2 +- methods/copy.cc | 2 +- methods/gzip.cc | 2 +- methods/rred.cc | 4 ++-- 8 files changed, 13 insertions(+), 11 deletions(-) (limited to 'debian') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 043185dbc..00bf68af1 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -227,7 +227,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ // if it does not exist, create a empty one if(!FileExists(state)) { - StateFile.Open(state, FileFd::WriteEmpty); + StateFile.Open(state, FileFd::WriteAtomic); StateFile.Close(); } diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 621c18716..b4e587d7b 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -134,7 +134,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List, TargetF += URItoFileName(S); if (_config->FindB("APT::CDROM::NoAct",false) == true) TargetF = "/dev/null"; - FileFd Target(TargetF,FileFd::WriteEmpty); + FileFd Target(TargetF,FileFd::WriteAtomic); FILE *TargetFl = fdopen(dup(Target.Fd()),"w"); if (_error->PendingError() == true) return false; @@ -565,7 +565,7 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName, /*{{{*/ FileFd Target; FileFd Rel; - Target.Open(TargetF,FileFd::WriteEmpty); + Target.Open(TargetF,FileFd::WriteAtomic); Rel.Open(prefix + file,FileFd::ReadOnly); if (_error->PendingError() == true) return false; @@ -840,7 +840,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ TargetF += URItoFileName(S); if (_config->FindB("APT::CDROM::NoAct",false) == true) TargetF = "/dev/null"; - FileFd Target(TargetF,FileFd::WriteEmpty); + FileFd Target(TargetF,FileFd::WriteAtomic); FILE *TargetFl = fdopen(dup(Target.Fd()),"w"); if (_error->PendingError() == true) return false; diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index c9a9a753c..ed35174bb 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -1192,7 +1192,7 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress if (Writeable == true && CacheFile.empty() == false) { unlink(CacheFile.c_str()); - CacheF = new FileFd(CacheFile,FileFd::WriteEmpty); + CacheF = new FileFd(CacheFile,FileFd::WriteAtomic); fchmod(CacheF->Fd(),0644); Map = CreateDynamicMMap(CacheF, MMap::Public); if (_error->PendingError() == true) @@ -1254,7 +1254,7 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress // Write it back if (Writeable == true && SrcCacheFile.empty() == false) { - FileFd SCacheF(SrcCacheFile,FileFd::WriteEmpty); + FileFd SCacheF(SrcCacheFile,FileFd::WriteAtomic); if (_error->PendingError() == true) return false; diff --git a/debian/changelog b/debian/changelog index 0f3d0d499..6945b48f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ apt (0.7.26~exp13) UNRELEASEDexperimental; urgency=low * apt-pkg/contrib/fileutl.cc: - Add WriteAtomic mode. - Revert WriteEmpty to old behavior (LP: #613211) + * apt-pkg, methods: + - Convert users of WriteEmpty to WriteAtomic. * apt-pkg/depcache.cc: - Only try upgrade for Breaks if there is a newer version, otherwise handle it as Conflicts (by removing it) (helps for #591882). diff --git a/methods/bzip2.cc b/methods/bzip2.cc index 5da214bfc..19e49828e 100644 --- a/methods/bzip2.cc +++ b/methods/bzip2.cc @@ -91,7 +91,7 @@ bool Bzip2Method::Fetch(FetchItem *Itm) close(GzOut[1]); FileFd FromGz(GzOut[0]); // For autoclose - FileFd To(Itm->DestFile,FileFd::WriteEmpty); + FileFd To(Itm->DestFile,FileFd::WriteAtomic); To.EraseOnFailure(); if (_error->PendingError() == true) return false; diff --git a/methods/copy.cc b/methods/copy.cc index 027b59f46..a6bb372a3 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -52,7 +52,7 @@ bool CopyMethod::Fetch(FetchItem *Itm) // See if the file exists FileFd From(File,FileFd::ReadOnly); - FileFd To(Itm->DestFile,FileFd::WriteEmpty); + FileFd To(Itm->DestFile,FileFd::WriteAtomic); To.EraseOnFailure(); if (_error->PendingError() == true) { diff --git a/methods/gzip.cc b/methods/gzip.cc index 72e3ac909..5b9b66b50 100644 --- a/methods/gzip.cc +++ b/methods/gzip.cc @@ -55,7 +55,7 @@ bool GzipMethod::Fetch(FetchItem *Itm) return true; } - FileFd To(Itm->DestFile,FileFd::WriteEmpty); + FileFd To(Itm->DestFile,FileFd::WriteAtomic); To.EraseOnFailure(); if (_error->PendingError() == true) return false; diff --git a/methods/rred.cc b/methods/rred.cc index f42c7a072..d51c45c85 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -446,7 +446,7 @@ bool RredMethod::Fetch(FetchItem *Itm) /*{{{*/ // the cleanup/closing of the fds) FileFd From(Path,FileFd::ReadOnly); FileFd Patch(Path+".ed",FileFd::ReadOnly); - FileFd To(Itm->DestFile,FileFd::WriteEmpty); + FileFd To(Itm->DestFile,FileFd::WriteAtomic); To.EraseOnFailure(); if (_error->PendingError() == true) return false; @@ -458,7 +458,7 @@ bool RredMethod::Fetch(FetchItem *Itm) /*{{{*/ // retry with patchFile lseek(Patch.Fd(), 0, SEEK_SET); lseek(From.Fd(), 0, SEEK_SET); - To.Open(Itm->DestFile,FileFd::WriteEmpty); + To.Open(Itm->DestFile,FileFd::WriteAtomic); if (_error->PendingError() == true) return false; if (patchFile(Patch, From, To, &Hash) != ED_OK) { -- cgit v1.2.3-70-g09d2 From 47f6d1b72bc883ecdc00542da4c824a5c4fb79fa Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 10 Aug 2010 15:58:09 +0200 Subject: * apt-pkg/algorithms.cc: - change the debug outputs to display also arch of the package and version dependencies information --- apt-pkg/algorithms.cc | 74 ++++++++++++++++++++++++------------------------ apt-pkg/cacheiterators.h | 3 ++ apt-pkg/pkgcache.cc | 24 ++++++++++++++++ debian/changelog | 7 ++++- 4 files changed, 70 insertions(+), 38 deletions(-) (limited to 'debian') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index f17c76d6c..12c5b8710 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -58,7 +58,7 @@ void pkgSimulate::Describe(PkgIterator Pkg,ostream &out,bool Current,bool Candid { VerIterator Ver(Sim); - out << Pkg.Name(); + out << Pkg.FullName(true); if (Current == true) { @@ -123,9 +123,9 @@ bool pkgSimulate::Install(PkgIterator iPkg,string /*File*/) { if ((Sim[End] & pkgDepCache::DepGInstall) == 0) { - cout << " [" << I.Name() << " on " << Start.TargetPkg().Name() << ']'; + cout << " [" << I.FullName(false) << " on " << Start.TargetPkg().FullName(false) << ']'; if (Start->Type == pkgCache::Dep::Conflicts) - _error->Error("Fatal, conflicts violated %s",I.Name()); + _error->Error("Fatal, conflicts violated %s",I.FullName(false).c_str()); } } } @@ -165,7 +165,7 @@ bool pkgSimulate::Configure(PkgIterator iPkg) // Sim.MarkInstall(Pkg,false); if (Sim[Pkg].InstBroken() == true) { - cout << "Conf " << Pkg.Name() << " broken" << endl; + cout << "Conf " << Pkg.FullName(false) << " broken" << endl; Sim.Update(); @@ -177,17 +177,17 @@ bool pkgSimulate::Configure(PkgIterator iPkg) continue; if (D->Type == pkgCache::Dep::Obsoletes) - cout << " Obsoletes:" << D.TargetPkg().Name(); + cout << " Obsoletes:" << D.TargetPkg().FullName(false); else if (D->Type == pkgCache::Dep::Conflicts) - cout << " Conflicts:" << D.TargetPkg().Name(); + cout << " Conflicts:" << D.TargetPkg().FullName(false); else if (D->Type == pkgCache::Dep::DpkgBreaks) - cout << " Breaks:" << D.TargetPkg().Name(); + cout << " Breaks:" << D.TargetPkg().FullName(false); else - cout << " Depends:" << D.TargetPkg().Name(); + cout << " Depends:" << D.TargetPkg().FullName(false); } cout << endl; - _error->Error("Conf Broken %s",Pkg.Name()); + _error->Error("Conf Broken %s",Pkg.FullName(false)); } else { @@ -254,7 +254,7 @@ void pkgSimulate::ShortBreaks() if (Sim[I].InstBroken() == true) { if (Flags[I->ID] == 0) - cout << I.Name() << ' '; + cout << I.FullName(false) << ' '; /* else cout << I.Name() << "! ";*/ } @@ -290,7 +290,7 @@ bool pkgApplyStatus(pkgDepCache &Cache) Cache.MarkInstall(I, false, 0, false); else return _error->Error(_("The package %s needs to be reinstalled, " - "but I can't find an archive for it."),I.Name()); + "but I can't find an archive for it."),I.FullName(true)); } continue; @@ -325,7 +325,7 @@ bool pkgApplyStatus(pkgDepCache &Cache) default: if (I->InstState != pkgCache::State::Ok) return _error->Error("The package %s is not ok and I " - "don't know how to fix it!",I.Name()); + "don't know how to fix it!",I.FullName(false)); } } return true; @@ -709,7 +709,7 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) if ((Flags[P->ID] & Protected) == Protected) { if (Debug == true) - clog << " Reinst Failed because of protected " << P.Name() << endl; + clog << " Reinst Failed because of protected " << P.FullName(false) << endl; Fail = true; } else @@ -720,7 +720,7 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) if (DoUpgrade(P) == false) { if (Debug == true) - clog << " Reinst Failed because of " << P.Name() << endl; + clog << " Reinst Failed because of " << P.FullName(false) << endl; Fail = true; } else @@ -739,7 +739,7 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) break; if (Debug == true) - clog << " Reinst Failed early because of " << Start.TargetPkg().Name() << endl; + clog << " Reinst Failed early because of " << Start.TargetPkg().FullName(false) << endl; Fail = true; } } @@ -763,7 +763,7 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) } if (Debug == true) - clog << " Re-Instated " << Pkg.Name() << endl; + clog << " Re-Instated " << Pkg.FullName(false) << endl; return true; } /*}}}*/ @@ -863,7 +863,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) (Flags[I->ID] & ReInstateTried) == 0) { if (Debug == true) - clog << " Try to Re-Instate " << I.Name() << endl; + clog << " Try to Re-Instate " << I.FullName(false) << endl; unsigned long OldBreaks = Cache.BrokenCount(); pkgCache::Version *OldVer = Cache[I].InstallVer; Flags[I->ID] &= ReInstateTried; @@ -879,14 +879,14 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) } else if (Debug == true) - clog << "Re-Instated " << I.Name() << " (" << OldBreaks << " vs " << Cache.BrokenCount() << ')' << endl; + clog << "Re-Instated " << I.FullName(false) << " (" << OldBreaks << " vs " << Cache.BrokenCount() << ')' << endl; } if (Cache[I].InstallVer == 0 || Cache[I].InstBroken() == false) continue; if (Debug == true) - clog << "Investigating " << I.Name() << endl; + clog << "Investigating " << I << endl; // Isolate the problem dependency PackageKill KillList[100]; @@ -911,7 +911,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if ((Flags[I->ID] & Protected) != Protected) { if (Debug == true) - clog << " Or group remove for " << I.Name() << endl; + clog << " Or group remove for " << I.FullName(false) << endl; Cache.MarkDelete(I); Change = true; } @@ -919,7 +919,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (OldEnd == LEnd && OrOp == OrKeep) { if (Debug == true) - clog << " Or group keep for " << I.Name() << endl; + clog << " Or group keep for " << I.FullName(false) << endl; Cache.MarkKeep(I, false, false); Change = true; } @@ -956,7 +956,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) } if (Debug == true) - clog << "Package " << I.Name() << " has broken " << Start.DepType() << " on " << Start.TargetPkg().Name() << endl; + clog << "Broken " << Start << endl; /* Look across the version list. If there are no possible targets then we keep the package and bail. This is necessary @@ -987,8 +987,8 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) pkgCache::PkgIterator Pkg = Ver.ParentPkg(); if (Debug == true) - clog << " Considering " << Pkg.Name() << ' ' << (int)Scores[Pkg->ID] << - " as a solution to " << I.Name() << ' ' << (int)Scores[I->ID] << endl; + clog << " Considering " << Pkg.FullName(false) << ' ' << (int)Scores[Pkg->ID] << + " as a solution to " << I.FullName(false) << ' ' << (int)Scores[I->ID] << endl; /* Try to fix the package under consideration rather than fiddle with the VList package */ @@ -1026,7 +1026,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) Cache.MarkInstall(I, false, 0, false); if (Debug == true) - clog << " Holding Back " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl; + clog << " Holding Back " << I.FullName(false) << " rather than change " << Start.TargetPkg().FullName(false) << endl; } else { @@ -1036,7 +1036,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (InOr == false) { if (Debug == true) - clog << " Removing " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl; + clog << " Removing " << I.FullName(false) << " rather than change " << Start.TargetPkg().FullName(false) << endl; Cache.MarkDelete(I); if (Counter > 1 && Scores[Pkg->ID] > Scores[I->ID]) Scores[I->ID] = Scores[Pkg->ID]; @@ -1068,7 +1068,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (Cache[End] & pkgDepCache::DepGCVer) { if (Debug) - clog << " Upgrading " << Pkg.Name() << " due to Breaks field in " << I.Name() << endl; + clog << " Upgrading " << Pkg.FullName(false) << " due to Breaks field in " << I.FullName(false) << endl; Cache.MarkInstall(Pkg, false, 0, false); continue; } @@ -1079,7 +1079,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) continue; if (Debug == true) - clog << " Added " << Pkg.Name() << " to the remove list" << endl; + clog << " Added " << Pkg.FullName(false) << " to the remove list" << endl; LEnd->Pkg = Pkg; LEnd->Dep = End; @@ -1111,12 +1111,12 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) Cache.MarkInstall(I, false, 0, false); if (Debug == true) - clog << " Holding Back " << I.Name() << " because I can't find " << Start.TargetPkg().Name() << endl; + clog << " Holding Back " << I.FullName(false) << " because I can't find " << Start.TargetPkg().FullName(false) << endl; } else { if (Debug == true) - clog << " Removing " << I.Name() << " because I can't find " << Start.TargetPkg().Name() << endl; + clog << " Removing " << I.FullName(false) << " because I can't find " << Start.TargetPkg().FullName(false) << endl; if (InOr == false) Cache.MarkDelete(I); } @@ -1146,14 +1146,14 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) J->Dep->Type == pkgCache::Dep::Obsoletes) { if (Debug == true) - clog << " Fixing " << I.Name() << " via remove of " << J->Pkg.Name() << endl; + clog << " Fixing " << I.FullName(false) << " via remove of " << J->Pkg.FullName(false) << endl; Cache.MarkDelete(J->Pkg); } } else { if (Debug == true) - clog << " Fixing " << I.Name() << " via keep of " << J->Pkg.Name() << endl; + clog << " Fixing " << I.FullName(false) << " via keep of " << J->Pkg.FullName(false) << endl; Cache.MarkKeep(J->Pkg, false, false); } @@ -1189,7 +1189,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) for (;I.end() != true; I++) { if (Cache[I].NewInstall() && !(Flags[I->ID] & PreInstalled)) { if(_config->FindI("Debug::pkgAutoRemove",false)) { - std::clog << "Resolve installed new pkg: " << I.Name() + std::clog << "Resolve installed new pkg: " << I.FullName(false) << " (now marking it as auto)" << std::endl; } Cache[I].Flags |= pkgCache::Flag::Auto; @@ -1252,7 +1252,7 @@ bool pkgProblemResolver::ResolveByKeep() if ((Flags[I->ID] & Protected) == 0) { if (Debug == true) - clog << "Keeping package " << I.Name() << endl; + clog << "Keeping package " << I.FullName(false) << endl; Cache.MarkKeep(I, false, false); if (Cache[I].InstBroken() == false) { @@ -1283,7 +1283,7 @@ bool pkgProblemResolver::ResolveByKeep() while (true) { if (Debug == true) - clog << "Package " << I.Name() << " has broken " << Start.DepType() << " on " << Start.TargetPkg().Name() << endl; + clog << "Package " << I.FullName(false) << " " << Start << endl; // Look at all the possible provides on this package SPtrArray VList = Start.AllTargets(); @@ -1300,7 +1300,7 @@ bool pkgProblemResolver::ResolveByKeep() if ((Flags[I->ID] & Protected) == 0) { if (Debug == true) - clog << " Keeping Package " << Pkg.Name() << " due to " << Start.DepType() << endl; + clog << " Keeping Package " << Pkg.FullName(false) << " due to " << Start.DepType() << endl; Cache.MarkKeep(Pkg, false, false); } @@ -1325,7 +1325,7 @@ bool pkgProblemResolver::ResolveByKeep() // Restart again. if (K == LastStop) - return _error->Error("Internal Error, pkgProblemResolver::ResolveByKeep is looping on package %s.",I.Name()); + return _error->Error("Internal Error, pkgProblemResolver::ResolveByKeep is looping on package %s.",I.FullName(false)); LastStop = K; K = PList - 1; } diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 0be9368bd..26070636e 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -293,6 +293,9 @@ class pkgCache::DepIterator : public Iterator { inline const char *CompType() const {return Owner->CompType(S->CompareOp);}; inline const char *DepType() const {return Owner->DepType(S->Type);}; + //Nice printable representation + friend std::ostream& operator <<(std::ostream& out, DepIterator D); + inline DepIterator(pkgCache &Owner, Dependency *Trg, Version* = 0) : Iterator(Owner, Trg), Type(DepVer) { if (S == 0) diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 9e1f8b633..2b051cbb0 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -661,6 +661,30 @@ void pkgCache::DepIterator::GlobOr(DepIterator &Start,DepIterator &End) } } /*}}}*/ +// ostream operator to handle string representation of a dependecy /*{{{*/ +// --------------------------------------------------------------------- +/* */ +std::ostream& operator<<(ostream& out, pkgCache::DepIterator D) +{ + if (D.end() == true) + return out << "invalid dependency"; + + pkgCache::PkgIterator P = D.ParentPkg(); + pkgCache::PkgIterator T = D.TargetPkg(); + + out << (P.end() ? "invalid pkg" : P.FullName(false)) << " " << D.DepType() + << " on "; + if (T.end() == true) + out << "invalid pkg"; + else + out << T; + + if (D->Version != 0) + out << " (" << D.CompType() << " " << D.TargetVer() << ")"; + + return out; +} + /*}}}*/ // VerIterator::CompareVer - Fast version compare for same pkgs /*{{{*/ // --------------------------------------------------------------------- /* This just looks over the version list to see if B is listed before A. In diff --git a/debian/changelog b/debian/changelog index d9908d0a6..69b1649c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,12 @@ apt (0.8.0~pre1) UNRELASED; urgency=low [ Programs translations ] * Swedish translation update. Closes: #592366 - -- Michael Vogt Fri, 30 Jul 2010 12:42:57 +0200 + [ David Kalnischkies ] + * apt-pkg/algorithms.cc: + - change the debug outputs to display also arch of the + package and version dependencies information + + -- David Kalnischkies Tue, 10 Aug 2010 15:56:11 +0200 apt (0.7.26~exp12) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From 086bb6d7b5ba933e0a8a6de13d731fcfb8eeda74 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 11 Aug 2010 19:39:44 +0200 Subject: * cmdline/apt-get.cc: - let APT::Get::Arch-Only in build-dep default to false again (Closes: #592628) Thanks Mohamed Amine IL Idrissi for report! --- cmdline/apt-get.cc | 4 +++- debian/changelog | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index c0e74b37b..dac0d42a8 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -28,6 +28,7 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE +#include #include #include #include @@ -2493,6 +2494,7 @@ bool DoBuildDep(CommandLine &CmdL) return false; unsigned J = 0; + bool const StripMultiArch = APT::Configuration::getArchitectures().size() <= 1; for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++) { string Src; @@ -2502,7 +2504,7 @@ bool DoBuildDep(CommandLine &CmdL) // Process the build-dependencies vector BuildDeps; - if (Last->BuildDepends(BuildDeps, _config->FindB("APT::Get::Arch-Only",true)) == false) + if (Last->BuildDepends(BuildDeps, _config->FindB("APT::Get::Arch-Only", false), StripMultiArch) == 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 1207fb52f..0a6a7a8fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,8 +29,11 @@ apt (0.8.0~pre1) UNRELASED; urgency=low * apt-pkg/algorithms.cc: - change the debug outputs to display also arch of the package and version dependencies information + * cmdline/apt-get.cc: + - let APT::Get::Arch-Only in build-dep default to false again + (Closes: #592628) Thanks Mohamed Amine IL Idrissi for report! - -- David Kalnischkies Tue, 10 Aug 2010 15:56:11 +0200 + -- David Kalnischkies Wed, 11 Aug 2010 19:36:21 +0200 apt (0.7.26~exp12) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From 6cb1583a73d7f009f05f8a2b20a177fa31249241 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 12 Aug 2010 16:45:41 +0200 Subject: purge packages in 'rc' state, thanks Rogier! (Closes: #150831) --- cmdline/apt-get.cc | 9 ++++++--- debian/changelog | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index dac0d42a8..6ca9e1402 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -844,9 +844,11 @@ struct TryToRemove { pkgCacheFile* Cache; pkgProblemResolver* Fix; bool FixBroken; + bool PurgePkgs; unsigned long AutoMarkChanged; - TryToRemove(pkgCacheFile &Cache, pkgProblemResolver &PM) : Cache(&Cache), Fix(&PM) {}; + TryToRemove(pkgCacheFile &Cache, pkgProblemResolver &PM) : Cache(&Cache), Fix(&PM), + PurgePkgs(_config->FindB("APT::Get::Purge", false)) {}; void operator() (pkgCache::VerIterator const &Ver) { @@ -856,10 +858,11 @@ struct TryToRemove { Fix->Protect(Pkg); Fix->Remove(Pkg); - if (Pkg->CurrentVer == 0) + if ((Pkg->CurrentVer == 0 && PurgePkgs == false) || + (PurgePkgs == true && Pkg->CurrentState == pkgCache::State::NotInstalled)) ioprintf(c1out,_("Package %s is not installed, so not removed\n"),Pkg.FullName(true).c_str()); else - Cache->GetDepCache()->MarkDelete(Pkg,_config->FindB("APT::Get::Purge",false)); + Cache->GetDepCache()->MarkDelete(Pkg, PurgePkgs); } }; /*}}}*/ diff --git a/debian/changelog b/debian/changelog index 0a6a7a8fa..e7df55743 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,7 @@ apt (0.8.0~pre1) UNRELASED; urgency=low * cmdline/apt-get.cc: - let APT::Get::Arch-Only in build-dep default to false again (Closes: #592628) Thanks Mohamed Amine IL Idrissi for report! + - purge packages in 'rc' state, thanks Rogier! (Closes: #150831) -- David Kalnischkies Wed, 11 Aug 2010 19:36:21 +0200 -- cgit v1.2.3-70-g09d2 From 09a10f9cd2661d28b2ff53d59a0936563cfe1cf7 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 13 Aug 2010 14:41:55 +0200 Subject: * apt-pkg/algorithms.cc: - let the problem resolver install packages to fix or-groups as a needed remove nuked another or-member (helps for #591882) The resolver sometimes need to break or-groups because he need to remove the previous satisfier as a result of a breaks/conflicts. In such broken or-groups he now tries to install a non-installed non-deleted member of the or-group to statisfy it again. This move is dangerous as it introduces the possibility of a bunch of "new" broken breaks/conflicts on the new statisfier or its dependencies and we don't know about them beforehand. We also don't have the infrastructure to undo the decision later, so we just do it and pray! For now a test option is provided to disable this behavior on the fly to test if the situation is worse: pkgProblemResolver::FixByInstall --- apt-pkg/algorithms.cc | 40 +++++++++++++++++++++++++++++----------- debian/changelog | 4 +++- 2 files changed, 32 insertions(+), 12 deletions(-) (limited to 'debian') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 12c5b8710..5641869ab 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -187,7 +187,7 @@ bool pkgSimulate::Configure(PkgIterator iPkg) } cout << endl; - _error->Error("Conf Broken %s",Pkg.FullName(false)); + _error->Error("Conf Broken %s",Pkg.FullName(false).c_str()); } else { @@ -290,7 +290,7 @@ bool pkgApplyStatus(pkgDepCache &Cache) Cache.MarkInstall(I, false, 0, false); else return _error->Error(_("The package %s needs to be reinstalled, " - "but I can't find an archive for it."),I.FullName(true)); + "but I can't find an archive for it."),I.FullName(true).c_str()); } continue; @@ -325,7 +325,7 @@ bool pkgApplyStatus(pkgDepCache &Cache) default: if (I->InstState != pkgCache::State::Ok) return _error->Error("The package %s is not ok and I " - "don't know how to fix it!",I.FullName(false)); + "don't know how to fix it!",I.FullName(false).c_str()); } } return true; @@ -847,6 +847,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) not be possible for a loop to form (that is a < b < c and fixing b by changing a breaks c) */ bool Change = true; + bool const TryFixByInstall = _config->FindB("pkgProblemResolver::FixByInstall", true); for (int Counter = 0; Counter != 10 && Change == true; Counter++) { Change = false; @@ -863,7 +864,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) (Flags[I->ID] & ReInstateTried) == 0) { if (Debug == true) - clog << " Try to Re-Instate " << I.FullName(false) << endl; + clog << " Try to Re-Instate (" << Counter << ") " << I.FullName(false) << endl; unsigned long OldBreaks = Cache.BrokenCount(); pkgCache::Version *OldVer = Cache[I].InstallVer; Flags[I->ID] &= ReInstateTried; @@ -886,7 +887,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) continue; if (Debug == true) - clog << "Investigating " << I << endl; + clog << "Investigating (" << Counter << ") " << I << endl; // Isolate the problem dependency PackageKill KillList[100]; @@ -904,9 +905,9 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (Start == End) { // Decide what to do - if (InOr == true) + if (InOr == true && OldEnd == LEnd) { - if (OldEnd == LEnd && OrOp == OrRemove) + if (OrOp == OrRemove) { if ((Flags[I->ID] & Protected) != Protected) { @@ -914,9 +915,9 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) clog << " Or group remove for " << I.FullName(false) << endl; Cache.MarkDelete(I); Change = true; - } - } - if (OldEnd == LEnd && OrOp == OrKeep) + } + } + else if (OrOp == OrKeep) { if (Debug == true) clog << " Or group keep for " << I.FullName(false) << endl; @@ -1041,6 +1042,23 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (Counter > 1 && Scores[Pkg->ID] > Scores[I->ID]) Scores[I->ID] = Scores[Pkg->ID]; } + else if (TryFixByInstall == true && + Start.TargetPkg()->CurrentVer == 0 && + Cache[Start.TargetPkg()].Delete() == false && + Cache.GetCandidateVer(Start.TargetPkg()).end() == false) + { + /* Before removing or keeping the package with the broken dependency + try instead to install the first not previously installed package + solving this dependency. This helps every time a previous solver + is removed by the resolver because of a conflict or alike but it is + dangerous as it could trigger new breaks/conflicts… */ + std::cout << " Try Installing " << Start.TargetPkg() << " before changing " << I.FullName(false) << std::endl; + unsigned long const OldBroken = Cache.BrokenCount(); + Cache.MarkInstall(Start.TargetPkg(), true, 1, false); + // FIXME: we should undo the complete MarkInstall process here + if (Cache[Start.TargetPkg()].InstBroken() == true || Cache.BrokenCount() > OldBroken) + Cache.MarkDelete(Start.TargetPkg(), false, 1, false); + } } } @@ -1325,7 +1343,7 @@ bool pkgProblemResolver::ResolveByKeep() // Restart again. if (K == LastStop) - return _error->Error("Internal Error, pkgProblemResolver::ResolveByKeep is looping on package %s.",I.FullName(false)); + return _error->Error("Internal Error, pkgProblemResolver::ResolveByKeep is looping on package %s.",I.FullName(false).c_str()); LastStop = K; K = PList - 1; } diff --git a/debian/changelog b/debian/changelog index e7df55743..3a1cc6787 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,8 @@ apt (0.8.0~pre1) UNRELASED; urgency=low [ David Kalnischkies ] * apt-pkg/algorithms.cc: + - let the problem resolver install packages to fix or-groups + as a needed remove nuked another or-member (helps for #591882) - change the debug outputs to display also arch of the package and version dependencies information * cmdline/apt-get.cc: @@ -34,7 +36,7 @@ apt (0.8.0~pre1) UNRELASED; urgency=low (Closes: #592628) Thanks Mohamed Amine IL Idrissi for report! - purge packages in 'rc' state, thanks Rogier! (Closes: #150831) - -- David Kalnischkies Wed, 11 Aug 2010 19:36:21 +0200 + -- David Kalnischkies Fri, 13 Aug 2010 14:24:27 +0200 apt (0.7.26~exp12) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From f824d95cacb53fc24a775a6a13feb2f8c7ae2ace Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 13 Aug 2010 16:42:38 +0200 Subject: * apt-pkg/pkgcache.cc: - fix LongDesc handling in LANG=C environment --- apt-pkg/pkgcache.cc | 3 ++- debian/changelog | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index bb28a33ca..a66a5198d 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -894,7 +894,8 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const pkgCache::DescIterator Desc = DescDefault; for (; Desc.end() == false; Desc++) - if (*l == Desc.LanguageCode()) + if (*l == Desc.LanguageCode() || + (*l == "en" && strcmp(Desc.LanguageCode(),"") == 0)) break; if (Desc.end() == true) Desc = DescDefault; diff --git a/debian/changelog b/debian/changelog index 3a1cc6787..671d9844e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,8 +35,10 @@ apt (0.8.0~pre1) UNRELASED; urgency=low - let APT::Get::Arch-Only in build-dep default to false again (Closes: #592628) Thanks Mohamed Amine IL Idrissi for report! - purge packages in 'rc' state, thanks Rogier! (Closes: #150831) + * apt-pkg/pkgcache.cc: + - fix LongDesc handling in LANG=C environment - -- David Kalnischkies Fri, 13 Aug 2010 14:24:27 +0200 + -- David Kalnischkies Fri, 13 Aug 2010 16:40:57 +0200 apt (0.7.26~exp12) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From 9349f80796a4b0be3ce2e732029ddd4a6558f80a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 13 Aug 2010 17:35:25 +0200 Subject: releasing version 0.8.0~pre1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 671d9844e..2f1e89c65 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -apt (0.8.0~pre1) UNRELASED; urgency=low +apt (0.8.0~pre1) experimental; urgency=low [ Programs translations ] * Swedish translation update. Closes: #592366 @@ -38,7 +38,7 @@ apt (0.8.0~pre1) UNRELASED; urgency=low * apt-pkg/pkgcache.cc: - fix LongDesc handling in LANG=C environment - -- David Kalnischkies Fri, 13 Aug 2010 16:40:57 +0200 + -- Michael Vogt Fri, 13 Aug 2010 17:00:49 +0200 apt (0.7.26~exp12) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From ea6db08d45e012d577f3081fa2070db9e034add9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 16 Aug 2010 11:38:20 +0200 Subject: * apt-pkg/contrib/strutl.cc: - fix error checking for vsnprintf in its safe variant Spotted by -Wextra: contrib/strutl.cc: In function 'char* safe_snprintf(char*, char*, const char*, ...)': contrib/strutl.cc:1172:14: warning: comparison of unsigned expression < 0 is always false --- apt-pkg/contrib/strutl.cc | 2 +- debian/changelog | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index ace74cb37..c1844de40 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1161,7 +1161,7 @@ void strprintf(string &out,const char *format,...) char *safe_snprintf(char *Buffer,char *End,const char *Format,...) { va_list args; - unsigned long Did; + int Did; va_start(args,Format); diff --git a/debian/changelog b/debian/changelog index 671d9844e..23c1218d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,8 +37,10 @@ apt (0.8.0~pre1) UNRELASED; urgency=low - purge packages in 'rc' state, thanks Rogier! (Closes: #150831) * apt-pkg/pkgcache.cc: - fix LongDesc handling in LANG=C environment + * apt-pkg/contrib/strutl.cc: + - fix error checking for vsnprintf in its safe variant - -- David Kalnischkies Fri, 13 Aug 2010 16:40:57 +0200 + -- David Kalnischkies Mon, 16 Aug 2010 11:35:53 +0200 apt (0.7.26~exp12) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From 6802b90c0871726f0018b2c3c059bf8c95a4a710 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 16 Aug 2010 12:12:51 +0200 Subject: * methods/bzip2.cc: - fix error checking for read in case of failing bzip2/lzma/whatever MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spotted by -Wextra: bzip2.cc: In member function ‘virtual bool Bzip2Method::Fetch(pkgAcqMethod::FetchItem*)’: bzip2.cc:108:19: warning: comparison of unsigned expression < 0 is always false bzip2.cc:111:19: warning: comparison of unsigned expression < 0 is always false --- debian/changelog | 4 +++- methods/bzip2.cc | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 23c1218d9..f72cad087 100644 --- a/debian/changelog +++ b/debian/changelog @@ -39,8 +39,10 @@ apt (0.8.0~pre1) UNRELASED; urgency=low - fix LongDesc handling in LANG=C environment * apt-pkg/contrib/strutl.cc: - fix error checking for vsnprintf in its safe variant + * methods/bzip2.cc: + - fix error checking for read in case of failing bzip2/lzma/whatever - -- David Kalnischkies Mon, 16 Aug 2010 11:35:53 +0200 + -- David Kalnischkies Mon, 16 Aug 2010 12:07:54 +0200 apt (0.7.26~exp12) experimental; urgency=low diff --git a/methods/bzip2.cc b/methods/bzip2.cc index 19e49828e..241f21c66 100644 --- a/methods/bzip2.cc +++ b/methods/bzip2.cc @@ -102,9 +102,8 @@ bool Bzip2Method::Fetch(FetchItem *Itm) while (1) { unsigned char Buffer[4*1024]; - unsigned long Count; - Count = read(GzOut[0],Buffer,sizeof(Buffer)); + ssize_t Count = read(GzOut[0],Buffer,sizeof(Buffer)); if (Count < 0 && errno == EINTR) continue; -- cgit v1.2.3-70-g09d2 From a23a7811d04b3f3f7ce761d025b684b3cf82b25e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 18 Aug 2010 11:23:49 +0200 Subject: * debian/apt.cron.daily: - create backups for our extended_states file (Closes: #593430) --- debian/apt.cron.daily | 9 +++++++++ debian/changelog | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index e59b05ee4..8c0e4c416 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -320,6 +320,15 @@ debug_echo() # ------------------------ main ---------------------------- +# Backup the 7 last versions of APT's extended_states file +# shameless copy from dpkg cron +if cd /var/backups ; then + if ! cmp -s apt.extended_states.0 /var/lib/apt/extended_states; then + cp -p /var/lib/apt/extended_states apt.extended_states + savelog -c 7 apt.extended_states >/dev/null + fi +fi + # check apt-config exstance if ! which apt-config >/dev/null ; then exit 0 diff --git a/debian/changelog b/debian/changelog index 2e8253bcf..4fdfb2769 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,10 @@ apt (0.8.0~pre2) UNRELEASED; urgency=low - fix error checking for vsnprintf in its safe variant * methods/bzip2.cc: - fix error checking for read in case of failing bzip2/lzma/whatever + * debian/apt.cron.daily: + - create backups for our extended_states file (Closes: #593430) - -- David Kalnischkies Wed, 18 Aug 2010 01:32:02 +0200 + -- David Kalnischkies Wed, 18 Aug 2010 11:09:52 +0200 apt (0.8.0~pre1) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From 4368851d55589a55fc10ff347890d8bbf33ee002 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Aug 2010 00:04:05 +0200 Subject: * apt-pkg/init.cc: - set the default values for dir::etc::trusted options correctly --- apt-pkg/indexcopy.cc | 5 ++--- apt-pkg/init.cc | 3 +++ debian/changelog | 4 +++- methods/gpgv.cc | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index b4e587d7b..a2a1d5934 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -661,9 +661,8 @@ bool SigVerify::RunGPGV(std::string const &File, std::string const &FileGPG, { string const gpgvpath = _config->Find("Dir::Bin::gpg", "/usr/bin/gpgv"); // FIXME: remove support for deprecated APT::GPGV setting - string const trustedFile = _config->FindFile("Dir::Etc::Trusted", - _config->Find("APT::GPGV::TrustedKeyring", "/etc/apt/trusted.gpg").c_str()); - string const trustedPath = _config->FindDir("Dir::Etc::TrustedParts", "/etc/apt/trusted.gpg.d"); + string const trustedFile = _config->FindFile("Dir::Etc::Trusted"); + string const trustedPath = _config->FindDir("Dir::Etc::TrustedParts"); bool const Debug = _config->FindB("Debug::Acquire::gpgv", false); diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 7a332c86e..846b27313 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -70,6 +70,9 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.Set("Dir::Etc::parts","apt.conf.d"); Cnf.Set("Dir::Etc::preferences","preferences"); Cnf.Set("Dir::Etc::preferencesparts","preferences.d"); + string const deprecated = _config->Find("APT::GPGV::TrustedKeyring"); + Cnf.Set("Dir::Etc::trusted", deprecated.empty() ? "trusted.gpg" : deprecated); + Cnf.Set("Dir::Etc::trustedparts","trusted.gpg.d"); Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods"); Cnf.Set("Dir::Media::MountPath","/media/apt"); diff --git a/debian/changelog b/debian/changelog index 4fdfb2769..91300e10c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,10 @@ apt (0.8.0~pre2) UNRELEASED; urgency=low - fix error checking for read in case of failing bzip2/lzma/whatever * debian/apt.cron.daily: - create backups for our extended_states file (Closes: #593430) + * apt-pkg/init.cc: + - set the default values for dir::etc::trusted options correctly - -- David Kalnischkies Wed, 18 Aug 2010 11:09:52 +0200 + -- David Kalnischkies Thu, 19 Aug 2010 00:01:30 +0200 apt (0.8.0~pre1) experimental; urgency=low diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 018e4f622..efe1f73f7 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -69,7 +69,7 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, { // TRANSLATOR: %s is the trusted keyring parts directory ioprintf(ret, _("No keyring installed in %s."), - _config->FindDir("Dir::Etc::TrustedParts", "/etc/apt/trusted.gpg.d").c_str()); + _config->FindDir("Dir::Etc::TrustedParts").c_str()); return ret.str(); } exit(111); -- cgit v1.2.3-70-g09d2 From 754b55091a75ddf3be5bf39df0c5021ff3e567e0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Aug 2010 00:10:25 +0200 Subject: * ftparchive/writer.cc: - init valid-until correctly to prevent garbage entering Release file --- debian/changelog | 4 +++- ftparchive/writer.cc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 91300e10c..ecd1b24d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,10 @@ apt (0.8.0~pre2) UNRELEASED; urgency=low - create backups for our extended_states file (Closes: #593430) * apt-pkg/init.cc: - set the default values for dir::etc::trusted options correctly + * ftparchive/writer.cc: + - init valid-until correctly to prevent garbage entering Release file - -- David Kalnischkies Thu, 19 Aug 2010 00:01:30 +0200 + -- David Kalnischkies Thu, 19 Aug 2010 00:09:00 +0200 apt (0.8.0~pre1) experimental; urgency=low diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 650eec57c..58e32dade 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -925,7 +925,7 @@ ReleaseWriter::ReleaseWriter(string const &DB) } time_t const validuntil = now + _config->FindI("APT::FTPArchive::Release::ValidTime", 0); - char validstr[128]; + char validstr[128] = ""; if (now == validuntil || strftime(validstr, sizeof(validstr), "%a, %d %b %Y %H:%M:%S UTC", gmtime(&validuntil)) == 0) -- cgit v1.2.3-70-g09d2 From 86f33b2382bbc8a4c06343801564f6a74e3081f4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Aug 2010 00:31:55 +0200 Subject: * apt-pkg/deb/debsystem.cc: - set dir::state::status based at least on dir --- apt-pkg/deb/debsystem.cc | 2 +- debian/changelog | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index 7056d771d..ab08a8f4d 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -165,7 +165,7 @@ bool debSystem::Initialize(Configuration &Cnf) which is yet to be determined. The functions in pkgcachegen should be the only users of these */ Cnf.CndSet("Dir::State::extended_states", Cnf.FindDir("Dir::State").append("extended_states")); - Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status"); + Cnf.CndSet("Dir::State::status", Cnf.FindDir("Dir", "/").append("var/lib/dpkg/status")); Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg"); if (StatusFile) { diff --git a/debian/changelog b/debian/changelog index ecd1b24d1..88b22c01b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,8 +11,10 @@ apt (0.8.0~pre2) UNRELEASED; urgency=low - set the default values for dir::etc::trusted options correctly * ftparchive/writer.cc: - init valid-until correctly to prevent garbage entering Release file + * apt-pkg/deb/debsystem.cc: + - set dir::state::status based at least on dir - -- David Kalnischkies Thu, 19 Aug 2010 00:09:00 +0200 + -- David Kalnischkies Thu, 19 Aug 2010 00:28:21 +0200 apt (0.8.0~pre1) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From 75954ae2420ae7755d8482f2f1eecc03595a5153 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 20 Aug 2010 19:09:16 +0200 Subject: * apt-pkg/deb/dpkgpm.cc: - use the InstVer instead of the CurrentVer for the autobit transfer Add also a small testcase to check the handling automatical --- apt-pkg/deb/dpkgpm.cc | 6 ++-- debian/changelog | 4 ++- test/integration/framework | 54 +++++++++++++++++++++++++---- test/integration/test-disappearing-packages | 54 +++++++++++++++++++++++++++++ 4 files changed, 108 insertions(+), 10 deletions(-) create mode 100755 test/integration/test-disappearing-packages (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index aa0b04bd5..5530ef129 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -554,7 +554,7 @@ void pkgDPkgPM::handleDisappearAction(string const &pkgname) // the disappeared package was auto-installed - nothing to do if ((Cache[Pkg].Flags & pkgCache::Flag::Auto) == pkgCache::Flag::Auto) return; - pkgCache::VerIterator PkgVer = Pkg.CurrentVer(); + pkgCache::VerIterator PkgVer = Cache[Pkg].InstVerIter(Cache); if (unlikely(PkgVer.end() == true)) return; /* search in the list of dependencies for (Pre)Depends, @@ -571,7 +571,9 @@ void pkgDPkgPM::handleDisappearAction(string const &pkgname) // the package is already marked as manual if ((Cache[Tar].Flags & pkgCache::Flag::Auto) != pkgCache::Flag::Auto) continue; - pkgCache::VerIterator TarVer = Tar.CurrentVer(); + pkgCache::VerIterator TarVer = Cache[Tar].InstVerIter(Cache); + if (TarVer.end() == true) + continue; for (pkgCache::DepIterator Rep = TarVer.DependsList(); Rep.end() != true; ++Rep) { if (Rep->Type != pkgCache::Dep::Replaces) diff --git a/debian/changelog b/debian/changelog index 88b22c01b..a08dce97f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,8 +13,10 @@ apt (0.8.0~pre2) UNRELEASED; urgency=low - init valid-until correctly to prevent garbage entering Release file * apt-pkg/deb/debsystem.cc: - set dir::state::status based at least on dir + * apt-pkg/deb/dpkgpm.cc: + - use the InstVer instead of the CurrentVer for the autobit transfer - -- David Kalnischkies Thu, 19 Aug 2010 00:28:21 +0200 + -- David Kalnischkies Fri, 20 Aug 2010 19:06:29 +0200 apt (0.8.0~pre1) experimental; urgency=low diff --git a/test/integration/framework b/test/integration/framework index 01b795ba9..82fca2046 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -74,13 +74,13 @@ aptget() { runapt apt-get $*; } aptftparchive() { runapt apt-ftparchive $*; } setupenvironment() { - local TMPWORKINGDIRECTORY=$(mktemp -d) + TMPWORKINGDIRECTORY=$(mktemp -d) local TESTDIR=$(readlink -f $(dirname $0)) msgninfo "Preparing environment for ${CCMD}$0${CINFO} in ${TMPWORKINGDIRECTORY}… " BUILDDIRECTORY="${TESTDIR}/../../build/bin" test -x "${BUILDDIRECTORY}/apt-get" || msgdie "You need to build tree first" local OLDWORKINGDIRECTORY=$(pwd) - trap "cd /; rm -rf $TMPWORKINGDIRECTORY; cd $OLDWORKINGDIRECTORY" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM +# trap "cd /; rm -rf $TMPWORKINGDIRECTORY; cd $OLDWORKINGDIRECTORY" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM cd $TMPWORKINGDIRECTORY mkdir rootdir aptarchive keys cd rootdir @@ -128,7 +128,7 @@ configarchitecture() { done } -buildsimplenativepackage() { +setupsimplenativepackage() { local NAME="$1" local ARCH="$2" local VERSION="$3" @@ -142,7 +142,6 @@ buildsimplenativepackage() { else DISTSECTION="$(echo "$SECTION" | cut -d'/' -f 1)" fi - msgninfo "Build package ${CCMD}${NAME}=${VERSION}/${RELEASE}${CINFO}… " local BUILDDIR=incoming/${NAME}-${VERSION} mkdir -p ${BUILDDIR}/debian/source cd ${BUILDDIR} @@ -174,17 +173,47 @@ Architecture: $ARCH" > debian/control test -e debian/compat || echo "7" > debian/compat test -e debian/source/format || echo "3.0 (native)" > debian/source/format test -e debian/rules || cp /usr/share/doc/debhelper/examples/rules.tiny debian/rules + cd - > /dev/null +} + +buildsimplenativepackage() { + local NAME="$1" + local ARCH="$2" + local VERSION="$3" + local RELEASE="${4:-unstable}" + local DEPENDENCIES="$5" + local DESCRIPTION="$6" + local SECTION="${7:-others}" + local DISTSECTION + if [ "$SECTION" = "$(echo "$SECTION" | cut -d'/' -f 2)" ]; then + DISTSECTION="main" + else + DISTSECTION="$(echo "$SECTION" | cut -d'/' -f 1)" + fi + setupsimplenativepackage "$NAME" "$ARCH" "$VERSION" "$RELEASE" "$DEPENDENCIES" "$DESCRIPTION" "$SECTION" + buildpackage "incoming/${NAME}-${VERSION}" "$RELEASE" "$DISTSECTION" + rm -rf "incoming/${NAME}-${VERSION}" +} + +buildpackage() { + local BUILDDIR=$1 + local RELEASE=$2 + local SECTION=$3 + msgninfo "Build package $(echo "$BUILDDIR" | grep -o '[^/]*$') for ${RELEASE} in ${SECTION}… " + cd $BUILDDIR + if [ "$ARCH" = "all" ]; then + ARCH="$(dpkg-architecture -qDEB_HOST_ARCH 2> /dev/null)" + fi local BUILT="$(dpkg-buildpackage -uc -us -a$ARCH 2> /dev/null)" local PKGS="$( echo "$BUILT" | grep '^dpkg-deb: building package' | cut -d'/' -f 2 | sed -e "s#'\.##")" local SRCS="$( echo "$BUILT" | grep '^dpkg-source: info: building' | grep -o '[a-z0-9._-]*$')" cd - > /dev/null for PKG in $PKGS; do - echo "pool/${PKG}" >> ./incoming/${RELEASE}.${DISTSECTION}.pkglist + echo "pool/${PKG}" >> ${TMPWORKINGDIRECTORY}/incoming/${RELEASE}.${SECTION}.pkglist done for SRC in $SRCS; do - echo "pool/${SRC}" >> ./incoming/${RELEASE}.${DISTSECTION}.srclist + echo "pool/${SRC}" >> ${TMPWORKINGDIRECTORY}/incoming/${RELEASE}.${SECTION}.srclist done - rm -rf $BUILDDIR msgdone "info" } @@ -365,6 +394,17 @@ diff() { fi } +testfileequal() { + local FILE="$1" + shift + msgtest "Test for correctness of file" "$FILE" + if [ -z "$*" ]; then + echo -n "" | diff $FILE - && msgpass || msgfail + else + echo "$*" | diff $FILE - && msgpass || msgfail + fi +} + testequal() { local COMPAREFILE=$(mktemp) echo "$1" > $COMPAREFILE diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages new file mode 100755 index 000000000..ebf2bb14f --- /dev/null +++ b/test/integration/test-disappearing-packages @@ -0,0 +1,54 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +buildsimplenativepackage "old-pkg" "i386" "1.0" "stable" +buildsimplenativepackage "unrelated" "all" "0.5" "unstable" + +setupsimplenativepackage "new-pkg" "i386" "2.0" "unstable" "Provides: old-pkg +Replaces: old-pkg +Conflicts: old-pkg (<< 2.0)" +local BUILDDIR="incoming/new-pkg-2.0" +echo "/usr/share/doc/new-pkg /usr/share/doc/old-pkg" > ${BUILDDIR}/debian/new-pkg.links +buildpackage "$BUILDDIR" "unstable" "main" +rm -rf "$BUILDDIR" + +setupsimplenativepackage "old-pkg" "all" "2.0" "unstable" "Depends: new-pkg" +local BUILDDIR="incoming/old-pkg-2.0" +echo "/usr/share/doc/new-pkg /usr/share/doc/old-pkg" > ${BUILDDIR}/debian/old-pkg.links +echo " +override_dh_link: + rm -rf debian/old-pkg/usr/share/doc/old-pkg/ + dh_link" >> ${BUILDDIR}/debian/rules +buildpackage "$BUILDDIR" "unstable" "main" +rm -rf "$BUILDDIR" + +setupaptarchive + +aptget install old-pkg=1.0 --trivial-only -qq 2>&1 > /dev/null + +testfileequal "rootdir/var/lib/apt/extended_states" "" # old-pkg is manual installed + +local CMD="aptget dist-upgrade -y -q=0" +msgtest "Test for equality of" "$CMD" +local COMPAREFILE=$(mktemp) +echo "The following package disappeared from your system as +all files have been overwritten by other packages: + old-pkg +Note: This is done automatic and on purpose by dpkg." > $COMPAREFILE +$CMD 2>&1 | tail -n 4 | diff $COMPAREFILE - && msgpass || msgfail +rm $COMPAREFILE + +sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' +testfileequal "rootdir/var/log/apt/history.log" " +Install: old-pkg:i386 (1.0) + +Install: new-pkg:i386 (2.0, automatic) +Upgrade: old-pkg:i386 (1.0, 2.0) +Disappeared: old-pkg (1.0)" + +testfileequal "rootdir/var/lib/apt/extended_states" "" # new-pkg should have get the manual flag from old-pkg -- cgit v1.2.3-70-g09d2 From de2b1358926d293c85277e1d9a58ac94915470ec Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 21 Aug 2010 00:52:59 +0200 Subject: * methods/http.cc: - some http servers violate HTTP1.1 by not issuing a Reason-Phrase (or at least a space after the code) especially for 200, but lets be nice and ignore it as we don't need the reason in general --- debian/changelog | 6 +++++- methods/http.cc | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a08dce97f..c2c0b605d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,8 +15,12 @@ apt (0.8.0~pre2) UNRELEASED; urgency=low - set dir::state::status based at least on dir * apt-pkg/deb/dpkgpm.cc: - use the InstVer instead of the CurrentVer for the autobit transfer + * methods/http.cc: + - some http servers violate HTTP1.1 by not issuing a Reason-Phrase + (or at least a space after the code) especially for 200, but lets + be nice and ignore it as we don't need the reason in general - -- David Kalnischkies Fri, 20 Aug 2010 19:06:29 +0200 + -- David Kalnischkies Fri, 20 Aug 2010 23:00:54 +0200 apt (0.8.0~pre1) experimental; urgency=low diff --git a/methods/http.cc b/methods/http.cc index 9fa74bffa..25e31de9a 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -553,8 +553,14 @@ bool ServerState::HeaderLine(string Line) // Evil servers return no version if (Line[4] == '/') { - if (sscanf(Line.c_str(),"HTTP/%u.%u %u%[^\n]",&Major,&Minor, - &Result,Code) != 4) + int const elements = sscanf(Line.c_str(),"HTTP/%u.%u %u%[^\n]",&Major,&Minor,&Result,Code); + if (elements == 3) + { + Code[0] = '\0'; + if (Debug == true) + clog << "HTTP server doesn't give Reason-Phrase for " << Result << std::endl; + } + else if (elements != 4) return _error->Error(_("The HTTP server sent an invalid reply header")); } else -- cgit v1.2.3-70-g09d2 From f213b6ea7397f2ba5b770e1a30e57dc8438bf61e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 21 Aug 2010 22:19:56 +0200 Subject: * apt-pkg/acquire-item.cc: - don't use ReadOnlyGzip mode for PDiffs as this mode doesn't work in combination with the AddFd methods of our hashclasses Add also 2 testcases: one to test pdiffs in general and one to test the handling of compressed indexes. --- apt-pkg/acquire-item.cc | 6 +- debian/changelog | 5 +- test/integration/Packages-pdiff-usage | 34 ++++++++ test/integration/Packages-pdiff-usage-new | 37 +++++++++ test/integration/framework | 58 +++++++++---- test/integration/test-compressed-indexes | 131 ++++++++++++++++++++++++++++++ test/integration/test-pdiff-usage | 51 ++++++++++++ 7 files changed, 303 insertions(+), 19 deletions(-) create mode 100644 test/integration/Packages-pdiff-usage create mode 100644 test/integration/Packages-pdiff-usage-new create mode 100755 test/integration/test-compressed-indexes create mode 100755 test/integration/test-pdiff-usage (limited to 'debian') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index a289fb7ba..752bc6a99 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -280,7 +280,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ ss >> ServerSha1 >> size; unsigned long const ServerSize = atol(size.c_str()); - FileFd fd(CurrentPackagesFile, FileFd::ReadOnlyGzip); + FileFd fd(CurrentPackagesFile, FileFd::ReadOnly); SHA1Summation SHA1; SHA1.AddFD(fd.Fd(), fd.Size()); string const local_sha1 = SHA1.Result(); @@ -297,7 +297,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ else { if(Debug) - std::clog << "SHA1-Current: " << ServerSha1 << std::endl; + std::clog << "SHA1-Current: " << ServerSha1 << " and we start at "<< fd.Name() << " " << fd.Size() << " " << local_sha1 << std::endl; // check the historie and see what patches we need string const history = Tags.FindS("SHA1-History"); @@ -511,7 +511,7 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/ string FinalFile = _config->FindDir("Dir::State::lists"); FinalFile += URItoFileName(RealURI); - FileFd fd(FinalFile, FileFd::ReadOnlyGzip); + FileFd fd(FinalFile, FileFd::ReadOnly); SHA1Summation SHA1; SHA1.AddFD(fd.Fd(), fd.Size()); string local_sha1 = string(SHA1.Result()); diff --git a/debian/changelog b/debian/changelog index c2c0b605d..c05f9439c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,8 +19,11 @@ apt (0.8.0~pre2) UNRELEASED; urgency=low - some http servers violate HTTP1.1 by not issuing a Reason-Phrase (or at least a space after the code) especially for 200, but lets be nice and ignore it as we don't need the reason in general + * apt-pkg/acquire-item.cc: + - don't use ReadOnlyGzip mode for PDiffs as this mode doesn't work + in combination with the AddFd methods of our hashclasses - -- David Kalnischkies Fri, 20 Aug 2010 23:00:54 +0200 + -- David Kalnischkies Sat, 21 Aug 2010 22:18:41 +0200 apt (0.8.0~pre1) experimental; urgency=low diff --git a/test/integration/Packages-pdiff-usage b/test/integration/Packages-pdiff-usage new file mode 100644 index 000000000..d1530a95c --- /dev/null +++ b/test/integration/Packages-pdiff-usage @@ -0,0 +1,34 @@ +Package: apt +Version: 0.7.25.3 +Architecture: i386 +Maintainer: APT Development Team +Installed-Size: 5244 +Replaces: libapt-pkg-dev (<< 0.3.7), libapt-pkg-doc (<< 0.3.7) +Provides: libapt-pkg-libc6.9-6-4.8 +Depends: libc6 (>= 2.3.4), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.4.0), debian-archive-keyring +Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt +Filename: pool/main/a/apt/apt_0.7.25.3_i386.deb +Size: 1750610 +MD5sum: 311aadc67d1b72428b54c9b4e1f76671 +SHA1: 3c695e028f74d5c55226f9ef30000bbbd881088c +SHA256: b46fd1546151c545fe4bfa56a5cc0e7811a9f68826326a529777fd660f28f050 +Description: Advanced front-end for dpkg + This is Debian's next generation front-end for the dpkg package manager. + It provides the apt-get utility and APT dselect method that provides a + simpler, safer way to install and upgrade packages. + . + APT features complete installation ordering, multiple source capability + and several other unique features, see the Users Guide in apt-doc. + +Package: oldstuff +Version: 1.0 +Architecture: i386 +Maintainer: Joe Sixpack +Installed-Size: 100 +Filename: pool/oldstuff_1.0_i386.deb +Size: 100000 +MD5sum: 311aeeadf78324aaff54c9b4e1f76671 +SHA1: 3c695e028f74d5c544deeddaaa1242desa81088c +SHA256: b46fd1546151c545fe4bfa56a5cc0e7deaef23e2da3e4f129727fd660f28f050 +Description: some cool but old stuff + This package will disappear in the next mirror update diff --git a/test/integration/Packages-pdiff-usage-new b/test/integration/Packages-pdiff-usage-new new file mode 100644 index 000000000..9157596a7 --- /dev/null +++ b/test/integration/Packages-pdiff-usage-new @@ -0,0 +1,37 @@ +Package: newstuff +Version: 1.0 +Architecture: i386 +Maintainer: Joe Sixpack +Installed-Size: 101 +Filename: pool/newstuff_1.0_i386.deb +Size: 101100 +MD5sum: 311aeeadf78324aaff1ceaf3e1f76671 +SHA1: 3c695e028f7a1ae324deeddaaa1242desa81088c +SHA256: b46fd154615edefab321cc56a5cc0e7deaef23e2da3e4f129727fd660f28f050 +Description: some cool and shiny new stuff + This package will appear in the next mirror update + +Package: apt +Priority: important +Section: admin +Installed-Size: 5672 +Maintainer: APT Development Team +Architecture: i386 +Version: 0.8.0~pre1 +Replaces: manpages-pl (<< 20060617-3~) +Provides: libapt-pkg4.10 +Depends: libc6 (>= 2.3.4), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.4.0), zlib1g (>= 1:1.1.4), debian-archive-keyring, gnupg +Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt +Conflicts: python-apt (<< 0.7.93.2~) +Filename: pool/main/a/apt/apt_0.8.0~pre1_i386.deb +Size: 2013046 +MD5sum: 6786ca6270c988f2c201716ededaedec +SHA1: fe26559e745d4c2c977c27170938852041c9adff +SHA256: a12f968467e1e3cec24191b72bfe84f7aeed3ce422e1a60bb4f1454f2b89b8ee +Description: Advanced front-end for dpkg + This is Debian's next generation front-end for the dpkg package manager. + It provides the apt-get utility and APT dselect method that provides a + simpler, safer way to install and upgrade packages. + . + APT features complete installation ordering, multiple source capability + and several other unique features, see the Users Guide in apt-doc. diff --git a/test/integration/framework b/test/integration/framework index 82fca2046..8efe47330 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -80,7 +80,8 @@ setupenvironment() { BUILDDIRECTORY="${TESTDIR}/../../build/bin" test -x "${BUILDDIRECTORY}/apt-get" || msgdie "You need to build tree first" local OLDWORKINGDIRECTORY=$(pwd) -# trap "cd /; rm -rf $TMPWORKINGDIRECTORY; cd $OLDWORKINGDIRECTORY" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM + CURRENTTRAP="cd /; rm -rf $TMPWORKINGDIRECTORY; cd $OLDWORKINGDIRECTORY" + trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM cd $TMPWORKINGDIRECTORY mkdir rootdir aptarchive keys cd rootdir @@ -373,17 +374,44 @@ setupaptarchive() { else setupflataptarchive fi - msgninfo "\tSign archive with Joe Sixpack key… " - for RELEASE in $(find aptarchive/ -name Release); do - gpg --no-default-keyring --secret-keyring ./keys/joesixpack.sec --keyring ./keys/joesixpack.pub --default-key Joe -abs -o ${RELEASE}.gpg ${RELEASE} - done - msgdone "info" + signreleasefiles msgninfo "\tSync APT's cache with the archive… " aptget update -qq msgdone "info" } -diff() { +signreleasefiles() { + local SIGNER="${1:-Joe Sixpack}" + msgninfo "\tSign archive with $SIGNER key… " + local SECKEYS="" + for KEY in $(find keys/ -name '*.sec'); do + SECKEYS="$SECKEYS --secret-keyring $KEY" + done + local PUBKEYS="" + for KEY in $(find keys/ -name '*.pub'); do + PUBKEYS="$PUBKEYS --keyring $KEY" + done + for RELEASE in $(find aptarchive/ -name Release); do + gpg --yes --no-default-keyring $SECKEYS $PUBKEYS --default-key "$SIGNER" -abs -o ${RELEASE}.gpg ${RELEASE} + done + msgdone "info" +} + +changetowebserver() { + if which weborf > /dev/null; then + weborf -xb aptarchive/ 2>&1 > /dev/null & + CURRENTTRAP="kill $(ps | grep weborf | sed -e 's#^[ ]*##' | cut -d' ' -f 1); $CURRENTTRAP" + trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM + local APTARCHIVE="file://$(readlink -f ./aptarchive)" + for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do + sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#" + done + return 0 + fi + return 1 +} + +checkdiff() { local DIFFTEXT="$($(which diff) -u $* | sed -e '/^---/ d' -e '/^+++/ d' -e '/^@@/ d')" if [ -n "$DIFFTEXT" ]; then echo @@ -399,9 +427,9 @@ testfileequal() { shift msgtest "Test for correctness of file" "$FILE" if [ -z "$*" ]; then - echo -n "" | diff $FILE - && msgpass || msgfail + echo -n "" | checkdiff $FILE - && msgpass || msgfail else - echo "$*" | diff $FILE - && msgpass || msgfail + echo "$*" | checkdiff $FILE - && msgpass || msgfail fi } @@ -410,7 +438,7 @@ testequal() { echo "$1" > $COMPAREFILE shift msgtest "Test for equality of" "$*" - $* 2>&1 | diff $COMPAREFILE - && msgpass || msgfail + $* 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail rm $COMPAREFILE } @@ -423,10 +451,10 @@ testequalor2() { shift 2 msgtest "Test for equality OR of" "$*" $* 2>&1 1> $COMPAREAGAINST - (diff $COMPAREFILE1 $COMPAREAGAINST 1> /dev/null || - diff $COMPAREFILE2 $COMPAREAGAINST 1> /dev/null) && msgpass || - ( echo "\n${CINFO}Diff against OR 1${CNORMAL}" "$(diff $COMPAREFILE1 $COMPAREAGAINST)" \ - "\n${CINFO}Diff against OR 2${CNORMAL}" "$(diff $COMPAREFILE2 $COMPAREAGAINST)" && + (checkdiff $COMPAREFILE1 $COMPAREAGAINST 1> /dev/null || + checkdiff $COMPAREFILE2 $COMPAREAGAINST 1> /dev/null) && msgpass || + ( echo "\n${CINFO}Diff against OR 1${CNORMAL}" "$(checkdiff $COMPAREFILE1 $COMPAREAGAINST)" \ + "\n${CINFO}Diff against OR 2${CNORMAL}" "$(checkdiff $COMPAREFILE2 $COMPAREAGAINST)" && msgfail ) rm $COMPAREFILE1 $COMPAREFILE2 $COMPAREAGAINST } @@ -448,7 +476,7 @@ N: No packages found" local ARCH=$(dpkg-architecture -qDEB_HOST_ARCH_CPU) eval `apt-config shell ARCH APT::Architecture` echo "$VIRTUAL" | sed -e "s/:$ARCH//" -e 's/:all//' > $COMPAREFILE - aptcache show $PACKAGE 2>&1 | diff $COMPAREFILE - && msgpass || msgfail + aptcache show $PACKAGE 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail rm $COMPAREFILE } diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes new file mode 100755 index 000000000..0b73f4c35 --- /dev/null +++ b/test/integration/test-compressed-indexes @@ -0,0 +1,131 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +buildsimplenativepackage "testpkg" "i386" "1.0" +setupaptarchive + +local GOODSHOW="$(aptcache show testpkg) +" +local GOODPOLICY="$(aptcache policy testpkg)" +local GOODSHOWSRC="$(aptcache showsrc testpkg) +" + +test $(echo "$GOODSHOW" | grep -e '^Package: testpkg' -e '^Version: 1.0' -e '^Architecture: i386' | wc -l) -eq 3 +testequal "$GOODSHOW" aptcache show testpkg +test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 file:/' | wc -l) -eq 4 +testequal "$GOODPOLICY" aptcache policy testpkg +test $(echo "$GOODSHOWSRC" | grep -e '^Package: testpkg' -e '^Format: 3.0 (native)' -e '^Files:' -e '^Checksums-Sha256:' | wc -l) -eq 4 +testequal "$GOODSHOWSRC" aptcache showsrc testpkg + + +testrun() { + local F + if [ -e rootdir/var/lib/apt/lists/*localhost*Release ]; then + msgtest "Check if all index files are" "${1:-uncompressed}" + if [ "$1" = "compressed" ]; then + ! test -e rootdir/var/lib/apt/lists/*_Packages || F=1 + ! test -e rootdir/var/lib/apt/lists/*_Sources || F=1 + test -e rootdir/var/lib/apt/lists/*_Packages.gz || F=1 + test -e rootdir/var/lib/apt/lists/*_Sources.gz || F=1 + else + test -e rootdir/var/lib/apt/lists/*_Packages || F=1 + test -e rootdir/var/lib/apt/lists/*_Sources || F=1 + ! test -e rootdir/var/lib/apt/lists/*_Packages.gz || F=1 + ! test -e rootdir/var/lib/apt/lists/*_Sources.gz || F=1 + fi + if [ -n "$F" ]; then + ls -laR rootdir/var/lib/apt/lists/ + msgfail + else + msgpass + fi + msgtest "Check if package is downloadable" + aptget install -d testpkg -qq && msgpass || msgfail + msgtest "\tdeb file is present"; test -f rootdir/var/cache/apt/archives/testpkg_1.0_i386.deb && msgpass || msgfail + aptget clean + msgtest "\tdeb file is gone"; ! test -f rootdir/var/cache/apt/archives/testpkg_1.0_i386.deb && msgpass || msgfail + fi + rm rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin + testequal "$GOODSHOW" aptcache show testpkg + testequal "$GOODSHOW" aptcache show testpkg + rm rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin + testequal "$GOODPOLICY" aptcache policy testpkg + testequal "$GOODPOLICY" aptcache policy testpkg + rm rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin + testequal "$GOODSHOWSRC" aptcache showsrc testpkg + testequal "$GOODSHOWSRC" aptcache showsrc testpkg + rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin + rm -rf rootdir/var/cache/apt/archives + msgtest "Check if the source is aptgetable" + aptget source testpkg -qq 2> /dev/null > /dev/null && msgpass || msgfail + msgtest "\tdsc file is present"; test -f testpkg_1.0.dsc && msgpass || msgfail + msgtest "\tdirectory is present"; test -d testpkg-1.0 && msgpass || msgfail + rm -rf testpkg-1.0 +} + +msgmsg "File: Test with uncompressed indexes" +testrun + +aptget update -qq -o Acquire::Pdiffs=1 +msgmsg "File: Test with uncompressed indexes (update unchanged with pdiffs)" +testrun + +aptget update -qq -o Acquire::Pdiffs=0 +msgmsg "File: Test with uncompressed indexes (update unchanged without pdiffs)" +testrun + +rm -rf rootdir/var/lib/apt/lists +echo 'Acquire::CompressionTypes::Order:: "gz"; +Acquire::GzipIndexes "true";' > rootdir/etc/apt/apt.conf.d/02compressindex + +aptget update -qq +msgmsg "File: Test with compressed indexes" +testrun "compressed" + +aptget update -qq -o Acquire::Pdiffs=1 +msgmsg "File: Test with compressed indexes (update unchanged with pdiffs)" +testrun "compressed" + +aptget update -qq -o Acquire::Pdiffs=0 +msgmsg "File: Test with compressed indexes (update unchanged without pdiffs)" +testrun "compressed" + +rm rootdir/etc/apt/apt.conf.d/02compressindex +changetowebserver +aptget update -qq +local GOODPOLICY="$(aptcache policy testpkg)" +test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 http://' | wc -l) -eq 4 +testequal "$GOODPOLICY" aptcache policy testpkg + +msgmsg "HTTP: Test with uncompressed indexes" +testrun + +aptget update -qq -o Acquire::Pdiffs=1 +msgmsg "HTTP: Test with uncompressed indexes (update unchanged with pdiffs)" +testrun + +aptget update -qq -o Acquire::Pdiffs=0 +msgmsg "HTTP: Test with uncompressed indexes (update unchanged without pdiffs)" +testrun + +rm -rf rootdir/var/lib/apt/lists +echo 'Acquire::CompressionTypes::Order:: "gz"; +Acquire::GzipIndexes "true";' > rootdir/etc/apt/apt.conf.d/02compressindex + +aptget update -qq +msgmsg "HTTP: Test with compressed indexes" +testrun "compressed" + +aptget update -qq -o Acquire::Pdiffs=1 +msgmsg "HTTP: Test with compressed indexes (update unchanged with pdiffs)" +testrun "compressed" + +aptget update -qq -o Acquire::Pdiffs=0 +msgmsg "HTTP: Test with compressed indexes (update unchanged without pdiffs)" +testrun "compressed" diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage new file mode 100755 index 000000000..85cbe9082 --- /dev/null +++ b/test/integration/test-pdiff-usage @@ -0,0 +1,51 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +buildaptarchive +setupflataptarchive +changetowebserver +signreleasefiles +aptget update -qq + +testnopackage newstuff +PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')" +testequal "$(cat ${PKGFILE}) +" aptcache show apt oldstuff + +cp ${PKGFILE}-new aptarchive/Packages +cat aptarchive/Packages | gzip > aptarchive/Packages.gz +cat aptarchive/Packages | bzip2 > aptarchive/Packages.bz2 +cat aptarchive/Packages | lzma > aptarchive/Packages.lzma +rm -rf aptarchive/Packages.diff +aptftparchive release aptarchive/ > aptarchive/Release +mkdir -p aptarchive/Packages.diff +PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)" +diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true +cat $PATCHFILE | gzip > ${PATCHFILE}.gz +PATCHINDEX="aptarchive/Packages.diff/Index" +echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new) +SHA1-History: + 9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28 + $(sha1sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE) +SHA1-Patches: + 7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-0814.28 + $(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX +sed -i aptarchive/Release \ + -e "/^MD5Sum:/ a\ + \ $(md5sum $PATCHINDEX | cut -d' ' -f 1) $(stat -c%s $PATCHINDEX) Packages.diff/Index" \ + -e "/^SHA1:/ a\ + \ $(sha1sum $PATCHINDEX | cut -d' ' -f 1) $(stat -c%s $PATCHINDEX) Packages.diff/Index" \ + -e "/^SHA256:/ a\ + \ $(sha256sum $PATCHINDEX | cut -d' ' -f 1) $(stat -c%s $PATCHINDEX) Packages.diff/Index" +signreleasefiles +aptget update -qq + +testnopackage oldstuff +testequal "$(cat ${PKGFILE}-new) +" aptcache show apt newstuff -- cgit v1.2.3-70-g09d2 From 662603c40b8b38e487f76e7aceb773c935203cea Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 23 Aug 2010 20:08:29 +0200 Subject: releasing version 0.8.0~pre2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c05f9439c..5501a1cfe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -apt (0.8.0~pre2) UNRELEASED; urgency=low +apt (0.8.0~pre2) experimental; urgency=low [ David Kalnischkies ] * apt-pkg/contrib/strutl.cc: @@ -23,7 +23,7 @@ apt (0.8.0~pre2) UNRELEASED; urgency=low - don't use ReadOnlyGzip mode for PDiffs as this mode doesn't work in combination with the AddFd methods of our hashclasses - -- David Kalnischkies Sat, 21 Aug 2010 22:18:41 +0200 + -- Michael Vogt Mon, 23 Aug 2010 19:09:08 +0200 apt (0.8.0~pre1) experimental; urgency=low -- cgit v1.2.3-70-g09d2