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
Nurlan
eepm
Commits
0391547b
Commit
0391547b
authored
Nov 05, 2019
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more clean and strict rules
parent
563f545d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
36 deletions
+22
-36
epm-dedup
bin/epm-dedup
+2
-3
epm-download
bin/epm-download
+2
-2
epm-install
bin/epm-install
+2
-2
epm-packages
bin/epm-packages
+6
-13
epm-policy
bin/epm-policy
+3
-3
epm-query_file
bin/epm-query_file
+1
-7
epm-remove
bin/epm-remove
+6
-6
No files found.
bin/epm-dedup
View file @
0391547b
...
...
@@ -49,9 +49,8 @@ try_fix_apt_rpm_dupls()
epm_dedup
()
{
case
$PMTYPE
in
apt-rpm
)
# ALT Linux only
case
"
$DISTRNAME
"
in
"ALTLinux"
)
assure_exists /usr/share/apt/scripts apt-scripts
if
[
-f
/usr/share/apt/scripts/dedup.lua
]
;
then
"Check for duplicates via apt-get dedup from apt-scripts"
...
...
bin/epm-download
View file @
0391547b
...
...
@@ -184,8 +184,8 @@ epm_download()
{
local
CMD
case
$DISTRNAME
in
ALTLinux
)
case
$DISTRNAME
-
$PMTYPE
in
ALTLinux
-apt-rpm
)
__epm_download_alt
$pkg_filenames
return
;;
...
...
bin/epm-install
View file @
0391547b
...
...
@@ -442,10 +442,10 @@ epm_print_install_command()
#[ -z "$1" ] && return
[
-z
"
$1
"
]
&&
[
-n
"
$pkg_names
"
]
&&
return
case
$PMTYPE
in
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm|dnf
-rpm
)
*
-rpm
)
echo
"rpm -Uvh --force
$nodeps
$*
"
;;
apt-dpkg|aptitude
-dpkg
)
*
-dpkg
)
echo
"dpkg -i
$*
"
;;
pkgsrc
)
...
...
bin/epm-packages
View file @
0391547b
...
...
@@ -23,12 +23,12 @@ __epm_packages_sort()
{
# FIXME: sort depends on --sort value
case
$PMTYPE
in
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm|dnf
-rpm
)
*
-rpm
)
# FIXME: space with quotes problems, use point instead
warmup_rpmbase
docmd rpm
-qa
--queryformat
"%{size}@%{name}-%{version}-%{release}
\n
"
$pkg_filenames
|
sed
-e
"s|@| |g"
|
sort
-n
-k1
;;
apt
-dpkg
)
*
-dpkg
)
warmup_dpkgbase
docmd dpkg-query
-W
--showformat
=
"
\$
{Installed-Size}@
\$
{Package}-
\$
{Version}:
\$
{Architecture}
\n
"
$pkg_filenames
|
sed
-e
"s|@| |g"
|
sort
-n
-k1
;;
...
...
@@ -57,13 +57,6 @@ epm_packages()
[
-n
"
$sort
"
]
&&
__epm_packages_sort
&&
return
case
$PMTYPE
in
apt-rpm
)
warmup_rpmbase
# FIXME: strong equal
CMD
=
"rpm -qa
$pkg_filenames
"
[
-n
"
$short
"
]
&&
CMD
=
"rpm -qa --queryformat %{name}
\n
$pkg_filenames
"
docmd
$CMD
return
;;
*
-dpkg
)
warmup_dpkgbase
# FIXME: strong equal
...
...
@@ -74,10 +67,7 @@ case $PMTYPE in
showcmd
$CMD
$CMD
|
grep
"^i"
|
sed
-e
"s|.* ||g"
| __fo_pfn
return
;;
snappy
)
CMD
=
"snappy info"
;;
yum-rpm|urpm-rpm|zypper-rpm|dnf-rpm
)
*
-rpm
)
warmup_rpmbase
# FIXME: strong equal
CMD
=
"rpm -qa
$pkg_filenames
"
...
...
@@ -87,6 +77,9 @@ case $PMTYPE in
packagekit-
*
)
docmd pkcon get-packages
--filter
installed
;;
snappy
)
CMD
=
"snappy info"
;;
emerge
)
CMD
=
"qlist -I -C"
# print with colors for console output
...
...
bin/epm-policy
View file @
0391547b
#!/bin/sh
#
# Copyright (C) 2015, 2017 Etersoft
# Copyright (C) 2015, 2017 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2015, 2017
, 2019
Etersoft
# Copyright (C) 2015, 2017
, 2019
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -31,7 +31,7 @@ warmup_bases
pkg_names
=
$(
__epm_get_hilevel_name
$pkg_names
)
case
$PMTYPE
in
apt-
rpm
)
apt-
*
)
docmd apt-cache policy
$pkg_names
;;
packagekit-
*
)
...
...
bin/epm-query_file
View file @
0391547b
...
...
@@ -78,17 +78,11 @@ __do_query()
{
local
CMD
case
$PMTYPE
in
apt-rpm
)
CMD
=
"rpm -qf"
;;
*
-dpkg
)
showcmd dpkg
-S
"
$1
"
dpkg_print_name_version
"
$(
dpkg
-S
$1
|
grep
-v
"^diversion by"
|
sed
-e
"s|:.*||"
)
"
return
;;
yum-rpm|dnf-rpm|urpm-rpm
)
CMD
=
"rpm -qf"
;;
zypper-rpm
)
*
-rpm
)
CMD
=
"rpm -qf"
;;
emerge
)
...
...
bin/epm-remove
View file @
0391547b
#!/bin/sh
#
# Copyright (C) 2012-2014, 2016, 2017 Etersoft
# Copyright (C) 2012-2014, 2016, 2017 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2014, 2016, 2017
, 2019
Etersoft
# Copyright (C) 2012-2014, 2016, 2017
, 2019
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -30,10 +30,10 @@ epm_remove_low()
warmup_lowbase
case
$PMTYPE
in
apt-rpm|yum-rpm|zypper-rpm|urpm-rpm|dnf
-rpm
)
*
-rpm
)
sudocmd rpm
-ev
$nodeps
$@
return
;;
apt-dpkg|aptitude
-dpkg
)
*
-dpkg
|
-dpkg
)
# shellcheck disable=SC2046
sudocmd dpkg
-P
$(
subst_option nodeps
--force-all
)
$(
print_name
"
$@
"
)
return
;;
...
...
@@ -204,10 +204,10 @@ epm_remove_nonint()
epm_print_remove_command
()
{
case
$PMTYPE
in
apt-rpm|yum-rpm|zypper-rpm|urpm-rpm|dnf
-rpm
)
*
-rpm
)
echo
"rpm -ev
$nodeps
$*
"
;;
apt-dpkg|aptitude
-dpkg
)
*
-dpkg
)
echo
"dpkg -P
$*
"
;;
packagekit-
*
)
...
...
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