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
563f545d
Commit
563f545d
authored
Nov 05, 2019
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add initial packagekit (pkcon) support
parent
ec11eef2
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
139 additions
and
67 deletions
+139
-67
epm-autoremove
bin/epm-autoremove
+3
-0
epm-check
bin/epm-check
+3
-0
epm-download
bin/epm-download
+4
-0
epm-filelist
bin/epm-filelist
+6
-0
epm-info
bin/epm-info
+30
-20
epm-install
bin/epm-install
+36
-34
epm-packages
bin/epm-packages
+3
-0
epm-policy
bin/epm-policy
+2
-2
epm-reinstall
bin/epm-reinstall
+4
-0
epm-release_upgrade
bin/epm-release_upgrade
+3
-0
epm-remove
bin/epm-remove
+9
-0
epm-repolist
bin/epm-repolist
+5
-2
epm-requires
bin/epm-requires
+5
-3
epm-search
bin/epm-search
+5
-2
epm-search_file
bin/epm-search_file
+5
-2
epm-sh-functions
bin/epm-sh-functions
+4
-0
epm-update
bin/epm-update
+3
-0
epm-upgrade
bin/epm-upgrade
+6
-2
epm-whatdepends
bin/epm-whatdepends
+3
-0
No files found.
bin/epm-autoremove
View file @
563f545d
...
...
@@ -197,6 +197,9 @@ case $PMTYPE in
fi
sudocmd aura
-Oj
;;
packagekit-
*
)
docmd pkcon repair
--autoremove
;;
yum-rpm
)
# cleanup orphanes?
while
true
;
do
...
...
bin/epm-check
View file @
563f545d
...
...
@@ -37,6 +37,9 @@ case $PMTYPE in
sudocmd apt-get
-f
install
||
return
#sudocmd apt-get autoremove
;;
packagekit-
*
)
docmd pkcon repair
;;
aptitude-dpkg
)
sudocmd aptitude
-f
install
||
return
#sudocmd apt-get autoremove
...
...
bin/epm-download
View file @
563f545d
...
...
@@ -198,6 +198,10 @@ epm_download()
aptcyg
)
sudocmd apt-cyg download
$pkg_filenames
;;
packagekit-
*
)
# TODO: force
docmd pkcon download
$pkg_filenames
;;
yum-rpm
)
# TODO: check yum install --downloadonly --downloaddir=/tmp <package-name>
assure_exists yumdownloader yum-utils
...
...
bin/epm-filelist
View file @
563f545d
...
...
@@ -67,6 +67,9 @@ __epm_filelist_remote()
fi
docmd_foreach __deb_local_content_filelist
"
$@
"
;;
packagekit-
*
)
docmd pkcon get-files
"
$@
"
;;
yum-rpm
)
assure_exists yum-utils
||
return
docmd repoquery
-q
-l
"
$@
"
...
...
@@ -120,6 +123,9 @@ __epm_filelist_name()
*
-dpkg
)
CMD
=
"dpkg -L"
;;
packagekit-
*
)
CMD
=
"pkcon get-files"
;;
android
)
CMD
=
"pm list packages -f"
;;
...
...
bin/epm-info
View file @
563f545d
#!/bin/sh
#
# Copyright (C) 2012, 2014, 2016 Etersoft
# Copyright (C) 2012, 2014, 2016 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2014, 2016
, 2019
Etersoft
# Copyright (C) 2012, 2014, 2016
, 2019
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -48,10 +48,6 @@ __epm_info_by_pkgtype()
__epm_info_by_pmtype
()
{
case
$PMTYPE
in
apt-rpm
)
__epm_info_rpm_low
&&
return
docmd apt-cache show
$pkg_names
;;
apt-dpkg
)
if
[
-n
"
$pkg_files
"
]
;
then
docmd dpkg
-I
$pkg_files
...
...
@@ -67,21 +63,35 @@ case $PMTYPE in
[
-z
"
$pkg_names
"
]
&&
return
docmd aptitude show
$pkg_names
;;
yum-rpm
)
__epm_info_rpm_low
&&
return
docmd yum info
$pkg_names
;;
urpmi-rpm
)
__epm_info_rpm_low
&&
return
docmd urpmq
-i
$pkg_names
;;
dnf-rpm
)
__epm_info_rpm_low
&&
return
docmd dnf info
$pkg_names
;;
zypper-rpm
)
*
-rpm
)
__epm_info_rpm_low
&&
return
docmd zypper info
$pkg_names
case
$PMTYPE
in
apt-rpm
)
docmd apt-cache show
$pkg_names
;;
packagekit-rpm
)
docmd pkcon get-details
$pkg_names
;;
yum-rpm
)
docmd yum info
$pkg_names
;;
urpmi-rpm
)
docmd urpmq
-i
$pkg_names
;;
dnf-rpm
)
docmd dnf info
$pkg_names
;;
zypper-rpm
)
docmd zypper info
$pkg_names
;;
*
)
warning
"Unknown command for
$PMTYPE
"
;;
esac
;;
packagekit-
*
)
# TODO: get-details-local
docmd pkcon get-details
$pkg_names
;;
pacman
)
is_installed
$pkg_names
&&
docmd pacman
-Qi
$pkg_names
&&
return
...
...
bin/epm-install
View file @
563f545d
#!/bin/sh
#
# Copyright (C) 2012-201
8
Etersoft
# Copyright (C) 2012-201
8
Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-201
9
Etersoft
# Copyright (C) 2012-201
9
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -129,6 +129,9 @@ epm_install_names()
urpm-rpm
)
sudocmd urpmi
$URPMOPTIONS
$@
return
;;
packagekit-
*
)
docmd pkcon
install
$@
return
;;
pkgsrc
)
sudocmd pkg_add
-r
$@
return
;;
...
...
@@ -230,6 +233,9 @@ epm_ni_install_names()
# FIXME: returns true ever no package found, need check for "no found", "Nothing to do."
yes
| sudocmd zypper
--non-interactive
$ZYPPEROPTIONS
install
$@
return
;;
packagekit-
*
)
docmd pkcon
install
--noninteractive
$@
return
;;
pkgsrc
)
sudocmd pkg_add
-r
$@
return
;;
...
...
@@ -315,9 +321,9 @@ epm_install_files()
# TODO: check read permissions
# sudo test -r FILE
# do not fallback to install_names if we have no permissions
case
"
$DISTRNAME
"
in
"ALTLinux"
)
case
$PMTYPE
in
apt-rpm
)
# TODO: replace with name changed function
__epm_check_if_try_install_deb
$@
&&
return
...
...
@@ -334,7 +340,9 @@ epm_install_files()
# use install_names
;;
esac
case
$PMTYPE
in
apt-dpkg|aptitude-dpkg
)
# the new version of the conf. file is installed with a .dpkg-dist suffix
if
[
-n
"
$non_interactive
"
]
;
then
...
...
@@ -358,34 +366,7 @@ epm_install_files()
return
;;
yum-rpm|dnf-rpm
)
__epm_check_if_try_install_deb
$@
&&
return
sudocmd rpm
-Uvh
$force
$nodeps
$@
&&
return
# if run with --nodeps, do not fallback on hi level
__epm_check_if_rpm_already_installed
$@
&&
return
[
-n
"
$nodeps
"
]
&&
return
YUMOPTIONS
=
--nogpgcheck
# use install_names
;;
zypper-rpm
)
__epm_check_if_try_install_deb
$@
&&
return
sudocmd rpm
-Uvh
$force
$nodeps
$@
&&
return
local
RES
=
$?
__epm_check_if_rpm_already_installed
$@
&&
return
# if run with --nodeps, do not fallback on hi level
[
-n
"
$nodeps
"
]
&&
return
$RES
ZYPPEROPTIONS
=
$(
__use_zypper_no_gpg_checks
)
# use install_names
;;
urpm-rpm
)
*
-rpm
)
__epm_check_if_try_install_deb
$@
&&
return
sudocmd rpm
-Uvh
$force
$nodeps
$@
&&
return
local
RES
=
$?
...
...
@@ -395,9 +376,27 @@ epm_install_files()
# if run with --nodeps, do not fallback on hi level
[
-n
"
$nodeps
"
]
&&
return
$RES
URPMOPTIONS
=
--no-verify-rpm
# use install_names
case
$PMTYPE
in
yum-rpm|dnf-rpm
)
YUMOPTIONS
=
--nogpgcheck
# use install_names
;;
zypper-rpm
)
ZYPPEROPTIONS
=
$(
__use_zypper_no_gpg_checks
)
# use install_names
;;
urpm-rpm
)
URPMOPTIONS
=
--no-verify-rpm
# use install_names
;;
*
)
# use install_names
;;
esac
;;
packagekit-
*
)
docmd pkcon install-local
$@
return
;;
pkgsrc
)
sudocmd pkg_add
$@
return
;;
...
...
@@ -518,6 +517,9 @@ epm_print_install_names_command()
zypper-rpm
)
echo
"zypper --non-interactive
$ZYPPEROPTIONS
install
$*
"
return
;;
packagekit-
*
)
echo
"pkcon --noninteractive
$*
"
return
;;
pacman
)
echo
"pacman -S --noconfirm
$force
$*
"
return
;;
...
...
bin/epm-packages
View file @
563f545d
...
...
@@ -84,6 +84,9 @@ case $PMTYPE in
[
-n
"
$short
"
]
&&
CMD
=
"rpm -qa --queryformat %{name}
\n
$pkg_filenames
"
docmd
$CMD
return
;;
packagekit-
*
)
docmd pkcon get-packages
--filter
installed
;;
emerge
)
CMD
=
"qlist -I -C"
# print with colors for console output
...
...
bin/epm-policy
View file @
563f545d
...
...
@@ -34,8 +34,8 @@ case $PMTYPE in
apt-rpm
)
docmd apt-cache policy
$pkg_names
;;
apt-dpkg
)
docmd
apt-cache policy
$pkg_names
packagekit-
*
)
docmd
pkcon resolve
$pkg_names
;;
*
)
fatal
"Have no suitable command for
$PMTYPE
"
...
...
bin/epm-reinstall
View file @
563f545d
...
...
@@ -33,6 +33,10 @@ epm_reinstall_names()
aptitude-dpkg
)
sudocmd aptitude reinstall
$@
return
;;
packagekit-
*
)
warning
"Please send me the correct command form for it"
docmd pkcon
install
--allow-reinstall
$@
return
;;
yum-rpm
)
sudocmd yum reinstall
$@
return
;;
...
...
bin/epm-release_upgrade
View file @
563f545d
...
...
@@ -326,6 +326,9 @@ epm_release_upgrade()
assure_exists
do
-release-upgrade
update-manager-core
sudocmd
do
-release-upgrade
;;
packagekit-
*
)
docmd pkcon upgrade-system
$pkg_filenames
;;
yum-rpm
)
docmd epm
install
rpm yum
sudocmd yum clean all
...
...
bin/epm-remove
View file @
563f545d
...
...
@@ -72,6 +72,9 @@ epm_remove_names()
apt-rpm
)
sudocmd apt-get remove
$APTOPTIONS
$@
return
;;
packagekit-
*
)
docmd pkcon remove
$@
return
;;
deepsolver-rpm
)
sudocmd ds-remove
$@
return
;;
...
...
@@ -164,6 +167,9 @@ epm_remove_nonint()
apt-rpm
)
sudocmd apt-get
-y
--force-yes
remove
$@
return
;;
packagekit-
*
)
docmd pkcon remove
--noninteractive
$@
return
;;
urpm-rpm
)
sudocmd urpme
--auto
$@
return
;;
...
...
@@ -204,6 +210,9 @@ epm_print_remove_command()
apt-dpkg|aptitude-dpkg
)
echo
"dpkg -P
$*
"
;;
packagekit-
*
)
echo
"pkcon remove --noninteractive
$*
"
;;
pkgsrc
)
echo
"pkg_delete -r
$*
"
;;
...
...
bin/epm-repolist
View file @
563f545d
#!/bin/sh
#
# Copyright (C) 2012, 2016 Etersoft
# Copyright (C) 2012, 2016 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2016
, 2019
Etersoft
# Copyright (C) 2012, 2016
, 2019
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -54,6 +54,9 @@ case $PMTYPE in
zypper-rpm
)
docmd zypper sl
-d
;;
packagekit-
*
)
docmd pkcon repo-list
;;
emerge
)
docmd eselect profile list
docmd layman
-L
...
...
bin/epm-requires
View file @
563f545d
#!/bin/sh
#
# Copyright (C) 2012-2013, 2016, 2018 Etersoft
# Copyright (C) 2012-2013, 2016, 2018 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2013, 2016, 2018
, 2019
Etersoft
# Copyright (C) 2012-2013, 2016, 2018
, 2019
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -61,7 +61,9 @@ case $PMTYPE in
#return
CMD
=
"apt-cache depends"
fi
;;
packagekit-
*
)
CMD
=
"pkcon required-by"
;;
#zypper-rpm)
# # FIXME: use hi level commands
...
...
bin/epm-search
View file @
563f545d
#!/bin/sh
#
# Copyright (C) 2012, 2013, 2016-201
8
Etersoft
# Copyright (C) 2012, 2013, 2016-201
8
Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2013, 2016-201
9
Etersoft
# Copyright (C) 2012, 2013, 2016-201
9
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -34,6 +34,9 @@ case $PMTYPE in
deepsolver-rpm
)
CMD
=
"ds-require --"
;;
packagekit-
*
)
CMD
=
"pkcon search name"
;;
urpm-rpm
)
# urpmq does not support --
CMD
=
"urpmq -y"
...
...
bin/epm-search_file
View file @
563f545d
#!/bin/sh
#
# Copyright (C) 2012, 2016, 2017 Etersoft
# Copyright (C) 2012, 2016, 2017 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2016, 2017
, 2019
Etersoft
# Copyright (C) 2012, 2016, 2017
, 2019
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -61,6 +61,9 @@ case $PMTYPE in
sudocmd apt-file update
docmd apt-file search
$pkg_filenames
return
;;
packagekit-
*
)
CMD
=
"pkcon search file"
;;
yum-rpm
)
# TODO
info
"Search by full packages list is not implemented yet"
...
...
bin/epm-sh-functions
View file @
563f545d
...
...
@@ -475,12 +475,16 @@ if [ -n "$FORCEPM" ] ; then
return
fi
# TODO: in more appropriate way
#which pkcon 2>/dev/null >/dev/null && info "You can run $ PMTYPE=packagekit epm to use packagekit backend"
# TODO: move it in distr_vendor?
# FIXME: some problems with multibased distros (Server Edition on CentOS and Desktop Edition on Ubuntu)
case
$DISTRNAME
in
ALTLinux
)
CMD
=
"apt-rpm"
#which ds-install 2>/dev/null >/dev/null && CMD=deepsolver-rpm
#which pkcon 2>/dev/null >/dev/null && CMD=packagekit-rpm
;;
PCLinux
)
CMD
=
"apt-rpm"
...
...
bin/epm-update
View file @
563f545d
...
...
@@ -38,6 +38,9 @@ case $PMTYPE in
#sudocmd apt-get -f install || exit
#sudocmd apt-get autoremove
;;
packagekit-
*
)
docmd pkcon refresh
;;
#snappy)
# sudocmd snappy
# ;;
...
...
bin/epm-upgrade
View file @
563f545d
#!/bin/sh
#
# Copyright (C) 2012, 2014, 2016 Etersoft
# Copyright (C) 2012, 2014, 2016 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2014, 2016
, 2019
Etersoft
# Copyright (C) 2012, 2014, 2016
, 2019
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -41,6 +41,10 @@ epm_upgrade()
aptitude-dpkg
)
CMD
=
"aptitude dist-upgrade"
;;
packagekit-
*
)
docmd pkcon update
return
;;
yum-rpm
)
local
OPTIONS
=
"
$(
subst_option non_interactive
-y
)
"
# can do update repobase automagically
...
...
bin/epm-whatdepends
View file @
563f545d
...
...
@@ -44,6 +44,9 @@ case $PMTYPE in
aptitude-dpkg
)
CMD
=
"aptitude why"
;;
packagekit-
*
)
CMD
=
"pkcon depends-on"
;;
yum-rpm
)
CMD
=
"repoquery --whatrequires"
;;
...
...
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