kwindrem / SetupHelper

Helper functions to simplify writing setup scripts that modify VenusOs functionality. The package includes automatic reinstallation of the package after a VenusOs update.
153 stars 18 forks source link

Questions to "Package development guidelines.pdf" #46

Closed mr-manuel closed 1 year ago

mr-manuel commented 1 year ago

Hello Kevin,

thanks for this awesome project. I was looking to integrate dbus-serialbattery with SetupHelper (https://github.com/Louisvdw/dbus-serialbattery/issues/67) to estimate how much work it would be. While reading the whole PDF some questions arised:

    1. The package must contain a file named ‘version’.

    In the project (dbus-serialbattery) a subfolder is used where all scripts are stored. This folder is then extracted in Venus OS. The question now is, has the version file to be in the root path of the GitHub repository and/or the root folder of the driver?

    1. The package should contain a file named gitHubInfo which should contain the Git Hub user name and default branch separated by : E.g., kwindrem:latest

    I think there is a typo. In your repositories this file contains the GitHub username and the release name that is fetched. No repository/branch name here?

  1. I red multiple times that branch names could be used. Is the SetupHelper then downloading the current state of the branch without the need of creating a release? As far as I know the releases are per repository and not per branch, so I do not fully understand this. Maybe I could specify a different version file in each branch to download a different version?

  2. Where do I add the info, that the SetupHelper knows, that my packet exists? -> It was to obvious that I did not see it defaultPackageList. Maybe a short reference in the PDF would also be great.

kwindrem commented 1 year ago

The version file must be in the root directory of the package, so root of the repo.

The file is "gitHubInfo" and contains user:branch. This too is in the root of the repo.

defaultPackageList is used to build the "uninstalled packages" list. Once the package is in /data, that's enough for PackageManager to know of it's existence. You can also create a new uninstalled package manually, filling in the package name, user and branch info manually.

It appears GitHub release names, tags and branches are in the same name space so work equally well for PackageManager to fetch the current state of branch, tag or release.

mr-manuel commented 1 year ago

Thanks!