summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/depcache.cc26
-rw-r--r--debian/apt.conf.ubuntu (renamed from debian/apt.conf.autoremove)2
-rw-r--r--debian/changelog9
-rwxr-xr-xdebian/rules2
4 files changed, 31 insertions, 8 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 4d193dc2e..740d14426 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -873,6 +873,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
bool found=false;
VerIterator instVer = Pkg.CurrentVer();
if(!instVer.end())
+ {
for (DepIterator D = instVer.DependsList(); D.end() != true; D++)
{
//FIXME: deal better with or-groups(?)
@@ -881,9 +882,10 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
if(IsImportantDep(D) && Start.TargetPkg() == D.TargetPkg())
found=true;
}
- // this is a new dep if it was not found to be already
- // a important dep of the installed pacakge
- isNewImportantDep = !found;
+ // this is a new dep if it was not found to be already
+ // a important dep of the installed pacakge
+ isNewImportantDep = !found;
+ }
}
if(isNewImportantDep)
if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true)
@@ -1330,8 +1332,22 @@ bool pkgDepCache::Policy::IsImportantDep(DepIterator Dep)
{
if(Dep.IsCritical())
return true;
- else if(Dep->Type == pkgCache::Dep::Recommends)
- return _config->FindB("APT::Install-Recommends", false);
+ else if(Dep->Type == pkgCache::Dep::Recommends)
+ {
+ if ( _config->FindB("APT::Install-Recommends", false))
+ return true;
+ // we suport a special mode to only install-recommends for certain
+ // sections
+ // FIXME: this is a meant as a temporarly solution until the
+ // recommends are cleaned up
+ string s = _config->Find("APT::Install-Recommends-Section","");
+ if(s.size() > 0)
+ {
+ const char *sec = Dep.TargetPkg().Section();
+ if (sec && strcmp(sec, s.c_str()) == 0)
+ return true;
+ }
+ }
else if(Dep->Type == pkgCache::Dep::Suggests)
return _config->FindB("APT::Install-Suggests", false);
diff --git a/debian/apt.conf.autoremove b/debian/apt.conf.ubuntu
index 98143ce9a..8d095f17e 100644
--- a/debian/apt.conf.autoremove
+++ b/debian/apt.conf.ubuntu
@@ -5,4 +5,6 @@ APT
"^linux-image.*";
"^linux-restricted-modules.*";
};
+
+ Install-Recommends-Section "metapackages";
};
diff --git a/debian/changelog b/debian/changelog
index d8f90ba40..0bd5e4532 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,9 +4,14 @@ apt (0.6.45ubuntu6) edgy; urgency=low
* cmdline/apt-get.cc:
- always show auto-removable packages and give a hint how to remove
them
- * debian/apt.conf.autoremove:
+ * debian/apt.conf.ubuntu:
- exlucde linux-image and linux-restricted-modules from ever being
auto-removed
+ - added "metapackages" as the section we want to install recommends
+ by default
+ * apt-pkg/depcache.cc:
+ - added support to turn install-recommends selectively on/off by
+ section
[Ian Jackson]
* Tests pass without code changes! Except that we need this:
* Bump cache file major version to force rebuild so that Breaks
@@ -17,7 +22,7 @@ apt (0.6.45ubuntu6) edgy; urgency=low
* Initial draft of `Breaks' implementation. Appears to compile,
but as yet *completely untested*.
- --
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 7 Sep 2006 11:50:52 +0200
apt (0.6.45ubuntu5) edgy; urgency=low
diff --git a/debian/rules b/debian/rules
index ffc23402e..2007370c4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -211,7 +211,7 @@ apt: build debian/shlibs.local
cp debian/bugscript debian/$@/usr/share/bug/apt/script
cp share/ubuntu-archive.gpg debian/$@/usr/share/$@
- cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove
+ cp debian/apt.conf.ubuntu debian/$@/etc/apt/apt.conf.d/01ubuntu
# head -n 500 ChangeLog > debian/ChangeLog
# make rosetta happy and remove pot files in po/ (but leave stuff