Merge branch 'mainline' into 'master'

Read additional_repos.xml from /product as well

See merge request fdroid/fdroidclient!1026
This commit is contained in:
Hans-Christoph Steiner 2021-06-16 12:26:29 +00:00
commit a8efa1ac07

View File

@ -322,16 +322,16 @@ public class DBHelper extends SQLiteOpenHelper {
/**
* Look for additional, initial repositories from the device's filesystem.
* These can be added as part of the ROM ({@code /system} or included later
* by vendors/OEMs ({@code /vendor}, {@code /odm}, {@code /oem}). These are
* always added at a lower priority than the repos embedded in the APK via
* These can be added as part of the ROM ({@code /system} or {@code /product}
* or included later by vendors/OEMs ({@code /vendor}, {@code /odm}, {@code /oem}).
* These are always added at a lower priority than the repos embedded in the APK via
* {@code default_repos.xml}.
* <p>
* ROM has the lowest priority, then Vendor, ODM, and OEM.
* ROM (System) has the lowest priority, then Product, Vendor, ODM, and OEM.
*/
private static List<String> loadAdditionalRepos(String packageName) {
List<String> repoItems = new LinkedList<>();
for (String root : Arrays.asList("/system", "/vendor", "/odm", "/oem")) {
for (String root : Arrays.asList("/system", "/product", "/vendor", "/odm", "/oem")) {
File additionalReposFile = new File(root + "/etc/" + packageName + "/additional_repos.xml");
try {
if (additionalReposFile.isFile()) {