Skip to content

Lowercase Perl packages names - #6648

Open
Omikorin wants to merge 17 commits into
msys2:masterfrom
Omikorin:perl-lowercase-names
Open

Omikorin wants to merge 17 commits into
msys2:masterfrom
Omikorin:perl-lowercase-names

Conversation

@Omikorin

@Omikorin Omikorin commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Resolves #6623

I've taken steps described below:

  1. Added _perlname usage everywhere. There are some always-lowercased exceptions but consistency is more important when thinking about possible future scripting. I found even a reversed "standarization" that went from lowercase to uppercase :D
  2. Fixed some leftovers that automated script didn't cover like really rare and old _perlmod
  3. Renamed all deps inside depends-like arrays for Perl packages
  4. Made Perl provides lowercase and updated the patchprov script. I didn't actually ran the script for clarity because it would update some dependencies and change their order.
  5. Added conflicts, provides, replaces

It would be better to merge this PR before #6620, #6621, and #6619, so rebasing this monstrosity won't be so harsh.

There won't by any additional cleanup in this PR.

@Omikorin
Omikorin marked this pull request as ready for review September 11, 2026 01:48
Comment thread perl/PKGBUILD
'perl-Win32=0.59_01'
'perl-Win32API-File=0.1203_01'
'perl-XSLoader=0.32'
provides=('perl-archive-tar=3.04'

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.

That's in theory a breaking change, it would need to provide both variants for some time.

@lazka lazka Sep 15, 2026

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.

Though I'm not sure if there are any users of this we care about, so maybe it's not an issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can add them back, good point.

@lazka

lazka commented Sep 15, 2026

Copy link
Copy Markdown
Member

@dscho just to be sure, do these many renames make problems for GFW automations?

@dscho

dscho commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@dscho just to be sure, do these many renames make problems for GFW automations?

Thanks for the ping! I think we should be fine, there are a couple of places I'll need to adapt, but nothing causing major heartaches.

@Omikorin

Copy link
Copy Markdown
Contributor Author

Hm, it broke, but seems like a CI thing

@dscho

dscho commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Hm, it broke, but seems like a CI thing

I don't quite think so, the real culprit is this:

[install] perl-term-table
  loading packages...
  resolving dependencies...
  looking for conflicting packages...
  warning: removing 'perl-term-table-0.028-3' from target list because it conflicts with 'perl-5.42.3-2'

So either this Perl module must be made compatible with the current perl package, or it needs to be excluded from this here PR, I'd think.

@Omikorin

Omikorin commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Okay, I managed to find the culprit.

Perl has the following provides list:

provides=(
          # ...
          'perl-Term-Table=0.024'
          'perl-term-table=0.024'
)

but the `Term-Table` module starts with this:

```bash
_perlname='Term-Table'
_realname="${_perlname,,}"
pkgname="perl-${_realname}"
pkgver=0.028
pkgrel=3

I'm not sure why Perl even provides a different version than the package with the same name.
I shouldn't downgrade already existing package, I think.

@dscho can you explain this bit?

Edit: It probably broke because of the new, explicit provides in Term-Table:

provides=("perl-Term-Table=${pkgver}")
conflicts=('perl-Term-Table')
replaces=('perl-Term-Table')

@dscho

dscho commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

@Omikorin since perl says that it already provides this module, I guess that it truly is an incompatibility with the current Perl? I only see two ways out: either delete that package in this PR, or make it require an older Perl version.

@lazka

lazka commented Sep 18, 2026

Copy link
Copy Markdown
Member

From what I understand both packages should be able to coexist, the perl provided one and the cpan one.

@lazka

lazka commented Sep 18, 2026

Copy link
Copy Markdown
Member

I can't think of a way to fix this though, maybe we should just drop all those provides from perl, to avoid conflicts with the real packages. Or just revert 765bf60 for now.

One could remove the conflicts from Term-Table, but that would break non-system-upgrades. Not supported in theory, but still.

@dscho

dscho commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Wasn't there a way to allow certain files in packages to be marked as "user may modify"? I think it was backup. Maybe those are allowed to live in multiple packages simultaneously?

Otherwise the best course of action might be to exclude the perl-term-table files from perl e.g. by deleting them in the package function of the PKGBUILD file (and of course dropping it from the provides array).

@lazka

lazka commented Sep 18, 2026

Copy link
Copy Markdown
Member

perl internals depend on term-table, so I don't think that's possible.

The issue here is that a package wants to conflict on another package, but not on the virtual package of the same name provided by another package. Not something pacman supports. From what I understand.

@Omikorin

Copy link
Copy Markdown
Contributor Author

Let me try something. It will need to be fixed for some packages later.

Perl includes dozens of dual-life modules that ship with the core distribution but are also maintained independently on CPAN.
Those packages can be used with a newer version if user wishes so, but if not, then he has the built-in packages available. CPAN modules simply overshadows Perl built-in modules.

From that reasoning, a CPAN module should not have conflicts nor replaces in PKGBUILD. If I'm right, then keeping Perl's both module versions and removing those options from CPAN modules should make them not conflict anymore.

The disadvantage of that solution is if some external package depends on a newer CPAN module then it will revert to using Perl's built-in module.

We can fix that for MINGW packages quickly on the staging level.

@Omikorin

Copy link
Copy Markdown
Contributor Author

Hmm, there is no CI workflow running

@lazka

lazka commented Sep 18, 2026

Copy link
Copy Markdown
Member

If there is no replaces then upgrades will fail because pacman could have the old naming installed and tries to install the new named package which has file conflicts.

@Omikorin

Omikorin commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Maybe this d6026f8 will change the situation. Otherwise, we need to revert the commit for double-named built-ins.

@lazka

lazka commented Sep 18, 2026

Copy link
Copy Markdown
Member

(this might work for now, but once the builtin module gets updated on the next perl minor update, things will conflict again)

@Omikorin

Copy link
Copy Markdown
Contributor Author

To be honest, if you run patchprov right now, there will be updates like you said.

Can we do it temporarily and freeze Perl with its provides for some time until we remove the uppercased version?

@lazka lazka mentioned this pull request Sep 18, 2026
@lazka

lazka commented Sep 18, 2026

Copy link
Copy Markdown
Member

Not quite sure I understand, but I'd be fine with just reverting 765bf60

@Omikorin

Copy link
Copy Markdown
Contributor Author

Okay, nevermind. If reverting works then let's do it.

@Omikorin
Omikorin force-pushed the perl-lowercase-names branch from 4724928 to 1668a30 Compare September 18, 2026 19:58
@Omikorin

Copy link
Copy Markdown
Contributor Author

Rebased on master branch

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.

MSYS Perl package names inconsistent with MINGW and Arch

3 participants