public inbox for gentoo-pms@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-pms] Slot operators for built packages
@ 2012-11-07 20:28 David Leverton
  2012-11-07 21:36 ` Zac Medico
  0 siblings, 1 reply; 5+ messages in thread
From: David Leverton @ 2012-11-07 20:28 UTC (permalink / raw
  To: gentoo-pms

It turns out that PMS says that if the developer wants to specify a dep 
the matches a specific slot, and also that it should be locked to the 
subslot of the package matching the dep at install time, the syntax is 
:slot=, that is with the slot between the : and the =.  Also, for both 
:= and :slot= forms, when the package is installed and the dep is 
rewritten to incorporate details of the matching package, the syntax is 
:slot/subslot=, again with all the information between the : and the =.

This means that it's not possible to tell from the built package's dep 
whether it was originally := or :slot=.  Is it too late to change this, 
by moving either the developer-written or PM-written part after the =? 
If it makes a difference, I didn't find any uses of :slot= in the main 
tree, although my grep might have been wrong....


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

* Re: [gentoo-pms] Slot operators for built packages
  2012-11-07 20:28 [gentoo-pms] Slot operators for built packages David Leverton
@ 2012-11-07 21:36 ` Zac Medico
  2012-11-07 21:44   ` Ciaran McCreesh
  0 siblings, 1 reply; 5+ messages in thread
From: Zac Medico @ 2012-11-07 21:36 UTC (permalink / raw
  To: gentoo-pms; +Cc: David Leverton

On 11/07/2012 12:28 PM, David Leverton wrote:
> It turns out that PMS says that if the developer wants to specify a dep
> the matches a specific slot, and also that it should be locked to the
> subslot of the package matching the dep at install time, the syntax is
> :slot=, that is with the slot between the : and the =.  Also, for both
> := and :slot= forms, when the package is installed and the dep is
> rewritten to incorporate details of the matching package, the syntax is
> :slot/subslot=, again with all the information between the : and the =.

Portage distinguishes it by writing in the implicit sub-slot. So, foo:0=
would be rewritten as foo:0/0= at install time. For the code, look for
"def slot_operator_built(self):" in this file:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=blob;f=pym/portage/dep/__init__.py

That defines the Atom.slot_operator_built attribute which is used a lot.

> This means that it's not possible to tell from the built package's dep
> whether it was originally := or :slot=.  Is it too late to change this,
> by moving either the developer-written or PM-written part after the =?
> If it makes a difference, I didn't find any uses of :slot= in the main
> tree, although my grep might have been wrong....

Yeah, I think it's too late to change anything, since EAPI 5 portage has
already been marked stable.
-- 
Thanks,
Zac


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

* Re: [gentoo-pms] Slot operators for built packages
  2012-11-07 21:36 ` Zac Medico
@ 2012-11-07 21:44   ` Ciaran McCreesh
  2012-11-07 21:49     ` Zac Medico
  0 siblings, 1 reply; 5+ messages in thread
From: Ciaran McCreesh @ 2012-11-07 21:44 UTC (permalink / raw
  To: gentoo-pms

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

On Wed, 07 Nov 2012 13:36:59 -0800
Zac Medico <zmedico@gentoo.org> wrote:
> On 11/07/2012 12:28 PM, David Leverton wrote:
> > It turns out that PMS says that if the developer wants to specify a
> > dep the matches a specific slot, and also that it should be locked
> > to the subslot of the package matching the dep at install time, the
> > syntax is :slot=, that is with the slot between the : and the =.
> > Also, for both := and :slot= forms, when the package is installed
> > and the dep is rewritten to incorporate details of the matching
> > package, the syntax is :slot/subslot=, again with all the
> > information between the : and the =.
> 
> Portage distinguishes it by writing in the implicit sub-slot. So,
> foo:0= would be rewritten as foo:0/0= at install time.

So how do you tell the difference between something that was foo:= and
something that was foo:0= ?

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-pms] Slot operators for built packages
  2012-11-07 21:44   ` Ciaran McCreesh
@ 2012-11-07 21:49     ` Zac Medico
  2012-11-07 21:51       ` Ciaran McCreesh
  0 siblings, 1 reply; 5+ messages in thread
From: Zac Medico @ 2012-11-07 21:49 UTC (permalink / raw
  To: gentoo-pms

On 11/07/2012 01:44 PM, Ciaran McCreesh wrote:
> On Wed, 07 Nov 2012 13:36:59 -0800
> Zac Medico <zmedico@gentoo.org> wrote:
>> On 11/07/2012 12:28 PM, David Leverton wrote:
>>> It turns out that PMS says that if the developer wants to specify a
>>> dep the matches a specific slot, and also that it should be locked
>>> to the subslot of the package matching the dep at install time, the
>>> syntax is :slot=, that is with the slot between the : and the =.
>>> Also, for both := and :slot= forms, when the package is installed
>>> and the dep is rewritten to incorporate details of the matching
>>> package, the syntax is :slot/subslot=, again with all the
>>> information between the : and the =.
>>
>> Portage distinguishes it by writing in the implicit sub-slot. So,
>> foo:0= would be rewritten as foo:0/0= at install time.
> 
> So how do you tell the difference between something that was foo:= and
> something that was foo:0= ?

You can't. Do you want that info for some reason?
-- 
Thanks,
Zac


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

* Re: [gentoo-pms] Slot operators for built packages
  2012-11-07 21:49     ` Zac Medico
@ 2012-11-07 21:51       ` Ciaran McCreesh
  0 siblings, 0 replies; 5+ messages in thread
From: Ciaran McCreesh @ 2012-11-07 21:51 UTC (permalink / raw
  To: gentoo-pms

[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]

On Wed, 07 Nov 2012 13:49:04 -0800
Zac Medico <zmedico@gentoo.org> wrote:
> On 11/07/2012 01:44 PM, Ciaran McCreesh wrote:
> > On Wed, 07 Nov 2012 13:36:59 -0800
> > Zac Medico <zmedico@gentoo.org> wrote:
> >> On 11/07/2012 12:28 PM, David Leverton wrote:
> >>> It turns out that PMS says that if the developer wants to specify
> >>> a dep the matches a specific slot, and also that it should be
> >>> locked to the subslot of the package matching the dep at install
> >>> time, the syntax is :slot=, that is with the slot between the :
> >>> and the =. Also, for both := and :slot= forms, when the package
> >>> is installed and the dep is rewritten to incorporate details of
> >>> the matching package, the syntax is :slot/subslot=, again with
> >>> all the information between the : and the =.
> >>
> >> Portage distinguishes it by writing in the implicit sub-slot. So,
> >> foo:0= would be rewritten as foo:0/0= at install time.
> > 
> > So how do you tell the difference between something that was foo:=
> > and something that was foo:0= ?
> 
> You can't. Do you want that info for some reason?

Yeah. It allows us to reinstall packages whose dependencies (or other
metadata) have changed.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2012-11-07 21:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 20:28 [gentoo-pms] Slot operators for built packages David Leverton
2012-11-07 21:36 ` Zac Medico
2012-11-07 21:44   ` Ciaran McCreesh
2012-11-07 21:49     ` Zac Medico
2012-11-07 21:51       ` Ciaran McCreesh

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