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
31dc9aa8
Commit
31dc9aa8
authored
Aug 02, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add missed command for Gentoo, Slackware, FreeBSD
improve repo management commands
parent
3e28382e
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
113 additions
and
37 deletions
+113
-37
epm-addrepo
bin/epm-addrepo
+17
-8
epm-info
bin/epm-info
+3
-0
epm-packages
bin/epm-packages
+9
-0
epm-query_file
bin/epm-query_file
+3
-0
epm-reinstall
bin/epm-reinstall
+6
-7
epm-remove
bin/epm-remove
+2
-1
epm-removerepo
bin/epm-removerepo
+19
-7
epm-repolist
bin/epm-repolist
+27
-5
epm-search_file
bin/epm-search_file
+5
-3
epm-update
bin/epm-update
+12
-5
epm-upgrade
bin/epm-upgrade
+10
-1
No files found.
bin/epm-addrepo
View file @
31dc9aa8
...
...
@@ -21,17 +21,26 @@
epm_addrepo
()
{
case
$PMTYPE
in
#
apt-rpm|apt-dpkg)
# docmd $SUDO apt-get check || exit
#
;;
#
yum-rpm)
# docmd $SUDO yum repolist || exit
#
;;
apt-rpm|apt-dpkg
)
echo
"You need manually add repo to /etc/apt/sources.list"
;;
yum-rpm
)
echo
"You need manually add repo to /etc/yum.repos.d/"
;;
urpm-rpm
)
docmd
$SUDO
urpmi.addmedia
--distrib
$pkg_filenames
docmd
$SUDO
urpmi.addmedia
$pkg_filenames
;;
zypper-rpm
)
docmd
$SUDO
zypper ar
$pkg_filenames
||
exit
docmd
$SUDO
zypper ar
$pkg_filenames
;;
emerge
)
docmd
$SUDO
layman
-a
$pkg_filenames
;;
pacman
)
echo
"You need manually add repo to /etc/pacman.conf"
;;
pkgtool
)
echo
"You need manually add repo to /etc/slackpkg/mirrors"
;;
*
)
fatal
"Do not known command for
$PMTYPE
"
...
...
bin/epm-info
View file @
31dc9aa8
...
...
@@ -33,6 +33,9 @@ case $PMTYPE in
pacman
)
docmd pacman
-Si
$pkg_names
;;
pkgtool
)
docmd slackpkg info
$pkg_names
;;
*
)
fatal
"Do not known command for
$PMTYPE
"
;;
...
...
bin/epm-packages
View file @
31dc9aa8
...
...
@@ -39,9 +39,18 @@ case $PMTYPE in
zypper-rpm
)
CMD
=
"rpm -qa"
;;
emerge
)
CMD
=
"qlist -I"
;;
pkg_add
)
CMD
=
"pkg_info"
;;
pacman
)
CMD
=
"pacman -Qs"
;;
pkgtool
)
CMD
=
"ls -1 /var/log/packages/"
;;
*
)
fatal
"Do not known query command for
$PMTYPE
"
;;
...
...
bin/epm-query_file
View file @
31dc9aa8
...
...
@@ -61,6 +61,9 @@ __do_query()
zypper-rpm
)
CMD
=
"rpm -qf"
;;
emerge
)
CMD
=
"equery belongs"
;;
pacman
)
CMD
=
"pacman -Qo"
;;
...
...
bin/epm-reinstall
View file @
31dc9aa8
...
...
@@ -41,26 +41,25 @@ epm_reinstall_names()
pacman
)
docmd
$SUDO
pacman
-U
$@
return
;;
pkgtool
)
docmd
$SUDO
slackpkg reinstall
$@
return
;;
*
)
fatal
"Do not known install command for
$PMTYPE
"
;;
esac
}
# for low level install
#is_alt && FANCYPERCENT=--fancypercent
#docmd $SUDO rpm -Uvh $FANCYPERCENT "$@"
epm_reinstall_files
()
{
[
-z
"
$1
"
]
&&
return
case
$
DISTRNAM
E
in
ALTLinux|PCLinux
)
case
$
PMTYP
E
in
apt-rpm
)
docmd
$SUDO
rpm
-Uvh
--force
$@
&&
return
docmd
$SUDO
apt-get
--reinstall
install
$@
return
;;
Ubuntu|Debian|Mint
)
apt-pkg
)
docmd
$SUDO
dpkg
-i
$@
return
;;
esac
...
...
bin/epm-remove
View file @
31dc9aa8
...
...
@@ -76,7 +76,8 @@ epm_remove_names()
docmd
$SUDO
pkg_delete
$@
return
;;
emerge
)
docmd
$SUDO
emerge
--unmerge
$@
#docmd $SUDO emerge --unmerge $@
docmd
$SUDO
emerge
-aC
$@
return
;;
pacman
)
docmd
$SUDO
pacman
-R
$@
...
...
bin/epm-removerepo
View file @
31dc9aa8
...
...
@@ -21,14 +21,26 @@
epm_removerepo
()
{
case
$PMTYPE
in
#apt-rpm|apt-dpkg)
# docmd $SUDO apt-get check || exit
# ;;
#yum-rpm)
# docmd $SUDO yum repolist || exit
# ;;
apt-rpm|apt-dpkg
)
echo
"You need remove repo from /etc/apt/sources.list"
;;
yum-rpm
)
echo
"You need remove repo from /etc/yum.repos.d/"
;;
urpm-rpm
)
docmd
$SUDO
urpmi.removemedia
$pkg_names
;;
zypper-rpm
)
docmd
$SUDO
zypper removerepo
$pkg_names
||
exit
docmd
$SUDO
zypper removerepo
$pkg_names
;;
emerge
)
docmd
$SUDO
layman
-d
$pkg_names
;;
pacman
)
echo
"You need remove repo from /etc/pacman.conf"
;;
pkgtool
)
echo
"You need remove repo from /etc/slackpkg/mirrors"
;;
*
)
fatal
"Do not known command for
$PMTYPE
"
...
...
bin/epm-repolist
View file @
31dc9aa8
...
...
@@ -18,17 +18,39 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
print_apt_sources_list
()
{
for
i
in
$@
;
do
test
-r
"
$i
"
||
continue
#echo
#echo "$i:"
grep
-v
"^#"
$i
done
|
grep
-v
"^$"
}
epm_repolist
()
{
case
$PMTYPE
in
#
apt-rpm|apt-dpkg)
# docmd $SUDO apt-get check || exit
#
;;
apt-rpm|apt-dpkg
)
docmd print_apt_sources_list /etc/apt/sources.list /etc/apt/sources.list.d/
*
;;
yum-rpm
)
docmd
$SUDO
yum repolist
docmd yum repolist
;;
urpm-rpm
)
docmd urpmq
--list-media
;;
zypper-rpm
)
docmd
$USDO
zypper sl
-d
docmd zypper sl
-d
;;
emerge
)
docmd layman
-L
;;
pacman
)
docmd
cat
/etc/pacman.conf
;;
pkgtool
)
docmd
cat
/etc/slackpkg/mirrors
;;
*
)
fatal
"Do not known command for
$PMTYPE
"
...
...
bin/epm-search_file
View file @
31dc9aa8
...
...
@@ -28,15 +28,17 @@ case $PMTYPE in
docmd apt-file search
$pkg_filenames
return
;;
yum-rpm
)
fatal
"TODO"
CMD
=
"yum search"
CMD
=
"yum provides"
;;
urpm-rpm
)
CMD
=
"urpmf"
;;
z
u
pper-rpm
)
z
y
pper-rpm
)
CMD
=
"zypper wp vi"
;;
pacman
)
CMD
=
"pacman -Qo"
;;
*
)
fatal
"Do not known search file command for
$PMTYPE
"
;;
...
...
bin/epm-update
View file @
31dc9aa8
...
...
@@ -23,15 +23,18 @@
epm_update
()
{
case
$PMTYPE
in
"apt-rpm"
)
apt-rpm
)
docmd
$SUDO
apt-get update
||
exit
#docmd $SUDO apt-get -f install || exit
;;
"apt-dpkg"
)
apt-dpkg
)
docmd
$SUDO
apt-get update
||
exit
#docmd $SUDO apt-get -f install || exit
#docmd $SUDO apt-get autoremove
;;
yum-rpm
)
docmd
$SUDO
yum check-update
;;
urpm-rpm
)
docmd
$SUDO
urpmi.update
-a
;;
...
...
@@ -41,10 +44,14 @@ case $PMTYPE in
zypper-rpm
)
docmd
$SUDO
zypper refresh
;;
emerge
)
docmd
$SUDO
emerge
--sync
;;
pkgtool
)
docmd
$SUDO
slackpkg update
;;
*
)
RET
=
1
echo
\"
Do not known
install command
for
DISTRNAME
$DISTRNAME
\"
exit
1
fatal
"Do not known update command for
$PMTYPE
"
;;
esac
...
...
bin/epm-upgrade
View file @
31dc9aa8
...
...
@@ -39,7 +39,16 @@ epm_upgrade()
CMD
=
"zypper dist-upgrade"
;;
pacman
)
CMD
=
"zypper -S -u"
CMD
=
"pacman -S -u"
;;
emerge
)
CMD
=
"emerge -NuDa world"
;;
pkg_add
)
CMD
=
"freebsd-update fetch install"
;;
pkgtool
)
CMD
=
"slackpkg upgrade-all"
;;
*
)
fatal
"Do not known command for
$PMTYPE
"
...
...
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