gluon-core: upgrade: don't print an error message on systems without opkg
This commit is contained in:
parent
cb33d518c6
commit
0a8e028e8f
@ -24,14 +24,15 @@ end
|
||||
|
||||
local prefix = subst['%%n'] .. '_'
|
||||
|
||||
local distfeeds = {}
|
||||
for line in io.lines('/etc/opkg/distfeeds.conf') do
|
||||
if fs.access('/etc/opkg/distfeeds.conf') then
|
||||
local distfeeds = {}
|
||||
for line in io.lines('/etc/opkg/distfeeds.conf') do
|
||||
table.insert(distfeeds, line)
|
||||
end
|
||||
end
|
||||
|
||||
local f = io.open('/etc/opkg/distfeeds.conf', 'w')
|
||||
local f = io.open('/etc/opkg/distfeeds.conf', 'w')
|
||||
|
||||
for _, line in ipairs(distfeeds) do
|
||||
for _, line in ipairs(distfeeds) do
|
||||
local name = line:match('^src/gz%s' .. prefix .. '(%S+)%s')
|
||||
if name == 'core' then
|
||||
f:write('# ' .. line .. '\n')
|
||||
@ -40,11 +41,11 @@ for _, line in ipairs(distfeeds) do
|
||||
else
|
||||
f:write(line .. '\n')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
f:close()
|
||||
f:close()
|
||||
|
||||
if site.opkg and site.opkg.extra and next(site.opkg.extra) then
|
||||
if site.opkg and site.opkg.extra and next(site.opkg.extra) then
|
||||
local f = io.open('/etc/opkg/gluon.conf', 'w')
|
||||
|
||||
for k, v in pairs(site.opkg.extra) do
|
||||
@ -53,6 +54,7 @@ if site.opkg and site.opkg.extra and next(site.opkg.extra) then
|
||||
|
||||
f:close()
|
||||
|
||||
else
|
||||
else
|
||||
os.remove('/etc/opkg/gluon.conf')
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user