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
Vladislav
eepm
Commits
34d80166
Commit
34d80166
authored
Apr 10, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm: drop less using
parent
54b0ade5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
+19
-17
epm-changelog
bin/epm-changelog
+9
-8
epm-filelist
bin/epm-filelist
+6
-5
epm-history
bin/epm-history
+4
-4
No files found.
bin/epm-changelog
View file @
34d80166
...
...
@@ -35,7 +35,7 @@ __epm_changelog_files()
case
$(
get_package_type
$1
)
in
rpm
)
assure_exists rpm
docmd_foreach
"rpm -q -p --changelog"
$@
| less
docmd_foreach
"rpm -q -p --changelog"
$@
;;
# deb)
#
...
...
@@ -52,17 +52,17 @@ __epm_changelog_local_names()
case
$PMTYPE
in
apt-rpm|yum-rpm|dnf-rpm|urpm-rpm|zypper-rpm
)
docmd_foreach
"rpm -q --changelog"
$@
| less
docmd_foreach
"rpm -q --changelog"
$@
;;
apt-dpkg|aptitude-dpkg
)
docmd zcat /usr/share/doc/
$1
/changelog.Debian.gz
| less
docmd zcat /usr/share/doc/
$1
/changelog.Debian.gz
;;
emerge
)
assure_exists equery
docmd equery changes
-f
$1
| less
docmd equery changes
-f
$1
;;
pacman
)
docmd pacman
-Qc
$1
| less
docmd pacman
-Qc
$1
;;
*
)
fatal
"Have no suitable command for
$PMTYPE
"
...
...
@@ -76,7 +76,7 @@ __epm_changelog_unlocal_names()
case
$PMTYPE
in
apt-rpm
)
__epm_changelog_apt
$@
| less
__epm_changelog_apt
"
$1
"
;;
#apt-dpkg)
# # FIXME: only first pkg
...
...
@@ -86,14 +86,14 @@ __epm_changelog_unlocal_names()
# sudocmd yum clean all
# ;;
urpm-rpm
)
docmd urpmq
--changelog
$@
| less
docmd urpmq
--changelog
"
$1
"
;;
#zypper-rpm)
# sudocmd zypper clean
# ;;
emerge
)
assure_exists equery
docmd equery changes
-f
$1
| less
docmd equery changes
-f
"
$1
"
;;
*
)
fatal
"Have no suitable command for
$PMTYPE
. Try install the package firstly."
...
...
@@ -109,6 +109,7 @@ epm_changelog()
__epm_changelog_files
$pkg_files
# TODO: add less or bat
local
pkg
for
pkg
in
$pkg_names
;
do
if
is_installed
$pkg
;
then
...
...
bin/epm-filelist
View file @
34d80166
...
...
@@ -32,7 +32,7 @@ __alt_local_content_filelist()
update_alt_contents_index
local
CI
=
"
$(
cat
$ALT_CONTENTS_INDEX_LIST
)
"
# TODO: safe way to use less
# TODO: safe way to use less
or bat
#local OUTCMD="less"
#[ -n "$USETTY" ] || OUTCMD="cat"
OUTCMD
=
"cat"
...
...
@@ -110,7 +110,8 @@ __epm_filelist_file()
;;
esac
docmd
$CMD
$@
| less
# TODO: add less
docmd
$CMD
$@
}
__epm_filelist_name
()
...
...
@@ -138,7 +139,7 @@ __epm_filelist_name()
CMD
=
"conary query --ls"
;;
pacman
)
docmd pacman
-Ql
$@
|
sed
-e
"s|.* ||g"
| less
docmd pacman
-Ql
$@
|
sed
-e
"s|.* ||g"
return
;;
emerge
)
...
...
@@ -167,7 +168,7 @@ __epm_filelist_name()
;;
slackpkg
)
is_installed
$@
||
fatal
"Query filelist for non installed packages is not implemented yet"
docmd
awk
'BEGIN{desk=1}{if(/^FILE LIST:$/){desk=0} else if (desk==0) {print}}'
/var/log/packages/
${
pkg_filenames
}*
| less
docmd
awk
'BEGIN{desk=1}{if(/^FILE LIST:$/){desk=0} else if (desk==0) {print}}'
/var/log/packages/
${
pkg_filenames
}*
return
;;
*
)
...
...
@@ -175,7 +176,7 @@ __epm_filelist_name()
;;
esac
# TODO: add less
# TODO: add less
or bat (for any output in the function)
docmd
$CMD
$@
&&
return
# TODO: may be we need check is installed before prev. line?
is_installed
$@
||
__epm_filelist_remote
$@
...
...
bin/epm-history
View file @
34d80166
...
...
@@ -118,19 +118,19 @@ if [ $PMTYPE = "apt-rpm" ] ; then
return
;;
--installed
)
# HELPCMD: print only new installed packages
__alt_epm_history_installed
| less
__alt_epm_history_installed
return
;;
--removed
)
# HELPCMD: print only removed packages
__alt_epm_history_removed
#| less
__alt_epm_history_removed
return
;;
--updated
)
# HELPCMD: print only updated packages
__alt_epm_history_updated
| less
__alt_epm_history_updated
return
;;
--list
)
# HELPCMD: (or empty) print all history entries
docmd journalctl
-t
apt-get
docmd journalctl
$JCHAN
return
;;
""
)
...
...
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