public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Virtual Packages
@ 2011-05-11 21:43 John
  2011-05-11 22:07 ` Paul Hartman
  2011-05-12  3:18 ` Mike Edenfield
  0 siblings, 2 replies; 4+ messages in thread
From: John @ 2011-05-11 21:43 UTC (permalink / raw
  To: gentoo-user


Have noticed that some packages require virtual packages to installed
as well. For example when installing dev-db/mysql, virtual/mysql is
installed as well. 

What are the purposes of these "virtual" packages??

Thanks 

-- 
John D Maunder
john@articwolf.myzen.co.uk



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] Virtual Packages
  2011-05-11 21:43 [gentoo-user] Virtual Packages John
@ 2011-05-11 22:07 ` Paul Hartman
  2011-05-12  3:18 ` Mike Edenfield
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Hartman @ 2011-05-11 22:07 UTC (permalink / raw
  To: gentoo-user

On Wed, May 11, 2011 at 4:43 PM, John <jdm@arcticwolf.myzen.co.uk> wrote:
>
> Have noticed that some packages require virtual packages to installed
> as well. For example when installing dev-db/mysql, virtual/mysql is
> installed as well.
>
> What are the purposes of these "virtual" packages??

I think it is usually when there are alternatives available which can
fit the dependency. For example, you could use MySQL or MariaDB to
satisfy virtual/mysql dependency. That way the alternatives can be
defined once in the virtual package, rather than in every single
package that uses MySQL.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] Virtual Packages
  2011-05-11 21:43 [gentoo-user] Virtual Packages John
  2011-05-11 22:07 ` Paul Hartman
@ 2011-05-12  3:18 ` Mike Edenfield
  2011-05-13 15:50   ` dong l
  1 sibling, 1 reply; 4+ messages in thread
From: Mike Edenfield @ 2011-05-12  3:18 UTC (permalink / raw
  To: gentoo-user

On 5/11/2011 5:43 PM, John wrote:
>
> Have noticed that some packages require virtual packages to installed
> as well. For example when installing dev-db/mysql, virtual/mysql is
> installed as well.
>
> What are the purposes of these "virtual" packages??

They allow other packages to depend on the presence of a 
"service" or "feature" instead of depending on a specific 
implementation.  For example, both sys-libs/pam and 
sys-auth/openpam satisfy "virtual/pam", since most 
applications will work just find against either library. 
There's about a dozen possible packages that provide 
"virtual/bootloader".

It's also used to allow different architectures to have 
different "default" implementations of the same service 
(like virtual/libc).

virtual/mysql, as of v5.1, can mean dev-db/mysql or 
dev-db/mariadb.

--Mike



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] Virtual Packages
  2011-05-12  3:18 ` Mike Edenfield
@ 2011-05-13 15:50   ` dong l
  0 siblings, 0 replies; 4+ messages in thread
From: dong l @ 2011-05-13 15:50 UTC (permalink / raw
  To: gentoo-user

I think it is a bit like IoC in OOP programing.
see http://en.wikipedia.org/wiki/Inversion_of_control



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-13 15:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 21:43 [gentoo-user] Virtual Packages John
2011-05-11 22:07 ` Paul Hartman
2011-05-12  3:18 ` Mike Edenfield
2011-05-13 15:50   ` dong l

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox