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
c7c09645
Commit
c7c09645
authored
Feb 27, 2014
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement info and use it
parent
abf5fa42
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
41 additions
and
37 deletions
+41
-37
epm-Install
bin/epm-Install
+1
-1
epm-addrepo
bin/epm-addrepo
+4
-4
epm-assure
bin/epm-assure
+2
-2
epm-autoremove
bin/epm-autoremove
+2
-2
epm-checkpkg
bin/epm-checkpkg
+1
-1
epm-clean
bin/epm-clean
+1
-1
epm-install
bin/epm-install
+2
-2
epm-kernel_update
bin/epm-kernel_update
+1
-1
epm-provides
bin/epm-provides
+1
-1
epm-query_file
bin/epm-query_file
+5
-3
epm-release-upgrade
bin/epm-release-upgrade
+2
-2
epm-removerepo
bin/epm-removerepo
+4
-4
epm-sh-functions
bin/epm-sh-functions
+9
-7
epm-simulate
bin/epm-simulate
+4
-4
epm-update
bin/epm-update
+1
-1
epm-upgrade
bin/epm-upgrade
+1
-1
No files found.
bin/epm-Install
View file @
c7c09645
...
...
@@ -26,7 +26,7 @@ epm_Install()
local
names
=
"
$(
echo
$pkg_names
| filter_out_installed_packages
)
"
local
files
=
"
$(
echo
$pkg_files
| filter_out_installed_packages
)
"
[
-z
"
$files$names
"
]
&&
ech
o
"Skip empty install list"
&&
return
22
[
-z
"
$files$names
"
]
&&
inf
o
"Skip empty install list"
&&
return
22
# do update only if really need install something
case
$PMTYPE
in
...
...
bin/epm-addrepo
View file @
c7c09645
...
...
@@ -25,10 +25,10 @@ case $PMTYPE in
sudocmd apt-repo add
$pkg_filenames
;;
apt-dpkg|aptitude-dpkg
)
ech
o
"You need manually add repo to /etc/apt/sources.list"
inf
o
"You need manually add repo to /etc/apt/sources.list"
;;
yum-rpm
)
ech
o
"You need manually add repo to /etc/yum.repos.d/"
inf
o
"You need manually add repo to /etc/yum.repos.d/"
;;
urpm-rpm
)
sudocmd urpmi.addmedia
$pkg_filenames
...
...
@@ -40,7 +40,7 @@ case $PMTYPE in
sudocmd layman
-a
$pkg_filenames
;;
pacman
)
ech
o
"You need manually add repo to /etc/pacman.conf"
inf
o
"You need manually add repo to /etc/pacman.conf"
# Only for alone packages:
#sudocmd repo-add $pkg_filenames
;;
...
...
@@ -48,7 +48,7 @@ case $PMTYPE in
sudocmd npackdcl add-repo
--url
=
$pkg_filenames
;;
slackpkg
)
ech
o
"You need manually add repo to /etc/slackpkg/mirrors"
inf
o
"You need manually add repo to /etc/slackpkg/mirrors"
;;
*
)
fatal
"Have no suitable command for
$PMTYPE
"
...
...
bin/epm-assure
View file @
c7c09645
...
...
@@ -36,14 +36,14 @@ __epm_assure()
if
__check_command_in_path
"
$1
"
>
/dev/null
;
then
if
[
-n
"
$verbose
"
]
;
then
local
compath
=
"
$(
__check_command_in_path
"
$1
"
)
"
ech
o
"Command
$1
is exists:
$compath
"
inf
o
"Command
$1
is exists:
$compath
"
epm qf
"
$compath
"
fi
return
fi
# TODO: use package name normalization
ech
o
"Install appropriate package for
$1
command..."
inf
o
"Install appropriate package for
$1
command..."
local
PACKAGE
=
"
$2
"
[
-n
"
$PACKAGE
"
]
||
PACKAGE
=
"
$1
"
...
...
bin/epm-autoremove
View file @
c7c09645
...
...
@@ -22,8 +22,8 @@ __epm_autoremove_altrpm()
local
pkg
local
flag
=
load_helper epm-packages
ech
o
ech
o
"Just remove all non -devel libs packages not need by anything"
inf
o
inf
o
"Just remove all non -devel libs packages not need by anything"
for
pkg
in
$(
short
=
1
pkg_filenames
=
epm_packages |
grep
--
"^lib"
|
grep
-v
--
"-devel$"
|
grep
-v
--
^libreoffice
)
;
do
sudocmd rpm
-v
-e
$pkg
&&
flag
=
1
done
...
...
bin/epm-checkpkg
View file @
c7c09645
...
...
@@ -70,7 +70,7 @@ esac
epm_checkpkg
()
{
if
[
-n
"
$pkg_names
"
]
;
then
echo
"Suggest
$pkg_names
are names
of installed packages"
info
"Suggest
$pkg_names
are name(s)
of installed packages"
__epm_check_installed_pkg
$pkg_names
return
fi
...
...
bin/epm-clean
View file @
c7c09645
...
...
@@ -51,6 +51,6 @@ case $PMTYPE in
fatal
"Have no suitable command for
$PMTYPE
"
;;
esac
ech
o
"It is recommend to run 'epm autoremove' also"
inf
o
"It is recommend to run 'epm autoremove' also"
}
bin/epm-install
View file @
c7c09645
...
...
@@ -369,12 +369,12 @@ epm_install()
return
fi
[
-
n
"
$pkg_files$pkg_names
"
]
||
{
echo
"Skip empty install list"
;
return
22
;
}
[
-
z
"
$pkg_files$pkg_names
"
]
&&
info
"Skip empty install list"
&&
return
22
local
names
=
"
$(
echo
$pkg_names
| filter_out_installed_packages
)
"
local
files
=
"
$(
echo
$pkg_files
| filter_out_installed_packages
)
"
[
-z
"
$files$names
"
]
&&
ech
o
"Skip empty install list"
&&
return
22
[
-z
"
$files$names
"
]
&&
inf
o
"Skip empty install list"
&&
return
22
# it is useful for first time running
update_repo_if_needed
...
...
bin/epm-kernel_update
View file @
c7c09645
...
...
@@ -19,7 +19,7 @@
epm_kernel_update
()
{
ech
o
"Start update system kernel to the latest version"
inf
o
"Start update system kernel to the latest version"
case
$DISTRNAME
in
ALTLinux
)
...
...
bin/epm-provides
View file @
c7c09645
...
...
@@ -73,7 +73,7 @@ case $PMTYPE in
apt-dpkg
)
# FIXME: need fix for a few names case
if
is_installed
$pkg_names
;
then
ech
o
"Please inform the author how to get provides from dpkg"
inf
o
"Please inform the author how to get provides from dpkg"
fi
# CMD="rpm -q --provides"
#else
...
...
bin/epm-query_file
View file @
c7c09645
...
...
@@ -33,7 +33,7 @@ __do_query_real_file()
else
TOFILE
=
`
which
$1
2>/dev/null
||
echo
$1
`
if
[
"
$TOFILE
"
!=
"
$1
"
]
;
then
ech
o
"Note:
$1
is placed as
$TOFILE
"
inf
o
"Note:
$1
is placed as
$TOFILE
"
fi
fi
...
...
@@ -41,10 +41,11 @@ __do_query_real_file()
if
[
-L
"
$TOFILE
"
]
;
then
__do_query
$TOFILE
LINKTO
=
`
readlink
"
$TOFILE
"
`
ech
o
"Note:
$TOFILE
is link to
$LINKTO
"
inf
o
"Note:
$TOFILE
is link to
$LINKTO
"
__do_query_real_file
"
$LINKTO
"
fi
FULLFILEPATH
=
`
realpath
$TOFILE
`
FULLFILEPATH
=
"
$TOFILE
"
}
dpkg_print_name_version
()
...
...
@@ -141,6 +142,7 @@ epm_query_file()
{
# in short mode print handle only real names and do short output
# TODO: move to separate command?
# FIXME: it is possible use query
if
[
-n
"
$short
"
]
;
then
[
-n
"
$pkg_files
"
]
||
fatal
"Run query without file names (needed path to files)"
__do_short_query
$pkg_files
...
...
bin/epm-release-upgrade
View file @
c7c09645
...
...
@@ -19,8 +19,8 @@
epm_release_upgrade
()
{
ech
o
"Start upgrade whole system to the next release"
ech
o
"Check also http://wiki.etersoft.ru/Admin/UpdateLinux"
inf
o
"Start upgrade whole system to the next release"
inf
o
"Check also http://wiki.etersoft.ru/Admin/UpdateLinux"
case
$PMTYPE
in
apt-rpm
)
...
...
bin/epm-removerepo
View file @
c7c09645
...
...
@@ -25,10 +25,10 @@ case $PMTYPE in
sudocmd apt-repo
rm
$pkg_filenames
;;
apt-dpkg|aptitude-dpkg
)
ech
o
"You need remove repo from /etc/apt/sources.list"
inf
o
"You need remove repo from /etc/apt/sources.list"
;;
yum-rpm
)
ech
o
"You need remove repo from /etc/yum.repos.d/"
inf
o
"You need remove repo from /etc/yum.repos.d/"
;;
urpm-rpm
)
sudocmd urpmi.removemedia
$pkg_filenames
...
...
@@ -40,13 +40,13 @@ case $PMTYPE in
sudocmd layman
-d
$pkg_filenames
;;
pacman
)
ech
o
"You need remove repo from /etc/pacman.conf"
inf
o
"You need remove repo from /etc/pacman.conf"
;;
npackd
)
sudocmd npackdcl remove-repo
--url
=
$pkg_filenames
;;
slackpkg
)
ech
o
"You need remove repo from /etc/slackpkg/mirrors"
inf
o
"You need remove repo from /etc/slackpkg/mirrors"
;;
*
)
fatal
"Have no suitable command for
$PMTYPE
"
...
...
bin/epm-sh-functions
View file @
c7c09645
...
...
@@ -102,12 +102,6 @@ set_target_pkg_env()
RPMVENDOR
=
$(
$DISTRVENDOR
-n
"
$DISTRNAME
"
)
}
# for systems without realpath command
realpath
()
{
readlink
-f
"
$@
"
}
# Print command line and run command line
showcmd
()
{
...
...
@@ -237,6 +231,14 @@ warning()
fi
}
info
()
{
isatty
||
return
0
[
-n
"
$quiet
"
]
&&
return
echo
"
$@
"
}
set_sudo
()
{
SUDO
=
""
...
...
@@ -261,7 +263,7 @@ set_eatmydata()
# use if possible
which eatmydata
>
/dev/null 2>/dev/null
||
return
SUDO
=
"
$SUDO
eatmydata"
i
satty
&&
echo
"Uwaga! eatmydata is installed, we will use it for disable all sync operations."
>
&2
i
nfo
"Uwaga! eatmydata is installed, we will use it for disable all sync operations."
return
0
}
...
...
bin/epm-simulate
View file @
c7c09645
...
...
@@ -117,7 +117,7 @@ EOF
pkg_filenames
=
"
$pkg
-[0-9]"
epm_search |
grep
-E
"(installed|upgrade)"
&&
continue
pkg_filenames
=
"
$pkg
"
epm_search |
grep
-E
"(installed|upgrade)"
&&
continue
res
=
1
ech
o
"Does not found in repository."
inf
o
"Does not found in repository."
done
return
$res
;;
*
)
...
...
@@ -130,16 +130,16 @@ EOF
epm_simulate
()
{
[
-z
"
$pkg_filenames
"
]
&&
ech
o
"Skip empty list"
&&
return
22
[
-z
"
$pkg_filenames
"
]
&&
inf
o
"Skip empty list"
&&
return
22
local
filenames
=
"
$(
echo
$pkg_filenames
| filter_out_installed_packages
)
"
[
-z
"
$filenames
"
]
&&
ech
o
"All packages are already installed"
&&
return
0
[
-z
"
$filenames
"
]
&&
inf
o
"All packages are already installed"
&&
return
0
_epm_do_simulate
$filenames
local
RES
=
$?
if
[
-z
"
$quiet
"
]
;
then
[
"
$RES
"
=
0
]
&&
echo
"Result:
$filenames
package(s) CAN BE installed"
||
ech
o
"Result: There are PROBLEMS with install some package(s)"
[
"
$RES
"
=
0
]
&&
info
"Result:
$filenames
package(s) CAN BE installed"
||
inf
o
"Result: There are PROBLEMS with install some package(s)"
fi
return
$RES
}
...
...
bin/epm-update
View file @
c7c09645
...
...
@@ -21,7 +21,7 @@
epm_update
()
{
ech
o
"Run command for update remote package repository database"
inf
o
"Run command for update remote package repository database"
case
$PMTYPE
in
apt-rpm
)
...
...
bin/epm-upgrade
View file @
c7c09645
...
...
@@ -26,7 +26,7 @@ epm_upgrade()
# it is useful for first time running
update_repo_if_needed
ech
o
"Run command for upgrade packages"
inf
o
"Run command for upgrade packages"
case
$PMTYPE
in
apt-rpm|apt-dpkg
)
...
...
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