Failed to generate snap metadata: 'adopt-info' refers to part 'synfig-studio', but that part is lacking the 'parse-info' property

Hi, guys!
I am trying to build project using snapcraft.io (snapcraft.io/synfigstudio/builds/1033447)
Locally it builds fine, using following command: snapcraft --debug --use-lxd

But snapcraft.io build fails with error:

Failed to generate snap metadata: 'adopt-info' refers to part 'synfig-studio', but that part is lacking the 'parse-info' property.

Documentation says:

To resolve this, make sure your part includes parse-info or runs a command to define the version details (such as snapcraftctl set-version).

and as I can see in log:

  • date -u +%Y%m%d
  • datestring=20200708
  • snapcraftctl set-version 1.5.0-20200708~943c6f1

the version is set.

snapcraft.yml is here: https://github.com/synfig/synfig/blob/master/snap/snapcraft.yaml

Last log:

make -j4
make install DESTDIR=/build/synfigstudio/parts/synfig-studio/install
Staging synfig-studio 
+ snapcraftctl stage
+ appdata_file=usr/share/appdata/org.synfig.SynfigStudio.appdata.xml
+ xmllint --xpath string(//release[1]/@version) usr/share/appdata/org.synfig.SynfigStudio.appdata.xml
+ appdata_version=1.5.0
+ sed -i -E s|^Icon=(.*)|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/\1.svg|g usr/share/applications/org.synfig.SynfigStudio.desktop
+ cd /build/synfigstudio
+ git describe --exact-match HEAD
fatal: no tag exactly matches '943c6f10d8c2e11ae875113ac296b60d5fc050c9'
+ grade=devel
+ snapcraftctl set-grade devel
+ [ devel = devel ]
+ git rev-parse --short=7 HEAD
+ githash=943c6f1
+ date -u +%Y%m%d
+ datestring=20200708
+ snapcraftctl set-version 1.5.0-20200708~943c6f1
Pulling cleanup 
Pulling gnome-3-34-extension 
Running build phase...
Skipping pull synfig-deps (already ran)
Skipping pull etl (already ran)
Skipping pull synfig-core (already ran)
Skipping pull synfig-studio (already ran)
Skipping pull cleanup (already ran)
Skipping pull gnome-3-34-extension (already ran)
Skipping build synfig-deps (already ran)
Skipping build etl (already ran)
Skipping build synfig-core (already ran)
Skipping build synfig-studio (already ran)
Building cleanup 
Building gnome-3-34-extension 
gcc -Wall -O2 -o bindtextdomain.so -fPIC -shared ./../src/bindtextdomain.c -ldl
install -d /build/synfigstudio/parts/gnome-3-34-extension/install/gnome-platform
install -d /build/synfigstudio/parts/gnome-3-34-extension/install/data-dir
install -d /build/synfigstudio/parts/gnome-3-34-extension/install/data-dir/icons
install -d /build/synfigstudio/parts/gnome-3-34-extension/install/data-dir/sounds
install -d /build/synfigstudio/parts/gnome-3-34-extension/install/data-dir/themes
install -D -m755 desktop-launch "/build/synfigstudio/parts/gnome-3-34-extension/install/snap/command-chain"/desktop-launch
install -D -m644 bindtextdomain.so "/build/synfigstudio/parts/gnome-3-34-extension/install/lib"/bindtextdomain.so
make -j4
make install DESTDIR=/build/synfigstudio/parts/gnome-3-34-extension/install
Skipping stage synfig-deps (already ran)
Skipping stage etl (already ran)
Skipping stage synfig-core (already ran)
Skipping stage synfig-studio (already ran)
Staging cleanup 
Staging gnome-3-34-extension 
Priming synfig-deps 
Priming etl 
Priming synfig-core 
Priming synfig-studio 
Priming cleanup 
+ rm -rf usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 usr/lib/x86_64-linux-gnu/libharfbuzz.so.0.10702.0
+ rm -rf usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1.3.0 usr/lib/x86_64-linux-gnu/libglibmm_generate_extra_defs-2.4.so.1 usr/lib/x86_64-linux-gnu/libglibmm_generate_extra_defs-2.4.so.1.3.0
+ rm -rf usr/lib/x86_64-linux-gnu/libgiomm-2.4.so.1 usr/lib/x86_64-linux-gnu/libgiomm-2.4.so.1.3.0
+ rm -rf usr/lib/x86_64-linux-gnu/libQt5Core.so.5 usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.9 usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5EglFSDeviceIntegration.so.5 usr/lib/x86_64-linux-gnu/libQt5EglFSDeviceIntegration.so.5.9 usr/lib/x86_64-linux-gnu/libQt5EglFSDeviceIntegration.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5EglFsKmsSupport.so.5 usr/lib/x86_64-linux-gnu/libQt5EglFsKmsSupport.so.5.9 usr/lib/x86_64-linux-gnu/libQt5EglFsKmsSupport.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5Network.so.5 usr/lib/x86_64-linux-gnu/libQt5Network.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Network.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5Svg.so.5 usr/lib/x86_64-linux-gnu/libQt5Svg.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Svg.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.9 usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5Xml.so.5 usr/lib/x86_64-linux-gnu/libQt5Xml.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Xml.so.5.9.5
+ rm -rf usr/lib/x86_64-linux-gnu/libflite.so.1 usr/lib/x86_64-linux-gnu/libflite.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_grapheme_lang.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_grapheme_lang.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_grapheme_lex.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_grapheme_lex.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_indic_lang.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_indic_lang.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_indic_lex.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_indic_lex.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_time_awb.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_time_awb.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_awb.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_awb.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_kal.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_kal.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_kal16.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_kal16.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_rms.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_rms.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_slt.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_slt.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmulex.so.1 usr/lib/x86_64-linux-gnu/libflite_cmulex.so.2.1 usr/lib/x86_64-linux-gnu/libflite_usenglish.so.1 usr/lib/x86_64-linux-gnu/libflite_usenglish.so.2.1
+ rm -rf usr/lib/x86_64-linux-gnu/qt5
+ rm -rf /build/synfigstudio/prime/usr/share/bug
+ rm -rf /build/synfigstudio/prime/usr/share/lintian
+ rm -rf /build/synfigstudio/prime/usr/share/man
+ rm -rf /build/synfigstudio/prime/usr/share/icons/Humanity
+ find /build/synfigstudio/prime/usr/share/doc/ -type f -not -name copyright -delete
+ find /build/synfigstudio/prime/usr/share -type d -empty -delete
+ cd /snap/core18/current
+ find . -type f,l -exec rm -f /build/synfigstudio/prime/{} ;
+ cd /snap/gnome-3-34-1804/current
+ find . -type f,l -exec rm -f /build/synfigstudio/prime/{} ;
Priming gnome-3-34-extension 
Failed to generate snap metadata: 'adopt-info' refers to part 'synfig-studio', but that part is lacking the 'parse-info' property.
Build failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 258, in run
    self.build()
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 247, in build
    env=env)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 100, in run_build_command
    return self.backend.run(args, env=full_env, **kwargs)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/lxd.py", line 537, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['lxc', 'exec', 'lp-bionic-amd64', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-57771115", "build-request-timestamp": "2020-07-08T21:14:55Z", "build_url": "https://launchpad.net/~build.snapcraft.io/+snap/4fbd9fd52d5ac50190eaac6b9edf9101/+build/1034496"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy', '--', '/bin/sh', '-c', 'cd /build/synfigstudio && linux64 snapcraft']' returned non-zero exit status 2
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=bionic --arch=amd64 SNAPBUILD-1034496
Scanning for processes to kill in build SNAPBUILD-1034496

You might get more responses if you change the category to #snapcraft

1 Like

FTFY :slight_smile:

I’ve seen this occur seemingly randomly. @sergiusens or @cjp256 might be able to suggest the cause, but I suspect that if you were to run snapcraft clean and then re-run snapcraft anew it will successfully build. Most of the instances I’ve seen of this issue are where the snap has been partially built, modified to fix an issue, and then attempted to complete the build.

1 Like

Thank you @lucyllewy, @ijohnson

The problem is that it builds fine locally, but when I try to build it using snapcraft.io builder, it fails.

Maybe I need to run an extra command to reproduce this locally?

From your yaml:

      if [ "$grade" = "devel" ]; then
        githash=$(git rev-parse --short=7 HEAD)
        datestring=$(date -u +%Y%m%d)
        snapcraftctl set-version "${appdata_version}-${datestring}~${githash}"
      fi

Note that your snapcraftctl set-version is only executed when $grade = "devel". If $grade is anything else, e.g. stable then it won’t call the set-version.

Yes, but below you can see that the command has executed:

+ snapcraftctl set-version 1.5.0-20200708~943c6f1

if I understand correctly, the version is set.

1 Like

I built it locally and could not reproduce. Is this still happening for your builds? Every time?

+ [ devel = devel ]
+ git rev-parse --short=7 HEAD
+ githash=f17715b
+ date -u +%Y%m%d
+ datestring=20200710
+ snapcraftctl set-version 1.5.0-20200710~f17715b
Pulling cleanup 
Pulling gnome-3-34-extension 
Skipping build synfig-deps (already ran)
Skipping build etl (already ran)
Skipping build synfig-core (already ran)
Skipping build synfig-studio (already ran)
Building cleanup 
Building gnome-3-34-extension 
make -j8
gcc -Wall -O2 -o bindtextdomain.so -fPIC -shared ./../src/bindtextdomain.c -ldl
make install DESTDIR=/root/parts/gnome-3-34-extension/install
install -d /root/parts/gnome-3-34-extension/install/gnome-platform
install -d /root/parts/gnome-3-34-extension/install/data-dir
install -d /root/parts/gnome-3-34-extension/install/data-dir/icons
install -d /root/parts/gnome-3-34-extension/install/data-dir/sounds
install -d /root/parts/gnome-3-34-extension/install/data-dir/themes
install -D -m755 desktop-launch "/root/parts/gnome-3-34-extension/install/snap/command-chain"/desktop-launch
install -D -m644 bindtextdomain.so "/root/parts/gnome-3-34-extension/install/lib"/bindtextdomain.so
Skipping stage synfig-deps (already ran)
Skipping stage etl (already ran)
Skipping stage synfig-core (already ran)
Skipping stage synfig-studio (already ran)
Staging cleanup 
Staging gnome-3-34-extension 
Priming synfig-deps 
Priming etl 
Priming synfig-core 
Priming synfig-studio 
Priming cleanup 
+ rm -rf usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 usr/lib/x86_64-linux-gnu/libharfbuzz.so.0.10702.0
+ rm -rf usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1.3.0 usr/lib/x86_64-linux-gnu/libglibmm_generate_extra_defs-2.4.so.1 usr/lib/x86_64-linux-gnu/libglibmm_generate_extra_defs-2.4.so.1.3.0
+ rm -rf usr/lib/x86_64-linux-gnu/libgiomm-2.4.so.1 usr/lib/x86_64-linux-gnu/libgiomm-2.4.so.1.3.0
+ rm -rf usr/lib/x86_64-linux-gnu/libQt5Core.so.5 usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.9 usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5EglFSDeviceIntegration.so.5 usr/lib/x86_64-linux-gnu/libQt5EglFSDeviceIntegration.so.5.9 usr/lib/x86_64-linux-gnu/libQt5EglFSDeviceIntegration.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5EglFsKmsSupport.so.5 usr/lib/x86_64-linux-gnu/libQt5EglFsKmsSupport.so.5.9 usr/lib/x86_64-linux-gnu/libQt5EglFsKmsSupport.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5Network.so.5 usr/lib/x86_64-linux-gnu/libQt5Network.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Network.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5Svg.so.5 usr/lib/x86_64-linux-gnu/libQt5Svg.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Svg.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.9 usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.9.5 usr/lib/x86_64-linux-gnu/libQt5Xml.so.5 usr/lib/x86_64-linux-gnu/libQt5Xml.so.5.9 usr/lib/x86_64-linux-gnu/libQt5Xml.so.5.9.5
+ rm -rf usr/lib/x86_64-linux-gnu/libflite.so.1 usr/lib/x86_64-linux-gnu/libflite.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_grapheme_lang.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_grapheme_lang.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_grapheme_lex.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_grapheme_lex.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_indic_lang.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_indic_lang.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_indic_lex.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_indic_lex.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_time_awb.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_time_awb.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_awb.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_awb.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_kal.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_kal.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_kal16.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_kal16.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_rms.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_rms.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_slt.so.1 usr/lib/x86_64-linux-gnu/libflite_cmu_us_slt.so.2.1 usr/lib/x86_64-linux-gnu/libflite_cmulex.so.1 usr/lib/x86_64-linux-gnu/libflite_cmulex.so.2.1 usr/lib/x86_64-linux-gnu/libflite_usenglish.so.1 usr/lib/x86_64-linux-gnu/libflite_usenglish.so.2.1
+ rm -rf usr/lib/x86_64-linux-gnu/qt5
+ rm -rf /root/prime/usr/share/bug
+ rm -rf /root/prime/usr/share/lintian
+ rm -rf /root/prime/usr/share/man
+ rm -rf /root/prime/usr/share/icons/Humanity
+ find /root/prime/usr/share/doc/ -type f -not -name copyright -delete
+ find /root/prime/usr/share -type d -empty -delete
+ cd /snap/core18/current
+ find . -type f,l -exec rm -f /root/prime/{} ;
+ cd /snap/gnome-3-34-1804/current
+ find . -type f,l -exec rm -f /root/prime/{} ;
Priming gnome-3-34-extension 
Snapping |                                                                                                                                                                                                                        
Snapped synfigstudio_1.5.0-20200710~f17715b_amd64.snap
1 Like

Hi! Yes. Just re-run build on snapcraft.io, and it still fails.
After that I tried to run snapcraft remote-build and yes, it also fails with the same error.

I thought that there may be different local/remote versions of snapcraft. So I checked snapcraft versions:
local:

$ snapcraft --version
snapcraft, version 4.1.1

remote:

2020-07-11T09:12:18Z INFO Waiting for automatic snapd restart...
snapcraft 4.1.1 from Canonical* installed

but they are the same.

I’ve managed to reproduce this issue with:
snapcraft clean; snapcraft pull; snapcraft snap

Will investigate further.

2 Likes

@cjp256 same for me.
As i can see the problem is what snapcraft pull runs snapcraftctl set-version 1.5.0-20200714~f17715b, and snapcraft snap is not.

So, maybe it needs to be moved to another stage?

I am also seeing this issue. At first I thought it was something about our explicit version step and as I’m setting up a new pipeline I just removed that but it was still happening.

So then I added --debug as advised by the command to introspect and it passed. I removed it and it broke again. I added it back and it was fixed again.

Oy- perhaps a red herring as it appears the message is still happening but the pipeline is not failing with --debug. So I suspect it maybe something about --debug that I do not understand.

Hi, guys!

For those who have the same problem:

Not working snapcraft.yml:

name: hello-world-cli
adopt-info: hello
base: core18
summary: Hello World
description: 'Hello World'

parts:
  hello:
    plugin: autotools
    source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
    override-stage: |
      set -xe
      snapcraftctl stage
      snapcraftctl set-version "1.0"

  cleanup:
    after: [hello]
    plugin: nil
    build-snaps: [core18]
    override-prime: |
      set -eux

apps:
  hello-world-cli:
    command: hello

Working snapcraft.yml:

name: hello-world-cli
adopt-info: cleanup
base: core18
summary: Hello World
description: 'Hello World'

parts:
  hello:
    plugin: autotools
    source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz

  cleanup:
    after: [hello]
    plugin: nil
    build-snaps: [core18]
    override-stage: |
      set -xe
      snapcraftctl stage
      snapcraftctl set-version "1.0"
    override-prime: |
      set -eux

apps:
  hello-world-cli:
    command: hello

As you may notice, if we move snapcraftctl and change adopt-info to the last stage - all works fine.

@cjp256 @lucyllewy I don’t know if this is the correct solution, but at least it solves the problem for me.

1 Like