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