From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-devhelp+bounces-74-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1MqvQx-0002Ak-JV
	for garchives@archives.gentoo.org; Thu, 24 Sep 2009 21:00:59 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id CD391E08C3;
	Thu, 24 Sep 2009 21:00:58 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 919C2E08C3
	for <gentoo-devhelp@lists.gentoo.org>; Thu, 24 Sep 2009 21:00:58 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 2B88067B96
	for <gentoo-devhelp@lists.gentoo.org>; Thu, 24 Sep 2009 21:00:58 +0000 (UTC)
X-Virus-Scanned: amavisd-new at gentoo.org
X-Spam-Score: -3.215
X-Spam-Level: 
X-Spam-Status: No, score=-3.215 required=5.5 tests=[AWL=-0.616,
	BAYES_00=-2.599]
Received: from smtp.gentoo.org ([127.0.0.1])
	by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id OPrakdZxyAXV for <gentoo-devhelp@lists.gentoo.org>;
	Thu, 24 Sep 2009 21:00:51 +0000 (UTC)
Received: from lo.gmane.org (lo.gmane.org [80.91.229.12])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTP id 0C0C367AE7
	for <gentoo-devhelp@gentoo.org>; Thu, 24 Sep 2009 21:00:49 +0000 (UTC)
Received: from list by lo.gmane.org with local (Exim 4.50)
	id 1MqvQk-00009p-3r
	for gentoo-devhelp@gentoo.org; Thu, 24 Sep 2009 23:00:46 +0200
Received: from athedsl-388099.home.otenet.gr ([79.131.68.1])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <gentoo-devhelp@gentoo.org>; Thu, 24 Sep 2009 23:00:46 +0200
Received: from realnc by athedsl-388099.home.otenet.gr with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <gentoo-devhelp@gentoo.org>; Thu, 24 Sep 2009 23:00:46 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: gentoo-devhelp@lists.gentoo.org
From:  Nikos Chantziaras <realnc@arcor.de>
Subject: [gentoo-devhelp]  Re: Writing ebuilds that replace others but with   different name
Date:  Fri, 25 Sep 2009 00:00:27 +0300
Organization:  Lucas Barks
Message-ID: <h9gmla$ml4$1@ger.gmane.org>
References:  <h9gk35$e9m$1@ger.gmane.org> <4ABBD8C1.5040003@j-schmitz.net>
Precedence: bulk
List-Post: <mailto:gentoo-devhelp@lists.gentoo.org>
List-Help: <mailto:gentoo-devhelp+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-devhelp+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-devhelp+subscribe@lists.gentoo.org>
List-Id: Gentoo Development-related help <gentoo-devhelp.gentoo.org>
X-BeenThere: gentoo-devhelp@gentoo.org
X-BeenThere: gentoo-devhelp@lists.gentoo.org
Mime-Version:  1.0
Content-Type:  text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding:  7bit
X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: athedsl-388099.home.otenet.gr
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090923 Thunderbird/3.0b4
In-Reply-To: <4ABBD8C1.5040003@j-schmitz.net>
Sender: news <news@ger.gmane.org>
X-Archives-Salt: c23bb8aa-f977-4613-949f-343df0b7cd1a
X-Archives-Hash: f60de3cf344fa3cfacc77cb0d73343f6

On 09/24/2009 11:38 PM, Justin wrote:
> Nikos Chantziaras wrote:
>> I seem to have some fundamental "flaw" in portage.  It seems I am not
>> able to write an ebuild that will in effect be able to replace another
>> one but with a different name.
>>
>> With RPMs, no matter how the RPM is named, it has "provides" data in it.
>>   Is there some similar mechanism in portage?  It seems to me that if the
>> name of an ebuild is changed, then *all* ebuilds depending on it will
>> have to change too.  That looks like a PITA to me if it's true.
>>
>> For example, if I have an overlay that provides alternative/altered
>> packages of already existing ones in the portage tree, they will "clash"
>> with portage.  Let's assume that my overlay provides an ebuild called
>> "foo-alt" which is a variation of a package in portage called "foo", but
>> is totally compatible with it.  What I'm looking for is being able to
>> emerge "foo-alt", but have the ebuild state clearly that it provides the
>> "foo" dependency, so ebuilds depending on "foo" will be satisfied if
>> "foo-alt" is installed but "foo" isn't.
>>
>> Possible?
>>
>>
> Thats's what virtuals are good for. As an example see virtual/jre.
> But in principle you are right. renaming a package is a headache and
> should really be avoided.

I'm not sure how I can use virtuals to provide an alternative but 
completely compatible package.  I'll give a straight example:

In my overlay, there's "x11-libs/qt-opengl-alt".  It is a variation of 
qt-opengl, providing and *replacing* all files in it.  However, if I 
unmerge qt-opengl and install qt-opengl-alt instead, even though the 
installed packages depending on qt-opengl work perfectly fine with it 
(it's fully compatible), an "emerge -uDN world" will try to pull 
qt-opengl back in because it thinks it's missing (and this will of 
course result in a file collision since qt-opengl-alt is also installed, 
providing the same files).

Changing the category also doesn't help ("x11-libs-alt/qt-opengl" for 
example).

So virtuals don't seem to have anything to do with with my problem. 
What's missing is something like RPM's "provides" (so the qt-opengl-alt 
ebuild would be able to say "I provide the qt-opengl package.)  From 
your answer, I take it that portage doesn't offer anything like this and 
the ebuild's name is hardcoded to be the package it provides :P