On Sun, Jul 13, 2008 at 02:31:15PM +0300, Shachar Or <[EMAIL PROTECTED]> was
heard to say:
> When I type 'aptitude install fuse-utils/etch-backports
> libfuse2/etch-backports+M' I expect aptitude to install both packages
> from etch-backports and mark the libfuse2 package as being automatically
> installed.
>
> What happens is that the libfuse2 package doesn't get selected for
> installation, or perhaps it get deselected because "nothing depends on
> it". Thing is, fuse-utils does depend on it. So I assume this has to do
> with the fact the aptitude by default chooses to not mark dependencies
> when they are from etch-backports.
It has more to do with this:
--- cut here ---
pkgCache::VerIterator ver=pkg.CurrentVer();
if(action==cmdline_install)
ver=cmdline_find_ver(pkg, source, sourcestr);
// ...
switch(action)
{
case cmdline_installauto:
case cmdline_install:
case cmdline_reinstall:
if(action==cmdline_reinstall && pkg.CurrentVer().end())
break;
(*apt_cache_file)->set_candidate_version(ver, NULL);
(*apt_cache_file)->mark_install(pkg, allow_auto && aptcfg->FindB(PACKAGE
"::Auto-Install", true),
action == cmdline_reinstall, NULL);
--- cut here ---
The attached patch should fix it.
As a workaround, I think you should be able to get the effect you
want by listing the package later on the command-line with '&M'
appended, as in:
aptitude install fuse-utils/etch-backports libfuse2/etch-backports
"libfuse2&M"
Daniel
# HG changeset patch
# User Daniel Burrows <[EMAIL PROTECTED]>
# Date 1215965629 25200
# Node ID dcdb27036ceeac387dabfc3fd5fd935207a2c949
# Parent 657b68f8a501c16f3d5a4f4c675ec7bdcecdc677
Correctly handle install-and-mark-auto commands that are targeted at a particular version (e.g., "install foo/archive+M").
The version on the command-line was only being selected for an
"install" action; for "installauto" the code would set the candidate
version to be the current verison, with the result that nothing at all
would happen.
diff -r 657b68f8a501 -r dcdb27036cee src/cmdline/cmdline_action.cc
--- a/src/cmdline/cmdline_action.cc Sat Jul 12 17:39:01 2008 -0700
+++ b/src/cmdline/cmdline_action.cc Sun Jul 13 09:13:49 2008 -0700
@@ -292,7 +292,7 @@
}
pkgCache::VerIterator ver=pkg.CurrentVer();
- if(action==cmdline_install)
+ if(action==cmdline_install || action == cmdline_installauto)
ver=cmdline_find_ver(pkg, source, sourcestr);
switch(action)