For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > January 2005 > Re: [PEAR-QA] Stable may require unstable ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR-QA] Stable may require unstable ?
Helgi Žormar

2005-01-30, 3:55 pm

On Sun, 2005-01-30 at 19:02, bertrand Gugger wrote:
> Hi,
> May a PEAR package become 'Stable'
> even if it requires 'alpha', 'beta' sub PEAR packages ?
> Thanks
> --
> bertrand Gugger (toggg)


Package can not go over their lowest dep stage or something like that.
If Package 1 deps on Package 2 and Package 2 is alpha, then Package 1
can be alpha or lower.
Last time I knew at least.

So no it can't, but I'm not sure about the thing I described above,
hence with how things are with versions which are still
beta/alpha/devel.

- Helgi
bertrand Gugger

2005-01-30, 3:56 pm

Helgi Žormar wrote:
Is it:

>Package can not go over their lowest dep stage
>

or Package should not go over ...
As going to 'Stable' is under responsibility of main devs
is it only human ?
no machine check underneath ?

> or something like that.
>If Package 1 deps on Package 2 and Package 2 is alpha, then Package 1
>can be alpha or lower.
>Last time I knew at least.
>
>So no it can't, but I'm not sure about the thing I described above,
>hence with how things are with versions which are still
>beta/alpha/devel.
>
>

Yes, it's still a BBC hanging there.
ą+
Lukas Smith

2005-01-30, 8:56 pm

bertrand Gugger wrote:
> Helgi Žormar wrote:
> Is it:
>
> or Package should not go over ...
> As going to 'Stable' is under responsibility of main devs
> is it only human ?
> no machine check underneath ?


afaik there is currently no check hardcoded into pearweb.
there could however be one in the future.
maybe you want to file a feature request on that one?

regards,
Lukas
bertrand Gugger

2005-01-30, 8:56 pm

Lukas Smith wrote:

> afaik there is currently no check hardcoded into pearweb.


As far as I can check here I don't find any, but my search doesn't work :(
(I tried grep again ...)

> there could however be one in the future.
> maybe you want to file a feature request on that one?


I don't mean so:
If I pear install a package and my preferred_state from conf is 'stable'
then pear tells me it requires 'subPckg'
then when I try pear install subPckg it says to me no package found in
my preferred state.
So i's me deciding for this very subPckg to say
pear -d preferred_state=alpha install subPckg
One day I need to sort out.
So if "feature request" then it's only about some warning by
install/upgrade ;)
Hope that make sense, even if stable go back to alpha from themselves
ą+
bertrand Gugger

2005-01-30, 8:56 pm

self rsponse

> As far as I can check here I don't find any, but my search doesn't
> work :(
> (I tried grep again ...)


Better this way:
<?php
if (!defined('T_ML_COMMENT')) {
define('T_ML_COMMENT', T_COMMENT);
} else {
define('T_DOC_COMMENT', T_ML_COMMENT);
}

$script = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1]: 'example.php';

$source = file_get_contents($script);
$tokens = token_get_all($source);
$cnt = $out =0;
foreach ($tokens as $token) {
if (is_string($token)) {
if ($out) {
echo $token;
if ($token == ';') {
// include is finished
$out = 0;
}
}
} else {
// token array
list($id, $text) = $token;

switch ($id) {
case T_COMMENT:
case T_ML_COMMENT:
case T_DOC_COMMENT:
case T_WHITESPACE:
// no action on comments nor white spaces
break;
case T_INCLUDE:
case T_INCLUDE_ONCE:
case T_REQUIRE:
case T_REQUIRE_ONCE:
// anything required -> output "as is"
echo "\n{$text}: ";
$out=1;
$cnt++;
break;

default:
if ($out) {
echo token_name($id).'->'.$text.' ';
}
}
}
}
echo "\n{$cnt} inc/req found\n";
?>
I go on,
ą+
--
bertrand Gugger (toggg)
Greg Beaver

2005-01-31, 3:56 am

bertrand Gugger wrote:
> Lukas Smith wrote:
>
>
>
> As far as I can check here I don't find any, but my search doesn't work :(
> (I tried grep again ...)
>
>
>
> I don't mean so:
> If I pear install a package and my preferred_state from conf is 'stable'
> then pear tells me it requires 'subPckg'
> then when I try pear install subPckg it says to me no package found in
> my preferred state.
> So i's me deciding for this very subPckg to say
> pear -d preferred_state=alpha install subPckg
> One day I need to sort out.
> So if "feature request" then it's only about some warning by
> install/upgrade ;)
> Hope that make sense, even if stable go back to alpha from themselves


PEAR 1.4.0 fixes this in several ways

1) dependencies are resolved prior to download
2) doing "pear install Package-state" will temporarily set
preferred_state to -state, so "pear install Auth-alpha" will install
dependencies that fit within preferred_state alpha, otherwise the
preferred_state will be used.

Greg
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com