Skip to content

mdscts occasionally refuses to delete the last crate listed in the crate.db file #3035

@mwinkel-dev

Description

@mwinkel-dev

Affiliation
MIT PSFC

Version(s) Affected
The MDSplus Version(s) affected, if any.
Client & Server: alpha-7-158-0

Platform(s)
Ubuntu-24, but presumably affects other platforms too

Installation Method(s)
Developer build.

Describe the bug
The mdscts utility is used to add CAMAC crates to the crate.db file and CAMAC modules to the cts.db file. In some circumstances, the CTS DelCrate command refuses to delete the last crate listed in the crate.db file. Presumably, the same problem exists regarding the last module in the cts.db file.

To Reproduce
Steps to reproduce the behavior:

  1. Install alpha-7-158-0 on Ubuntu 24.
  2. Create a "/tmp/cts" directory that will contain the two *.db files.
  3. Use a text editor to create cts.db file that contains two bytes, a space and a newline.
  4. Use a text editor to create this crate.db file (it can also be created using CTS AddCrate commands)
GKA401:...:.:.:.
GKA402:...:.:.:.
GKA403:...:.:.:.
GKA404:...:.:.:.
GKA405:...:.:.:.
GKA406:...:.:.:.
GKA407:...:.:.:.
GKA408:...:.:.:.
GKA409:...:.:.:.
GKA410:...:.:.:.
GKA411:...:.:.:.
GKA412:...:.:.:.
GKA413:...:.:.:.
  1. Run mdscts and execute the following commands:
CTS> delcrate gka413
CTS> delcrate gka412
CTS> delcrate gka405
CTS> delcrate gka411
CTS> delcrate gka410
Error: entry 'GKA410' not found
mdsdcl: --> failed on line 'delcrate gka410'

Expected behavior
Displaying the crate.db file shows that GKA410 does indeed exist in the file. Therefore, mdscts should find the crate and delete it. No errors should be thrown.

Screenshots
n/a

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions