• scfg: Two import issues

    From Nigel Reed@1:103/705 to GitLab issue in main/sbbs on Mon Nov 11 03:10:03 2024
    open https://gitlab.synchro.net/main/sbbs/-/issues/820

    I'll put both of these in 1 report since they're related to importing.

    Issue 1. When using a CD DIRS.TXT list, if you have a directory which subdirectories, scfg will erroneously report a duplicate directory. For example:

    ```
    $ grep driving DIRS.TXT
    /nfs/bbs/bbc/files/games/driving/ BBC:Games:Driving /nfs/bbs/bbc/files/games/driving/boat/ BBC:Games:Driving:Boat /nfs/bbs/bbc/files/games/driving/miscellaneous/ BBC:Games:Driving:Miscellaneous
    /nfs/bbs/bbc/files/games/driving/motorbike/ BBC:Games:Driving:Motorbike /nfs/bbs/bbc/files/games/driving_top_down/ BBC:Games:Driving Top Down /nfs/bbs/bbc/files/games/driving/vertical/ BBC:Games:Driving:Vertical /nfs/bbs/bbc/files/games/maze/driving/ BBC:Games:Maze:Driving
    ```

    I got a report about DRIVING being a duplicate directory. There are no duplicates here.

    Issue 2.
    I specified a full pathname to the files, but scfg is assuming that those files are in the /sbbs/data/dirs directory and that is not the case. Parent directory is blank in this case. Maybe an option to use absolute or relative path when importing may be in order to help the sysop properly locate the files.
    --- SBBSecho 3.21-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Mon Nov 11 09:20:25 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/820#note_5973

    It looks like the import issue is due to duplicate internal codes being generated. I thought scfg would try and create unique codes if one was already in use. This was done long ago for message areas.
    --- SBBSecho 3.21-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Mon Nov 11 09:22:27 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/820#note_5973

    It looks like the import issue is due to duplicate internal codes being generated. I thought scfg would try and create unique codes if one was already in use. This was done long ago for message areas.

    ```/nfs/bbs/bbc/files/games/driving/miscellaneous/ BBC:Games:Driving:Miscellaneous`
    ```

    For example, scfg is taking the last part of the filename, miscellaneous, and using that as the internal code. Now, if I have something like ./games/space/miscellaneous it will try to create another entry with miscellaneous rather than trying to make it unique.

    Hope that makes sense?
    --- SBBSecho 3.21-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Nov 11 14:10:52 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/820#note_5976

    Please don't combine issues.

    The first one reported here sounds like a duplicate of issue #810:

    The problem is actually in constructing a meaningful/useful short name (25 chars or less) from those longer paths. You don't likely want duplicate short names and SCFG is preventing that. SCFG sees that "handheld/handheld/adventure" is \> 25 chars long, so it uses "handheld/adventure" instead (for the new dir's short name), but that short name is already taken because "handle/adventure" was already added. Any automated solution by SCFG would include adding gibberish to your user-visible directory short names, and I don't think you'd want that.
    --- SBBSecho 3.21-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Nov 11 14:15:31 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/820#note_5978

    The solution to the second issue here is to use the "Parent Directory" feature for the library. When importing a dirs.txt file, the paths are normally relative to some common parent directory. That's common parent directory is what you would use for the Library's "Parent Directory".

    Where'd this DIRS.TXT file come from? It doesn't look to be a format I recognize.
    --- SBBSecho 3.21-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Mon Nov 11 21:21:31 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/820#note_5984

    Rather than just saying duplicate and moving on and not importing the group, how about offering the sysop a change to choose a different name so the import can go ahead?
    --- SBBSecho 3.21-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)