Re: autoremoving metapackages doesn't remove dependencies... can we create hybrid-metapackages that do?

2012-06-27 Thread Jordon Bedwell
On Wed, Jun 27, 2012 at 11:44 AM, Chris McClimans
ubuntu-devel-disc...@hippiehacker.org wrote:
 Why does autoremoving the ubuntu-virt-mgmt metapackage fail to remove any
 dependencies, while autoremoving the virt-manager package works as expected?

 Is there a difference in the way that metapackages are processed vs normal
 packages?

Think of a meta-package as a grocery list.  Think of a normal package
as the ingredients.  With the grocery list you can add and remove
anything you want and some things aren't explicitly required and might
even get removed later... but with the ingredients, everything is
required and if you remove one ingredient you might as well remove the
rest because it's just not going to taste right.  That doesn't mean
there aren't optional ingredients though, those are just recommends ;)

 I looked at the debian/control on the source for both of them but didn't see
 anything out of the ordinary.

There are a few different things, the install size should be blank and
debian/rules should be a bit different.


 If they are treated differently, I'd like to know how to create a
 hybrid-metapackage.
 When a hybrid-metapackage is autoremoved, it's dependencies should be
 removed with it.

You can force apt (well I don't know if this is still the case though)
by adjusting /etc/apt/apt.conf.d/*autoremove and removing
meta-packages from the list of never auto-mark but that is pretty
dangerous, if you decide to remove a required from ubuntu-desktop that
isn't a requirement at all and probably just a bloat-package that is
useful to some then you end up removing it all.  I guess you could
have the meta-package trigger on uninstall and do an extra dpkg
uninstall though I don't know if that would even work, I've never
actually tried sorcery like that.

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: autoremoving metapackages doesn't remove dependencies... can we create hybrid-metapackages that do?

2012-06-27 Thread Chris McClimans
The  APT::Never-MarkAuto-Sections  default
in /etc/apt/apt.conf.d/01autoremove
means that packages in the */metapackage sections do not set aptitude
markauto**.

**
http://algebraicthunk.net/~dburrows/projects/aptitude/doc/en/ch02s02s07.html

This seems to be the primary difference in the packages being treated
differently for autoremove.

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.
My profile-meta-package-hybrids sound like they just need to avoid the
*/metapackage sections...

On Wed, Jun 27, 2012 at 12:28 PM, Jordon Bedwell jor...@envygeeks.comwrote:

 Think of a meta-package as a grocery list.  Think of a normal package
 as the ingredients.  With the grocery list you can add and remove
 anything you want and some things aren't explicitly required and might
 even get removed later... but with the ingredients, everything is
 required and if you remove one ingredient you might as well remove the
 rest because it's just not going to taste right.  That doesn't mean
 there aren't optional ingredients though, those are just recommends ;)


I'm actually trying to create custom profile-meta-packages that when
removed, remove dependent packages if they are no longer used.
I didn't think profile-meta-packages would be any different than normal
meta-packages until I saw your response.
These 'profile-meta-packages' may need to avoid actual meta-packages (from
*/metapackage sections) as dependencies if markauto isn't set during
installation.

 If they are treated differently, I'd like to know how to create a
  hybrid-metapackage.
  When a hybrid-metapackage is autoremoved, it's dependencies should be
  removed with it.

 You can force apt (well I don't know if this is still the case though)
 by adjusting /etc/apt/apt.conf.d/*autoremove and removing
 meta-packages from the list of never auto-mark but that is pretty
 dangerous,


Commenting out the metapackages sections from Never-MarkAuto-Sections did
make it work as expected... but is dangerous as mentioned.

 grep -A4 Never-MarkAuto /etc/apt/apt.conf.d/01autoremove
  Never-MarkAuto-Sections
  {
// metapackages;
// restricted/metapackages;
// universe/metapackages;

Since commenting these out works, I thought I might be able to override
APT::Never-MarkAuto-Sections on the command line.

However, it doesn't seem to zero out APT::Never-MarkAuto-Sections.

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

apt-get -o APT::Never-MarkAuto-Sections=  install -y ubuntu-virt-mgmt
apt-get -o APT::Never-MarkAuto-Sections=  autoremove -y ubuntu-virt-mgmt
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss