From 0d853cef0175975908b139bdcf3064effd54489b Mon Sep 17 00:00:00 2001 From: jwodder Date: Tue, 25 Oct 2022 16:18:09 +0000 Subject: [PATCH] --- ...metadata_on_Windows_doesn__39__t_work.mdwn | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/bugs/addurl_+_metadata_on_Windows_doesn__39__t_work.mdwn diff --git a/doc/bugs/addurl_+_metadata_on_Windows_doesn__39__t_work.mdwn b/doc/bugs/addurl_+_metadata_on_Windows_doesn__39__t_work.mdwn new file mode 100644 index 0000000000..df111bb55e --- /dev/null +++ b/doc/bugs/addurl_+_metadata_on_Windows_doesn__39__t_work.mdwn @@ -0,0 +1,37 @@ +(Sorry for the uninformative title, but I had to work within the character limit.) + +### Please describe the problem. + +`git-annex metadata` does nothing on Windows if invoked while `git-annex addurl` is in progress on other files. + +### What steps will reproduce the problem? + +On Windows (but not on Linux or macOS, where everything works fine): + +- Start `git-annex addurl` in batch mode +- Feed it two or more URLs +- After reading the completion message for a URL from addurl's stdout, but before reading the remaining output, run `git-annex metadata` in batch mode and try to set the metadata for the file that was just downloaded. +- `git-annex metadata` will output an empty line (i.e., just CR LF), and if nothing further is fed to it, it will exit successfully without printing anything else on stdout or stderr. +- Querying the file's metadata normally after `git-annex addurl` exits will show that no metadata was set for the file. + +The Python script at (Python 3.8+ required) will run the above steps and show the output from `git-annex metadata`. A sample run under GitHub Actions can be seen at ; note the following section of the output under "Run script": + +``` +16:04:04 [DEBUG ] __main__: Opening pipe to: git-annex metadata --batch --json --json-error-messages +16:04:04 [DEBUG ] __main__: Input to metadata: b'{"file": "programming/gameboy.pdf", "fields": {"title": ["GameBoy Programming Manual"]}}\n' +16:04:04 [DEBUG ] __main__: r.returncode=0 +16:04:04 [DEBUG ] __main__: r.stdout=b'\r\n' +16:04:04 [DEBUG ] __main__: r.stderr=b'' +``` + +This problem does not always occur, but it seems to occur most of the time. Using `git-annex registerurl` in place of `git-annex metadata` works fine. + +### What version of git-annex are you using? On what operating system? + +git-annex 10.20221003, provided by datalad/git-annex, on Microsoft Windows Server 2022 + +### Please provide any additional information below. + +This affects a hobby project of mine – "gamdam", implemented in [Python](https://github.com/jwodder/gamdam) and [Rust](https://github.com/jwodder/gamdam-rust) — that interacts with git-annex. + +[[!meta author=jwodder]]