From f6c702eba601aa3ecf253d1a4d9119949a0a2cf9 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sat, 8 Dec 2007 12:15:21 -0200 Subject: * Applied patch from Alexander Winston to use 'min' as symbol for minute, closes: #219034. --- apt-pkg/contrib/strutl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 006452af4..a04c266ba 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -331,19 +331,19 @@ string TimeToStr(unsigned long Sec) { if (Sec > 60*60*24) { - sprintf(S,"%lid %lih%lim%lis",Sec/60/60/24,(Sec/60/60) % 24,(Sec/60) % 60,Sec % 60); + sprintf(S,"%lid %lih%limin%lis",Sec/60/60/24,(Sec/60/60) % 24,(Sec/60) % 60,Sec % 60); break; } if (Sec > 60*60) { - sprintf(S,"%lih%lim%lis",Sec/60/60,(Sec/60) % 60,Sec % 60); + sprintf(S,"%lih%limin%lis",Sec/60/60,(Sec/60) % 60,Sec % 60); break; } if (Sec > 60) { - sprintf(S,"%lim%lis",Sec/60,Sec % 60); + sprintf(S,"%limin%lis",Sec/60,Sec % 60); break; } -- cgit v1.2.3-70-g09d2 From da543ed87d3f8b8a0030a211452c9bddfc066f0b Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sun, 16 Dec 2007 18:35:58 -0200 Subject: * Applied patch from Peter Eisentraut to fix a grammatical error ("manual installed" -> "manually installed"), closes: #438136. * --- apt-pkg/algorithms.cc | 4 ++-- cmdline/apt-get.cc | 2 +- debian/changelog | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 62727a852..158f9c258 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -1261,8 +1261,8 @@ void pkgProblemResolver::InstallProtect() Cache.MarkDelete(I); else { - // preserver the information if the package was auto - // or manual installed + // preserve the information whether the package was auto + // or manually installed bool autoInst = (Cache[I].Flags & pkgCache::Flag::Auto); Cache.MarkInstall(I, false, 0, !autoInst); } diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 3bcacb293..486e995cc 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1719,7 +1719,7 @@ bool DoInstall(CommandLine &CmdL) (Cache[Pkg].Flags & pkgCache::Flag::Auto) && _config->FindB("APT::Get::ReInstall",false) == false) { - ioprintf(c1out,_("%s set to manual installed.\n"), + ioprintf(c1out,_("%s set to manually installed.\n"), Pkg.Name()); Cache->MarkAuto(Pkg,false); AutoMarkChanged++; diff --git a/debian/changelog b/debian/changelog index 8e3f9ab38..4c56aa901 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,9 @@ apt (0.7.10) UNRELEASED; urgency=low work properly in initramfs, closes: #448316. * Applied patch from Robert Millan to make apt-key and apt-get to ignore time conflicts, closes: #451328. + * Applied patch from Peter Eisentraut to fix a + grammatical error ("manual installed" -> "manually installed"), + closes: #438136. [ Program translations ] - Basque updated. Closes: #453088 @@ -43,7 +46,10 @@ apt (0.7.10) UNRELEASED; urgency=low * ftparchive/multicompress.cc: - support lzma output - -- Otavio Salvador Sun, 16 Dec 2007 18:23:52 -0200 + [ Otavio Salvador ] + * + + -- Otavio Salvador Sun, 16 Dec 2007 18:34:40 -0200 apt (0.7.9) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From db2cca1129fa2d88eae80e1c4a17e263236a95a3 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sun, 16 Dec 2007 18:53:32 -0200 Subject: * apt-pkg/contrib/configuration.cc: - if RootDir is set, then FindFile and FindDir will return paths relative to the directory stored in RootDir, closes: #456457. --- apt-pkg/contrib/configuration.cc | 7 ++++++- debian/changelog | 5 +++++ doc/apt.conf.5.xml | 13 +++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 3109fd7a5..e8301d918 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -173,6 +173,11 @@ string Configuration::Find(const char *Name,const char *Default) const */ string Configuration::FindFile(const char *Name,const char *Default) const { + const Item *RootItem = Lookup("RootDir"); + std::string rootDir = (RootItem == 0) ? "" : RootItem->Value; + if(rootDir.size() > 0 && rootDir[rootDir.size() - 1] != '/') + rootDir.push_back('/'); + const Item *Itm = Lookup(Name); if (Itm == 0 || Itm->Value.empty() == true) { @@ -204,7 +209,7 @@ string Configuration::FindFile(const char *Name,const char *Default) const Itm = Itm->Parent; } - return val; + return rootDir + val; } /*}}}*/ // Configuration::FindDir - Find a directory name /*{{{*/ diff --git a/debian/changelog b/debian/changelog index 9ae68c770..d8ce744d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,6 +47,11 @@ apt (0.7.10) UNRELEASED; urgency=low - support lzma data members * ftparchive/multicompress.cc: - support lzma output + + [ Daniel Burrows ] + * apt-pkg/contrib/configuration.cc: + - if RootDir is set, then FindFile and FindDir will return paths + relative to the directory stored in RootDir, closes: #456457. -- Otavio Salvador Sun, 16 Dec 2007 18:46:29 -0200 diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 43f33681f..5bc6c55db 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -295,6 +295,19 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; dpkg, apt-get dpkg-source dpkg-buildpackage and apt-cache specify the location of the respective programs. + + + The configuration item RootDir has a special + meaning. If set, all paths in Dir:: will be + relative to RootDir, even paths that + are specified absolutely. So, for instance, if + RootDir is set to + /tmp/staging and + Dir::State::status is set to + /var/lib/dpkg/status, then the status file + will be looked up in + /tmp/staging/var/lib/dpkg/status. + APT in DSelect -- cgit v1.2.3-70-g09d2 From aff87a762f86ed47f2b81ccbac23faa5d9fddcdb Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 17 Dec 2007 20:49:50 +0100 Subject: apt-pkg/deb/dpkgpm.cc: fix types --- apt-pkg/deb/dpkgpm.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index d796146fa..11bf827d7 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -342,8 +342,8 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) */ void pkgDPkgPM::DoStdin(int master) { - char input_buf[256] = {0,}; - int len = read(0, input_buf, sizeof(input_buf)); + unsigned char input_buf[256] = {0,}; + ssize_t len = read(0, input_buf, sizeof(input_buf)); if (len) write(master, input_buf, len); else @@ -357,9 +357,9 @@ void pkgDPkgPM::DoStdin(int master) */ void pkgDPkgPM::DoTerminalPty(int master) { - char term_buf[1024] = {0,}; + unsigned char term_buf[1024] = {0,0, }; - int len=read(master, term_buf, sizeof(term_buf)); + ssize_t len=read(master, term_buf, sizeof(term_buf)); if(len == -1 && errno == EIO) { // this happens when the child is about to exit, we -- cgit v1.2.3-70-g09d2 From 3a6d37fdcfbdb152eb00371ff69b8871c9a02527 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 3 Jan 2008 11:25:58 +0100 Subject: * apt-pkg/packagemanager.{cc,h}: - propergate the Immediate flag to make hitting the "E: Internal Error, Could not perform immediate configuration (2)" harder --- apt-pkg/packagemanager.cc | 53 ++++++++++++++++++++++++++++++++++++----------- apt-pkg/packagemanager.h | 1 + debian/changelog | 4 ++++ 3 files changed, 46 insertions(+), 12 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index d6172c6c4..c391a6036 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -118,6 +118,41 @@ bool pkgPackageManager::FixMissing() } /*}}}*/ +// PM::ImmediateAdd - Add the immediate flag recursivly /*{{{*/ +// --------------------------------------------------------------------- +/* This adds the immediate flag to the pkg and recursively to the + dependendies + */ +void pkgPackageManager::ImmediateAdd(PkgIterator I, bool UseInstallVer) +{ + DepIterator D; + + if(UseInstallVer) + { + if(Cache[I].InstallVer == 0) + return; + D = Cache[I].InstVerIter(Cache).DependsList(); + } else { + if (I->CurrentVer == 0) + return; + D = I.CurrentVer().DependsList(); + } + + for ( /* nothing */ ; D.end() == false; D++) + if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) + { + if(!List->IsFlag(D.TargetPkg(), pkgOrderList::Immediate)) + { + if(Debug) + clog << "ImmediateAdd(): Adding Immediate flag to " << I.Name() << endl; + List->Flag(D.TargetPkg(),pkgOrderList::Immediate); + ImmediateAdd(D.TargetPkg(), UseInstallVer); + } + } + return; +} + /*}}}*/ + // PM::CreateOrderList - Create the ordering class /*{{{*/ // --------------------------------------------------------------------- /* This populates the ordering list with all the packages that are @@ -144,21 +179,15 @@ bool pkgPackageManager::CreateOrderList() (I->Flags & pkgCache::Flag::Important) == pkgCache::Flag::Important) && NoImmConfigure == false) { + if(Debug) + clog << "CreateOrderList(): Adding Immediate flag for " << I.Name() << endl; List->Flag(I,pkgOrderList::Immediate); - - // Look for other packages to make immediate configurea - if (Cache[I].InstallVer != 0) - for (DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); - D.end() == false; D++) - if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) - List->Flag(D.TargetPkg(),pkgOrderList::Immediate); + + // Look for other install packages to make immediate configurea + ImmediateAdd(I, true); // And again with the current version. - if (I->CurrentVer != 0) - for (DepIterator D = I.CurrentVer().DependsList(); - D.end() == false; D++) - if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) - List->Flag(D.TargetPkg(),pkgOrderList::Immediate); + ImmediateAdd(I, false); } // Not interesting diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 53cd4c96f..a1bfdc52d 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -49,6 +49,7 @@ class pkgPackageManager : protected pkgCache::Namespace bool Debug; bool DepAdd(pkgOrderList &Order,PkgIterator P,int Depth = 0); + void ImmediateAdd(PkgIterator P, bool UseInstallVer); virtual OrderResult OrderInstall(); bool CheckRConflicts(PkgIterator Pkg,DepIterator Dep,const char *Ver); bool CreateOrderList(); diff --git a/debian/changelog b/debian/changelog index ef9784178..4f22e9d92 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,6 +43,10 @@ apt (0.7.10) UNRELEASED; urgency=low * apt-pkg/acquire-item.{cc,h}: - make the authentication download code more robust against servers/proxies with broken If-Range implementations + * apt-pkg/packagemanager.{cc,h}: + - propergate the Immediate flag to make hitting the + "E: Internal Error, Could not perform immediate configuration (2)" + harder [ Chris Cheney ] * ftparchive/contents.cc: -- cgit v1.2.3-70-g09d2