Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
settingsd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
settingsd
Commits
298d48ec
Commit
298d48ec
authored
Apr 11, 2019
by
Дмитрий Никулин
Committed by
Никита Ефремов
Apr 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
package_updates: extract package current version
parent
6b6421af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fmod_package_updates.py
plugins/functions/fmod_package_updates.py
+2
-2
No files found.
plugins/functions/fmod_package_updates.py
View file @
298d48ec
...
@@ -15,7 +15,7 @@ APT_COMMANDS = (
...
@@ -15,7 +15,7 @@ APT_COMMANDS = (
'download'
,
'changelog'
,
'build-dep'
,
'full-upgrade'
,
'show'
,
'list'
,
'download'
,
'changelog'
,
'build-dep'
,
'full-upgrade'
,
'show'
,
'list'
,
'edit-sources'
'edit-sources'
)
)
PACKAGE_REGEX
=
re
.
compile
(
r'^(\S+)/\S+\s(\S+)'
)
PACKAGE_REGEX
=
re
.
compile
(
r'^(\S+)/\S+\s(\S+)
\s\S+\s\[upgradable from: (\S+)\]
'
)
MULTIPLE_SPACES_REGEX
=
re
.
compile
(
r'\s{2,}'
)
MULTIPLE_SPACES_REGEX
=
re
.
compile
(
r'\s{2,}'
)
...
@@ -43,7 +43,7 @@ class PackageUpdates(service.FunctionObject) :
...
@@ -43,7 +43,7 @@ class PackageUpdates(service.FunctionObject) :
def
_extract_upgradable_packages
(
self
,
apt_output
):
def
_extract_upgradable_packages
(
self
,
apt_output
):
lines
=
apt_output
.
split
(
'
\n
'
)
lines
=
apt_output
.
split
(
'
\n
'
)
matches
=
[
PACKAGE_REGEX
.
match
(
line
)
for
line
in
lines
]
matches
=
[
PACKAGE_REGEX
.
match
(
line
)
for
line
in
lines
]
return
[[
m
[
1
],
m
[
2
]]
for
m
in
matches
if
m
]
return
[[
m
[
1
],
m
[
3
],
m
[
2
]]
for
m
in
matches
if
m
]
def
_parse_apt_block
(
self
,
block
):
def
_parse_apt_block
(
self
,
block
):
fields
=
{}
fields
=
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment