Updating in Developer Mode - Two Problems

So I’m trying to update a development system I created and I’m running into 2 small problems when I attempt the updates. When I run /usr/src/devtools/freepbx_git.php --refresh I end up with these errors:

  1. When it gets to the framework module I get Refusing to refresh framework as it will break everything. Do it manually…K, fine. Except nothing really explains how to do that.

  2. When it gets to the timeconditions modules I get

PHP Fatal error:  Uncaught Exception: i18n/ja_JP/LC_MESSAGES/timeconditions.po: unmerged (f5f2695de43e03bb1af053c0b82d3bede04e46a8)
i18n/ja_JP/LC_MESSAGES/timeconditions.po: unmerged (6430b43602b01f692fc67eb05e5e39bac7175f25)
i18n/ja_JP/LC_MESSAGES/timeconditions.po: unmerged (a9fd34c75f90a6a0b0ea3c46d530acbd5ff09c86)
fatal: git-write-tree: error building trees
Cannot save the current index state
 in /usr/src/devtools/libraries/Git.php:262
Stack trace:
#0 /usr/src/devtools/libraries/Git.php(277): GitRepo->run_command()
#1 /usr/src/devtools/libraries/Git.php(822): GitRepo->run()
#2 /usr/src/devtools/libraries/freepbx.php(124): GitRepo->add_stash()
#3 /usr/src/devtools/freepbx_git.php(236): freepbx::refreshRepo()
#4 {main}
  thrown in /usr/src/devtools/libraries/Git.php on line 262

Then everything dies and it doesn’t try to update any other modules.

The other issue with framework is it refuses to update. It’s on 16.0.21.4 but everything I do to update this module just ignores it and says it is installed.

So how does one manually update framework to a current version in Developer Mode? @billsimon @lgaetz thoughts?

I don’t have a dev box set up right now. I will set one up and see whether I have the same troubles.

1 Like

Since I did a fresh install I didn’t have any problems.

It looks like your problem with the timeconditions module is with the freepbx_git.php script and not the module itself. You can use git directly instead:

cd /usr/src/freepbx/timeconditions

git reset --hard (edit: unless you are working on this module, in which case you should commit your work rather than discarding it with git reset)

git pull origin

fwconsole ma install timeconditions

To update framework…

cd /usr/src/freepbx/framework
git pull origin
./install -n --dev-links

Write your own little shell script to update all the source:

cd /usr/src/freepbx
for x in $( ls -d * ) ; do pushd $x && git pull origin && popd ; done
for x in $( ls -d * ) ; do fwconsole ma install $x ; done

You might have to run through the install sequence more than once because I don’t think installing modules one-by-one in this way will handle dependencies. So you just have to keep running through until all dependencies are met and all modules are installed.

Yeah, figured it was something with that script. timeconditions is fine but framework still isn’t updating right. It’s pulling from git and it shows in the module.xml to be 16.0.30 which is good but when I do an install…nothing.

        <rawname>framework</rawname>
        <modtype>framework</modtype>
        <repo>standard</repo>
        <name>FreePBX Framework</name>
        <version>16.0.30</version>
No directory /var/www/html/admin/modules/framework/amp_conf/htdocs, install script not needed
Generating CSS...Done
Module framework version 16.0.21.4 successfully installed
Updating Hooks...Done
Chowning directories...Done

Listing the modules still show 16.021.4, as does the GUI

framework | 16.0.21.4 | Online upgrade available (16.0.30) | GPLv2+

Maybe I just need to blow this away and start fresh.

Ohhh found the issue. The sym linking was completely messed up.

Rerunning the install script within the framework directory should do it.

I checked out an older commit and then ran ./install -n --dev-links

(you responded while I was typing…)

Is that what you ended up doing to solve the problem?

1 Like

Yeah, once I saw the sym links broken I re-ran that. It’s up on the right versions now.

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.