summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-06-14 11:59:13 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-06-14 11:59:13 +0200
commit702c84fb16a65ce0850bb99676edfbeefd656193 (patch)
tree2fcd13af56764d344124db49061d0dc970424179 /apt-pkg/depcache.cc
parent8d4b705ab0ef3a0de13a9ff9f1aa47f09112f374 (diff)
parent47026cdea6ba7d145922ce21d5ec478598126b8d (diff)
* apt-pkg/deb/dpkgpm.cc:
- apport integration added, this means that a apport report is written on dpkg failures * merged from debian/unstable, remaining changes: - maintainer field changed * merged the debian/experimental changes back into the debian/sid branch * merged from Christian Perrier: * mr.po: New Marathi translation Closes: #416806 * zh_CN.po: Updated by Eric Pareja Closes: #416822 * tl.po: Updated by Eric Pareja Closes: #416638 * gl.po: Updated by Jacobo Tarrio * da.po: Updated by Claus Hindsgaul * fr.po: Remove a non-breakable space for usability * ru.po: Updated Russian translation. Closes: #405476 * *.po: Unfuzzy after upstream typo corrections * buildlib/archtable: - added support for sh3/sh4 (closes: #424870) - added support for m32r (closes: #394096) * buildlib/systemtable: - added support for lpia * configure.in: - check systemtable for architecture mapping too * fix error in AutocleanInterval, closes: #319339 (thanks to Israel G. Lugo for the patch) * add "purge" commandline argument, closes: #133421) (thanks to Julien Danjou for the patch) * add "purge" commandline argument, closes: #133421) (thanks to Julien Danjou for the patch) * fix FTBFS with gcc 4.3, closes: #417090 (thanks to Martin Michlmayr for the patch) * add --dsc-only option, thanks to K. Richard Pixley * Removed the more leftover #pragma interface/implementation closes: #306937 (thanks to Andreas Henriksson for the patch) * ABI library name change because its build against new glibc * implement SourceVer() in pkgRecords (thanks to Daniel Burrows for the patch!) * apt-pkg/algorithm.cc: - use clog for all debugging - only increase the score of installed applications if they are not obsolete - fix resolver bug on removal triggered by weak-dependencies with or-groups * methods/http.cc: - send apt version in User-Agent * apt-pkg/deb/debrecords.cc: - fix SHA1Hash() return value * apt-pkg/cdrom.cc: - only unmount if APT::CDROM::NoMount is false * methods/cdrom.cc: - only umount if it was mounted by the method before - if decompression of a index fails, delete the index * vi.po: Updated to 515t. Closes: #426976 * eu.po: Updated to 515t. Closes: #423766 * pt.po: 515t. Closes: #423111 * fr.po: Updated by Christian Perrier * Update all PO and the POT. Gives 513t2f for formerly complete translations * Package that contains tall the new features * Removed all #pragma interface/implementation * Branch that contains tall the new features: * translated package descriptions * task install support * automatic dependency removal (thanks to Daniel Burrows) * merged support for the new dpkg "Breaks" field (thanks to Ian Jackson) * handle network failures more gracefully on "update" * support for unattended-upgrades (via unattended-upgrades package) * added apt-transport-https method - ca.po: Updated to 514t - be.po: Updated to 514t - it.po: Updated to 514t - hu.po: Updated to 514t - zh_TW.po: Updated to 514t - ar.po: Updated to 293t221u. - ru.po: Updated to 514t. Closes: #392466 - nb.po: Updated to 514t. Closes: #392466 - pt.po: Updated to 514t. Closes: #393199 - fr.po: One spelling error corrected: s/accèder/accéder - km.po: Updated to 514t. - ko.po: Updated to 514t. - bg.po: Updated to 514t. - de.po: Updated to 514t. - en_GB.po: Updated to 514t. * debian/control: - depend on debian-archive-keyring to offer clean upgrade path (closes: #386800) * merged "install-recommends" branch (ABI break): - new "--install-recommends" - install new recommends on "upgrade" if --install-recommends is given - new "--fix-policy" option to install all packages with unmet important dependencies (usefull with --install-recommends to see what not-installed recommends are on the system) - fix of recommended packages display (only show CandidateVersion fix or-group handling) * merged "install-task" branch (use with "apt-get install taskname^") * Applied patch from Daniel Schepler to make apt bin-NMU able. * apt-pkg/acquire-item.cc: - fix reversed logic of the "Acquire::PDiffs" option * apt-pkg/contrib/sha256.cc: - applied patch to fix unaligned access problem. Closes: #367417 (thanks to David Mosberger) * apt-pkg/contrib/sha256.{cc,h},hashes.{cc,h}: support for sha256 (thanks to Anthony Towns) * ftparchive/cachedb.{cc,h},writer.{cc,h}: optimizations (thanks to Anthony Towns) * apt pdiff support from experimental merged * apt-pkg/deb/dpkgpm.cc: wording fixes (thanks to Matt Zimmerman) - fix error in dpkg interaction (closes: #364513, thanks to Martin Dickopp)
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc41
1 files changed, 20 insertions, 21 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 9f0fa143d..491ba6d4c 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -240,9 +240,9 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)
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)
+ continue;
if(_config->FindB("Debug::pkgAutoRemove",false))
std::clog << "Writing new AutoInstall: "
<< pkg.Name() << std::endl;
@@ -715,7 +715,6 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser)
// We dont even try to keep virtual packages..
if (Pkg->VersionList == 0)
return;
-
#if 0 // reseting the autoflag here means we lose the
// auto-mark information if a user selects a package for removal
// but changes his mind then and sets it for keep again
@@ -955,23 +954,22 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
std::clog << "Installing " << InstPkg.Name()
<< " as dep of " << Pkg.Name()
<< std::endl;
-
- // now check if we should consider it a automatic dependency or not
- string sec = _config->Find("APT::Never-MarkAuto-Section","");
- if(Pkg.Section() && (string(Pkg.Section()) == sec))
- {
- if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true)
- std::clog << "Setting NOT as auto-installed because its a direct dep of a package in section " << sec << std::endl;
- MarkInstall(InstPkg,true,Depth + 1, true, ForceImportantDeps);
- }
- else
- {
- // mark automatic dependency
- MarkInstall(InstPkg,true,Depth + 1, false, ForceImportantDeps);
- // Set the autoflag, after MarkInstall because MarkInstall unsets it
- if (P->CurrentVer == 0)
- PkgState[InstPkg->ID].Flags |= Flag::Auto;
- }
+ // now check if we should consider it a automatic dependency or not
+ string sec = _config->Find("APT::Never-MarkAuto-Section","");
+ if(Pkg.Section() && (string(Pkg.Section()) == sec))
+ {
+ if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true)
+ std::clog << "Setting NOT as auto-installed because its a direct dep of a package in section " << sec << std::endl;
+ MarkInstall(InstPkg,true,Depth + 1, true);
+ }
+ else
+ {
+ // mark automatic dependency
+ MarkInstall(InstPkg,true,Depth + 1, false, ForceImportantDeps);
+ // Set the autoflag, after MarkInstall because MarkInstall unsets it
+ if (P->CurrentVer == 0)
+ PkgState[InstPkg->ID].Flags |= Flag::Auto;
+ }
}
continue;
}
@@ -1382,3 +1380,4 @@ bool pkgDepCache::Policy::IsImportantDep(DepIterator Dep)
return false;
}
/*}}}*/
+