#1444: g.parser dpes not filter for duplicate output map statements
---------------------+------------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 6.4.2
Component: LibGIS | Version: 6.4.1
Keywords: | Platform: All
Cpu: All |
---------------------+------------------------------------------------------
A funny effect happens when the user states output map(s) several
times due to copy-paste errors:
{{{
GRASS 6.4.2svn (nc_spm_08):~ > r.watershed elev_lid792_1m thresh=5000
drain=draindir_5K accum=accum_5K basin=basin_5K accum=accum_5K
accum=accum_5K --o
SECTION 1a (of 5): Initiating Memory.
SECTION 1b (of 5): Determining Offmap Flow.
...
SECTION 5: Closing Maps.
100%
Illegal filename. Character <,> not allowed.
WARNING: <accum_5K,accum_5K,accum_5K> is an illegal file name
WARNING: unable to open new accum map layer.
WARNING: category information for [accum_5K,accum_5K,accum_5K] in
[neteler]
missing or invalid
Illegal filename. Character <,> not allowed.
WARNING: can't write history information for [accum_5K,accum_5K,accum_5K]
}}}
{{{
GRASS 7.0.svn (nc_spm_08@grass70):~ > r.composite b=lsat7_2002_10
g=lsat7_2002_20 r=lsat7_2002_30 out=bla2 out=bla2
WARNING: Illegal filename <bla2,bla2>. Character <,> not allowed.
ERROR: <bla2,bla2> is an illegal file name
}}}
#1444: g.parser does not filter for duplicate output map statements
---------------------+------------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 6.4.2
Component: LibGIS | Version: 6.4.1
Keywords: parser | Platform: All
Cpu: All |
---------------------+------------------------------------------------------
Changes (by hamish):
* keywords: => parser
Comment:
It would seem that by design (at least in 6.5) if you use a command line
parameter more than once the parser concatenates them together with ',' as
the f.sep.:
#1444: g.parser does not filter for duplicate output map statements
---------------------+------------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 6.4.2
Component: LibGIS | Version: 6.4.1
Keywords: parser | Platform: All
Cpu: All |
---------------------+------------------------------------------------------
Comment(by glynn):
Replying to [comment:2 hamish]:
> It would seem that by design (at least in 6.5) if you use a command line
parameter more than once the parser concatenates them together with ',' as
the f.sep.:
Correct; this feature has existed since forever, but isn't widely known.
It can be useful in conjunction with e.g. xargs, as generating multiple
options is easier than trying to glue the values together into a single
option.
> if the particular option does not allow multiple="YES", you get an
error.
>
> perhaps a way to handle this is for the parser to be more upfront about
scanning for illegal map names &/or if multiple=NO?
#1444: g.parser does not filter for duplicate output map statements
----------------------+-----------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: reopened
Priority: minor | Milestone: 6.4.2
Component: LibGIS | Version: 6.4.1
Resolution: | Keywords: parser
Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment(by glynn):
Replying to [comment:5 martinl]:
> Milestone: 6.4.2. I would expect backport to devbr6 and relbr64, or not?
Probably. Aside from the "enhancement", r48205 also contains a bug fix;
appending answers to the default argument would discard any values
specified without the option=. IOW:
{{{
r.series map1,map2 input=map3,map4
}}}
was treated as:
{{{
r.series input=map3,map4
}}}
rather than:
{{{
r.series input=map1,map2,map3,map4
}}}
#1444: g.parser does not filter for duplicate output map statements
----------------------+-----------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: reopened
Priority: minor | Milestone: 6.4.2
Component: LibGIS | Version: 6.4.1
Resolution: | Keywords: parser
Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment(by lutra):
GRASS 6.4.2RC249259 (installed with osgeo4w) seems to still accept such
wrong parameters. Example:
{{{
C:\>g.version
GRASS 6.4.2RC249259 (2011)
}}}
{{{
C:\>v.what.vect vector=pontos@teste2 =point layer=1
column=ETICHETTA qvector=prov@teste2 =area qlayer=1 qcolumn=PROVINCIA
100%
100%
100%
100 categories read from the map
100 categories exist in the table
100 categories read from the map exist in the table
100 records updated
v.distance complete.
}}}
#1444: g.parser does not filter for duplicate output map statements
----------------------+-----------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: reopened
Priority: minor | Milestone: 6.4.2
Component: LibGIS | Version: 6.4.1
Resolution: | Keywords: parser
Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Changes (by neteler):
* cc: lutra, pcav (added)
Comment:
I have locally backported it and it helps:
{{{
GRASS 6.4.2svn (nc_spm_08):~ > v.what.vect myhospitals qvect=urbanarea
column=urb_name qcolumn=NAME =silly ==d layer=1
Sorry <=silly> is not a valid option
Sorry <==d> is not a valid option
}}}