Skip to content

Re-validate first-time CTAN upload as a new package - #469

Merged
josephwright merged 1 commit into
latex3:mainfrom
yegor256:468
Jul 12, 2026
Merged

Re-validate first-time CTAN upload as a new package#469
josephwright merged 1 commit into
latex3:mainfrom
yegor256:468

Conversation

@yegor256

Copy link
Copy Markdown
Contributor

When you upload a package to CTAN for the first time, the first validation pass comes back saying the package does not exist yet. l3build then flips update to false and validates again as a new package. That second pass was broken: it called construct_ctan_post, which only returns the raw curl config (the form-string="..." lines), and handed that straight to shell. So instead of running curl, the shell tried to execute each config line as a command, every one failed on stderr, and because shell only reads stdout the whole thing looked like it succeeded. The upload reported success and sent nothing.

The initial pass got this right because it wrote the config to a file and built a real curl --config <file> <url> command first. This pulls that file-writing and command-assembly step out into construct_ctan_command and uses it on both paths, so the re-validation now runs an actual curl command against the submit URL.

Closes #468

A first-time CTAN upload passed the raw curl config content straight to
the shell when re-validating an unknown package, so every form-string
line failed silently and nothing was uploaded.

Extract the config-file writing and curl command assembly into
construct_ctan_command and call it on both the initial and the
re-validation paths, so the second pass runs a real curl command.
Copilot AI review requested due to automatic review settings July 12, 2026 06:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@yegor256

Copy link
Copy Markdown
Contributor Author

@davidcarlisle please, take a look

@davidcarlisle davidcarlisle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good to me, thanks

@josephwright
josephwright merged commit 9463b5f into latex3:main Jul 12, 2026
3 checks passed
Comment thread l3build-upload.lua
print("Package not found on CTAN; re-validating as new package:")
uploadconfig.update = false
ctan_post = construct_ctan_post(uploadfile)
ctan_post = construct_ctan_command(uploadfile) .. ' https://ctan.org/submit/'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Need to pass debugging status here too?

-      ctan_post = construct_ctan_command(uploadfile) ..  ' https://ctan.org/submit/'
+      ctan_post = construct_ctan_command(uploadfile, options["debug"]) ..  ' https://ctan.org/submit/'

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.

First-time CTAN upload runs the curl config as a shell script and uploads nothing (l3build-upload.lua:185)

5 participants