Opened 5 years ago

Last modified 4 years ago

#3761 new defect

Verbosity of g.extension when using the -f flag

Reported by: Nikos Alexandris Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Default Version: unspecified
Keywords: g.extension Cc:
CPU: Unspecified Platform: Unspecified

Description

In g.extension, in the def remove_extension() function, there is:

    if force:
        grass.verbose(_("List of removed files:"))
    else:
        grass.info(_("Files to be removed:"))

and

    if force:
        grass.message(_("Updating addons metadata file..."))
        remove_extension_xml(mlist)
        grass.message(_("Extension <%s> successfully uninstalled.") %
                      options['extension'])

This is not correct in my humble view. In case of using the -f flag, the messages will be emitted regardless of any successful or non-successful execution of the remove_extension_xml function which in turn can be misleading.

I suggest these messages to be integrated in the functions for which they report whatever they report. I have no solution to propose yet, but this ticket serves to highlight the problem.

Change History (4)

comment:1 by martinl, 5 years ago

Component: AddonsDefault

comment:2 by martinl, 5 years ago

Remove Milestone from Addons bugreports.

comment:3 by Nikos Alexandris, 5 years ago

Also here: https://github.com/OSGeo/grass/blob/9d140ebe89995a8e698e1b9d19f18b7c7387b64c/scripts/g.extension/g.extension.py#L1401

Better to state something is done after it is done. Else, change the message.

comment:4 by neteler, 4 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.