From: Chris Marusich <cmmarusich@gmail.com>
To: Quiliro Ordonez Baca <quiliro@riseup.net>
Cc: 29365@debbugs.gnu.org
Subject: bug#29365: openmolar looking in /usr/share/openmolar
Date: Wed, 22 Nov 2017 01:35:59 -0800 [thread overview]
Message-ID: <87tvxmfyf4.fsf@gmail.com> (raw)
In-Reply-To: <878tf0x3bq.fsf@riseup.net> (Quiliro Ordonez Baca's message of "Mon, 20 Nov 2017 12:33:29 -0500")
[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]
Quiliro Ordonez Baca <quiliro@riseup.net> writes:
> When starting OpenMolar for the first time, it has an error when it
> creates the application database:
>
> ERROR - error creating database tables
> Traceback (most recent call last):
> File "/gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/lib/python3.5/site-packages/openmolar/create_db.py", line 145, in create_tables
> f = open(fp, "r")
> FileNotFoundError: [Errno 2] No existe el fichero o el directorio: '/usr/share/openmolar/resources/schema.sql'
>
> when it should look for the following file:
> /gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/share/openmolar/resources/schema.sql
>
> The flaw in the definition is in:
> /gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81f9e5/lib/python3.5/site-packages/openmolar/settings/localsettings.py: SHARE_DIR = os.path.join("/usr", "share", "openmolar")
>
> I do not know haw to fix it. Please instruct how to do it.
Based on your assessment, it looks like the problem is that the
application hard-codes the "/usr" directory path.
One solution for this problem is to replace that line of code in the
source with the correct path. You can do this in the package definition
by using the substitute* macro provided by the (guix build utils)
module. In fact, it looks like the current package definition for
openmolar already attempts to do this. Run "guix edit openmolar" to
view the current package definition.
Perhaps you could modify the package definition to also replace the path
in localsettings.py? You might also want to look around in the source
for other paths that need to be fixed (a command such as "grep -r /usr"
might be helpful).
For information on how to use substitute*, please refer to
guix/build/utils.scm in the Guix source tree. For general information
on hacking on Guix, check the section titled "Contributing" in the
manual (e.g., run info '(guix) Contributing' in a terminal).
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-11-22 9:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 17:33 bug#29365: openmolar looking in /usr/share/openmolar Quiliro Ordonez Baca
2017-11-22 9:35 ` Chris Marusich [this message]
2017-11-22 17:13 ` Adonay Felipe Nogueira
2017-12-20 20:11 ` Quiliro Ordonez Baca
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tvxmfyf4.fsf@gmail.com \
--to=cmmarusich@gmail.com \
--cc=29365@debbugs.gnu.org \
--cc=quiliro@riseup.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.