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

Re: [tryton-debian] gnuhealth packaging (was: Exception when building the package in a cleanroom Debian environment)



* Luis Falcon: " Re: [tryton-debian] [Health-dev] [tryton] Re: Exception when
  building the package in a cleanroom Debian environment" (Wed, 26 Mar 2014
  10:33:35 -0300):

Hi Luis, hi all,
 
> On Tue, 25 Mar 2014 19:10:00 +0100
> Mathias Behrle <mbehrle@m9s.biz> wrote:
> 
> > * Luis Falcon: " [tryton] Re: [Health-dev] Exception when building
> > the package in a cleanroom Debian environment" (Mon, 24 Mar 2014
> > 19:02:30 -0300):
> > 
> > Hi Emilien, hi all,
> > 
> > > On Mon, 24 Mar 2014 21:35:40 +0100
> > > Emilien Klein <emilien+gnuhealth.org@klein.st> wrote:
> > > 
> > > > Hi GNU Health team,
> > > > 
> > > > The Debian package has to pass a number of automated tests to
> > > > validate a minimal level of quality. One of these tools is called
> > > > piuparts.
> > > > 
> > > > When running piuparts on the latest version of the Debian
> > > > package, an exception was thrown. I would need some help figuring
> > > > out how to fix this.
> > > > 
> > > > See the output of the entire build process here, the Traceback is
> > > > at the end:
> > > > https://piuparts.debian.org/sid/fail/gnuhealth-server_2.4.1-2.log
> > > > 
> > > > Extract:
> > > > 
> > > >   [Fri Mar 14 03:40:49 2014] INFO:modules:ir:loading lang.xml
> > > >   [Fri Mar 14 03:40:49 2014]  [7mERROR [0m:convert:Error while
> > > > parsing xml file: In tag record: model ir.lang with id lang_ca.
> > > >   Traceback (most recent call last):
> > > > [...]
> > > >     File
> > > > "/usr/lib/python2.7/dist-packages/trytond/backend/postgresql/database.py",
> > > > line 309, in execute return self.cursor.execute(sql, params)
> > > >   UnicodeEncodeError: 'ascii' codec can't encode character
> > > > u'\xe0' in position 5: ordinal not in range(128)
> > > > 
> > > > 
> > > > Seems like there is some character with accents in the Canadian
> > > > language model, which can't be encoded using ASCII.
> > > >
> > > The file ir/lang.xml is part of the core of Tryton server. I'm
> > > copying the Tryton community.
> > > 
> > > The language that is making reference with this tag is Català (from
> > > Catalonia) .
> > > 
> > > Tryton deals fine with non-ascii characters in xml files without the
> > > need for encoding it (like "Catal&agrave;") on the xml file. 
> > > 
> > > You should get this traceback at Tryton server tests, before the
> > > actual check GNU Health modules are loaded.
> > > 
> > > It seems like it has to do with something on the test environment,
> > > since both Tryton core and GNU Health modules load just fine.
> > > 
> > > Thanks a lot for reporting and for your great job on packaging GNU
> > > Health and Tryton in Debian.
> > > 
> > > 
> > > Best,
> > > 
> > > 
> > > > Any idea how to fix this?
> > > > Thanks,
> > > >     +Emilien
> > 
> > I can not provide actually a fix withotu digging further into the
> > gnuhealth package, but just some hints:
> > 
> > 1) tryton-server [1] is passing piuparts and basically this seems
> > also to apply for gnuhealth-server [2]. The error seems to be  caused
> > by the gnuhealth package scripts or the tools it uses.
> > 
> Thanks for the info.
> 
> I am looking now at the the database-scripts/install/psql script of the
> Debian package.
> 
> It's not a good idea to init all the modules. In fact, I wouldn't
> create any database . The DB creation, modules selection depends on the
> needs of each user or Health Institution. In fact some of them - like
> health_ICD10-PCS and health_ICPM should be mutually exclusive.

I guessed something like that without deeper knowledge of gnuhealth, thanks for
confirming. Quite a while ago I had a look at the gnuhealth package and
shared my opinion in proposing a different package layout [1][2]. The
gnuhealth package is maintained by the Debian Med Packaging Team
<debian-med-packaging@lists.alioth.debian.org> and I think they will be glad to
receive feedback.

> If you want to have a demo GNU Health instance  with a set of modules,
> functionality, then we can provide you a postgres dump for that
> version. That's what Axel is working on with the LiveCD demo for
> OpenSUSE.

While a postgres dump could be a solution to create a basic setup, I even would
prefer to use a proteus script, like the one used to create the demo database
on demo.tryton.org. This would make independent from the postgres version, being
more flexible, being better maintainable, etc., since it just uses an existent
and working Tryton server setup.
 
> If the Debian package installs the server and modules;
> configuration files; gnuhealth OS and DB user and environment variables
> would be more than enough.
> 
> 
> Just as curiosity, can you check the DB encoding of the created DB
> (psql -l will show it). 
> 
> Again, we should not create the DB as part of the installation process
> though.

I don't see see the point in not creating an initial database (with respect to
the goal of an one-in-all package). I agree on not installing the whole module
set by default into the database. As previously said I would split the
gnuhealth package into more manageable packages.
 
Cheers,
Mathias

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707632
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707639

-- 

    Mathias Behrle
    MBSolutions
    Gilgenmatten 10 A
    D-79114 Freiburg

    Tel: +49(761)471023
    Fax: +49(761)4770816
    http://m9s.biz
    UStIdNr: DE 142009020
    PGP/GnuPG key availabable from any keyserver, ID: 0x8405BBF6

Attachment: signature.asc
Description: PGP signature


Reply to: