You are not logged in.

#1 2020-03-02 18:53:58

karcher
Member
Registered: 2018-01-09
Posts: 140

[SOLVED] "cp: cannot stat" error during package update

Hi all,

when I try to update mindomo-bin:
https://aur.archlinux.org/cgit/aur.git/ … indomo-bin

I get this error:

cp: cannot stat '/home/user/.cache/yay/mindomo-bin/src/usr/bin': No such file or directory

I can't figure out how should I edit the PKGBUILD to make it work.
Could someone please help?

Last edited by karcher (2020-03-03 17:03:46)

Offline

#2 2020-03-02 20:35:45

mpan
Member
Registered: 2012-08-01
Posts: 1,188
Website

Re: [SOLVED] "cp: cannot stat" error during package update

For me the sources are not even matching.⁽¹⁾ That may or may not be related — you may be receiving a different file than I do. The one I get builds fine.

However, from you using word “update” in a specific way and having “yay” in your path, I guess you are using an AUR helper. Have you tried doing it the normal way? Does the problem persist?
____
⁽¹⁾ 2644af6e4e1c2fdf9e32cbe7da608dd9573a5e228dd3ce4f897a5fcafab381ae instead of ed873e82534c0a4be204464386f61c89248c46e7649a1073d5c6fa24f2281227.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2020-03-02 21:01:32

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] "cp: cannot stat" error during package update

Please post the PKGBUILD you used and the full output from makepkg.

Offline

#4 2020-03-02 21:50:07

yochananmarqos
Member
Registered: 2020-02-05
Posts: 194

Re: [SOLVED] "cp: cannot stat" error during package update

Change the following in the PKGBUILD:

pkgver=9.2.4
source_x86_64=("https://www.mindomo.com/download/9.2/Mindomo_v.${pkgver}_x64.AppImage")

Now run the following in the folder with the PKGBUILD (presumably ~/.cache/yay/mindomo-bin)

updpkgsums && makepkg -i

Offline

#5 2020-03-03 08:46:54

karcher
Member
Registered: 2018-01-09
Posts: 140

Re: [SOLVED] "cp: cannot stat" error during package update

I did like always do and I had no issue with it up until now.
I'm using the AUR helper (yay) to edit the PKGBUILD during installation:

$ yay -S mindomo-bin --editmenu

Then I made with my text editor these changes:

pkgver=9.2.4
source_x86_64=('https://www.mindomo.com/download/9.2/Mindomo_v.'$pkgver'_x64.AppImage')
sha256sums_x86_64=('ccfbdca579c137621c94595439ac56008752a2070185f41502af73f4569764d3')

I'm calculating the sha256 upfront manually. I didn't know it can be done automatically...

In any case I would expect that a change is needed in this line:

cp -r "${srcdir}/usr/bin" "${pkgdir}/opt/mindomo"

like here:

https://bbs.archlinux.org/viewtopic.php?id=100562

@mpan:

The one I get builds fine.

How?

Have you tried doing it the normal way? Does the problem persist?

What do you mean the normal way?
Yes.


@loqs:

Please post the PKGBUILD you used and the full output from makepkg.

PKGBUILD is like the original with the 3 changes I mentioned before.

This i the output:

$ updpkgsums && makepkg -i

==> Retrieving sources...
  -> Found mindomo.desktop
  -> Found Mindomo_v.9.2.4_x64.AppImage
==> Generating checksums for source files...
==> Making package: mindomo-bin 9.2.4-1 (Tue 03 Mar 2020 10:04:23 AM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found mindomo.desktop
  -> Found Mindomo_v.9.2.4_x64.AppImage
==> Validating source files with sha256sums...
    mindomo.desktop ... Passed
==> Validating source_x86_64 files with sha256sums...
    Mindomo_v.9.2.4_x64.AppImage ... Passed
==> Extracting sources...
==> Removing existing $pkgdir/ directory...
==> Entering fakeroot environment...
==> Starting package()...
cp: cannot stat '/home/user/.cache/yay/mindomo-bin/src/usr/bin': No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...

Last edited by karcher (2020-03-03 09:07:51)

Offline

#6 2020-03-03 10:14:38

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] "cp: cannot stat" error during package update

$ bsdtar -tvf Mindomo_v.9.2.4_x64.AppImage
bsdtar: Error opening archive: Unrecognized archive format
$ bsdtar -tvf Mindomo_v.8.0.24_x64.AppImage
drwxr-xr-x  3 0      0        2048 Sep  6  2017 .
drwxr-xr-x  4 0      1000     2048 Sep  6  2017 usr
drwxrwxr-x  4 0      1000     4096 Sep  6  2017 usr/bin
drwxrwxr-x  2 0      1000     8192 Sep  6  2017 usr/bin/locales
drwxrwxr-x  2 0      1000     2048 Sep  6  2017 usr/bin/resources
drwxr-xr-x  3 0      1000     2048 Sep  5  2017 usr/share
drwxr-xr-x  3 0      1000     2048 Oct 26  2016 usr/share/icons
drwxrwxr-x  18 0      1000     2048 Oct  5  2016 usr/share/icons/default
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/1024x1024
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/1024x1024/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/112x112
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/112x112/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/128x128
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/128x128/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/16x16
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/16x16/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/2048x2048
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/2048x2048/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/24x24
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/24x24/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/256x256
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/256x256/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/32x32
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/32x32/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/48x48
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/48x48/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/512x512
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/512x512/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/56x56
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/56x56/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/64x64
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/64x64/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/72x72
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/72x72/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/86x86
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/86x86/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/94x94
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/94x94/apps
drwxr-xr-x  3 0      1000     2048 Sep 15  2016 usr/share/icons/default/96x96
drwxr-xr-x  2 0      1000     2048 Sep 15  2016 usr/share/icons/default/96x96/apps
-rwxr-xr-x  2 0      1000    76432 Sep 15  2016 .DirIcon
-rwxr-xr-x  2 0      1000        0 Sep 15  2016 usr/share/icons/default/2048x2048/apps/Mindomo.png link to .DirIcon
-rwxrwxr-x  1 0      1000     7329 Sep 15  2016 AppRun
-rw-rw-r--  1 0      1000      192 Sep  6  2017 Mindomo.desktop
-rw-r--r--  1 0      1000    58177 Sep  6  2017 usr/bin/blink_image_resources_200_percent.pak
-rw-r--r--  1 0      1000       15 Sep  6  2017 usr/bin/content_resources_200_percent.pak
-rw-r--r--  1 0      1000  9872914 Sep  6  2017 usr/bin/content_shell.pak
-rw-r--r--  1 0      1000 10127152 Sep  6  2017 usr/bin/icudtl.dat
-rw-r--r--  1 0      1000  2574840 Sep  6  2017 usr/bin/libffmpeg.so
-rwxr-xr-x  1 0      1000 21103192 Sep  6  2017 usr/bin/libnode.so
-rw-r--r--  1 0      1000     1055 Sep  6  2017 usr/bin/LICENSE
-rw-r--r--  1 0      1000  1350542 Sep  6  2017 usr/bin/LICENSES.chromium.html
-rw-r--r--  1 0      1000     6139 Sep  6  2017 usr/bin/locales/am.pak
-rw-r--r--  1 0      1000     5776 Sep  6  2017 usr/bin/locales/ar.pak
-rw-r--r--  1 0      1000     6792 Sep  6  2017 usr/bin/locales/bg.pak
-rw-r--r--  1 0      1000     8730 Sep  6  2017 usr/bin/locales/bn.pak
-rw-r--r--  1 0      1000     4138 Sep  6  2017 usr/bin/locales/ca.pak
-rw-r--r--  1 0      1000     4006 Sep  6  2017 usr/bin/locales/cs.pak
-rw-r--r--  1 0      1000     3612 Sep  6  2017 usr/bin/locales/da.pak
-rw-r--r--  1 0      1000     4085 Sep  6  2017 usr/bin/locales/de.pak
-rw-r--r--  1 0      1000     7346 Sep  6  2017 usr/bin/locales/el.pak
-rw-r--r--  1 0      1000     3500 Sep  6  2017 usr/bin/locales/en-GB.pak
-rw-r--r--  1 0      1000     3507 Sep  6  2017 usr/bin/locales/en-US.pak
-rw-r--r--  1 0      1000     4445 Sep  6  2017 usr/bin/locales/es.pak
-rw-r--r--  1 0      1000     4306 Sep  6  2017 usr/bin/locales/es-419.pak
-rw-r--r--  1 0      1000     3736 Sep  6  2017 usr/bin/locales/et.pak
-rw-r--r--  1 0      1000     5718 Sep  6  2017 usr/bin/locales/fa.pak
-rw-r--r--  1 0      1000     6081 Sep  6  2017 usr/bin/locales/fake-bidi.pak
-rw-r--r--  1 0      1000     3824 Sep  6  2017 usr/bin/locales/fi.pak
-rw-r--r--  1 0      1000     4338 Sep  6  2017 usr/bin/locales/fil.pak
-rw-r--r--  1 0      1000     4526 Sep  6  2017 usr/bin/locales/fr.pak
-rw-r--r--  1 0      1000     8221 Sep  6  2017 usr/bin/locales/gu.pak
-rw-r--r--  1 0      1000     4596 Sep  6  2017 usr/bin/locales/he.pak
-rw-r--r--  1 0      1000     7814 Sep  6  2017 usr/bin/locales/hi.pak
-rw-r--r--  1 0      1000     3990 Sep  6  2017 usr/bin/locales/hr.pak
-rw-r--r--  1 0      1000     4428 Sep  6  2017 usr/bin/locales/hu.pak
-rw-r--r--  1 0      1000     3679 Sep  6  2017 usr/bin/locales/id.pak
-rw-r--r--  1 0      1000     4121 Sep  6  2017 usr/bin/locales/it.pak
-rw-r--r--  1 0      1000     4857 Sep  6  2017 usr/bin/locales/ja.pak
-rw-r--r--  1 0      1000     9372 Sep  6  2017 usr/bin/locales/kn.pak
-rw-r--r--  1 0      1000     3976 Sep  6  2017 usr/bin/locales/ko.pak
-rw-r--r--  1 0      1000     4189 Sep  6  2017 usr/bin/locales/lt.pak
-rw-r--r--  1 0      1000     4322 Sep  6  2017 usr/bin/locales/lv.pak
-rw-r--r--  1 0      1000    10291 Sep  6  2017 usr/bin/locales/ml.pak
-rw-r--r--  1 0      1000     8026 Sep  6  2017 usr/bin/locales/mr.pak
-rw-r--r--  1 0      1000     3791 Sep  6  2017 usr/bin/locales/ms.pak
-rw-r--r--  1 0      1000     3574 Sep  6  2017 usr/bin/locales/nb.pak
-rw-r--r--  1 0      1000     3842 Sep  6  2017 usr/bin/locales/nl.pak
-rw-r--r--  1 0      1000     3987 Sep  6  2017 usr/bin/locales/pl.pak
-rw-r--r--  1 0      1000     3962 Sep  6  2017 usr/bin/locales/pt-BR.pak
-rw-r--r--  1 0      1000     4017 Sep  6  2017 usr/bin/locales/pt-PT.pak
-rw-r--r--  1 0      1000     4341 Sep  6  2017 usr/bin/locales/ro.pak
-rw-r--r--  1 0      1000     6296 Sep  6  2017 usr/bin/locales/ru.pak
-rw-r--r--  1 0      1000     4078 Sep  6  2017 usr/bin/locales/sk.pak
-rw-r--r--  1 0      1000     3934 Sep  6  2017 usr/bin/locales/sl.pak
-rw-r--r--  1 0      1000     6312 Sep  6  2017 usr/bin/locales/sr.pak
-rw-r--r--  1 0      1000     3523 Sep  6  2017 usr/bin/locales/sv.pak
-rw-r--r--  1 0      1000     4024 Sep  6  2017 usr/bin/locales/sw.pak
-rw-r--r--  1 0      1000    10148 Sep  6  2017 usr/bin/locales/ta.pak
-rw-r--r--  1 0      1000     9761 Sep  6  2017 usr/bin/locales/te.pak
-rw-r--r--  1 0      1000     7842 Sep  6  2017 usr/bin/locales/th.pak
-rw-r--r--  1 0      1000     3885 Sep  6  2017 usr/bin/locales/tr.pak
-rw-r--r--  1 0      1000     6404 Sep  6  2017 usr/bin/locales/uk.pak
-rw-r--r--  1 0      1000     4673 Sep  6  2017 usr/bin/locales/vi.pak
-rw-r--r--  1 0      1000     3533 Sep  6  2017 usr/bin/locales/zh-CN.pak
-rw-r--r--  1 0      1000     3497 Sep  6  2017 usr/bin/locales/zh-TW.pak
-rwxr-xr-x  1 0      1000 67668240 Sep  6  2017 usr/bin/Mindomo
-rw-r--r--  1 0      1000   394778 Sep  6  2017 usr/bin/natives_blob.bin
-rw-rw-r--  1 0      1000 633016870 Sep  6  2017 usr/bin/resources/app.asar
-rw-r--r--  1 0      1000    186248 Sep  6  2017 usr/bin/resources/electron.asar
-rw-r--r--  1 0      1000    809996 Sep  6  2017 usr/bin/snapshot_blob.bin
-rw-r--r--  1 0      1000    157298 Sep  6  2017 usr/bin/ui_resources_200_percent.pak
-rw-r--r--  1 0      1000     60296 Sep  6  2017 usr/bin/views_resources_200_percent.pak
-rwxr-xr-x  1 0      1000     31708 Sep 15  2016 usr/share/icons/default/1024x1024/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      5225 Sep 15  2016 usr/share/icons/default/112x112/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      5616 Sep 15  2016 usr/share/icons/default/128x128/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      3113 Sep 15  2016 usr/share/icons/default/16x16/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      3313 Sep 15  2016 usr/share/icons/default/24x24/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      8662 Sep 15  2016 usr/share/icons/default/256x256/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      3478 Sep 15  2016 usr/share/icons/default/32x32/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      3826 Sep 15  2016 usr/share/icons/default/48x48/apps/Mindomo.png
-rwxr-xr-x  1 0      1000     15750 Sep 15  2016 usr/share/icons/default/512x512/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      4063 Sep 15  2016 usr/share/icons/default/56x56/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      4211 Sep 15  2016 usr/share/icons/default/64x64/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      4363 Sep 15  2016 usr/share/icons/default/72x72/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      4663 Sep 15  2016 usr/share/icons/default/86x86/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      4901 Sep 15  2016 usr/share/icons/default/94x94/apps/Mindomo.png
-rwxr-xr-x  1 0      1000      4900 Sep 15  2016 usr/share/icons/default/96x96/apps/Mindomo.png

bsdtar does not support the archive format used by the 9.2.4 version,  so nothing is extracted so the package() function fails when the extracted contents is missing.

Offline

#7 2020-03-03 12:09:05

karcher
Member
Registered: 2018-01-09
Posts: 140

Re: [SOLVED] "cp: cannot stat" error during package update

@loqs:

bsdtar does not support the archive format used by the 9.2.4 version,  so nothing is extracted so the package() function fails when the extracted contents is missing.


OK. What can I do about it?

Offline

#8 2020-03-03 15:41:48

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] "cp: cannot stat" error during package update

# Maintainer:  Soldatov Nikita "nvrmd" <n [at]nevermind.su>

pkgname=mindomo-bin
pkgver=9.2.4
pkgrel=1
pkgdesc="Mindomo is an online collaborative mind mapping, concept mapping and outlining software for visualizing and organizing information."
arch=('x86_64')
url="https://www.mindomo.com"
license=('custom:mindomo')
provides=('mindomo')

source=('mindomo.desktop')
source_x86_64=('https://www.mindomo.com/download/9.2/Mindomo_v.'$pkgver'_x64.AppImage')
noextract=("Mindomo_v.$pkgver_x64.AppImage")
sha256sums=('c40dd838c3bd6ab7ef91f530d73dcb5f0c7313743769c7bb498cbe5d4131b4e1')
sha256sums_x86_64=('ccfbdca579c137621c94595439ac56008752a2070185f41502af73f4569764d3')

package() {
    chmod +x ./Mindomo_v."$pkgver"_x64.AppImage
    ./Mindomo_v."$pkgver"_x64.AppImage --appimage-extract

    # bin -> opt
    install -dm755 "${pkgdir}/opt"
    cp -r "${srcdir}/squashfs-root/" "${pkgdir}/opt/mindomo"
    chmod -R 755 "${pkgdir}/opt/mindomo"

    # symlink
    install -dm755 "${pkgdir}/usr/bin"
    ln -s "/opt/mindomo/mindomo" "${pkgdir}/usr/bin/mindomo"

    # desktop
    install -Dm644 "$srcdir/mindomo.desktop" "$pkgdir/usr/share/applications/mindomo.desktop"

    # icons
    install -dm755 "${pkgdir}/usr/share/icons/"
    cp -r "${srcdir}/squashfs-root/usr/share/icons/hicolor" "${pkgdir}/usr/share/icons/hicolor"
    chmod -R 755 "${pkgdir}/usr/share/icons/hicolor"
}

This repacks the AppImage but is untested,  it uses

    chmod +x ./Mindomo_v."$pkgver"_x64.AppImage
    ./Mindomo_v."$pkgver"_x64.AppImage --appimage-extract

To extract the AppImage contents.  Then I attempted to adjust the rest of the package function for the location changes.

Offline

#9 2020-03-03 17:02:47

karcher
Member
Registered: 2018-01-09
Posts: 140

Re: [SOLVED] "cp: cannot stat" error during package update

@loqs: It worked like a charm! You're great! Many thanks!

Offline

Board footer

Powered by FluxBB