[haiku-development] Re: Looking for feedback on enhancements for dealing with Mac keyboards with Haiku

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 27 Sep 2011 00:23:46 -0400

On Mon, Sep 26, 2011 at 11:33 PM, Ingo Weinhold <ingo_weinhold@xxxxxx>wrote:

> Besides that this is not even true -- currently there's already a .svn
> directory that needs to be explicitly excluded from copying


That is true of every directory and is due to the brain-dead design of
subversion to include a .svn/ directory in each directory in the project.


> -- people might have other local files there (e.g. backup files generated
> by editors).


Well, I suppose that we could exclude files in the directory (every
directory really) that begin with ~ since that is a common way for editors
to mark temporary files, but that is already a problem in the current
HaikuImage (I think). Temp files certainly are a problem but they are not
the problem I am trying to solve right now. If you want to solve that
problem it would have to happen in a different ticket that specifically
addresses that particular shortcoming of HaikuImage.

I could explicitly include each file to program more defensively; I know how
to do that already. However, I believe that It is better to copy all the
files in that directory over so that someone who comes along later won't
have the same trouble that I had. Meaning someone will come along and add a
keyboard layout file to that directory expecting it to show up in the keymap
app and it wouldn't because they would have to also add the file explicitly
to the HaikuImage. That is confusing.

Please tell me if I am wrong with any of the above.


> Moreover, just because ATM all files contained in the directories should be
> copied doesn't mean that this will be the case forever. If someone puts an
> experimental layout there that is not ready for prime time or a Jamfile,
> .gitignore, or ... is added for whatever reason, those would have to be
> excluded from copying them to the image as well.


If you put an experimental layout file in that directory you want it to be
included in the image. That's why you put it there. You don't commit that
file to the repo if it isn't ready, but if you are doing testing, the file
should be copied over so that it will show up in the keymap app so that you
can, well, test it.


> This kind of reverses the purpose of HaikuImage. It is supposed to define
> the image contents, not what shouldn't be part of it.
>

This is the code I'd like to replace the keyboardLayout copying code with:

# Copy Keyboard Layout files including subdirectories
CopyDirectoryToHaikuImage system data
: [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ]
: "KeyboardLayouts" : -x .svn ;

This will copy all files from the directory (minus the .svn/ dir) into the
keyboardLayout directory in the image. So I am not defining what should not
be part of the image contents, I am defining what should, everything except
the previously mentioned brain-dead .svn/ dir.

John Scipione

Other related posts: