Aliyundup snap based on python

I have two parts with “plugin: python”, and it seems that they have some common python build-in files . How can I handle the conflicts ? Thank you .
reference:
https://insights.ubuntu.com/2017/01/28/ubuntu-core-how-to-enable-aliases-for-your-snaps-commands/
snapcraft.yaml file content is below :

name: aliyun
version: '1.0.0'
summary: aliyun is the Aliyun client tools for Linux. 
description: |
  osscmd is a commandline tool for aliyun oss.
  ossutil is aliyun oss utility. 
  duplicity is a full/incremental backup tool with aliyun oss interface.

grade: stable  #stable #devel
confinement: devmode 

apps:
  duplicity:
    command: bin/duplicity
    aliases: [ossduplicity, oss-duplicity]
  ossutil:
    command: bin/ossutil
    aliases: [ossutil, oss-util]
  osscmd:
    command: bin/osscmd
    aliases: [osscmd, oss-cmd]

parts:
  duplicity:
    plugin: python
    python-version: python2
    stage-packages:
      - librsync-dev
      - python-lockfile
      - python-crcmod
      - python-requests
    python-packages:
      - oss2
    install: |
      echo "++++++++++++++++++++++++++++++++++++++++ duplicity"
      mkdir -p $SNAPCRAFT_PART_INSTALL/bin/
      cp aliyunsource/bin/duplicity   $SNAPCRAFT_PART_INSTALL/bin/duplicity
      cp -r  aliyunsource/duplicity   $SNAPCRAFT_PART_INSTALL/lib/python2.7/site-packages/
      echo "---------------------------------------- duplicity"
  ossutil:
    plugin: nil
    install: |
      echo "++++++++++++++++++++++++++++++++++++++++ ossutil"
      mkdir -p $SNAPCRAFT_PART_INSTALL/bin/
      cp aliyunsource/bin/ossutil   $SNAPCRAFT_PART_INSTALL/bin/ossutil
      echo "---------------------------------------- ossutil"
  osscmd:
    plugin: python
    python-version: python2
    build: |
      echo "++++++++++++++++++++++++++++++++++++++++ osscmd"
      mkdir -p $SNAPCRAFT_PART_INSTALL/bin/
      cp aliyunsource/bin/osscmd   $SNAPCRAFT_PART_INSTALL/bin/osscmd
      cp -r aliyunsource/oss   $SNAPCRAFT_PART_INSTALL/lib/python2.7/site-packages/
      echo "---------------------------------------- osscmd"

Hi, I have fill in the aliases field in the snapcraft.yaml file, but I cannot see the alises, and the “snap aliases” return empty. Please help me , thank you .

name: aliyun
version: '1.0.0'
summary: aliyun is the Aliyun client tools for Linux. 
description: |
  osscmd is a commandline tool for aliyun oss.
  ossutil is aliyun oss utility. 
  duplicity is a full/incremental backup tool with aliyun oss interface.

grade: stable  #stable #devel
confinement: devmode 

apps:
  duplicity:
    command: bin/duplicity
    aliases: [duplicity]
  ossutil:
    command: bin/ossutil
    aliases: [ossutil]
  osscmd:
    command: bin/osscmd
    aliases: [osscmd]

parts:
  python-part: #duplicity, osscmd
    plugin: python
    python-version: python2
    stage-packages:
      - librsync-dev
      - python-lockfile
      - python-crcmod
      - python-requests
    python-packages:
      - oss2
    install: |
      echo "+++++++++++++++++++++++++ python-part ossmd/duplicity"
      mkdir -p $SNAPCRAFT_PART_INSTALL/bin/
      cp aliyunsource/bin/duplicity   $SNAPCRAFT_PART_INSTALL/bin/duplicity
      cp -r  aliyunsource/duplicity   $SNAPCRAFT_PART_INSTALL/lib/python2.7/site-packages/

      cp aliyunsource/bin/osscmd   $SNAPCRAFT_PART_INSTALL/bin/osscmd
      cp -r aliyunsource/oss   $SNAPCRAFT_PART_INSTALL/lib/python2.7/site-packages/

      echo "------------------------- python-part ossmd/duplicity"
  ossutil:
    plugin: nil
    
    install: |
      echo "+++++++++++++++++++++++++ ossutil"
      mkdir -p $SNAPCRAFT_PART_INSTALL/bin/
      cp aliyunsource/bin/ossutil   $SNAPCRAFT_PART_INSTALL/bin/ossutil
      echo "------------------------- ossutil"

As the article says you need to use “snap alias …” after installation (like you need to use “snap connect …” to make interfaces available to your snap)

I want to register the snap name “aliyun” in the Store , but failed. Who registered it ? If it’s me , I can push the snap successfully , is that right ?

snap alias failed ! What else should I do then?
snapcraft.yaml file content :

apps:
  ossduplicity:
    command: bin/ossduplicity
    aliases: [ossduplicity]
  ossutil:
    command: bin/ossutil
    aliases: [ossutil]
  osscmd:
    command: bin/osscmd
    aliases: [osscmd]

i think you need to use the existing command name:

snap alias alicloud.ossutil ossutil

for details see:

Same install command , but different result in two machines . You can see the picture. I do not kown the reason.

Start by checking “snap version” on both systems…

The kernel of the second install is massively outdated (4.4 should be at -83-generic or newer) and likely full of security issues, try updating it.

That said, this should not result in a “not found” error… Is the network connection of the second install properly working ?

I have installed it in 3 machines, but only mine is OK… the others are “not found”.

are all of them having working network, are all of them amd64 based etc etc … try to find the difference between them …

i just noticed that you seem to be using a non-public store … indeed the machines need to know about this store (using snap find over here also does not return any results for alicloud)

I will find out the root cause, you can install it in your machines… Thank you .
I find that only my machine which snapcraft build the alicloud snap can install it successfully.

How to update it ?

that and the fact that you do not upload to the main store but to a private one called “LimeNET” … (i have not much clue about private stores, you need to contact some store person)

Which Store is the main Store ? And how to switch it to the main Store ?

i dont know, but apparently your install uses a store branded as “LimeNET”, you should talk to the store people that helped you setting this up …

I don’t know how to talk to the store people … Please help me .

looks like it is now available in the public store:

ogra@styx:~$ snap info alicloud
name:      alicloud
summary:   "alicloud is the Aliyun client tools for Linux."
publisher: aliyun
description: |
  osscmd is a commandline tool for Aliyun oss.
  ossutil is Aliyun oss utility. 
  duplicity is a full/incremental backup tool with Aliyun oss interface.
  
channels:              
  stable:    –              
  candidate: –              
  beta:      1.0.0 (1) 16MB devmode
  edge:      1.0.0 (1) 16MB devmode
ogra@styx:~$

Yes, I change it to PUBLIC… and then it works .
I want to register “aliyun” as my snap name , but it has been registered already… What a pity ! Do you have any other good way ? “aliyun” should be mine…

It seems that “aliyun” has no snap info. …Why?
How can I get back my “aliyun” snap name ?