2008/10/25

Make ecosconfig tool play fair with a Subversion repository

eCos ecosconfig tool has been designed with CVS repository in mind.


However, if you need to store your eCos base code into a Subversion repository, ecosconfig goes mad: it considers any hidden directory, such as .svn SVN administrative dir from a SVN working copy, as an eCos package candidate for inclusion in the eCos build system.


The net result is a ton of stupid warning messages that plague the log output of an eCos code build session.


The following patch prevent ecosconfig from parsing .svn directories.


Note that a better, more generic fix would be to actually ignore any hidden directory, that is a directory which starts with a dot character.


diff -r -u -x '*.svn*' vendor/ecos/host/libcdl/database.cxx new/ecos/host/libcdl/database.cxx
--- vendor/ecos/host/libcdl/database.cxx	2008-10-25 17:15:22.000000000 +0200
+++ new/ecos/host/libcdl/database.cxx	2008-10-14 00:35:28.000000000 +0200
@@ -221,7 +221,8 @@
                 unsigned int i;
                 interp->locate_subdirs(pkgdir, subdirs);
                 for (i = 0; i < subdirs.size(); i++) {
-                    if (("CVS" == subdirs[i]) || ("cvs" == subdirs[i])) {
+                    if (("CVS" == subdirs[i]) || ("cvs" == subdirs[i]) || \
+                        (".svn" == subdirs[i])) {
                         continue;
                     }
                     if ("" != package.script) {
Only in branches/host_tools/ecostools/host/libcdl/doc: .cvsignore
diff -r -u -x '*.svn*' vendor/ecos/host/libcdl/interp.cxx new/ecos/host/libcdl/interp.cxx
--- vendor/ecos/host/libcdl/interp.cxx	2008-10-25 17:15:22.000000000 +0200
+++ new/ecos/host/libcdl/interp.cxx	2008-10-14 00:35:28.000000000 +0200
@@ -1179,7 +1179,7 @@
 foreach entry [glob -nocomplain -- $pattern] {              \n\
     if ([file isdirectory $entry]) {                        \n\
         set entry [file tail $entry]                        \n\
-        if {($entry != \"CVS\") && ($entry != \"cvs\")} {   \n\
+        if {($entry != \"CVS\") && ($entry != \"cvs\") && ($entry != \".svn\")} {   \n\
             lappend result $entry                           \n\
         }                                                   \n\
     }                                                       \n\

No comments: