Skip to content

Commit

Permalink
luci-app-package-manager: support new APK repositories.d configs
Browse files Browse the repository at this point in the history
Support new APK repositories.d configs following OPKG was to better
split distfeeds and customfeeds.

Support for ""legacy"" repositories is kept to support migration period
and to support custom scenario where user use this file instead.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
  • Loading branch information
Ansuel committed Nov 17, 2024
1 parent cfa774e commit ea8b7aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,13 @@ function handleConfig(ev)
fs.list(base_dir).then(function(partials) {
var files = [];

if (!L.hasSystemFeature('apk'))
files.push(base_dir + '.conf')
if (L.hasSystemFeature('apk')) {
files.push(base_dir + '/' + 'repositories.d/customfeeds.list',
base_dir + '/' + 'repositories.d/distfeeds.list'
)
} else {
files.push(base_dir + '.conf')
}

for (var i = 0; i < partials.length; i++) {
if (partials[i].type == 'file') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"/usr/libexec/package-manager-call list-available": [ "exec" ],
"/etc/opkg.conf": [ "read" ],
"/etc/opkg/*.conf": [ "read" ],
"/etc/apk/repositories": [ "read" ]
"/etc/apk/repositories": [ "read" ],
"/etc/apk/repositories.d/distfeeds.list": [ "read" ],
"/etc/apk/repositories.d/customfeeds.list": [ "read" ]
},
"ubus": {
"luci": [ "getMountPoints" ]
Expand All @@ -25,6 +27,8 @@
"/etc/opkg.conf": [ "write" ],
"/etc/opkg/*.conf": [ "write" ],
"/etc/apk/repositories": [ "write" ],
"/etc/apk/repositories.d/distfeeds.list": [ "write" ],
"/etc/apk/repositories.d/customfeeds.list": [ "write" ],
"/tmp/upload.ipk": [ "write" ],
"/tmp/upload.apk": [ "write" ]
}
Expand Down

0 comments on commit ea8b7aa

Please sign in to comment.