Problem/Motivation
After packaging a file, the packager creates a symlink to the latest release of the branch, so sites can request drupal-10.x.hu.po and get the newest 10.x translation. Drupal 7's l10n_packager_create_latest_symlink() (from #2555021) strips the minor component from the branch first: 10.1.5 gets the drupal-10.x.hu.po link, and ftp.drupal.org redirects drupal-10.1.x.hu.po to it. The 3.0.x port kept the branch as is, so a 10.1.5 release would create drupal-10.1.x.hu.po and nothing would exist under the name sites and the redirect expect. Contrib releases with core compatibility, like 8.x-1.0, are not affected.
Proposed resolution
Name the link after the major branch (the same rule the downloads tables use) and replace an existing link even when its target is gone.
Tests: Drupal 7 testLatestSymlink() first, covering the 8.x-1.x link, the 2.x link of a 2.1.0 release and the link moving to 2.1.1; PackagerLatestSymlinkTest is the port.
LLM disclosure
LLM was used to find, diagnose explain and fix this issue. With human review.
Comments
Comment #4
gábor hojtsy