Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

Commit af6a9a7

Browse files
doniksUniversalSuperBox
authored andcommitted
fix list
we were checking for preferences, but they were not set. checking for sources is more reliable. secondly, the isfile check needs a full path
1 parent 084f298 commit af6a9a7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ubports-qa

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,10 @@ def list_exists(branch):
104104
def list_lists():
105105
return [
106106
f.split("ubports-")[1].split(".list")[0]
107-
for f in os.listdir("/etc/apt/preferences.d")
108-
if os.path.isfile(f) and f.startswith("ubports-")
107+
for f in os.listdir("/etc/apt/sources.list.d/")
108+
if os.path.isfile("/etc/apt/sources.list.d/" + f) and f.startswith("ubports-")
109109
]
110110

111-
112111
def add_list(branch):
113112
if list_exists(branch):
114113
return

0 commit comments

Comments
 (0)