Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand PSEUDOHOST as destination in FILECREATED info written #1979

Conversation

MattHeffron
Copy link
Contributor

@MattHeffron MattHeffron commented Jan 21, 2025

This change uses TRUEFILENAME to expand the FULLNAME of the output stream.

Some files are being saved with PseudoHosts in the FILECREATED expression. The PseudoHost will prevent some utility scripts from correct behavior.

(E.g., restore-versions.sh looks for "{DSK}" to identify the file path and get the Medley file version number. This won't fix every case, for example if the PseudoHost is defined in terms of "{UNIX}", restore-versions.sh still wouldn't identify the file version.)

…sion. This will prevent some utility scripts from correct behavior.

(E.g., restore-versions.sh looks for "{DSK}" to identify the file path and get the Medley file version number.
This won't fix every case, for example if the PseudoHost is defined in terms of "{UNIX}", restore-versions.sh still wouldn't identify the file version.)
@MattHeffron MattHeffron self-assigned this Jan 21, 2025
Copy link
Member

@masinter masinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can resolve the problems of version numbers and files through a sequence of patches like this one, which doesn't address the fundamental problem that different people will have different version numbers in the file system than in the FILECREATED expressions.

@rmkaplan
Copy link
Contributor

rmkaplan commented Jan 21, 2025 via email

@MattHeffron
Copy link
Contributor Author

I don't think we can resolve the problems of version numbers and files through a sequence of patches like this one

I agree that this is a stop gap solution so that restore-versions.sh has a better chance of working. A complete solution would be much better, of course.

@masinter
Copy link
Member

What is the problem?
The version numbers in the FILECREATED expression are meaningless for anyone not running in the clone of the repo used by anyone else.
We can support version numbers, but this PR doesn't use absolute version numbers but rather relative ones, and that helps.

Maybe we could work out some use cases? the main one I want to support is to ensure that if I make a new clone of the repo or remove all version files (find . -name "*~" -exec rm {} \;) that the file package will not assume that version numbers are valid. Right now the ilemaps are cached by the version numbered file names. Also whereis.hash when it reopens should get the latest version number.

@MattHeffron
Copy link
Contributor Author

Per discussion 1/27, will not work as intended. Closed without merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants