<div>The  APT::Never-MarkAuto-Sections  default in /etc/apt/apt.conf.d/01autoremove  </div><div>means that packages in the */metapackage sections do not set aptitude markauto**.<div><br></div><div>** <a href="http://algebraicthunk.net/~dburrows/projects/aptitude/doc/en/ch02s02s07.html">http://algebraicthunk.net/~dburrows/projects/aptitude/doc/en/ch02s02s07.html</a><br>

<div><br></div><div>This seems to be the primary difference in the packages being treated differently for autoremove.</div><div><br></div><div><div>I would expect that if I put custom metapackages in a local repo and made sure the were NOT in the metapackages section, then markauto would be set and autoremove would work.</div>

<div><div>My profile-meta-package-hybrids sound like they just need to avoid the */metapackage sections...</div></div><div><br></div><div><div class="gmail_quote">On Wed, Jun 27, 2012 at 12:28 PM, Jordon Bedwell <span dir="ltr"><<a href="mailto:jordon@envygeeks.com" target="_blank">jordon@envygeeks.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Think of a meta-package as a grocery list.  Think of a normal package</div>
as the ingredients.  With the grocery list you can add and remove<br>
anything you want and some things aren't explicitly required and might<br>
even get removed later... but with the ingredients, everything is<br>
required and if you remove one ingredient you might as well remove the<br>
rest because it's just not going to taste right.  That doesn't mean<br>
there aren't optional ingredients though, those are just recommends ;)<br></blockquote><div><br></div><div>I'm actually trying to create custom profile-meta-packages that when removed, remove dependent packages if they are no longer used.</div>

<div>I didn't think profile-meta-packages would be any different than normal meta-packages until I saw your response.</div><div>These 'profile-meta-packages' may need to avoid actual meta-packages (from */metapackage sections) as dependencies if markauto isn't set during installation.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>> If they are treated differently, I'd like to know how to create a<br>
> hybrid-metapackage.<br>
> When a hybrid-metapackage is autoremoved, it's dependencies should be<br>
> removed with it.<br>
<br>
</div>You can force apt (well I don't know if this is still the case though)<br>
by adjusting /etc/apt/apt.conf.d/*autoremove and removing<br>
meta-packages from the list of never auto-mark but that is pretty<br>
dangerous,</blockquote><div><br></div><div>Commenting out the metapackages sections from Never-MarkAuto-Sections did make it work as expected... but is dangerous as mentioned.</div><div><br></div><div> grep -A4 Never-MarkAuto /etc/apt/apt.conf.d/01autoremove  </div>

<div><div>  Never-MarkAuto-Sections</div><div>  {</div><div>//<span style="white-space:pre-wrap">   </span>"metapackages";</div>
<div>//<span style="white-space:pre-wrap">        </span>"restricted/metapackages";</div><div>//<span style="white-space:pre-wrap">   </span>"universe/metapackages";</div></div>
<div><br></div><div>Since commenting these out works, I thought I might be able to override APT::Never-MarkAuto-Sections on the command line.</div><div><br></div><div>However, it doesn't seem to zero out APT::Never-MarkAuto-Sections.</div>

<div><br></div><div>The apt.conf man page said something about using #clear on lists, but I'm unsure how to call that on the command line.</div><div>Anyone know the correct way to zero out an APT list option on the command line?</div>

<div><br></div><div><div>apt-get -o APT::Never-MarkAuto-Sections=" " install -y ubuntu-virt-mgmt</div><div>apt-get -o APT::Never-MarkAuto-Sections=" " autoremove -y ubuntu-virt-mgmt</div><div></div></div>

</div>
</div></div></div></div>