Hello,
We are planning to upgrade our invenio instances from 1.1.2 to 1.1.3
version. With that purpose I decide to test in my local box and I'm getting
2 errors.
1 - On this step: $ sudo -u www-data /opt/invenio/bin/inveniocfg --upgrade
Traceback (most recent call last):
File "/opt/invenio/bin/inveniocfg", line 33, in <module>
main()
File "/usr/local/lib/python2.7/dist-packages/invenio/inveniocfg.py", line
1628, in main
cli_cmd_upgrade(conf)
File "/usr/local/lib/python2.7/dist-packages/invenio/inveniocfg.py", line
1356, in cli_cmd_upgrade
cmd_upgrade(conf)
File
"/usr/local/lib/python2.7/dist-packages/invenio/inveniocfg_upgrader.py",
line 870, in cmd_upgrade
upgrades = upgrader.get_upgrades()
File
"/usr/local/lib/python2.7/dist-packages/invenio/inveniocfg_upgrader.py",
line 638, in get_upgrades
plugins = self._load_upgrades(remove_applied=remove_applied)
File
"/usr/local/lib/python2.7/dist-packages/invenio/inveniocfg_upgrader.py",
line 590, in _load_upgrades
'depends_on': (list, []),
File "/usr/local/lib/python2.7/dist-packages/invenio/pluginutils.py",
line 691, in create_enhanced_plugin_builder
from invenio.webinterface_handler import wash_urlargd
File
"/usr/local/lib/python2.7/dist-packages/invenio/webinterface_handler.py",
line 49, in <module>
from invenio.webuser import get_preferred_user_language, isGuestUser, \
File "/usr/local/lib/python2.7/dist-packages/invenio/webuser.py", line
45, in <module>
from invenio.config import \
ImportError: cannot import name
CFG_WEBSEARCH_PERMITTED_RESTRICTED_COLLECTIONS_LEVEL
We fixed by adding manually this line to the invenio.conf file
CFG_WEBSEARCH_PERMITTED_RESTRICTED_COLLECTIONS_LEVEL
= 0
But it should be done automatically by the upgrade script or not?
2 - After that we run again the same script and it seems to create wrong
config variable in /usr/local/lib/python2.7/dist-packages/invenio/config.py:
It creates this:
CFG_BIBDOCFILE_ADDITIONAL_KNOWN_MIMETYPES = "{
"application/xml-dtd": ".dtd",
}"
Instead of:
CFG_BIBDOCFILE_ADDITIONAL_KNOWN_MIMETYPES = {
"application/xml-dtd": ".dtd",
}
So, I was surfing in the code and maybe what is missing is to add
CFG_BIBDOCFILE_ADDITIONAL_KNOWN_MIMETYPES
to the ## 3c) special cases: dicts and real pythonic lists case in
convert_conf_option function so it generates the options as a dictionary.
I saw it already fixed in github
inveniocfg.py<https://github.com/inveniosoftware/invenio/blob/master/modules/miscutil/lib/inveniocfg.py>
.But the http://invenio-software.org/download/invenio-1.1.3.tar.gz still
has the issue.
How should we proceed on this case to make the upgrade happen.
Thanks in advance,
--
Jorge Jardines
Senior Software Engineer
skype: jorge.jardines.frontiers
Frontiers <http://www.frontiersin.org/>
Centro de Empresas - UPM
Campus de Montegancedo
28223 Pozuelo de Alarcón
Madrid
twitter.com/FrontiersIn <http://twitter.com/frontiersin>
facebook.com/FrontiersIn <https://www.facebook.com/Frontiersin>