sailfishos-chum / sailfishos-chum-gui

GUI application for utilising the SailfishOS:Chum community repository
https://openrepos.net/content/olf/sailfishoschum-gui-installer
MIT License
13 stars 16 forks source link

[Question] Order of queried source repositories #272

Closed nephros closed 2 months ago

nephros commented 2 months ago

SailfishOS VERSION: any
HARDWARE : any
SailfishOS:Chum GUI application VERSION: 0.6.6

QUESTION

We currently try to get source repo metadata (like number of issues etc) in chumpackage.cpp:

https://github.com/sailfishos-chum/sailfishos-chum-gui/blob/baf9f3bd04cdcbe704b55e8af74030d8e02c3b52/src/chumpackage.cpp#L232

where:

These three URLs are tried in sequence, and if one of the code repo implementations (github, gitlab, ..., also tried in that order) claims it can find a repository under that url, it is used to retrieve remote metadata.

I believe the order should be changed to

  1. ChumMeta/PackagingRepo
  2. ChumMeta/Repo
  3. ChumMeta/Homepage
  4. RPM-spec/Url

assuming that if PackagingRepo is present, it is the preferred place to handle Issues, and surely is the authoritative source for Releases.

In other words, I'd like to

-    for (const QString &u: {m_repo_url, m_url, m_packaging_repo_url}) 
+    for (const QString &u: {m_packaging_repo_url, m_repo_url, m_url}) 
Olf0 commented 2 months ago

Sounds reasonable to me.

AFAIR @rinigus designed this.

rinigus commented 2 months ago

Sounds reasonable to me as well. It was for historical reasons only, I have added packaging repo later and didn't think about the order at that time. Feel free to change