Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk-update-icon-cache failing on filename with non-ascii chars #111

Closed
tonylambiris opened this issue May 2, 2022 · 3 comments
Closed
Labels

Comments

@tonylambiris
Copy link

I am the maintainer for the zafiro-icon-theme-git and am running into the following issue:

❯ pacman -U zafiro-icon-theme-git-1.2.r37.gf60cede-1-any.pkg.tar.zst
loading packages...
warning: zafiro-icon-theme-git-1.2.r37.gf60cede-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) zafiro-icon-theme-git-1.2.r37.gf60cede-1

[...INSTALL PROGRESS SNIPPED FOR BREVITY...]

:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating icon theme caches...
gtk-update-icon-cache: The generated cache was invalid.
error: command failed to execute correctly

I ran the following command to find any offending files:

❯ find src/zafiro-icon-theme-git | grep -P "[^\x00-\x7F|\x80-\xFF]"
src/zafiro-icon-theme-git/apps/scalable/βTORRENT.svg

I then added this snippet to the package() function in the PKGBUILD:

+       msg "Checking filenames for any non-ascii characters..."
+       while read file; do
+               msg2 "$(mv -vf "$file" "$(tr -cd '\000-\177' <<<$file)")"
+       done < <( find . -type f | grep -P "[^\x00-\x7F|\x80-\xFF]" )

File was detected and renamed during the pkgbuild process:

==> Starting package()...
==> Checking filenames for any non-ascii characters...
  -> renamed './apps/scalable/βTORRENT.svg' -> './apps/scalable/TORRENT.svg'

Package now installs without any issues:

❯ pacman -U zafiro-icon-theme-git-1.2.r37.gf60cede-1-any.pkg.tar.zst
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) zafiro-icon-theme-git-1.2.r37.gf60cede-1

[...INSTALL PROGRESS SNIPPED FOR BREVITY...]

:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating icon theme caches...
@zayronxio
Copy link
Owner

I'm sorry, I do not keep updated the aur repository

@romildo
Copy link

romildo commented Jul 10, 2022

This issue is still present in the recent released 1.3 version.

zayronxio added a commit that referenced this issue Jul 18, 2022
@zayronxio
Copy link
Owner

solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants