1

I'm writing an application (say, example_1.0.rpm) that is hosted externally (on example.com) and this app tries to update itself on every launch whenever new version is available.

My approach:

  • Check for new version and download example_2.0.rpm)
  • From application call "xdg-open example_2.0.rpm" and quit the application itself.

This approach work fine on Ubuntu 16.04 (with latest updates as of 6/7/2016) but Fedora 23 has issue mentioned below.

Questions:

  • Is this the best way to do it or I can use some functionality of PackageKit?
  • Fedora 23 (gnome-software 3.18.2) has an issue with above approach, whenever application calls "xdg-open example_2.0.rpm", gnome-software just shows the option to remove but not upgrade.
2
  • 1
    don't do this. your users will hate you. and justifiably so. At most, you should alert them that there's a new version available and then shut up about it. DO NOT FORCE OR NAG YOUR USERS TO UPGRADE. They may have very good reasons for NOT upgrading at this moment in time.
    – cas
    Jun 8, 2016 at 6:28
  • Thou shalt not cross post.
    – Murphy
    Jun 8, 2016 at 11:06

1 Answer 1

0

The best way is to use PackageKit. It will work on both Ubuntu and Fedora.

Here is example how to use that: https://www.freedesktop.org/software/PackageKit/pk-faq.html#session-methods

1
  • I looked at that but i don't see InstallLocalFile() method exposed by org.freedesktop.PackageKit service on fedora 23. But gnome-software is obviously handle xdg-open call but it is so buggy at this moment.
    – PnotNP
    Jun 8, 2016 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .