[GRASS-dev] [GRASS GIS] #2418: t.unregister: "maps"-parameter limited to ca. 5000 maps

#2418: t.unregister: "maps"-parameter limited to ca. 5000 maps
-------------------------+--------------------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Temporal | Version: unspecified
Keywords: | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
In t.unregister the "maps" parameter seems to be limited to ca. 5000 maps.

I have a strds with ca. 20k raster maps and tried to remove all by piping
the output from t.rast.list to the "maps" parameter in t.unregister. After
some testing I found out that the "maps" parameter works fine with 5000
maps, but with 6000 maps and more I got an "Argument list to long" error.

However, unregistering of all 20k maps worked fine when output from
t.rast.list was stored in a file and then t.unregister`s "file" parameter
used.

BTW, maybe a flag for unregistering all maps in a stds would be useful?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2418&gt;
GRASS GIS <http://grass.osgeo.org>

#2418: t.unregister: "maps"-parameter limited to ca. 5000 maps
-------------------------+--------------------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Temporal | Version: unspecified
Keywords: | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by huhabla):

Replying to [ticket:2418 sbl]:
> In t.unregister the "maps" parameter seems to be limited to ca. 5000
maps.
>
> I have a strds with ca. 20k raster maps and tried to remove all by
piping the output from t.rast.list to the "maps" parameter in
t.unregister. After some testing I found out that the "maps" parameter
works fine with 5000 maps, but with 6000 maps and more I got an "Argument
list to long" error.

This is not a defect, its the os specific limitation of argument lists[1].

> However, unregistering of all 20k maps worked fine when output from
t.rast.list was stored in a file and then t.unregister`s "file" parameter
used.

The reason for the input file option is the os limit of command line
arguments. So you did exactly the right thing by using it in case of 20k
maps.

> BTW, maybe a flag for unregistering all maps in a stds would be useful?

Sounds useful indeed, feel free to add it to t.unregister. :slight_smile:

[1] https://wiki.debian.org/CommonErrorMessages/ArgumentListTooLong

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2418#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>