Skip to content

Commit

Permalink
skip isSystemPackage static dep check for self checks
Browse files Browse the repository at this point in the history
  • Loading branch information
muhomorr authored and thestinger committed Jul 28, 2024
1 parent 4b1cff4 commit 8dc9fdc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/src/main/java/app/grapheneos/apps/core/Repo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,14 @@ private fun checkStaticDeps(json: JSONObject, repo: Repo): Boolean {
}

json.optJSONArray("staticDeps")?.asStringList()?.let { pkgDeps ->
if (pkgDeps.any { !checkPackageDep(ComplexDependency(it), repo, enforceSystemPkg = true) }) {
return false
for (depStr in pkgDeps) {
val dep = ComplexDependency(depStr)
// there's currently no certificate checks for static dependencies, require them to
// be a system package instead, unless it's our own package
val enforceSystemPkg = dep.lhs != selfPkgName
if (!checkPackageDep(dep, repo, enforceSystemPkg)) {
return false
}
}
}

Expand Down

0 comments on commit 8dc9fdc

Please sign in to comment.