From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: bug#29365: openmolar looking in /usr/share/openmolar Date: Wed, 22 Nov 2017 01:35:59 -0800 Message-ID: <87tvxmfyf4.fsf@gmail.com> References: <878tf0x3bq.fsf@riseup.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHRSr-0004DG-AL for bug-guix@gnu.org; Wed, 22 Nov 2017 04:37:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHRSo-0008BT-6s for bug-guix@gnu.org; Wed, 22 Nov 2017 04:37:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:43136) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eHRSo-0008BP-2Q for bug-guix@gnu.org; Wed, 22 Nov 2017 04:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eHRSn-000528-Pw for bug-guix@gnu.org; Wed, 22 Nov 2017 04:37:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <878tf0x3bq.fsf@riseup.net> (Quiliro Ordonez Baca's message of "Mon, 20 Nov 2017 12:33:29 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Quiliro Ordonez Baca Cc: 29365@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Quiliro Ordonez Baca writes: > When starting OpenMolar for the first time, it has an error when it > creates the application database:=20 > > ERROR - error creating database tables > Traceback (most recent call last): > File "/gnu/store/smx5rayf45ylqn59czjkvx2hcrl95p5x-openmolar-1.0.15-gd81= f9e5/lib/python3.5/site-packages/openmolar/create_db.py", line 145, in crea= te_tables > f =3D 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/sha= re/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 = =3D 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). =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAloVRP8ACgkQ3UCaFdgi Rp0XHQ/+MsO3l1tD8gWgduSkrYQF9vNWSH1IQ2RqVQlQudCO9ovYIijVDPw5Px0X 0+4RG+HmuskhRapeTxFvBHtao4Z8nGoRDJf0vsdYA3qquAZMtPmrBWcsBxLAdcg7 TbwphntIYEvfyyETbcl2Kd8q7S/5ateXAu4h3Mm3cKK5xA1rsnJ7+xM84dMah3db YXj4nNzjNwYt7Qg7zC3gEjR1VookUI7IfROSOf8dRbWh4L8fqTmpJoVZorQWNDS7 iLPL0g4i/WaYitfrvrXm53h41rkFWADLseAe/hb89iZuePxGXFdOLCdyLQW2COI0 HELsIAnQ3/EJ3moGY9ou05IGf38eO9KDah1dQ2Co38ACLu+V8Dp4DB9SzeiMzWDk kq5GHJsFmJQ1I9Ex0MsS0cjkA/jUCT3hFr2jI9ST5tIThro/hc1o23XxoHt5kXC8 zu5G/HwGOKrpinZgHIay4J3Tey/eqSJuOlmNBQYhOFRooaEiUUfMNO3swbBrJ+H4 T/dsL8VyNXjIrzvVCQ93jzkLbzX//vbxPqDwfxOhcvKVSqGE8S+7bzBysrbxY/6y LOSMk8McVsTE07UaHyZxZZCy9ZngRWYMUnxamQx6HG4b4bTPqk1MkKjzehw97wpb kC4uMJ1UEpPkRyncmQPIJmeEt/S+JZCb+Rs2qR2FTPmnZIdLUKY= =tleE -----END PGP SIGNATURE----- --=-=-=--