Fix filenames and paths after `pacman-mirrors` -> `manjaro-mirrors` package renaming

The topic described future problems of the project renaming without intervention into package content file names and paths used to store files on a user PC where the package will be installed.

The news of renaming:

The package owns next pacman-mirrors-path-contained files

❯ pacman -Ql manjaro-mirrors | grep 'pacman-'
manjaro-mirrors /etc/pacman-mirrors.conf
manjaro-mirrors /usr/bin/pacman-mirrors
manjaro-mirrors /usr/share/libalpm/hooks/pacman-mirrors-install.hook
manjaro-mirrors /usr/share/libalpm/hooks/pacman-mirrors-upgrade.hook
manjaro-mirrors /usr/share/libalpm/scripts/pacman-mirrors-install
manjaro-mirrors /usr/share/libalpm/scripts/pacman-mirrors-upgrade
manjaro-mirrors /usr/share/man/man8/pacman-mirrors.8.gz
manjaro-mirrors /usr/share/pacman-mirrors/
manjaro-mirrors /usr/share/pacman-mirrors/mirrors.json

If application name is now manjaro-mirrors, then it would be misleading to store it’s files (bins, configs, assets) by pacman-mirrors paths.

Why package content should also get renaming after package rename:

Current state of paths and file naming is against the rule of proper (representative / self-described) package files.

Moreover if somebody (now, after a month or a brand new app will appear in any (years) future) will install other package of pacman-mirrors, it could introduce files rewrites because the only owner of proper bin file name and path to store files in for the pacman-mirrors is the abstract pacman-mirrors package by naming convention, not any other package.

To store files the manjaro-mirrors by path and by names of pacman-mirrors is and idea to mislead users about package name of the files owner and it is the base to introduce future file conflict by overwriting files of another package with potential/possible name of pacman-mirrors.

Let’s try prevent this issue postponed into future and to get rid of easy-to-be-predicted future conflicts.

Yes, we should rename it’s call in all apps into current proper name, but we know that it will be the only right way to prevent lacks and bugs in future.

Algorithm could go like this:

  1. manjaro-mirrors package renames all filenames and paths from pacman-mirrors to manjaro-mirrors.
  2. manjaro-mirrors package introduces a link files named as old files in pacman-mirrors had and they leads to files by new renamed to manjaro-mirrors paths.
  3. manjaro-mirrors ships new version. It works flawlessly for all external software cause now links of old names leads to new filenames and paths of manjaro-mirrors.
  4. manjaro-mirrors informs all involved software’s authors (which uses pacman-mirrors) to fix names and paths of binary/configs/assets to call to.
  5. After informing all involved software’s authors, the transition period starts. I predict it will continue at least to several months.
  6. After all software, which wants to call pacman-mirrors functionality got renamed that calls into new names of manjaro-mirrors paths and bins, the fallback links to pacman-mirrors paths get removed. The manjaro-mirrors ships the final version without links of transition from one naming to a new one.

And only 6th step frees old naming of pacman-mirrors to be ready to use to potential pacman-mirrors package. And cause of that latency the faster we will start the paths transition the cleaner error-free future we will get.

If we can, please let’s do rename properly / fully - according to all naming convention schemes.

At least thank you for your attention, team and forum members!

@oberon

It is only a temporary rename of the package itself, due to somebody having uploaded a pacman-mirrors package to the AUR that is specifically intended for the Windows Subsystem for Linux [sic].

The Manjaro developers have filed a take-down request with the AUR regarding said package, but this can take a long time to get processed, and thus meanwhile the rename was necessary.

Also, the commands and files still retain the same name for a reason, which is that pacman-mirrors is a well-known tool in Manjaro and Arch, and is often referenced in advice we give to the forum members, as well as in the Wiki articles.

3 Likes

@Aragorn , so the manjaro-mirrors renaming to pacman-mirrors is only stopgap measure and after AUR got their pacman-mirrors to be removed, the manjaro-mirrors will switch back to the pacman-mirrors name?

If yes, then my suggestion was inappropriate: I though that the name of manjaro-mirrors is a new name for a long time.

Yes. :wink:

See the comment trail

https://aur.archlinux.org/packages/pacman-mirrors

The package is in progress to change to

https://aur.archlinux.org/packages/msys2-pacman-mirrors

Also see Rename project (#183) · Issues · Applications / pacman-mirrors · GitLab

wow! already got the backwards update:

❯ sudo pacman -Syu                                                                                                                                                               
:: Synchronising package databases...
 core                                                                                              160.3 KiB   368 KiB/s 00:00 [############################################################################] 100%
 extra is up to date
 community is up to date
 chaotic-aur                                                                                         2.2 MiB  1293 KiB/s 00:02 [############################################################################] 100%
:: Starting full system upgrade...
:: Replace manjaro-mirrors with core/pacman-mirrors? [Y/n] 
resolving dependencies...
looking for conflicting packages...

Package (2)          Old Version          New Version          Net Change

manjaro-mirrors      4.23.2+2+g2f58b3c-2                        -0.67 MiB
core/pacman-mirrors                       4.23.2+2+g2f58b3c-3    0.67 MiB

Total Installed Size:  0.67 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 

if a user was in a whole-day “sleep”, they even did not know that whole story :slight_smile:

1 Like

Well, you see… it went forwards temporarily, then reversed itself. It’s a bit difficult to explain… Perhaps The Doctor described it best when he said, it’s “A big ball of wibbly wobbly, timey wimey stuff.”

Exactly. If they were asleep during the period the temporal anomaly was active, then nothing actually happened. :wink:

Nothing to see here, move along. Back to your regularly scheduled package updates.

5 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.