Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: Dev

mono-env.eclass: new eclass to be used by most of dotnet packages

 

 

Gentoo dev RSS feed   Index | Next | Previous | View Threaded


pacho at gentoo

Apr 14, 2013, 2:40 AM

Post #1 of 10 (679 views)
Permalink
mono-env.eclass: new eclass to be used by most of dotnet packages

Due reasons explained here:
https://bugs.gentoo.org/show_bug.cgi?id=462052#c1

We would like to start a process of simplifying dotnet maintained
eclasses a lot because they are currently really hard to maintain. As a
start point, we will need a simple eclass simply to export some
variables needed to build most of dotnet packages. That variables are
currently being exported by mono.eclass, the idea would be to split the
"environment exporting" part out of it (and deprecate current
mono.eclass in the future)
Attachments: mono-env.eclass (1.15 KB)


mgorny at gentoo

Apr 14, 2013, 2:45 AM

Post #2 of 10 (646 views)
Permalink
Re: mono-env.eclass: new eclass to be used by most of dotnet packages [In reply to]

On Sun, 14 Apr 2013 11:40:03 +0200
Pacho Ramos <pacho [at] gentoo> wrote:

> # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
> # shared dir to ${T} so that ${T}/.wapi can be used during the install process.
> export MONO_SHARED_DIR="${T}"

Don't use ${T} in global scope. And just don't export them
in the global scope either.

--
Best regards,
Michał Górny
Attachments: signature.asc (0.94 KB)


pacho at gentoo

Apr 14, 2013, 2:59 AM

Post #3 of 10 (647 views)
Permalink
Re: mono-env.eclass: new eclass to be used by most of dotnet packages [In reply to]

El dom, 14-04-2013 a las 11:45 +0200, Michał Górny escribió:
> On Sun, 14 Apr 2013 11:40:03 +0200
> Pacho Ramos <pacho [at] gentoo> wrote:
>
> > # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
> > # shared dir to ${T} so that ${T}/.wapi can be used during the install process.
> > export MONO_SHARED_DIR="${T}"
>
> Don't use ${T} in global scope. And just don't export them
> in the global scope either.
>

Why not?


pacho at gentoo

Apr 14, 2013, 3:00 AM

Post #4 of 10 (646 views)
Permalink
Re: mono-env.eclass: new eclass to be used by most of dotnet packages [In reply to]

El dom, 14-04-2013 a las 11:45 +0200, Michał Górny escribió:
> On Sun, 14 Apr 2013 11:40:03 +0200
> Pacho Ramos <pacho [at] gentoo> wrote:
>
> > # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
> > # shared dir to ${T} so that ${T}/.wapi can be used during the install process.
> > export MONO_SHARED_DIR="${T}"
>
> Don't use ${T} in global scope. And just don't export them
> in the global scope either.
>

Maybe setting a custom pkg_setup could be an option :/


mgorny at gentoo

Apr 14, 2013, 3:08 AM

Post #5 of 10 (649 views)
Permalink
Re: mono-env.eclass: new eclass to be used by most of dotnet packages [In reply to]

On Sun, 14 Apr 2013 11:59:14 +0200
Pacho Ramos <pacho [at] gentoo> wrote:

> El dom, 14-04-2013 a las 11:45 +0200, Michał Górny escribió:
> > On Sun, 14 Apr 2013 11:40:03 +0200
> > Pacho Ramos <pacho [at] gentoo> wrote:
> >
> > > # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
> > > # shared dir to ${T} so that ${T}/.wapi can be used during the install process.
> > > export MONO_SHARED_DIR="${T}"
> >
> > Don't use ${T} in global scope. And just don't export them
> > in the global scope either.
>
> Why not?

Let's start with the fact that ${T} is only partially persistent
by the words of PMS. I don't know if it's really relevant here but
you're exporting persistent variables with value based on
an non-persistent one.

Thinking about it more, it probably would work. As long as you don't
assume anything about those directories on pkg_*rm() where ${T} would
have changed already and your variables wouldn't.

Also, why are you exporting HOME? PMS does that already...

--
Best regards,
Michał Górny
Attachments: signature.asc (0.94 KB)


pacho at gentoo

Apr 14, 2013, 3:25 AM

Post #6 of 10 (647 views)
Permalink
Re: mono-env.eclass: new eclass to be used by most of dotnet packages [In reply to]

El dom, 14-04-2013 a las 12:08 +0200, Michał Górny escribió:
> On Sun, 14 Apr 2013 11:59:14 +0200
> Pacho Ramos <pacho [at] gentoo> wrote:
>
> > El dom, 14-04-2013 a las 11:45 +0200, Michał Górny escribió:
> > > On Sun, 14 Apr 2013 11:40:03 +0200
> > > Pacho Ramos <pacho [at] gentoo> wrote:
> > >
> > > > # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
> > > > # shared dir to ${T} so that ${T}/.wapi can be used during the install process.
> > > > export MONO_SHARED_DIR="${T}"
> > >
> > > Don't use ${T} in global scope. And just don't export them
> > > in the global scope either.
> >
> > Why not?
>
> Let's start with the fact that ${T} is only partially persistent
> by the words of PMS. I don't know if it's really relevant here but
> you're exporting persistent variables with value based on
> an non-persistent one.
>
> Thinking about it more, it probably would work. As long as you don't
> assume anything about those directories on pkg_*rm() where ${T} would
> have changed already and your variables wouldn't.
>

Yes, they will be needed at compile time, that would explain why no
problem raised for now :/ Thanks for the info

> Also, why are you exporting HOME? PMS does that already...
>

Probably because it's inherited from current mono.eclass, but, are you
sure PMS does that already? There are more examples in the tree (in
eclasses and ebuilds) exporting HOME in similar way (vim.eclass for
example) :/ Or maybe it was started to be exported more recently and
this is only a relic :|


mgorny at gentoo

Apr 14, 2013, 3:40 AM

Post #7 of 10 (647 views)
Permalink
Re: mono-env.eclass: new eclass to be used by most of dotnet packages [In reply to]

On Sun, 14 Apr 2013 12:25:27 +0200
Pacho Ramos <pacho [at] gentoo> wrote:

> El dom, 14-04-2013 a las 12:08 +0200, Michał Górny escribió:
> > On Sun, 14 Apr 2013 11:59:14 +0200
> > Pacho Ramos <pacho [at] gentoo> wrote:
> >
> > > El dom, 14-04-2013 a las 11:45 +0200, Michał Górny escribió:
> > > > On Sun, 14 Apr 2013 11:40:03 +0200
> > > > Pacho Ramos <pacho [at] gentoo> wrote:
> > > >
> > > > > # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
> > > > > # shared dir to ${T} so that ${T}/.wapi can be used during the install process.
> > > > > export MONO_SHARED_DIR="${T}"
> > > >
> > > > Don't use ${T} in global scope. And just don't export them
> > > > in the global scope either.
> > >
> > > Why not?
> >
> > Let's start with the fact that ${T} is only partially persistent
> > by the words of PMS. I don't know if it's really relevant here but
> > you're exporting persistent variables with value based on
> > an non-persistent one.
> >
> > Thinking about it more, it probably would work. As long as you don't
> > assume anything about those directories on pkg_*rm() where ${T} would
> > have changed already and your variables wouldn't.
> >
>
> Yes, they will be needed at compile time, that would explain why no
> problem raised for now :/ Thanks for the info

Well, I am a bit worried about metadata regen but I guess even having
invalid values there doesn't hurt anyone. Well, assuming that the
eclass will always be sourced before running the build and noone will
try to use a pre-cached environment.

> > Also, why are you exporting HOME? PMS does that already...
> >
>
> Probably because it's inherited from current mono.eclass, but, are you
> sure PMS does that already? There are more examples in the tree (in
> eclasses and ebuilds) exporting HOME in similar way (vim.eclass for
> example) :/ Or maybe it was started to be exported more recently and
> this is only a relic :|

It's on the list [1], and I think I've seen 'home' subdirs in the build
root for a long time. I guess people may be resetting it 'just to be
sure'.

One thing should be noted though: $HOME may and usually will be
different than $T.

[1]:http://dev.gentoo.org/~ulm/pms/5/pms.html#x1-11800011.1

--
Best regards,
Michał Górny
Attachments: signature.asc (0.94 KB)


zmedico at gentoo

Apr 14, 2013, 2:02 PM

Post #8 of 10 (646 views)
Permalink
Re: mono-env.eclass: new eclass to be used by most of dotnet packages [In reply to]

On 04/14/2013 02:59 AM, Pacho Ramos wrote:
> El dom, 14-04-2013 a las 11:45 +0200, Michał Górny escribió:
>> On Sun, 14 Apr 2013 11:40:03 +0200
>> Pacho Ramos <pacho [at] gentoo> wrote:
>>
>>> # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
>>> # shared dir to ${T} so that ${T}/.wapi can be used during the install process.
>>> export MONO_SHARED_DIR="${T}"
>>
>> Don't use ${T} in global scope. And just don't export them
>> in the global scope either.
>>
>
> Why not?

It's more flexible if you put it in a function and call it from
pkg_setup. That way, if it turns out that you need to do something that
can't be done in global scope, you're already prepared.
--
Thanks,
Zac


pacho at gentoo

May 19, 2013, 3:31 AM

Post #9 of 10 (575 views)
Permalink
Re: mono-env.eclass: new eclass to be used by most of dotnet packages [In reply to]

El dom, 14-04-2013 a las 11:40 +0200, Pacho Ramos escribió:
> Due reasons explained here:
> https://bugs.gentoo.org/show_bug.cgi?id=462052#c1
>
> We would like to start a process of simplifying dotnet maintained
> eclasses a lot because they are currently really hard to maintain. As a
> start point, we will need a simple eclass simply to export some
> variables needed to build most of dotnet packages. That variables are
> currently being exported by mono.eclass, the idea would be to split the
> "environment exporting" part out of it (and deprecate current
> mono.eclass in the future)
>
>

Updated eclass taking care of previous suggestions
Attachments: mono-env.eclass (1.35 KB)


pacho at gentoo

May 24, 2013, 12:18 PM

Post #10 of 10 (568 views)
Permalink
Re: mono-env.eclass: new eclass to be used by most of dotnet packages [In reply to]

El dom, 19-05-2013 a las 12:31 +0200, Pacho Ramos escribió:
> El dom, 14-04-2013 a las 11:40 +0200, Pacho Ramos escribió:
> > Due reasons explained here:
> > https://bugs.gentoo.org/show_bug.cgi?id=462052#c1
> >
> > We would like to start a process of simplifying dotnet maintained
> > eclasses a lot because they are currently really hard to maintain. As a
> > start point, we will need a simple eclass simply to export some
> > variables needed to build most of dotnet packages. That variables are
> > currently being exported by mono.eclass, the idea would be to split the
> > "environment exporting" part out of it (and deprecate current
> > mono.eclass in the future)
> >
> >
>
> Updated eclass taking care of previous suggestions

Added

Gentoo dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.