UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Script for updating apps [help needed]

    Scheduled Pinned Locked Moved App Development
    scriptsclickableunfinished
    3 Posts 2 Posters 77 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • CiberSheepC Offline
        CiberSheep
        last edited by CiberSheep

        I was collecting some of the regex and code I found here to make a script to update apps from Xenial to Focal.

        I've put some of this in an unfinished sh:
        https://gitlab.com/cibersheep/update-apps
        MR are welcome to finish the process that are missing

        Warning: It is not complete, I'm sure there's a better way of doing things and it is a good moment to do the same for Noble. Here's where I need your help.

        Xenial to FocalUpdate to Morph

        • clickable.json to yaml
          • this is pretty bad, is there a better way of doing this? I mean, with the default tool in the system, without an external tool
          • it will leave a dirty yaml file that need to be edited by hand
        • Framework update
          • I think this is ok
          • I'm sure I forgot something here
        • Update to Morph
          • Probably ok
        • Update imports and Ubuntu qml items
          • It turned out pretty well

        Another planet, another time, another universe!

        G 1 Reply Last reply Reply Quote 0
        • CiberSheepC CiberSheep pinned this topic
        • G Online
          gpatel-fr @CiberSheep
          last edited by

          @CiberSheep said in Script for updating apps [help needed]:

          it will leave a dirty yaml file that need to be edited by hand

          I tried it on this project: https://github.com/august-alt/filemanager-app
          and the result of your script could be loaded by the python yaml library, so what's wrong ? is the software used less lenient than the yaml python library, or is there more complicated clickable.json files ?

          CiberSheepC 1 Reply Last reply Reply Quote 0
          • CiberSheepC Offline
            CiberSheep @gpatel-fr
            last edited by

            @gpatel-fr said in Script for updating apps [help needed]:

            or is there more complicated clickable.json files ?

            Thanks for asking. Yep, when the json has nested elements it would fail?
            For example applying the script to this json:

            }
            [...]
              "kill": "qmlscene",
              "dependencies_host" : [
            	"qml-module-ubuntu-onlineaccounts2"
              ]
            }
            

            will leave a yml file similar to

            [...]
              "kill": "qmlscene"
              "dependencies_host":
            	"qml-module-ubuntu-onlineaccounts2"
            

            and, I think, it should end with a list

            "dependencies_host":
                - "qml-module-ubuntu-onlineaccounts2"
            

            Another planet, another time, another universe!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post