keeferrourke / la-capitaine-icon-theme

La Capitaine is an icon pack designed to integrate with most desktop environments. The set of icons takes inspiration from the latest iterations of macOS and Google's Material Design.
https://krourke.org/projects/art/la-capitaine-icon-theme
Other
1.94k stars 215 forks source link

configure.sh symlink issue with package build in sandbox #3

Closed viewizard closed 8 years ago

viewizard commented 8 years ago

The issue related to this line in script: https://github.com/keeferrourke/la-capitaine-icon-theme/blob/master/configure.sh#L98 https://github.com/keeferrourke/la-capitaine-icon-theme/blob/master/configure.sh#L99

cd "$wd"

ln -sf "$wd"/places/scalable/distributor-logo.svg "$wd"/apps/scalable/cs-desktop.svg
ln -sf "$wd"/places/scalable/distributor-logo.svg "$wd"/apps/scalable/applications-system.svg

Since we build packages in sandbox, only relative paths should be used for symlinks creation (real sandboxed path will be something like): /var/tmp/portage/x11-themes/la-capitaine-icon-theme-0.1/image/usr/share/icons/LaCapitaine/apps/scalable/... but not /usr/share/icons/LaCapitaine/apps/scalable/... so, files will be installed in targeted system into "/usr/share/icons/LaCapitaine/apps/scalable/..." as broken symlinks.

keeferrourke commented 8 years ago

For the lines in question, I believe this should fix the issue with the symlink paths

cd "$wd"/places/scalable

ln -sf distributor-logo.svg ../../apps/scalable/cs-desktop.svg
ln -sf distributor-logo.svg ../../apps/scalable/applications-system.svg

Changes to configure.sh pushed to master.

viewizard commented 8 years ago

You made commit (https://github.com/keeferrourke/la-capitaine-icon-theme/commit/8d5090938a2afca6d811e8e3bcae20e3a42f57fb) that create /usr/share/icons/LaCapitaine/apps/scalable/cs-desktop.svg and /usr/share/icons/LaCapitaine/apps/scalable/applications-system.svg symlink on /usr/share/icons/LaCapitaine/apps/scalable/distributor-logo.svg target (Ubuntu logo). :-)

totoro # stat /usr/share/icons/LaCapitaine/apps/scalable/cs-desktop.svg
File  : «/usr/share/icons/LaCapitaine/apps/scalable/cs-desktop.svg» -> «distributor-logo.svg»

Everything is more simple. Here is my patch that I have tested:

--- a/configure.sh
+++ b/configure.sh
@@ -95,8 +95,8 @@

 cd "$wd"

-ln -sf "$wd"/places/scalable/distributor-logo.svg "$wd"/apps/scalable/cs-desktop.svg
-ln -sf "$wd"/places/scalable/distributor-logo.svg "$wd"/apps/scalable/applications-system.svg
+ln -sfr "$wd"/places/scalable/distributor-logo.svg "$wd"/apps/scalable/cs-desktop.svg
+ln -sfr "$wd"/places/scalable/distributor-logo.svg "$wd"/apps/scalable/applications-system.svg

 echo "Updated distributor logo."

just let "ln" do relative paths.

keeferrourke commented 8 years ago

master updated with your suggested changes.

keeferrourke commented 8 years ago

can I close this?

viewizard commented 8 years ago

Sure.