I then installed the package with sudo snap install --classic --dangerous *.snap
After I fixed the bug I run the snapcraft command again it will creates another snap with dirty in the name.
I then removed the package with sudo snap remove term-cheat and install the dirty package.
I now expected that the app is updated, but it is not, it’s still returning the same error (some problem in my python package, maybe this is relevant?)
When I run snapcraft clean it removes all installed packages in the vm and I have to reinstall it but it does not update my package. I am confused to what is the right way to update and test a package.
The dirty in the name is due to using version: git. The version string is generated based on the git revision. However if snapcraft detects that there’s additional files which are not part of the commit (possibly your updated snapcraft.yaml?) then it will tag dirty on the end. If you commit your changes, that will go away.
It sounds like there’s some other issue with the snap? Do you have a link to a repo or can you paste the yaml so we can help further?
hey there my account was locked so I could not answer
I think I have an idea, I had some problems before updating the python modules in my package, and only sometimes saw in the snapcraft output that the libs were updated. Among the libs there was also my python module. When I run it now I do not see that the python modules are updated, this might be the reason why my code does not change.
Now I have an idea to work around it but I would love to know how I can update the python modules in the vm.
when I did this the snapcraft app detected a change and rebuild the package. I can now add a fake value to the python-packages: list build once with an error and then remove the fake value and the build process starts again and calls the setup script again.
I guess I should file an error report somewhere, maybe the python plugin? Not sure though whos fault it is to not detect the change.
After trying for several hour I found out that in the pull stage new code is never pulled in to the parts/[myapp]/src. I only see an old cached version in there. I tried snapcraft cleansnapcraft clean myapp, deleting the directory in the vm and many other things but without success the old code is always copied back and used in building the package.
I think I finally found a way to rebuild the package. If I comment out the source-type line in my snapcraft.yaml the package builds once on the second build there is an error. Commenting in the line builds the package with the old code again, but commenting out the line builds the package with the latest code.