dreemurrs-embedded / Pine64-Arch

:penguin: Arch Linux ARM for your PinePhone/Pro and PineTab/2
701 stars 104 forks source link

Initial pacman -Syu fails on glibc-locales. #649

Closed ewtoombs closed 1 month ago

ewtoombs commented 1 month ago

Device info

Describe the bug

error: failed to commit transaction (conflicting files)
glibc-locales: /usr/lib/locale/aa_DJ.utf8/LC_ADDRESS exists in filesystem
glibc-locales: /usr/lib/locale/aa_DJ.utf8/LC_COLLATE exists in filesystem
glibc-locales: /usr/lib/locale/aa_DJ.utf8/LC_CTYPE exists in filesystem
glibc-locales: /usr/lib/locale/aa_DJ.utf8/LC_IDENTIFICATION exists in filesystem

This goes on for pages.

To Reproduce

  1. Insert SD card into PC.
  2. curl -L 'https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20240326/archlinux-pinephone-pro-phosh-20240326.img.xz' | xzcat | sudo dd of=/dev/mmcblkN bs=1M conv=fsync
  3. Power down phone and insert SD card into phone.
  4. vol down + power on.
  5. Configure the wifi.
  6. Enable ssh.
  7. pacman -Syu

Expected behavior The command completes.

Logfiles and additional information

$ pacman -Qo /usr/lib/locale/
/usr/lib/locale/ is owned by glibc 2.35-5.1
$ pacman -Qo /usr/lib/locale/aa_DJ.utf8/LC_ADDRESS 
error: No package owns /usr/lib/locale/aa_DJ.utf8/LC_ADDRESS

The following fixes it:

# rm /usr/lib/locale/*

Before submitting a bug report, please be sure that you have done the following:

ewtoombs commented 1 month ago

I just found this:

$ pacman -Ql glibc-locales
glibc-locales /usr/
glibc-locales /usr/lib/
glibc-locales /usr/lib/glibc-locale/
glibc-locales /usr/lib/glibc-locale/aa_DJ.utf8/
glibc-locales /usr/lib/glibc-locale/aa_DJ.utf8/LC_ADDRESS
glibc-locales /usr/lib/glibc-locale/aa_DJ.utf8/LC_COLLATE
glibc-locales /usr/lib/glibc-locale/aa_DJ.utf8/LC_CTYPE
glibc-locales /usr/lib/glibc-locale/aa_DJ.utf8/LC_IDENTIFICATION
...

This is before upgrading. There is also this:

$ cat /usr/share/libalpm/hooks/60-glibc-locales.hook
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = usr/lib/locale/*

[Action]
Description = Restoring locales
When = PostTransaction
Exec = /bin/bash -c 'cp -a /usr/lib/glibc-locale/*utf8 /usr/lib/locale/'

It appears the newest version of glibc-locales handles the files differently. This issue should go away once the new glibc-locales is in the .img .

Danct12 commented 1 month ago

https://github.com/dreemurrs-embedded/Pine64-Arch/discussions/641