1

We're developing app for raspberry PI in python. We don't have much experience deploying apps in linux and we need to figure out how to update this app after releasing. We came up with 2 ways:

  1. make a custom private repository and create .deb package of the app
  2. make a script to check some url with packed app, unpack it and rewrite the old app.

Can you recommend the approach we should take?

4

I would definitely go with the apt package (.deb). You application will be much easier to manage on the target systems and you will have a much higher level of confidence in your software deliveries. APT is a rock solid system.

APT will make sure that all software dependencies are resolved. Python, with "batteries included" has many dependencies on system software libraries. If you just download code and overwrite your app, there is no checking to make sure that the system contains the correct versions of the libraries that your app may depend on. This could cause your app to behave incorrectly or not at all.

APT also does a lot of checking while building your app package. There are many APT tools and subsystems for building python packages.

I believe if you try to make your own distribution system, in the long run you will have to develop more of your own code and have more logistical problems.

On the downside, you'll need to learn how to build python packages in the APT system, which can be quite involved, but I think worth it.

As a Debian and Ubuntu user, developer, administrator, and packager for over 15 years, I would not like it if a vendor wanted to deliver software outside of the APT system because of the risks involved.

1
  • Also chiming in as someone who has received packages as deliveries please make sure to include your dependencies (if any) when you package your program. I've had cases of receiving a package but it did not specify the dependencies needed and the creators weren't sure what the dependencies were, it became a lot of work for everyone to get it working instead of it being almost none. – Centimane Oct 27 '15 at 11:57
1

"Some script which checks for updates" definitely would seem very fishy. It would need extra provisions, it would need the necessary rights to update which it wouldn't have by default and you'll run into all kinds of problems and you are re-inventing the wheel. I strictly deny any updates outside of the packaging system on my systems - except for those where I update the software from their own source repository and where I know what I do and it does. It's too risky to otherwise damage my system beyond repair.

Definitely go for the packaging system shipped with your target system, thus a .deb package and, if you want, even offer them in a repository - that then ensures that users can actually update it also with the system tools by a simple sudo apt-get update; sudo apt-get upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.