diff -ruN /tmp/old/script/lib/install-application.js /tmp/new/script/lib/install-application.js This is a test patch for Tiny Core that helps extension packaging. * It bypass Icon caching which requires sudo privilege * It fix data directory to /usr/local/share * It hard-code baseIconThemeDirPath to '/tmp/atom-root/usr/local/share/icons/hicolor' To apply the patch: (either one is fine) cd atom-source && patch -Np3 < this.patch cd atom-source && patch ./script/lib/install-application.js this.patch To build mkdir -p /tmp/atom-root/usr/local/share/icons/hicolor ./script/build --install=/tmp/atom-root/usr/local --- /tmp/old/script/lib/install-application.js 2021-03-08 17:38:22.000000000 +0000 +++ /tmp/new/script/lib/install-application.js 2021-03-21 12:57:51.792170051 +0000 @@ -31,11 +31,12 @@ * https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables */ function findBaseIconThemeDirPath() { + return '/tmp/atom-root/usr/local/share/icons/hicolor'; const defaultBaseIconThemeDir = '/usr/share/icons/hicolor'; const dataDirsString = process.env.XDG_DATA_DIRS; if (dataDirsString) { const dataDirs = dataDirsString.split(path.delimiter); - if (dataDirs.includes('/usr/share/') || dataDirs.includes('/usr/share')) { + if (dataDirs.includes('/usr/local/share/') || dataDirs.includes('/usr/local/share')) { return defaultBaseIconThemeDir; } else { return path.join(dataDirs[0], 'icons', 'hicolor'); @@ -146,9 +147,9 @@ } }); - console.log(`Updating icon cache for "${baseIconThemeDirPath}"`); + console.log(`Skipping icon cache for "${baseIconThemeDirPath}"`); try { - execSync(`gtk-update-icon-cache ${baseIconThemeDirPath} --force`); + execSync(`echo gtk-update-icon-cache -q -f -t /usr/local/share/icons/hicolor`); } catch (e) {} }