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
966238e4
Commit
966238e4
authored
Apr 15, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm install: add warning when install non ALT packages
parent
b2154a1f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
epm-install
bin/epm-install
+4
-1
epm-sh-install
bin/epm-sh-install
+21
-0
No files found.
bin/epm-install
View file @
966238e4
...
@@ -328,13 +328,16 @@ epm_install_files()
...
@@ -328,13 +328,16 @@ epm_install_files()
case
"
$BASEDISTRNAME
"
in
case
"
$BASEDISTRNAME
"
in
"alt"
)
"alt"
)
# on ALT install target can be a real path
# do not use low-level for install by file path (f.i. epm install /usr/bin/git)
# do not use low-level for install by file path (f.i. epm install /usr/bin/git)
if
__epm_if_command_path
$files
;
then
if
__epm_if_command_path
$files
;
then
epm_install_names
$files
epm_install_names
$files
return
return
fi
fi
# on ALT install target can be a real path
__epm_print_warning_for_nonalt_packages
$files
# do repack if needed
if
__epm_repack_if_needed
$files
;
then
if
__epm_repack_if_needed
$files
;
then
[
-n
"
$repacked_pkgs
"
]
||
fatal
"Can't convert
$files
"
[
-n
"
$repacked_pkgs
"
]
||
fatal
"Can't convert
$files
"
files
=
"
$repacked_pkgs
"
files
=
"
$repacked_pkgs
"
...
...
bin/epm-sh-install
View file @
966238e4
...
@@ -115,6 +115,27 @@ __epm_get_pkgvendor()
...
@@ -115,6 +115,27 @@ __epm_get_pkgvendor()
epm print field Vendor
for
"
$pkg
"
2>/dev/null
epm print field Vendor
for
"
$pkg
"
2>/dev/null
}
}
__epm_print_warning_for_nonalt_packages
()
{
# only ALT
[
"
$BASEDISTRNAME
"
=
"alt"
]
||
return
0
local
i
for
i
in
$*
;
do
local
vendor
# TODO: check only for rpm
vendor
=
"
$(
__epm_get_pkgvendor
"
$i
"
)
"
local
packager
=
"
$(
epm print field Packager
for
"
$i
"
2>/dev/null
)
"
# TODO: check GPG or some other mark
echo
"
$packager
"
|
grep
-q
"@altlinux"
&&
[
"
$vendor
"
=
"ALT Linux Team"
]
&&
return
0
warning
"%%% You are trying install package
$i
not from ALT repository. Be careful! %%%"
done
}
# Args: package names. Set noscripts for outside packages.
# Args: package names. Set noscripts for outside packages.
__epm_check_vendor
()
__epm_check_vendor
()
{
{
...
...
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