bugFreeciv - Bugs: bug #24673, modpack.spec would be better than...

Show feedback again

bug #24673: modpack.spec would be better than modpack.db

Submitted by:  Frank <dunnoob>
Submitted on:  Mon May 16 23:58:56 2016  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: 2.6Operating System: None
Planned Release: Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Sun Aug 21 11:40:11 2016, comment #7:

Also see patch #7641

Frank <dunnoob>
Thu May 19 10:56:55 2016, comment #6:

> the temporary file is not written at all

You could pick a .tmp extension for unclear temporary blobs, where "unclear" means "really not notepad", e.g., http://forum.freeciv.org/f/viewtopic.php?f=12&t=838&start=10#p4852

Frank <dunnoob>
Tue May 17 17:43:10 2016, comment #5:

Side note: The whole .control directory should be hidden directory. That's why it has a dot as first character (makes directory hidden one in unixy systems)

That S2_4 and S2_3 leave also modpack.list there is just because there's no pressing need to clean it out, and next time modpack installer downloads it, it will get overwritten anyway.
Latest versions have ability to handle such a downloaded ini-file directly in memory, so the temporary file is not written at all.

Marko Lindqvist <cazfi>
Project Administrator
Tue May 17 17:36:18 2016, comment #4:

I considered .mpdb (modpack database) when I implemented this, to have it different from all those other .db extensions.

I'm against .spec, as it would indicate that file is something that is provided for freeciv, while the file in question is created by freeciv itself and should not be touched by editor (You mention deleting an entry, and I already referred to that as "currently it having ini-file format provides easy way to hack around some problems").
Also, we have just (in freeciv-3.0 development version only, I think) got away from the problem of using .spec for two purposes, which confused some of our own maintenance scripts.

In any case, renaming this would be bigger task than "just rename" it as there are .dbs out there already - migration and all kind of compatibility issues would need to be handled.

It's also not guaranteed that the file remains as text file (though any change would face those migration issues). It could be binary file. In the early plans I actually had it as sqlite database, but decided that benefits of that would not be big enough to justify making sqlite hard requirement for freeciv. Btu maybe some day we do have sqlite as hard requirement, at which point converting this file to use it would make sense.

Marko Lindqvist <cazfi>
Project Administrator
Tue May 17 16:41:13 2016, comment #3:

Somewhat unrelated, AFAIK "delete installed modpack subdirectory and delete the corresponding line in .control/modpack.list manually with a text editor" is the only way to uninstall a modpack. I never did that so far, but it's a valid "edit .control/modpack.thingy manually" application.

Frank <dunnoob>
Tue May 17 16:32:43 2016, comment #2:

A common icon for Freeciv-related text files in a graphical shell (on Windows that's typically explorer) is just nice. Syntax high-lighting for Freeciv-related text files is also just nice.

On Windows for each file extension there can be only one associated "open" application, that's what happens when I double-click the file in explorer, or "start" it in a command line shell or within *.cmd shell scripts.

.db is just totally unsuited for this business, because there are lots of different ideas what .db actually is (historic Dbase, Sqlite-stuff, other data bases, plain text as in modpack.db, etc.)

Of course .spec or .list could be also used for other purposes, but as it happens on my box only Freeciv uses extension .spec, and the 2.4 modpack.list is the only .list on my box.

Frank <dunnoob>
Tue May 17 04:54:28 2016, comment #1:

Why would you want to associate that .db like all those other files? The other files are user editable, .db is modpack installer's internal "persistent memory" and should not be touched otherwise (at least in theory - currently it having ini-file format provides easy way to hack around some problems)

Marko Lindqvist <cazfi>
Project Administrator
Mon May 16 23:58:56 2016, original submission:

See http://freeciv.wikia.com/wiki/Creating_freeciv-modpack_content?action=history -- on Windows everything with the Freeciv spec/tilespec/musicspec/soundspec/ruleset syntax can be associated with one "Freeciv INI-like plain text file type" (common icon and/or syntax highlighting), only db fails, because it is also used for other Data Base file formats (non-Freeciv, binary, whatever).

Frank <dunnoob>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by dunnoob (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup