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
2f339897
Commit
2f339897
authored
May 23, 2025
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm print: allow use field/arch/version/release/name for foreign package
parent
c14bba1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
7 deletions
+38
-7
epm-print
bin/epm-print
+38
-7
No files found.
bin/epm-print
View file @
2f339897
...
@@ -70,11 +70,37 @@ dpkg_query_package_field()
...
@@ -70,11 +70,37 @@ dpkg_query_package_field()
#fi
#fi
}
}
__get_pmtype
()
{
local
pkg
=
"
$1
"
local
pmtype
=
"
$2
"
if
!
is_pkgfile
"
$1
"
;
then
echo
"
$pmtype
"
return
fi
case
$(
get_package_type
"
$pkg
"
)
in
rpm
)
echo
"fake-rpm"
return
;;
deb
)
echo
"fake-dpkg"
return
;;
esac
echo
"
$pmtype
"
return
}
query_package_field
()
query_package_field
()
{
{
local
field
=
"
$1
"
local
field
=
"
$1
"
shift
shift
case
$PMTYPE
in
local
pmtype
=
"
$(
__get_pmtype
"
$1
"
"
$PMTYPE
"
)
"
case
$pmtype
in
*
-dpkg
)
*
-dpkg
)
dpkg_query_package_field
"
$field
"
"
$@
"
dpkg_query_package_field
"
$field
"
"
$@
"
;;
;;
...
@@ -87,9 +113,10 @@ query_package_field()
...
@@ -87,9 +113,10 @@ query_package_field()
print_pkg_arch
()
print_pkg_arch
()
{
{
case
$PMTYPE
in
local
pmtype
=
"
$(
__get_pmtype
"
$1
"
"
$PMTYPE
"
)
"
case
$pmtype
in
*
-dpkg
)
*
-dpkg
)
dpkg_query_package_field
"Arch"
"
$@
"
|
sed
-e
"s|-.*||"
-e
"s|.*:||"
dpkg_query_package_field
"Arch
itecture
"
"
$@
"
|
sed
-e
"s|-.*||"
-e
"s|.*:||"
;;
;;
*
-rpm
)
*
-rpm
)
rpm_query_package_field
"arch"
"
$@
"
rpm_query_package_field
"arch"
"
$@
"
...
@@ -99,7 +126,8 @@ print_pkg_arch()
...
@@ -99,7 +126,8 @@ print_pkg_arch()
print_pkg_version
()
print_pkg_version
()
{
{
case
$PMTYPE
in
local
pmtype
=
"
$(
__get_pmtype
"
$1
"
"
$PMTYPE
"
)
"
case
$pmtype
in
*
-dpkg
)
*
-dpkg
)
dpkg_query_package_field
"Version"
"
$@
"
|
sed
-e
"s|-.*||"
-e
"s|.*:||"
dpkg_query_package_field
"Version"
"
$@
"
|
sed
-e
"s|-.*||"
-e
"s|.*:||"
;;
;;
...
@@ -111,7 +139,8 @@ print_pkg_version()
...
@@ -111,7 +139,8 @@ print_pkg_version()
print_pkg_release
()
print_pkg_release
()
{
{
case
$PMTYPE
in
local
pmtype
=
"
$(
__get_pmtype
"
$1
"
"
$PMTYPE
"
)
"
case
$pmtype
in
*
-dpkg
)
*
-dpkg
)
dpkg_query_package_field
"Version"
"
$@
"
|
sed
-e
"s|.*-||"
dpkg_query_package_field
"Version"
"
$@
"
|
sed
-e
"s|.*-||"
;;
;;
...
@@ -123,7 +152,8 @@ print_pkg_release()
...
@@ -123,7 +152,8 @@ print_pkg_release()
print_pkg_version_release
()
print_pkg_version_release
()
{
{
case
$PMTYPE
in
local
pmtype
=
"
$(
__get_pmtype
"
$1
"
"
$PMTYPE
"
)
"
case
$pmtype
in
*
-dpkg
)
*
-dpkg
)
dpkg_query_package_field
"Version"
"
$@
"
|
sed
-e
"s|.*:||"
dpkg_query_package_field
"Version"
"
$@
"
|
sed
-e
"s|.*:||"
;;
;;
...
@@ -135,7 +165,8 @@ print_pkg_version_release()
...
@@ -135,7 +165,8 @@ print_pkg_version_release()
print_pkg_name
()
print_pkg_name
()
{
{
case
$PMTYPE
in
local
pmtype
=
"
$(
__get_pmtype
"
$1
"
"
$PMTYPE
"
)
"
case
$pmtype
in
*
-dpkg
)
*
-dpkg
)
dpkg_query_package_field
"Package"
"
$@
"
dpkg_query_package_field
"Package"
"
$@
"
;;
;;
...
...
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