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
1d7e2436
Commit
1d7e2436
authored
Aug 04, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Plain Diff
backported to M60P as 0.9.5-alt0.M60P.1 (with rpmbph script)
parents
b9a92202
b85d42d9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
18 deletions
+72
-18
epm
bin/epm
+8
-4
epm-install
bin/epm-install
+29
-0
epm-packages
bin/epm-packages
+4
-10
epm-query
bin/epm-query
+6
-0
epm-query_file
bin/epm-query_file
+17
-2
eepm.spec
eepm.spec
+8
-2
No files found.
bin/epm
View file @
1d7e2436
...
...
@@ -64,6 +64,7 @@ quiet=
nodeps
=
non_interactive
=
skip_installed
=
show_command_only
=
epm_cmd
=
pkg_files
=
pkg_names
=
...
...
@@ -110,13 +111,13 @@ check_command()
-e
|
-P
|
remove|delete
)
# HELPCMD: remove (delete) package(s) from the database and the system
epm_cmd
=
remove
;;
-qi
|
info
)
# HELPCMD: print package detail info
-qi
|
info
|show
)
# HELPCMD: print package detail info
epm_cmd
=
info
;;
clean
)
# HELPCMD: clean local package cache
epm_cmd
=
clean
;;
-qa
|
list|packages
)
# HELPCMD: list of installed package(s)
-qa
|
list|packages
|-l
)
# HELPCMD: list of installed package(s)
epm_cmd
=
packages
;;
-qp
|
query_package
)
# HELPCMD: search in the list of installed packages
...
...
@@ -134,7 +135,7 @@ check_command()
-q
|
installed
)
# HELPCMD: check presence of package(s)
epm_cmd
=
query
;;
-qf
|
which
)
# HELPCMD: query package(s) owning file
-qf
|
which
|belongs
)
# HELPCMD: query package(s) owning file
epm_cmd
=
query_file
;;
filesearch
)
# HELPCMD: search in which package a file is included
...
...
@@ -152,7 +153,7 @@ check_command()
simulate
)
# HELPCMD: simulate install (check requires)
epm_cmd
=
simulate
;;
addrepo
)
# HELPCMD: add package repo
addrepo
|ar
)
# HELPCMD: add package repo
epm_cmd
=
addrepo
;;
repolist|sl
)
# HELPCMD: print repo list
...
...
@@ -182,6 +183,9 @@ for opt in "$@" ; do
--skip-installed
)
# HELPOPT: skip already install during install
skip_installed
=
1
;;
--show-command-only
)
# HELPOPT: show command only, do not any action
show_command_only
=
1
;;
--quiet
)
# HELPOPT: quiet mode (do not print commands before exec)
quiet
=
1
;;
...
...
bin/epm-install
View file @
1d7e2436
...
...
@@ -151,9 +151,38 @@ epm_install_files()
epm_install_names
$@
}
epm_print_install_command
()
{
case
$PMTYPE
in
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm
)
echo
"rpm -Uvh --force
$nodeps
$@
"
;;
apt-dpkg
)
echo
"dpkg -i
$@
"
;;
pkg_add
)
echo
"pkg_add
$@
"
;;
pacman
)
echo
"pacman -U --noconfirm
$@
"
;;
slackpkg
)
echo
"installpkg
$@
"
;;
*
)
fatal
"Do not known appropriate install command for
$PMTYPE
"
;;
esac
}
epm_install
()
{
if
[
-n
"
$show_command_only
"
]
;
then
epm_print_install_command
$names
return
fi
[
-n
"
$pkg_files$pkg_names
"
]
||
fatal
"Run install without packages"
local
names
=
"
$(
echo
$pkg_names
| filter_out_installed_packages
)
"
...
...
bin/epm-packages
View file @
1d7e2436
...
...
@@ -23,19 +23,13 @@ epm_packages()
case
$PMTYPE
in
apt-rpm
)
CMD
=
"rpm -qa"
CMD
=
"rpm -qa
$pkg_filenames
"
;;
apt-dpkg
)
CMD
=
"dpkg -l"
CMD
=
"dpkg -l
$pkg_filenames
"
;;
yum-rpm
)
CMD
=
"rpm -qa"
;;
urpm-rpm
)
CMD
=
"rpm -qa"
;;
zypper-rpm
)
CMD
=
"rpm -qa"
yum-rpm|urpm-rpm|zypper-rpm
)
CMD
=
"rpm -qa
$pkg_filenames
"
;;
emerge
)
CMD
=
"qlist -I"
...
...
bin/epm-query
View file @
1d7e2436
...
...
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
# TODO: combine with -qa (the difference only in return status now)
epm_query
()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
...
...
@@ -28,6 +30,10 @@ case $PMTYPE in
;;
apt-dpkg
)
CMD
=
"dpkg -l"
# TODO: make rpm-like output
#showcmd dpkg -l $pkg_filenames
#dpkg -l $pkg_filenames | grep "^ii"
#return
;;
*
)
fatal
"Do not known command for
$PMTYPE
"
...
...
bin/epm-query_file
View file @
1d7e2436
...
...
@@ -45,6 +45,20 @@ real_file()
FULLFILEPATH
=
`
readlink
-f
$TOFILE
`
}
dpkg_print_name_version
()
{
local
ver
for
i
in
$*
;
do
ver
=
$(
dpkg
-s
$i
2>/dev/null |
grep
"Version:"
|
sed
-e
"s|Version: ||g"
)
if
[
-z
"
$ver
"
]
;
then
echo
"
$i
"
else
echo
"
$i
-
$ver
"
fi
done
}
__do_query
()
{
case
$PMTYPE
in
...
...
@@ -52,8 +66,9 @@ __do_query()
CMD
=
"rpm -qf"
;;
apt-dpkg
)
CMD
=
"dpkg -S"
;;
showcmd dpkg
-S
$1
dpkg_print_name_version
$(
dpkg
-S
$1
|
sed
-e
"s|:.*||"
)
return
;;
yum-rpm|urpm-rpm
)
CMD
=
"rpm -qf"
;;
...
...
eepm.spec
View file @
1d7e2436
# This spec is backported to ALTLinux p6 automatically by rpmbph script. Do not edit it.
#
Name: eepm
Version: 0.9.
4
Version: 0.9.
5
Release: alt0.M60P.1
Summary: Etersoft EPM package manager
...
...
@@ -47,9 +47,15 @@ with various distros.
%_bindir/distr_info
%changelog
*
Fri Aug 03 2012 Vitaly Lipatov <lav@altlinux.ru> 0.9.4
-alt0.M60P.1
*
Sat Aug 04 2012 Vitaly Lipatov <lav@altlinux.ru> 0.9.5
-alt0.M60P.1
- backport to ALTLinux p6 (by rpmbph script)
* Sat Aug 04 2012 Vitaly Lipatov <lav@altlinux.ru> 0.9.5-alt1
- epm-install: add show-command-only support
- epm: update commands variations
- query_file: make output from dpkg like rpm -q
- epm-packages: allow filter list packages by one name
* Fri Aug 03 2012 Vitaly Lipatov <lav@altlinux.ru> 0.9.4-alt1
- add query package (-qp) support
- print command example in stderr
...
...
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