Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
0
Merge Requests
0
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
eepm
Commits
a479be9c
Commit
a479be9c
authored
Apr 24, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm status: add --validate (check for package correctness)
parent
f507b4f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
epm-status
bin/epm-status
+15
-0
No files found.
bin/epm-status
View file @
a479be9c
...
@@ -19,6 +19,13 @@
...
@@ -19,6 +19,13 @@
load_helper epm-query
load_helper epm-query
# check if the package is really package (check accessibility)
epm_status_validate
()
{
local
pkg
=
"
$1
"
local
rpmversion
=
"
$(
epm print field Version
for
"
$pkg
"
2>/dev/null
)
"
[
-n
"
$rpmversion
"
]
}
epm_status_original
()
epm_status_original
()
{
{
...
@@ -28,6 +35,7 @@ epm_status_original()
...
@@ -28,6 +35,7 @@ epm_status_original()
case
$DISTRNAME
in
case
$DISTRNAME
in
ALTLinux|ALTServer
)
ALTLinux|ALTServer
)
epm_status_validate
$pkg
||
return
#[ "$(epm print field Vendor for package $pkg)" = "ALT Linux Team" ] && return
#[ "$(epm print field Vendor for package $pkg)" = "ALT Linux Team" ] && return
epm_status_repacked
$pkg
&&
return
1
epm_status_repacked
$pkg
&&
return
1
__epm_check_if_package_from_repo
$pkg
&&
return
__epm_check_if_package_from_repo
$pkg
&&
return
...
@@ -47,6 +55,7 @@ epm_status_repacked()
...
@@ -47,6 +55,7 @@ epm_status_repacked()
case
$BASEDISTRNAME
in
case
$BASEDISTRNAME
in
alt
)
alt
)
epm_status_validate
$pkg
||
return
local
packager
=
"
$(
epm print field Packager
for
"
$1
"
2>/dev/null
)
"
local
packager
=
"
$(
epm print field Packager
for
"
$1
"
2>/dev/null
)
"
[
"
$packager
"
=
"EPM <support@etersoft.ru>"
]
&&
return
0
[
"
$packager
"
=
"EPM <support@etersoft.ru>"
]
&&
return
0
[
"
$packager
"
=
"EPM <support@eepm.ru>"
]
&&
return
0
[
"
$packager
"
=
"EPM <support@eepm.ru>"
]
&&
return
0
...
@@ -71,6 +80,7 @@ epm_status_thirdpart()
...
@@ -71,6 +80,7 @@ epm_status_thirdpart()
#local packager="$(epm print field Packager for "$1" 2>/dev/null)"
#local packager="$(epm print field Packager for "$1" 2>/dev/null)"
#echo "$packager" && grep -q "altlinux" && return 0
#echo "$packager" && grep -q "altlinux" && return 0
#echo "$packager" && grep -q "basealt" && return 0
#echo "$packager" && grep -q "basealt" && return 0
epm_status_validate
$pkg
||
return
local
distribution
local
distribution
distribution
=
"
$(
epm print field Distribution
for
"
$pkg
"
2>/dev/null
)
"
distribution
=
"
$(
epm print field Distribution
for
"
$pkg
"
2>/dev/null
)
"
...
@@ -96,6 +106,7 @@ Options:
...
@@ -96,6 +106,7 @@ Options:
--original check if <package> is from distro repo
--original check if <package> is from distro repo
--thirdpart check if <package> from a third part source (didn't packed for this distro)
--thirdpart check if <package> from a third part source (didn't packed for this distro)
--repacked check if <package> was repacked with epm repack
--repacked check if <package> was repacked with epm repack
--validate check if <package> is accessible (we can get a fields from it)
EOF
EOF
}
}
...
@@ -133,6 +144,10 @@ epm_status()
...
@@ -133,6 +144,10 @@ epm_status()
epm_status_repacked
"
$@
"
epm_status_repacked
"
$@
"
return
return
;;
;;
--validate
)
epm_status_validate
"
$@
"
return
;;
*
)
*
)
fatal
"Unknown option
$option
, use epm status --help to get info"
fatal
"Unknown option
$option
, use epm status --help to get info"
;;
;;
...
...
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