[Sputnik-list] git
pierre pracht
pierre.pracht at gmail.com
Wed Mar 5 10:44:48 GMT+2 2008
Le 5 mars 08 à 07:55, Yuri Takhteyev a écrit :
> Interesting.
>
>> alpha/cvs-1/alpha-cvs-1.rockspec
>> alpha/cvs-1/lua/alphamod/init.lua
>> alpha/cvs-1/lua/...
>> beta/cvs-1/beta-cvs-1.rockspec
>> beta/cvs-1/lua/.....
>>
>> and put this in .gitignore :
>> /*/*
>> !/*/cvs-1
>
> This would mean "ignore everything other "cvs-1" directories?
Yes, first rule ignore all first level directory and their content.
"!" : Mean negate in gitignore, it bring back previously ignored file.
So only cvs-1 sub-repertory would be committed
>> With this the git clone can be used as a rocks repository.
>> The ignore rules get ride of other rocks ( other/1.0.0/ )
>> Other rocks can be directly installed in the git clone.
>
> Makes sense. Though with this, the paths get even longer:
> rocks/sputnik/cvs-1/lua/sputnik/init.lua
>
> BTW, does it have to be "cvs-1" or can it be "git-1"?
"cvs" is a special name for rock version. In luarocks code it get
priority over other version name.
May be luarocks code can be changed to do the same for svn, git, ...
But I'm not sure it would make sense. cvs must be read as SCM : Source
Control Management.
For the number 1 (X) : cvs-X it seem to be needed by rocks name rules.
I don't known if it can be relaxed. But it can be used for testing
purpose : add a cvs-2 to temporary use an other rock.
> I am wondering if it would all be less ugly if we just write a script
> to add symlinks:
>
> link_rock.sh sputnik ~/sputnik/rocks
>
> This would create the directory ~/sputnik/rocks/sputnik if it doesn't
> exist yet and then symlink "sputnik" to ~/sputnik/rocks/sputnik/cvs-1
This is what I have done previously (but didn't take time to script it).
But the idea is to invert the process :
- not bring cvs rocks to rocks local repository
- but bring stable rock to cvs version and use it as local rocks
repository
But if rocks get multiple local rocks repository in 0.5, it would
obviate the question.
>> Or you can make directory and symbolic link from rocks site wide
>> installation. A simple script can make it. (Rq: directory are
>> needed for
>> ignore rule)
>> And you can use lua/luarocks system install :
>> export $LUAROCKS_CONFIG = ...
>
> Perhaps you are suggesting the same thing.
Not sure, see above.
What I mean : write a luarocks_config.lua who point to the git clone
(who have link or copy of other need rocks)
Remark, if luarocks get multiple local rocks repository, it could be
useful that luarocks_config.lua can grab content of an other config
(e.g. site wide one). So a project can give one who would add some
external rocks repository (need for the project)
>> All setup can be easily scripted :
>> - make git clone
>> - install lua / lua rocks or use site wide install
>> - install rocks dependency locally or globally and link to git-clone
>> - optional xavante and start script
>> Rq : install script can be in git if rocks are pushed down in a
>> repertory
>
> I am not sure I understood.
I may try it myself :
in the git repository
README
install.sh
rocks/alpha/cvs-1/alpha-cvs-1.rockspec
rocks/alpha/cvs-1/lua/alphamod/init.lua
rocks/beta/....
launch install.sh and it would ask :
lua installation detected : /usr/
1) use this one
2) use on other
3) make a new install locally
? 1
install rocks dependency :
1) in /usr/share/rocks/
2) in current project
? 1
password :
...
> (I came down with a serious cold today,
> so my thinking is a bit blurred.)
I hope you feel better soon.
- pierre
More information about the Sputnik-list
mailing list