summaryrefslogtreecommitdiff
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
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";
-rw-r--r--apt-pkg/depcache.cc20
-rw-r--r--debian/apt.conf.ubuntu1
-rw-r--r--debian/changelog13
-rw-r--r--doc/examples/configure-index10
4 files changed, 36 insertions, 8 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;
}
diff --git a/debian/apt.conf.ubuntu b/debian/apt.conf.ubuntu
index 8d095f17e..3a9945b54 100644
--- a/debian/apt.conf.ubuntu
+++ b/debian/apt.conf.ubuntu
@@ -7,4 +7,5 @@ APT
};
Install-Recommends-Section "metapackages";
+ Never-MarkAuto-Section "metapackages";
};
diff --git a/debian/changelog b/debian/changelog
index aa6a01692..3038e49bd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+apt (0.6.46.4ubuntu10) feisty; urgency=low
+
+ * 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";
+
+ --
+
apt (0.6.46.4ubuntu9) feisty; urgency=low
* debian/control:
@@ -5,7 +15,6 @@ apt (0.6.46.4ubuntu9) feisty; urgency=low
- Set Ubuntu maintainer address
* 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
* cmdline/apt-get.cc:
- fix version output in autoremove list (LP#68941)
@@ -16,7 +25,7 @@ apt (0.6.46.4ubuntu9) feisty; urgency=low
* doc/examples/configure-index:
- document APT::Acquire::Translation
- --
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 13 Mar 2007 15:24:39 +0100
apt (0.6.46.4ubuntu8) feisty; urgency=low
diff --git a/doc/examples/configure-index b/doc/examples/configure-index
index e5d1f2ab3..2bcafa39d 100644
--- a/doc/examples/configure-index
+++ b/doc/examples/configure-index
@@ -96,8 +96,14 @@ APT
// consider Recommends, Suggests as important dependencies that should
// be installed by default
- APT::Install-Recommends "false";
- APT::Install-Suggests "false";
+ Install-Recommends "false";
+ Install-Suggests "false";
+
+ // install recommends automatically for packages in this section
+ Install-Recommends-Section "metapackages";
+
+ // consider dependencies of packages in this section manual
+ Never-MarkAuto-Section "metapackages";
// Write progress messages on this fd (for stuff like base-config)
Status-Fd "-1";