Kara-Moon Forum
April 20, 2024, 08:48:18 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Using my own grooves without local path  (Read 4691 times)
alexis
Jr. Member
*
Posts: 62


« on: February 08, 2012, 06:31:10 PM »

Hello all,

I have my own groove set that I invoke in my MMA data files like this:
Code:
use ~/<my personal groove dir path>/<my groove>

As this is suggested, my personal grooves are saved in my home.
I don't want to manage them in the MMA distribution lib dir (lib), since I don't think it's a good practice.
And I also want to use standard MMA grooves.

My solution works, but I'd like to get rid off the path: it's configuration specific, if I use MMA in another computer, it probably won't work.
So my question is: is it possible to specify a personal path in mmarc file, that would be used in addition with standard lib path.
I'd simply type:
Code:
use <my groove>
... and MMA would search the groove files in the standard path AND in the personal path.

I read the manual (from page 208 upwards), but I understand it isn't doable currently.

Thanks.

Alexis
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #1 on: February 08, 2012, 08:23:15 PM »

For a bunch or reasons (mostly laziness on my part) you can't have a multiple set of libpaths.

However, this should work:

1. leave the default libpath as is (/usr/share/mma/lib or whatever).

2. Create you own mma set of libraries. Let's say it's in ~/mymma/lib.

3. Addfiles: ~/mymma/lib/neat.mma , ~/mymma/lib/not-so-neat.mma, etc.

4. Add a symbolic link to ~/mymma/lib:

         cd to /usr/share/mma/lib
         sudo ln -s ~/mymma/lib

5. There is no step 5.

Now, when you do a mma -g the local dir will be processed and added to the database. You'll probably need to be root. I've not tried this, but it should work fine. Let me know please.

I think that a better way to do this would be to have a multiple lib directories each with it's own database. That was users don't need to worry about root permissions, etc. Next version?

In the meantime, using this method should ensure that the next version will be  compatible. I hope.

As a side note, if I were re-starting mma I don't know if I'd even have an auto-lib database, etc. It is problematic in keeping name spaces unique, etc. I think that I'd just leave the "use" directive in for all access. But, that's not going to happen.
 
Comments?
Logged

My online life: http://www.mellowood.ca
alexis
Jr. Member
*
Posts: 62


« Reply #2 on: February 09, 2012, 06:11:51 PM »

Now, when you do a mma -g the local dir will be processed and added to the database. You'll probably need to be root. I've not tried this, but it should work fine. Let me know please.
Yes, this great idea works! Thanks. But this is a Linux-specific solution (as far as I know symbolic links support on last Windows versions).

Quote
As a side note, if I were re-starting mma I don't know if I'd even have an auto-lib database, etc. It is problematic in keeping name spaces unique, etc. I think that I'd just leave the "use" directive in for all access. But, that's not going to happen.
BTW, why was this database introduced? Is it for performance reason (resolving quickly the groove name)?

Cheers,

Alexis
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #3 on: February 09, 2012, 06:29:19 PM »


Yes, this great idea works! Thanks. But this is a Linux-specific solution (as far as I know symbolic links support on last Windows versions).

Good that it works. I do have multiple libs on my list.

Windows? I really don't know. I spend so little time there ... and, besides, since there in no concept of root in Windows adding to the system (wherever that might be) isn't an issue, is it.

Quote
BTW, why was this database introduced? Is it for performance reason (resolving quickly the groove name)?

Without a database mma would have to search each file to find a groove name. Seems to be an expensive operation. Of course, with extended names one could avoid that ... but then, it'd be just like using USE.

But, it seems that whatever one does with the existing system there is always the possibility of grabbing the wrong groove if you have similar names. USE avoids that completely.

Just for historical interest: the original method I used was USE.
Logged

My online life: http://www.mellowood.ca
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.059 seconds with 19 queries.