ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* file name resolving for lua files
@ 2009-12-16 15:16 Aditya Mahajan
  2009-12-17 16:25 ` Otared Kavian
  0 siblings, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2009-12-16 15:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I have noticed that my local context update scripts were not always 
working correctly. In particular, the mtxrun and luatools file never got 
updated. The reason is the following.

When I run mtxrun --selfupdate I get

     mtxrun --selfupdate
     MTXrun | fileio: to be replaced old script
     /opt/experimental/tex/texmf-linux-64/bin/mtxrun
     MTXrun | fileio: using suffix based filetype 'texmfscripts'
     MTXrun | fileio: checking new script
     /opt/experimental/tex/texmf-context/scripts/context/stubs/mswin/mtxrun.lua
     MTXrun | fileio: new script should come from scripts/context/lua

So, mtxrun is trying to replace mtxrun from the stubs directory. In fact, 
if I get the same result from

     luatools --locate mtxrun.lua
     /opt/experimental/tex/texmf-context/scripts/context/stubs/mswin/mtxrun.lua

Something is wrong with the search logic as texmfstart also gets this 
wrong.

     texmfstart --locate mtxrun.lua
     /opt/experimental/tex/texmf-context/scripts/context/stubs/mswin/mtxrun.lua%

However, kpsewhich works correctly.

     kpsewhich mtxrun.lua
     /opt/experimental/tex/texmf-context/scripts/context/lua/mtxrun.lua

Do others also get the same result? Any idea what is going wrong here?

Aditya

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file name resolving for lua files
  2009-12-16 15:16 file name resolving for lua files Aditya Mahajan
@ 2009-12-17 16:25 ` Otared Kavian
  2009-12-17 18:31   ` Aditya Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Otared Kavian @ 2009-12-17 16:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2847 bytes --]

Hi Aditya,

On my machine (Mac OS X) the Minimals are installed and when trying what you suggest I get the correct path:

localhost:~ kavian$ luatools --locate mtxrun.lua
/context-minimal/tex/texmf-context/scripts/context/lua/mtxrun.lua

localhost:~ kavian$ texmfstart --locate mtxrun.lua
/context-minimal/tex/texmf-context/scripts/context/lua/mtxrun.lua
localhost:~ kavian$ 

I remember that a long time ago when I was using texlive, at some point the issues with scripts being in a "stubs" subdirectory of context appeared, but don't remember how the issue was fixed (maybe Mojca or Hans did something magic to solve it?).

Best regards: OK

On 16 déc. 2009, at 16:16, Aditya Mahajan wrote:

> Hi,
> 
> I have noticed that my local context update scripts were not always working correctly. In particular, the mtxrun and luatools file never got updated. The reason is the following.
> 
> When I run mtxrun --selfupdate I get
> 
>    mtxrun --selfupdate
>    MTXrun | fileio: to be replaced old script
>    /opt/experimental/tex/texmf-linux-64/bin/mtxrun
>    MTXrun | fileio: using suffix based filetype 'texmfscripts'
>    MTXrun | fileio: checking new script
>    /opt/experimental/tex/texmf-context/scripts/context/stubs/mswin/mtxrun.lua
>    MTXrun | fileio: new script should come from scripts/context/lua
> 
> So, mtxrun is trying to replace mtxrun from the stubs directory. In fact, if I get the same result from
> 
>    luatools --locate mtxrun.lua
>    /opt/experimental/tex/texmf-context/scripts/context/stubs/mswin/mtxrun.lua
> 
> Something is wrong with the search logic as texmfstart also gets this wrong.
> 
>    texmfstart --locate mtxrun.lua
>    /opt/experimental/tex/texmf-context/scripts/context/stubs/mswin/mtxrun.lua%
> 
> However, kpsewhich works correctly.
> 
>    kpsewhich mtxrun.lua
>    /opt/experimental/tex/texmf-context/scripts/context/lua/mtxrun.lua
> 
> Do others also get the same result? Any idea what is going wrong here?
> 
> Aditya
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

%%%%%%%%%%%%%%%%%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 aveue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: Otared.Kavian@math.uvsq.fr




[-- Attachment #1.2: Type: text/html, Size: 4130 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file name resolving for lua files
  2009-12-17 16:25 ` Otared Kavian
@ 2009-12-17 18:31   ` Aditya Mahajan
  2009-12-17 20:06     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2009-12-17 18:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 17 Dec 2009, Otared Kavian wrote:

> Hi Aditya,
>
> On my machine (Mac OS X) the Minimals are installed and when trying what you suggest I get the correct path:
>
> localhost:~ kavian$ luatools --locate mtxrun.lua
> /context-minimal/tex/texmf-context/scripts/context/lua/mtxrun.lua
>
> localhost:~ kavian$ texmfstart --locate mtxrun.lua
> /context-minimal/tex/texmf-context/scripts/context/lua/mtxrun.lua
> localhost:~ kavian$

Can anyone on linux 64 confirm this? I want to cofirm if this is something 
general or specific to my machine.

> I remember that a long time ago when I was using texlive, at some point 
> the issues with scripts being in a "stubs" subdirectory of context 
> appeared, but don't remember how the issue was fixed (maybe Mojca or 
> Hans did something magic to solve it?).

I get the correct result with TL09, but incorrect result on two differnt 
minimal installations.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file name resolving for lua files
  2009-12-17 18:31   ` Aditya Mahajan
@ 2009-12-17 20:06     ` Hans Hagen
  2009-12-17 20:25       ` Aditya Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2009-12-17 20:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:
> On Thu, 17 Dec 2009, Otared Kavian wrote:
> 
>> Hi Aditya,
>>
>> On my machine (Mac OS X) the Minimals are installed and when trying 
>> what you suggest I get the correct path:
>>
>> localhost:~ kavian$ luatools --locate mtxrun.lua
>> /context-minimal/tex/texmf-context/scripts/context/lua/mtxrun.lua
>>
>> localhost:~ kavian$ texmfstart --locate mtxrun.lua
>> /context-minimal/tex/texmf-context/scripts/context/lua/mtxrun.lua
>> localhost:~ kavian$
> 
> Can anyone on linux 64 confirm this? I want to cofirm if this is 
> something general or specific to my machine.
> 
>> I remember that a long time ago when I was using texlive, at some 
>> point the issues with scripts being in a "stubs" subdirectory of 
>> context appeared, but don't remember how the issue was fixed (maybe 
>> Mojca or Hans did something magic to solve it?).
> 
> I get the correct result with TL09, but incorrect result on two differnt 
> minimal installations.

can you run with 
--track=resolvers.locating,resolvers.details,resolvers.expansions

(or --resolvers=*)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file name resolving for lua files
  2009-12-17 20:06     ` Hans Hagen
@ 2009-12-17 20:25       ` Aditya Mahajan
  2009-12-17 20:52         ` Hans Hagen
  2009-12-17 21:48         ` Hans Hagen
  0 siblings, 2 replies; 10+ messages in thread
From: Aditya Mahajan @ 2009-12-17 20:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1339 bytes --]

On Thu, 17 Dec 2009, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> On Thu, 17 Dec 2009, Otared Kavian wrote:
>> 
>>> Hi Aditya,
>>> 
>>> On my machine (Mac OS X) the Minimals are installed and when trying what 
>>> you suggest I get the correct path:
>>> 
>>> localhost:~ kavian$ luatools --locate mtxrun.lua
>>> /context-minimal/tex/texmf-context/scripts/context/lua/mtxrun.lua
>>> 
>>> localhost:~ kavian$ texmfstart --locate mtxrun.lua
>>> /context-minimal/tex/texmf-context/scripts/context/lua/mtxrun.lua
>>> localhost:~ kavian$
>> 
>> Can anyone on linux 64 confirm this? I want to cofirm if this is something 
>> general or specific to my machine.
>> 
>>> I remember that a long time ago when I was using texlive, at some point 
>>> the issues with scripts being in a "stubs" subdirectory of context 
>>> appeared, but don't remember how the issue was fixed (maybe Mojca or Hans 
>>> did something magic to solve it?).
>> 
>> I get the correct result with TL09, but incorrect result on two differnt 
>> minimal installations.
>
> can you run with 
> --track=resolvers.locating,resolvers.details,resolvers.expansions

The output of

  luatools  --track=resolvers.locating,resolvers.details,resolvers.expansions --find-file mtxrun.lua

is attached. I don't know know to interpret the result, but nothing seems 
glaringly wrong.

Aditya

[-- Attachment #2: Type: APPLICATION/zip, Size: 3199 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file name resolving for lua files
  2009-12-17 20:25       ` Aditya Mahajan
@ 2009-12-17 20:52         ` Hans Hagen
  2009-12-17 21:48         ` Hans Hagen
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2009-12-17 20:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Mojca Miklavec

Aditya Mahajan wrote:

> is attached. I don't know know to interpret the result, but nothing 
> seems glaringly wrong.

need some thinking ...

anyhow, i get

LuaTools | fileio: checking filename 'mtxrun.lua'
LuaTools | fileio: file './mtxrun.lua' is not readable
LuaTools | fileio: file 'c:/data/develop/context/lua/mtxrun.lua' is readable
LuaTools | fileio: found 'c:/data/develop/context/lua/mtxrun.lua' by 
scanning
LuaTools | fileio: c:/data/develop/context/lua/mtxrun.lua

btw ... we can remove the etex, pdfetex and omega entries in the cnf 
file i think (i wonder if there's anything useful in those subpaths)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file name resolving for lua files
  2009-12-17 20:25       ` Aditya Mahajan
  2009-12-17 20:52         ` Hans Hagen
@ 2009-12-17 21:48         ` Hans Hagen
  2009-12-17 22:01           ` Aditya Mahajan
  1 sibling, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2009-12-17 21:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Mojca Miklavec, Taco Hoekwater

Aditya Mahajan wrote:

path ... i think that your match is related to the more or less random 
way paths are created under

$TEXMF/scripts/context//

normally stubs come after lua but maybe not on your machine

so, we might better use this:

$TEXMF/scripts/context/{lua,ruby,perl}//

(i cc mojca for the minimals and taco for tex live)

normally this is not that important as there is only one instance ..

also, selfupdate should not be influenced by that as it should take the 
original

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file name resolving for lua files
  2009-12-17 21:48         ` Hans Hagen
@ 2009-12-17 22:01           ` Aditya Mahajan
  2009-12-17 22:09             ` Aditya Mahajan
  2009-12-18 10:09             ` Hans Hagen
  0 siblings, 2 replies; 10+ messages in thread
From: Aditya Mahajan @ 2009-12-17 22:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater, Mojca Miklavec

On Thu, 17 Dec 2009, Hans Hagen wrote:

> Aditya Mahajan wrote:
>
> path ... i think that your match is related to the more or less random way 
> paths are created under
>
> $TEXMF/scripts/context//
>
> normally stubs come after lua but maybe not on your machine
>
> so, we might better use this:
>
> $TEXMF/scripts/context/{lua,ruby,perl}//

Thanks. I changed TEXMFSCRIPTS in texmf.cnf to include the specific 
directories, and now luatools finds the correct file and --selfupdate 
works.

> (i cc mojca for the minimals and taco for tex live)
>
> normally this is not that important as there is only one instance ..

Do you mean that the stubs director should not have mtxrun.lua? I have

$find /opt/experimental -name 'mtxrun.lua'
/opt/experimental/tex/texmf-context/scripts/context/stubs/mswin/mtxrun.lua
/opt/experimental/tex/texmf-context/scripts/context/lua/mtxrun.lua

> also, selfupdate should not be influenced by that as it should take the 
> original

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file name resolving for lua files
  2009-12-17 22:01           ` Aditya Mahajan
@ 2009-12-17 22:09             ` Aditya Mahajan
  2009-12-18 10:09             ` Hans Hagen
  1 sibling, 0 replies; 10+ messages in thread
From: Aditya Mahajan @ 2009-12-17 22:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Also, mtxrun and luatools do not set the exit flag correctly in case of 
a failure. For example, (in the old setup)

$mtxrun --selfupdate 
MTXrun | fileio: to be replaced old script /opt/context-minimals/texmf-linux-64/bin/mtxrun
MTXrun | fileio: using suffix based filetype 'texmfscripts'
MTXrun | fileio: checking new script /opt/context-minimals/texmf-context/scripts/context/stubs/mswin/mtxrun.lua
MTXrun | fileio: new script should come from scripts/context/lua

$ echo $?
0

Because of this, I never noticed that something was going wrong in my 
update scripts.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file name resolving for lua files
  2009-12-17 22:01           ` Aditya Mahajan
  2009-12-17 22:09             ` Aditya Mahajan
@ 2009-12-18 10:09             ` Hans Hagen
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2009-12-18 10:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater, Mojca Miklavec

Aditya Mahajan wrote:
> On Thu, 17 Dec 2009, Hans Hagen wrote:
> 
>> Aditya Mahajan wrote:
>>
>> path ... i think that your match is related to the more or less random 
>> way paths are created under
>>
>> $TEXMF/scripts/context//
>>
>> normally stubs come after lua but maybe not on your machine
>>
>> so, we might better use this:
>>
>> $TEXMF/scripts/context/{lua,ruby,perl}//
> 
> Thanks. I changed TEXMFSCRIPTS in texmf.cnf to include the specific 
> directories, and now luatools finds the correct file and --selfupdate 
> works.
> 
>> (i cc mojca for the minimals and taco for tex live)
>>
>> normally this is not that important as there is only one instance ..
> 
> Do you mean that the stubs director should not have mtxrun.lua? I have
> 
> $find /opt/experimental -name 'mtxrun.lua'
> /opt/experimental/tex/texmf-context/scripts/context/stubs/mswin/mtxrun.lua
> /opt/experimental/tex/texmf-context/scripts/context/lua/mtxrun.lua

eh ... there is no stub on your machine, just mtxrun (without suffix) 
copied to bin, on windows there is mtxrun.exe and mtxrun.lua in the bin 
path

i just put duplicates into mswin/stubs for convenience

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-12-18 10:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-16 15:16 file name resolving for lua files Aditya Mahajan
2009-12-17 16:25 ` Otared Kavian
2009-12-17 18:31   ` Aditya Mahajan
2009-12-17 20:06     ` Hans Hagen
2009-12-17 20:25       ` Aditya Mahajan
2009-12-17 20:52         ` Hans Hagen
2009-12-17 21:48         ` Hans Hagen
2009-12-17 22:01           ` Aditya Mahajan
2009-12-17 22:09             ` Aditya Mahajan
2009-12-18 10:09             ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).