merge files.xml creation with rest of code base

Bug #363061 reported by Hank Bromley
2
Affects Status Importance Assigned to Milestone
Microfilm
New
Undecided
Unassigned

Bug Description

Scandata for microfilm items is labeled "Microfilm Scandata XML" in files.xml, instead of the plain "Scandata" that Scribe items use. But so far as derivations.xml knows, "Microfilm Scandata XML" doesn't exist as a format name.

The different format name happens because RePublisherPostprocess.php uses its own mflm-files-maker.php to generate files.xml, instead of FilesXML::setFormats(), like other items do. (FilesXML::setFormats() itself relies on the contents of derivations.xml to determine formats, which keeps knowledge of file formats centralized in one place where it can more easily be managed.)

Can microfilm just use FilesXML::setFormats() (optionally with the $prune arg, if there might be a preexisting files.xml that needs to have some entries removed because the files no longer exist)?

If that's not possible for some reason, here are two fallback options:

- I may be able to modify setFormats() to meet your needs

- Failing that, perhaps the existing format-assigning code in mflm-files-maker.php could use FormatGetter::pickFormat() instead of its own hardcoded names, so that the names would stay in sync with what other parts of the code base are using

Archeological note: mflm-files-maker.php originated as a copy of petabox/sw/bin/files-maker.php. But files-maker.php doesn't assign format names - it seems primarily intended instead for adding/updating md5 entries. So mflm-files-maker.php seems to have diverged from its roots with the result that it's being used for a purpose it's not ideally suited for.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.