Closed cuihaoleo closed 10 months ago
I don't know how to fix the PKGBUILD so I wrote a new one from scratch for archlinuxcn repo:
https://github.com/archlinuxcn/repo/blob/69b44e1cf576ca261a4868906d5ab9f238570839/archlinuxcn/joplin/PKGBUILD
It built successfully on my Arch PC and inside a clean chroot (extra-x86_64-build
).
Hello,
Can you show your electron dependencies versions and the versions of the makedepends ?
Not sure why we're removing the package lock and yarn lock in the PKGBUILD
. I'm no JS developer, but I think those are important to pin versions so these types of build issues don't occur.
If I modify the PKGBUILD
included in this repo to comment out the removal of the package-lock.json
and yarn.lock
, Joplin builds correctly.
$ git diff | cat
diff --git a/PKGBUILD b/PKGBUILD
index 2b43429..2451e38 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -63,7 +63,7 @@ prepare() {
fi
msg2 "Deleting all package-locks.json"
- find "${srcdir}/joplin-${pkgver}" -type f -name package-lock.json -delete
+# find "${srcdir}/joplin-${pkgver}" -type f -name package-lock.json -delete
msg2 "Appliying patches..."
msg2 "Tweaking .yarnrc"
@@ -88,7 +88,7 @@ prepare() {
cat "$desktop_package_json" | grep "electron-rebuild"
msg2 "Removing yarn.lock"
- rm "${srcdir}/joplin-${pkgver}/yarn.lock"
+# rm "${srcdir}/joplin-${pkgver}/yarn.lock"
}
@sahal good catch.
I intruduced them there while was trying to package joplin when it changed to yarn 3, i needed to some custumizations. I will remove this and do a release.
I confirm that @sahal fix works.
commenting out those "removing of lock" lines worked for me too.
This has been fixed,reopen if necessary.
When packaging 2.7.15-4, I got this error (joplin-2.7.15-4-x86_64-build.log):
The error in
/tmp/xfs-68722820/build.log
(full text)) is:I guess this is because some dependencies were updated. I tried to restore dependency pinning by commenting out the line
rm "${srcdir}/joplin-${pkgver}/yarn.lock"
inPKGBUILD
, and got the same error as in #111