andk / pause

Perl authors upload server
http://pause.perl.org/
150 stars 57 forks source link

If the case of a dist name changes, PAUSE should use the most recent version #428

Open neilb opened 1 year ago

neilb commented 1 year ago

Let's say you have a CPAN distribution with a single module, so the dist name is based on the module's name. If you do one or more releases, and then change the case of the module name, you may (hopefully will) change the name of the distribution as well. When this happens, PAUSE realises that the two different names are the same distribution (good), but in various places it will give the original dist name, rather than the current one. I think it should show the current name.

Example: I released N/NE/NEILB/Acme-NameChangeTest-0.003.tar.gz and then changed the "Test" to "TEST", so now if you look in 02packages you'll see:

Acme::NameChangeTEST              undef  N/NE/NEILB/Acme-NameChangeTEST-0.004.tar.gz

And 06perms is showing:

  Acme::NameChangeTEST,NEILB,f

I look at "View Permissions", "Add Comaintainers", and other places, then the good news is that only one version of this distribution appears (unlike MetaCPAN, for example), but the distname is given as Acme-NameChangeTest, rather than Acme-NameChangeTEST.

charsbar commented 4 months ago

This is because the packages table has a row like the following

   package: Acme::NameChangeTEST
   version: undef
      dist: N/NE/NEILB/Acme-NameChangeTEST-0.004.tar.gz
  distname: Acme-NameChangeTest                                       (<- This is shown in those pages)

My first guess was this was caused by a bug in one-off-utils/fill_distname.pl, but the script was added to one-off-utils in 2019, so that should not be the reason of this mismatch. Unfortunately, I found much more rows that do not match dist and distname. I don't have a clue why this happened yet.

The distname column is only used in those perms-per-distribution pages. It should be safe if we update the column with the correct dist by another one-off-utils script. But, how should we proceed?