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
aae3cde9
Commit
aae3cde9
authored
Jul 22, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use PMTYPE and SUDO
parent
49a21e78
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
60 deletions
+40
-60
TODO
TODO
+0
-2
epm-clean
bin/epm-clean
+5
-5
epm-filelist
bin/epm-filelist
+6
-6
epm-packages
bin/epm-packages
+7
-8
epm-query
bin/epm-query
+3
-12
epm-remove
bin/epm-remove
+6
-6
epm-simulate
bin/epm-simulate
+12
-20
epm-upgrade
bin/epm-upgrade
+1
-1
No files found.
TODO
View file @
aae3cde9
1. Разобраться с поиском по локальным пакетам
2. Дописать таблицу на вики и по ней справку
3. Переделать по возможности все команды на PMTYPE
4. Проверить, что в общем всё работает
5. Там, где нужно, добавить $SUDO
6. rpmqf, если не найдёт в локальной базе, могла бы искать в глобальной
7. Дописать начатый reinstall (повторную установку), с --force при установке пакета
...
...
bin/epm-clean
View file @
aae3cde9
...
...
@@ -20,18 +20,18 @@
epm_clean
()
{
case
$
DISTRNAM
E
in
"ALTLinux"
|
"Ubuntu"
|
"Debian"
|
"PCLinux"
)
case
$
PMTYP
E
in
apt-rpm|apt-dpkg
)
docmd
$SUDO
apt-get clean
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
yum-rpm
)
docmd
$SUDO
yum clean all
docmd
$SUDO
yum makecache
;;
"Mandriva"
)
urpm-rpm
)
docmd
$SUDO
urpmi
--clean
;;
"SUSE"
)
zypper-rpm
)
docmd
$SUDO
zypper clean
;;
*
)
...
...
bin/epm-filelist
View file @
aae3cde9
...
...
@@ -24,20 +24,20 @@ epm_filelist()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
case
$
DISTRNAM
E
in
"ALTLinux"
|
"PCLinux"
)
case
$
PMTYP
E
in
apt-rpm
)
CMD
=
"rpm -ql"
;;
"Ubuntu"
|
"Debian"
)
apt-dpkg
)
CMD
=
"dpkg -L"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
yum-rpm
)
CMD
=
"rpm -ql"
;;
"Mandriva"
)
urpm-rpm
)
CMD
=
"rpm -ql"
;;
"SUSE"
)
zypper-rpm
)
CMD
=
"rpm -ql"
;;
*
)
...
...
bin/epm-packages
View file @
aae3cde9
...
...
@@ -23,25 +23,24 @@
epm_packages
()
{
case
$
DISTRNAM
E
in
"ALTLinux"
|
"PCLinux"
)
case
$
PMTYP
E
in
apt-rpm
)
CMD
=
"rpm -qa"
;;
"Ubuntu"
|
"Debian"
)
apt-dpkg
)
CMD
=
"dpkg -l"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
yum-rpm
)
CMD
=
"rpm -qa"
;;
"Mandriva"
)
urpm-rpm
)
CMD
=
"rpm -qa"
;;
"SUSE"
)
zypper-rpm
)
CMD
=
"rpm -qa"
;;
*
)
RET
=
1
CMD
=
"echo
\"
Do not known query command for DISTRNAME
$DISTRNAME
\"
"
fatal
"Do not known query command for
$PMTYPE
"
;;
esac
...
...
bin/epm-query
View file @
aae3cde9
...
...
@@ -24,22 +24,13 @@ epm_query()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
case
$
DISTRNAM
E
in
"ALTLinux"
|
"PCLinux"
)
case
$
PMTYP
E
in
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm
)
CMD
=
"rpm -q"
;;
"Ubuntu"
|
"Debian"
)
apt-dpkg
)
CMD
=
"dpkg -l"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
CMD
=
"rpm -q"
;;
"Mandriva"
)
CMD
=
"rpm -q"
;;
"SUSE"
)
CMD
=
"rpm -q"
;;
*
)
fatal
"Do not known command for
$PMTYPE
"
;;
...
...
bin/epm-remove
View file @
aae3cde9
...
...
@@ -75,17 +75,17 @@ epm_remove()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run remove without names"
case
$
DISTRNAM
E
in
"ALTLinux"
|
"Ubuntu"
|
"Debian"
|
"PCLinux"
)
case
$
PMTYP
E
in
apt-rpm|apt-dpkg
)
CMD
=
"apt-get remove --purge"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
yum-rpm
)
CMD
=
"yum remove"
;;
"Mandriva"
)
urpm-rpm
)
CMD
=
"urpme"
;;
"SUSE"
)
zypper-rpm
)
CMD
=
"zypper remove"
;;
*
)
...
...
@@ -93,6 +93,6 @@ case $DISTRNAME in
;;
esac
docmd
$CMD
$pkg_names
$pkg_files
docmd
$
SUDO
$
CMD
$pkg_names
$pkg_files
}
bin/epm-simulate
View file @
aae3cde9
...
...
@@ -18,38 +18,30 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
# TODO
epm_
install_sim
()
epm_
simulate
()
{
case
$DISTRNAME
in
"ALTLinux"
|
"PCLinux"
)
CMD
=
"apt-get --simulate install"
;;
"Ubuntu"
|
"Debian"
)
local
CMD
[
-n
"
$pkg_names
"
]
||
fatal
"Run
$epm_cmd
without packages"
case
$PMTYPE
in
apt-rpm|apt-dpkg
)
CMD
=
"apt-get --simulate install"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
yum-rpm
)
CMD
=
"yum provides"
;;
"Mandriva"
)
urpm-rpm
)
CMD
=
"urpmi --test --auto"
;;
"SUSE"
)
zypper-rpm
)
CMD
=
"zypper --non-interactive install --dry-run"
;;
*
)
fatal
"Do not known install command for DISTRNAME
$DISTRNAM
E
"
fatal
"Do not known install command for
$PMTYP
E
"
;;
esac
echo
$CMD
}
epm_simulate
()
{
[
-n
"
$pkg_names
"
]
||
fatal
"Run
$epm_cmd
without packages"
esac
CMD
=
$(
epm_install_sim
$DISTRNAME
)
docmd
$SUDO
$CMD
$pkg_names
}
bin/epm-upgrade
View file @
aae3cde9
...
...
@@ -43,5 +43,5 @@ epm_upgrade()
;;
esac
docmd
$CMD
docmd
$
SUDO
$
CMD
}
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