FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 03-31-2012, 12:44 PM
Ulrich Mueller
 
Default Should ${T} be defined in pkg_prepare ?

>>>>> On Sat, 31 Mar 2012, Maciej Grela wrote:

> I've read the PMS and I haven't found information whether this variable
> is supposed to be set during pkg_prepare or not.

There is no such stage. You mean pkg_pretend, I suppose?

> Therefore I ask, what is the proper behaviour here ? Is there
> documentation on what special env variables are supposed to be
> defined in each stage ?

It's specified here:
<http://dev.gentoo.org/~ulm/pms/4/pms.html#x1-11900012.1>

| Variable Legal in Consistent? Description
| ---------------------------------------------------------------------
| T All Partially⁴ The full path to a temporary
| directory for use by the ebuild.
|
| ⁴Consistent and preserved across a single connected sequence of
| install or uninstall phases, but not between install and uninstall.
| When reinstalling a package, this variable must have different
| values for the install and the replacement.

> Can this be considered as a bug in paludis ?

The spec seems to be clear that T is legal in all phases, including
pkg_pretend.

Ulrich
 
Old 03-31-2012, 03:36 PM
Tiziano Müller
 
Default Should ${T} be defined in pkg_prepare ?

Am Samstag, den 31.03.2012, 14:44 +0200 schrieb Ulrich Mueller:
> >>>>> On Sat, 31 Mar 2012, Maciej Grela wrote:
>
> > I've read the PMS and I haven't found information whether this variable
> > is supposed to be set during pkg_prepare or not.
>
> There is no such stage. You mean pkg_pretend, I suppose?
>
> > Therefore I ask, what is the proper behaviour here ? Is there
> > documentation on what special env variables are supposed to be
> > defined in each stage ?
>
> It's specified here:
> <http://dev.gentoo.org/~ulm/pms/4/pms.html#x1-11900012.1>
>
> | Variable Legal in Consistent? Description
> | ---------------------------------------------------------------------
> | T All Partially⁴ The full path to a temporary
> | directory for use by the ebuild.
> |
> | ⁴Consistent and preserved across a single connected sequence of
> | install or uninstall phases, but not between install and uninstall.
> | When reinstalling a package, this variable must have different
> | values for the install and the replacement.
>
> > Can this be considered as a bug in paludis ?
>
> The spec seems to be clear that T is legal in all phases, including
> pkg_pretend.

Well, I'd say: there is no sane value you can assign to $T since you are
not allowed to write anything anyway:

"pkg_pretend must not write to the
filesystem." (http://dev.gentoo.org/~ulm/pms/4/pms.html#x1-9700010.1.2)

and since "pkg_pretend is run separately from the main phase function
sequence, and does not participate in any kind of environment saving" it
is not guaranteed to be set to the same $T later.

Cheers,
Tiziano
 
Old 03-31-2012, 08:56 PM
Ulrich Mueller
 
Default Should ${T} be defined in pkg_prepare ?

>>>>> On Sat, 31 Mar 2012, Tiziano Mller wrote:

>> The spec seems to be clear that T is legal in all phases, including
>> pkg_pretend.

> Well, I'd say: there is no sane value you can assign to $T since you
> are not allowed to write anything anyway:

> "pkg_pretend must not write to the filesystem."
> (http://dev.gentoo.org/~ulm/pms/4/pms.html#x1-9700010.1.2)

That's not necessarily a contradiction. Writing being not allowed
doesn't imply that the directory must not exist.

> and since "pkg_pretend is run separately from the main phase
> function sequence, and does not participate in any kind of
> environment saving" it is not guaranteed to be set to the same $T
> later.

The problem is that apart from T (and maybe HOME), there seems to be
no other directory that check_reqs.eclass could use for its disk space
check in pkg_pretend. WORKDIR doesn't exist in pkg_* phases.

Ulrich
 
Old 03-31-2012, 09:01 PM
Francesco Riosa
 
Default Should ${T} be defined in pkg_prepare ?

2012/3/31 Tiziano Müller <dev-zero@gentoo.org>:
> Am Samstag, den 31.03.2012, 14:44 +0200 schrieb Ulrich Mueller:
>> >>>>> On Sat, 31 Mar 2012, Maciej Grela wrote:
>>
>> > I've read the PMS and I haven't found information whether this variable
>> > is supposed to be set during pkg_prepare or not.
>>
>> There is no such stage. You mean pkg_pretend, I suppose?
>>
>> > Therefore I ask, what is the proper behaviour here ? Is there
>> > documentation on what special env variables are supposed to be
>> > defined in each stage ?
>>
>> It's specified here:
>> <http://dev.gentoo.org/~ulm/pms/4/pms.html#x1-11900012.1>
>>
>> | Variable * Legal in * Consistent? * *Description
>> | ---------------------------------------------------------------------
>> | T * * * * *All * * * *Partially⁴ * * The full path to a temporary
>> | * * * * * * * * * * * * * * * * * * *directory for use by the ebuild.
>> |
>> | ⁴Consistent and preserved across a single connected sequence of
>> | install or uninstall phases, but not between install and uninstall.
>> | When reinstalling a package, this variable must have different
>> | values for the install and the replacement.
>>
>> > Can this be considered as a bug in paludis ?
>>
>> The spec seems to be clear that T is legal in all phases, including
>> pkg_pretend.
>
> Well, I'd say: there is no sane value you can assign to $T since you are
> not allowed to write anything anyway:

indeed it's not writing, check-reqs.eclass is reading space available
via 'df -Pm' there is something else it could use assuming
$PORTAGE_TMPDIR is worse for portability?

>
> "pkg_pretend must not write to the
> filesystem." (http://dev.gentoo.org/~ulm/pms/4/pms.html#x1-9700010.1.2)
>
> and since "pkg_pretend is run separately from the main phase function
> sequence, and does not participate in any kind of environment saving" it
> is not guaranteed to be set to the same $T later.
>
> Cheers,
> Tiziano
 
Old 03-31-2012, 09:24 PM
Zac Medico
 
Default Should ${T} be defined in pkg_prepare ?

On 03/31/2012 01:56 PM, Ulrich Mueller wrote:
>>>>>> On Sat, 31 Mar 2012, Tiziano Mller wrote:
>> and since "pkg_pretend is run separately from the main phase
>> function sequence, and does not participate in any kind of
>> environment saving" it is not guaranteed to be set to the same $T
>> later.
>
> The problem is that apart from T (and maybe HOME), there seems to be
> no other directory that check_reqs.eclass could use for its disk space
> check in pkg_pretend. WORKDIR doesn't exist in pkg_* phases.

How about PWD?
--
Thanks,
Zac
 
Old 04-01-2012, 08:29 AM
Ulrich Mueller
 
Default Should ${T} be defined in pkg_prepare ?

>>>>> On Sat, 31 Mar 2012, Zac Medico wrote:

>> The problem is that apart from T (and maybe HOME), there seems to
>> be no other directory that check_reqs.eclass could use for its disk
>> space check in pkg_pretend. WORKDIR doesn't exist in pkg_* phases.

> How about PWD?

No sure. Do all package managers set it to a parent dir of WORKDIR
in pkg_pretend?

At least PMS doesn't say so:

| 10.1.1 Initial Working Directories
| [...] it may be set to anything and the ebuild must not rely upon
| a particular location for it.

Ulrich
 
Old 04-01-2012, 06:49 PM
Zac Medico
 
Default Should ${T} be defined in pkg_prepare ?

On 04/01/2012 01:29 AM, Ulrich Mueller wrote:
>>>>>> On Sat, 31 Mar 2012, Zac Medico wrote:
>
>>> The problem is that apart from T (and maybe HOME), there seems to
>>> be no other directory that check_reqs.eclass could use for its disk
>>> space check in pkg_pretend. WORKDIR doesn't exist in pkg_* phases.
>
>> How about PWD?
>
> No sure. Do all package managers set it to a parent dir of WORKDIR
> in pkg_pretend?

Since bug 388593 [1], portage uses the normal PORTAGE_TMPDIR for
pkg_pretend. Before that is was using the default temp dir from python's
tempfile module (which defaults to /tmp).

> At least PMS doesn't say so:
>
> | 10.1.1 Initial Working Directories
> | [...] it may be set to anything and the ebuild must not rely upon
> | a particular location for it.

Maybe something for EAPI 5?

[1] https://bugs.gentoo.org/show_bug.cgi?id=388593
--
Thanks,
Zac
 
Old 04-01-2012, 06:55 PM
Ciaran McCreesh
 
Default Should ${T} be defined in pkg_prepare ?

On Sat, 31 Mar 2012 14:10:50 +0200
Maciej Grela <maciej.grela@gmail.com> wrote:
> I've read the PMS and I haven't found information whether this
> variable is supposed to be set during pkg_prepare or not. Therefore I
> ask, what is the proper behaviour here ? Is there documentation on
> what special env variables are supposed to be defined in each stage ?
> Can this be considered as a bug in paludis ?

Mmm. The spec implies that it should be set to something sane... There's
no guarantee, of course, that the amount of space in ${T} in pkg_pretend
is anything like the amount of space that will be available for the
build, but check-reqs is deliberately designed to be wildly inaccurate.

--
Ciaran McCreesh
 
Old 04-01-2012, 08:13 PM
Maciej Grela
 
Default Should ${T} be defined in pkg_prepare ?

On 01.04.2012 20:55, Ciaran McCreesh wrote:
> On Sat, 31 Mar 2012 14:10:50 +0200
> Maciej Grela <maciej.grela@gmail.com> wrote:
>> I've read the PMS and I haven't found information whether this
>> variable is supposed to be set during pkg_prepare or not. Therefore I
>> ask, what is the proper behaviour here ? Is there documentation on
>> what special env variables are supposed to be defined in each stage ?
>> Can this be considered as a bug in paludis ?
> Mmm. The spec implies that it should be set to something sane... There's
> no guarantee, of course, that the amount of space in ${T} in pkg_pretend
> is anything like the amount of space that will be available for the
> build, but check-reqs is deliberately designed to be wildly inaccurate.
>

Should I create a bug for this ?

Best regards,
--
Maciej Grela
 
Old 04-01-2012, 08:47 PM
Michał Górny
 
Default Should ${T} be defined in pkg_prepare ?

On Sun, 1 Apr 2012 19:55:44 +0100
Ciaran McCreesh <ciaran.mccreesh@googlemail.com> wrote:

> On Sat, 31 Mar 2012 14:10:50 +0200
> Maciej Grela <maciej.grela@gmail.com> wrote:
> > I've read the PMS and I haven't found information whether this
> > variable is supposed to be set during pkg_prepare or not. Therefore
> > I ask, what is the proper behaviour here ? Is there documentation on
> > what special env variables are supposed to be defined in each
> > stage ? Can this be considered as a bug in paludis ?
>
> Mmm. The spec implies that it should be set to something sane...
> There's no guarantee, of course, that the amount of space in ${T} in
> pkg_pretend is anything like the amount of space that will be
> available for the build, but check-reqs is deliberately designed to
> be wildly inaccurate.

Yes because being wildly accurate in this case is such a great
possibility here. Why don't you delight us with your vision of wildly
accurate space prediction, mister?

--
Best regards,
Michał Górny
 

Thread Tools




All times are GMT. The time now is 01:25 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org