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
bc73fd90
Commit
bc73fd90
authored
Apr 17, 2024
by
Boria138
Committed by
Vitaly Lipatov
Apr 25, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm packages: add --last argument (eterbug #17253)
parent
54b799ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
6 deletions
+51
-6
epm
bin/epm
+1
-4
epm-packages
bin/epm-packages
+50
-2
No files found.
bin/epm
View file @
bc73fd90
...
...
@@ -200,6 +200,7 @@ case $PROGNAME in
;;
epmqa
)
# HELPSHORT: alias for epm packages
epm_cmd
=
packages
direct_args
=
1
;;
epmqp
)
# HELPSHORT: alias for epm qp (epm query package)
epm_cmd
=
query_package
...
...
@@ -564,10 +565,6 @@ check_option()
--url
)
# HELPOPT: print only URL instead of download package
print_url
=
"--url"
;;
--sort
)
# HELPOPT: sort output, f.i. --sort=size (supported only for packages command)
# TODO: how to read arg?
sort
=
"
$1
"
;;
-y
|
--auto
|
--assumeyes
|
--non-interactive
|
--disable-interactivity
)
# HELPOPT: non interactive mode
non_interactive
=
"--auto"
interactive
=
""
...
...
bin/epm-packages
View file @
bc73fd90
...
...
@@ -19,9 +19,21 @@
load_helper epm-sh-warmup
__epm_packages_help
()
{
echo
"package management list"
get_help HELPCMD
$SHAREDIR
/epm-packages
cat
<<
EOF
Examples:
epm packages --sort
epm packages --sort=size
epm packages --last
EOF
}
__epm_packages_sort
()
{
# FIXME: sort depends on --sort value
case
$PMTYPE
in
*
-rpm
)
# FIXME: space with quotes problems, use point instead
...
...
@@ -38,6 +50,24 @@ case $PMTYPE in
esac
}
__epm_packages_last
()
{
case
$PMTYPE
in
*
-rpm
)
# FIXME: space with quotes problems, use point instead
warmup_rpmbase
docmd rpm
-qa
--last
;;
pacman
)
assure_exists expac
docmd expac
--timefmt
=
'%Y-%m-%d %T'
'%l\t%n %v'
|
sort
|
tail
-200
|
nl
;;
*
)
fatal
"Last package list function is not implemented for
$PMTYPE
"
;;
esac
}
__aptcyg_print_full
()
{
#showcmd apt-cyg show
...
...
@@ -54,7 +84,25 @@ __fo_pfn()
epm_packages
()
{
local
CMD
[
-n
"
$sort
"
]
&&
__epm_packages_sort
"
$@
"
&&
return
case
"
$1
"
in
-h
|
--help
|
help
)
# HELPCMD: help
__epm_packages_help
return
;;
--sort
=
size|--sort
)
# HELPCMD: list package(s) by size, most
__epm_packages_sort
return
;;
--last
|
--sort
=
time
)
# HELPCMD: list package(s) by install time, most
__epm_packages_last
return
;;
""
)
;;
*
)
fatal
"Unknown option
$1
. Use epm packages --help to get help."
esac
case
$PMTYPE
in
*
-dpkg
)
...
...
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