Snapcraft falha: [Errno 21] É um diretório: '/ caminho / para / snap / prime /.'

0

Estou tentando fazer um projeto , que já provou ser um grande desafio. Eu tive que escrever nada menos que 3 plugins customizados, mas neste momento todas as partes terminam o staging. Depois de testar tudo, o snapcraft falha com o erro no tópico.

Aqui está o meu snapcraft.yaml:

name: stakeweightedvoting-app
version: "0.1"
summary: A blockchain-based secure voting and polling application
description: Stake Weighted Voting is Follow My Vote's application for stake-weighted voting on a blockchain. The app allows users to create and vote on polls on a blockchain, and securely tallying and displaying the results to ensure that no fraud can occur undetected.
confinement: devmode

apps:
  VotingApp:
    # If this actually works, I'll eat my hat. Can't fix it until I can build a snap, though...
    command: . $SNAP/opt/qt57/bin/qt57-env.sh && VotingApp

parts:
  stakeweightedvoting:
    plugin: x-qbs
    source: git://github.com/followmyvote/stakeweightedvoting
    source-branch: master
    build-packages: [qt57base, qt57declarative, qt57charts-no-lgpl, qt57quickcontrols2, qt57websockets, qt57svg, python-yaml]
    after: [botan, capnproto]
  capnproto:
    plugin: x-nonbroken-cmake
    source: git://github.com/sandstorm-io/capnproto
    # Ideally I would specify v0.5.3 here, but it no longer builds without tweaking, and I don't know how to apply patches in snapcraft
    source-branch: master
    source-subdir: c++
  botan:
    plugin: x-botan
    source: http://botan.randombit.net/releases/Botan-1.11.31.tgz

A saída completa de snapcraft :

dev@ubuntu-dev:~/swv$ snapcraft
"grade" property not specified: defaulting to "stable"
Searching for local plugin for x-nonbroken-cmake
Searching for local plugin for x-botan
Searching for local plugin for x-qbs
Skipping pull botan (already ran)
Skipping pull capnproto (already ran)
'stakeweightedvoting' has prerequisites that need to be staged: capnproto botan
Skipping pull capnproto (already ran)
Skipping pull botan (already ran)
Skipping build capnproto (already ran)
Skipping build botan (already ran)
Skipping stage capnproto (already ran)
Skipping stage botan (already ran)
Skipping pull stakeweightedvoting (already ran)
Skipping build botan (already ran)
Skipping build capnproto (already ran)
'stakeweightedvoting' has prerequisites that need to be staged: capnproto botan
Skipping pull capnproto (already ran)
Skipping pull botan (already ran)
Skipping build capnproto (already ran)
Skipping build botan (already ran)
Skipping stage capnproto (already ran)
Skipping stage botan (already ran)
Skipping build stakeweightedvoting (already ran)
Skipping stage botan (already ran)
Skipping stage capnproto (already ran)
'stakeweightedvoting' has prerequisites that need to be staged: capnproto botan
Skipping pull capnproto (already ran)
Skipping pull botan (already ran)
Skipping build capnproto (already ran)
Skipping build botan (already ran)
Skipping stage capnproto (already ran)
Skipping stage botan (already ran)
Skipping stage stakeweightedvoting (already ran)
Skipping prime botan (already ran)
Skipping prime capnproto (already ran)
'stakeweightedvoting' has prerequisites that need to be staged: capnproto botan
Skipping pull capnproto (already ran)
Skipping pull botan (already ran)
Skipping build capnproto (already ran)
Skipping build botan (already ran)
Skipping stage capnproto (already ran)
Skipping stage botan (already ran)
Skipping prime stakeweightedvoting (already ran)
[Errno 21] Is a directory: '/home/dev/swv/prime/.'

Eu posso fornecer as fontes para os três plug-ins personalizados, mas nenhum deles substitui nada após a etapa de criação, por isso estou omitindo-os por enquanto.

Eu encontrei este bug que é provavelmente o que estou vendo, mas a solução não funcionou para mim.

    
por Nathan 26.09.2016 / 23:09

1 resposta

1

command: . $SNAP/opt/qt57/bin/qt57-env.sh && VotingApp não funcionaria, pois é necessário fornecer um arquivo real no diretório snap e . é o resultado do erro que você recebe.

No entanto, você pode escrever seu próprio script de wrapper:

#!/bin/sh

source $SNAP/opt/qt57/bin/qt57-env.sh

exec VotingApp $*

e tem isso como a entrada command .

Faça algo semelhante à demonstração do tomcat com wrapper (mas você não precisa de um Makefile , basta usar o dump plugin 'como mostrado na demo do mosquito )

    
por sergiusens 26.09.2016 / 23:55