we have the following modman file set-up

app/code/local/XXX/*                        app/code/local/XXX/
app/design/frontend/base/default/layout/*   app/design/frontend/base/default/layout/
app/etc/modules/*                           app/etc/modules/
app/locale/*                                app/locale/

The problem is that for example

app/locale/*                                app/locale/

overwrites all directories. app/locale/* on github contains De_de and en_us directories. These directories already contain files on the Magento server.

Now how can I make modman, clone all files from github in match app/locale/* --- but then merge with already existing files, instead of overwriting the whole directory

Solution now seems to be

app/locale/da_DK/*                                        app/locale/da_DK/
app/locale/de_DE/*                                        app/locale/de_DE/
app/locale/en_US/*                                        app/locale/en_US/

So to date I understand that if, one uses /* in modman

  • independent files are copied 1 by 1 and overwritten if they exist (expected)
  • folders are copied 1 by 1 and overwrite everything in the already existing folder (not expected; we would expect to loop through directory a level lower and then link file per file)

It is a bit unsatisfactory to give such an answer, but afaik there is indeed no other way then to link the files in the modman directory separately. We discussed this issue extensively in the de_DE community translation under https://github.com/riconeitzel/German_LocalePack_de_DE/pull/65. Unfortunately in german. And now the language files are indeed named separately in the modman file to avoid this problem.

So your understanding is completely correct. Maybe one could ask Colin on GitHub if he sees any other possibility or if he wants to change this behaviour...

  • 1
    I think this is a feature not a bug. You define the files and folders you want to link. To link all, you have the shortcut *. If you don't want to link these files, you have to define the link one level deeper in the directory tree... – Fabian Blechschmidt Aug 26 '14 at 15:31
  • Something like a /** action would be cool which recursively checks subdirectories and only replaces/links files, not folders... – Simon Aug 26 '14 at 15:42
  • This solves only the problem, when the modman installation is not the first one :( – Fabian Blechschmidt Aug 26 '14 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.