summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-03-14 11:38:41 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-03-14 11:38:41 +0100
commite6065cfcf0b5c6a57aa582cb3c2bd2b3fafe64b7 (patch)
treee90246321ade875980bee9e0ffdd33ed289da67a /apt-pkg
parent90ff41f8a6fdd304ac645f8279464462ca36fccd (diff)
* apt-pkg/depcache.cc:
- added "APT::Never-MarkAuto-Section" and consider dependencies of packages in this section manual * debian/apt.conf.ubuntu: - added APT::Never-MarkAuto-Section "metapackages";
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/depcache.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 81e1eeb33..fe8a617ac 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -955,11 +955,23 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
std::clog << "Installing " << InstPkg.Name()
<< " as dep of " << Pkg.Name()
<< std::endl;
- 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, 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;
+ }
}
continue;
}