Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
ffbs-gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ffbs
ffbs-gluon
Commits
0a8e028e
Unverified
Commit
0a8e028e
authored
8 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-core: upgrade: don't print an error message on systems without opkg
parent
cb33d518
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-core/luasrc/lib/gluon/upgrade/500-opkg
+26
-24
26 additions, 24 deletions
package/gluon-core/luasrc/lib/gluon/upgrade/500-opkg
with
26 additions
and
24 deletions
package/gluon-core/luasrc/lib/gluon/upgrade/500-opkg
+
26
−
24
View file @
0a8e028e
...
...
@@ -24,35 +24,37 @@ end
local
prefix
=
subst
[
'%%n'
]
..
'_'
local
distfeeds
=
{}
for
line
in
io.lines
(
'/etc/opkg/distfeeds.conf'
)
do
table.insert
(
distfeeds
,
line
)
end
local
f
=
io.open
(
'/etc/opkg/distfeeds.conf'
,
'w'
)
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
for
_
,
line
in
ipairs
(
distfeeds
)
do
local
name
=
line
:
match
(
'^src/gz%s'
..
prefix
..
'(%S+)%s'
)
if
name
==
'core'
then
f
:
write
(
'# '
..
line
..
'
\n
'
)
elseif
name
and
site
.
opkg
and
site
.
opkg
.
lede
then
f
:
write
(
string.format
(
'src/gz %s %s/%s\n'
,
prefix
..
name
,
replace_patterns
(
site
.
opkg
.
lede
),
name
))
else
f
:
write
(
line
..
'
\n
'
)
local
f
=
io.open
(
'/etc/opkg/distfeeds.conf'
,
'w'
)
for
_
,
line
in
ipairs
(
distfeeds
)
do
local
name
=
line
:
match
(
'^src/gz%s'
..
prefix
..
'(%S+)%s'
)
if
name
==
'core'
then
f
:
write
(
'# '
..
line
..
'
\n
'
)
elseif
name
and
site
.
opkg
and
site
.
opkg
.
lede
then
f
:
write
(
string.format
(
'src/gz %s %s/%s\n'
,
prefix
..
name
,
replace_patterns
(
site
.
opkg
.
lede
),
name
))
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
local
f
=
io.open
(
'/etc/opkg/gluon.conf'
,
'w'
)
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
f
:
write
(
string.format
(
'src/gz %s %s\n'
,
k
,
replace_patterns
(
v
)))
end
for
k
,
v
in
pairs
(
site
.
opkg
.
extra
)
do
f
:
write
(
string.format
(
'src/gz %s %s\n'
,
k
,
replace_patterns
(
v
)))
end
f
:
close
()
f
:
close
()
else
os.remove
(
'/etc/opkg/gluon.conf'
)
else
os.remove
(
'/etc/opkg/gluon.conf'
)
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment