phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] setup broken for phpgwapi upgrade in HEAD


From: Benoit Hamet
Subject: Re: [Phpgroupware-developers] setup broken for phpgwapi upgrade in HEAD
Date: Wed, 04 Oct 2006 12:23:45 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060915)

Hi Sigurd, Hi all,

I'm not sure I agree with the way you correct the problem.

Let me explain what I understand from the old code base.

The purpose was to upgrade the whole installation, with a loop in case
of cross dependencies ...

So that was working fine until now for all apps, excluding the phpgwapi
for a reason I will explain later.

But the modification you made, let me think that the when a cross
dependancy will be found, the whole process will loop, since apps are
not updated after beeing installed ...

So I propose the following :

Instead of moving the code for $setup_info =
$GLOBALS['phpgw_setup']->detection->get_db_versions($setup_info);
                        $setup_info =
$GLOBALS['phpgw_setup']->detection->compare_versions($setup_info);
                        $setup_info =
$GLOBALS['phpgw_setup']->detection->check_depends($setup_info);


Outside the loop,

let in in place (in the loop), and change the condition for updating the
$pass array ...
If you take a look at that parts,
foreach($setup_info as $key => $value)
{
   if ( isset($value['name'])
        && $value['name'] != 'phpgwapi'
        && $value['status'] == 'U' )
   {

You will understand why the phpgwapi is never updated in the current code.

In fact if you read the upgrade method, you will read this :
if ( isset($setup_info[$key]['status'])
     && ($setup_info[$key]['status'] == 'U'
    || $setup_info[$key]['status'] == 'D'
    || $setup_info[$key]['status'] == 'V'
    || $setup_info[$key]['status'] == '' ) ) // TODO this is not getting
set for api upgrade, sometimes ???
{

Of course, this is not setted, because $setup_info['phpgwapi'] was never
updated

So the process was borken because the former test was not trying to see
if $setup_info[$key]['status'] == '' which is true if
$setup_info[$key]['status']  is not set ... so phpgwapi was upgraded
even if not needed ...

I don't know if the way I want to correct it won't break things ... it's
very hard to change things in this portion of code, since it's really
hard to test it.

Anyway, I'm open to discuss.

Regards,

BenoƮt.





Sigurd Nes wrote:
> Benoit Hamet wrote:
>> Hi all,
>>
>> I just notice that's there is some problem in upgrading the tables in
>> the HEAD version.
>>
>> I found the problem (at least something looking as it), and have
>> informed Dave about it.
>>
>> btw, only phpgwapi is concerned, and I guess that's a very old bug that
>> the E_ALL fixes just show up :)
>>
>> Should be fixed tommorow morning for me.
>>
>> Regards.
>>
>> Caeies
>>   
> I had the same problem - so I took the liberty of fixing it (committed).
> 
> Regards
> 
> Sigurd
> 
> 
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]