Otherwise when both are enabled the metadata from the archive gets
priority over repo which is not really what we want.
It also breaks a lot of icons, featuregraphics and screenshots.
Fixesfdroid/fdroidclient#1771Fixesfdroid/fdroidclient#1772Fixesfdroid/fdroidclient#1686
We also update the default repo priorities for existing installs if we
find the default repos in the original order.
The query is pretty annoying to write in java, here is the raw sql form.
UPDATE fdroid_repo
SET priority = ( SELECT SUM(priority)
FROM fdroid_repo
WHERE address IN ('https://f-droid.org/repo', 'https://f-droid.org/archive')
) - priority
WHERE address IN ('https://f-droid.org/repo', 'https://f-droid.org/archive') AND
'TRUE' IN (
SELECT
CASE
WHEN a.priority = b.priority-1 THEN 'TRUE'
ELSE 'FALSE'
END
FROM fdroid_repo as a
INNER JOIN fdroid_repo as b ON
a.address = "https://f-droid.org/repo" and b.address = "https://f-droid.org/archive"
)
This allows whitelabel versions of apps to specify built-in app repos that
have push requests accepted by default. This is useful for the case where
there is a central manager of the core apps that are installed.
https://gitlab.com/fdroid/fdroidserver/issues/177
This is a step towards supporting easy whitelabeling, using gradle flavors.
This allows the whitelabel version to set the default repos just by making
their own default_repos.xml in app/src/whitelabel/res/values. That one
will then override the built-in F-Droid one.