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
Nurlan
eepm
Commits
baed4b38
Commit
baed4b38
authored
Jul 24, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-packages: add size sort support for rpm and dpkg
parent
7aaabf25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
epm
bin/epm
+3
-0
epm-packages
bin/epm-packages
+17
-0
No files found.
bin/epm
View file @
baed4b38
...
...
@@ -267,6 +267,9 @@ check_option()
--short
)
# HELPOPT: short output (just 'package' instead 'package-version-release')
short
=
"--short"
;;
--sort
)
# HELPOPT: sort output, f.i. --sort=size (supported only for packages command)
sort
=
"
$1
"
;;
--auto
)
# HELPOPT: non interactive mode
non_interactive
=
1
;;
...
...
bin/epm-packages
View file @
baed4b38
...
...
@@ -17,9 +17,26 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
__epm_packages_sort
()
{
# FIXME: sort depends on --sort value
case
$PMTYPE
in
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm|dnf-rpm
)
docmd rpm
-qa
--queryformat
"%{size} %{name}-%{version}-%{release}
\n
"
$pkg_filenames
|
sort
-n
;;
apt-dpkg
)
docmd dpkg-query
-W
--showformat
=
"
\$
{Size}
\$
{Package}-
\$
{Version}
\n
"
$pkg_filenames
|
sort
-n
;;
*
)
fatal
"Sorted package list are not realized for
$PMTYPE
"
;;
esac
}
epm_packages
()
{
local
CMD
[
-n
"
$sort
"
]
&&
__epm_packages_sort
&&
return
case
$PMTYPE
in
apt-rpm
)
...
...
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