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
e61e6a6b
Commit
e61e6a6b
authored
May 05, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm status: add --certified support (for packages we trust)
parent
5c096f05
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
5 deletions
+31
-5
epm-sh-install
bin/epm-sh-install
+12
-4
epm-status
bin/epm-status
+13
-0
common.sh
play.d/common.sh
+6
-1
No files found.
bin/epm-sh-install
View file @
e61e6a6b
...
...
@@ -77,13 +77,11 @@ __convert_pkgallowscripts_to_regexp()
echo
"
$tmpalf
"
}
__epm_package_ok_scripts
()
__epm_package_
name_
ok_scripts
()
{
local
pkg
=
"
$1
"
local
name
=
"
$1
"
local
alf
=
"
$CONFIGDIR
/pkgallowscripts.list"
[
-s
"
$alf
"
]
||
return
1
local
name
name
=
"
$(
epm print field Name
for
"
$pkg
"
2>/dev/null
)
"
[
-n
"
$name
"
]
||
return
1
local
tmpalf
=
$(
__convert_pkgallowscripts_to_regexp
"
$alf
"
)
echo
"
$name
"
|
grep
-q
-f
$tmpalf
...
...
@@ -92,6 +90,16 @@ __epm_package_ok_scripts()
return
$res
}
__epm_package_ok_scripts
()
{
local
pkg
=
"
$1
"
local
name
# TODO: improve epm print name and use it here
name
=
"
$(
epm print field Name
for
"
$pkg
"
2>/dev/null
)
"
[
-n
"
$name
"
]
||
return
1
__epm_package_name_ok_scripts
"
$name
"
}
__epm_vendor_ok_scripts
()
{
local
vendor
=
"
$1
"
...
...
bin/epm-status
View file @
e61e6a6b
...
...
@@ -30,6 +30,13 @@ epm_status_installable()
fi
}
epm_status_certified
()
{
local
pkg
=
"
$1
"
load_helper epm-install
__epm_package_name_ok_scripts
"
$pkg
"
}
# check if the package is really package (check accessibility)
epm_status_validate
()
{
...
...
@@ -129,7 +136,9 @@ Usage: epm status [options] <package>
Options:
--installed check if <package> is installed
--installable check if <package> can be installed from the repo
--original check if <package> is from distro repo
--certified check if <package> is certified that it can be installed without repacking
--thirdparty check if <package> from a third-party source (didn't packed for this distro)
--repacked check if <package> was repacked with epm repack
--validate check if <package> is accessible (we can get a fields from it)
...
...
@@ -162,6 +171,10 @@ epm_status()
epm_status_original
"
$@
"
return
;;
--certified
)
epm_status_certified
"
$@
"
return
;;
--third-party
|
--thirdparty
|
--thirdpart
)
epm_status_thirdparty
"
$@
"
return
...
...
play.d/common.sh
View file @
e61e6a6b
...
...
@@ -265,8 +265,13 @@ is_repacked_package()
return
1
fi
if
epm status
--certified
$pkg
;
then
# allow install/update if we agreed with their package
return
0
fi
if
epm status
--thirdparty
$pkg
;
then
echo
"Package
$pkg
is already installed, packaged by vendor
$(
epm print field
Distribution
for
$pkg
)
."
echo
"Package
$pkg
is already installed, packaged by vendor
$(
epm print field
Vendor
for
$pkg
)
."
return
1
fi
...
...
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