[GRASS-dev] Re: [GRASS-SVN] r49533 - grass/branches/develbranch_6/gui/scripts

Martin Landa landa.martin at gmail.com
Tue Dec 13 06:56:15 EST 2011


Hi,

2011/12/13 Hamish <hamish_b at yahoo.com>:
>> and bat-files to `bin` directory.
>
> this has changed now, right?

yes

> If there needs to be an install manifest I still think it would be
> better to store it locally, but forgetting that for now, does this

yes

> look ok to sync grass6.xml?  (generic filename: consider renaming..?)

don't know `addons/grass6.xml` seems to be OK for me.

> [ copied to http://paste.debian.net/149065/ ]
>
> Index: tools/addons/build-xml.py
> ===================================================================
> --- tools/addons/build-xml.py   (revision 49697)
> +++ tools/addons/build-xml.py   (working copy)
> @@ -41,7 +41,7 @@
>         fd.write('%s<keywords>%s</keywords>\n' % (' ' * indent, ','.join(keyw)))
>         fd.write('%s<binary>\n' % (' ' * indent))
>         indent += 4
> -        for f in get_module_files(m):
> +        for f in get_module_files(m, g7):
>             fd.write('%s<file>%s</file>\n' % (' ' * indent, f))
>         indent -= 4
>         fd.write('%s</binary>\n' % (' ' * indent))
> @@ -53,20 +53,28 @@
>             print " FAILED"
>
>
> -def scandirs(path):
> +def scandirs(path, g7 = True):
>     flist = list()
>     for f in glob.glob(os.path.join(path, '*') ):
>         if os.path.isdir(f):
>             flist += scandirs(f)
>         else:
> +            if not g7:
> +                if f.find('bin/') == 0:
> +                    f.replace('bin/', '', 1)
> +                elif f.find('script/') == 0:
> +                    f.replace('script/', '', 1)
> +                elif f.find('man/') == 0:
> +                    f.replace('man/', 'docs/man/', 1)
> +
>             flist.append(f)
> -
> +
>     return flist
>
> -def get_module_files(name):
> +def get_module_files(name, g7 = True):
>     os.chdir(os.path.join(sys.argv[1], name))
>     return scandirs('*')
> -
> +
>  def get_module_metadata(name):
>     import grass.script.task as gtask
>     path = os.environ['PATH']

auto-generated metafiles on the remote server should not applied "tidy
citizen" idea. Then list of the files will be incorrect when you
install the extension with `-s` flag. g.extension should store
metafile locally in addons dir and define list of the files on it's
own.

Personal note: I hope that you understand that your idea is not eating
energy only to you... Thanks to "tidy citizen" I have always something
to do ;-)

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa


More information about the grass-dev mailing list