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
1
Merge Requests
1
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
05e30a42
Commit
05e30a42
authored
Jan 15, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm info: support file path to show owning package info
parent
b558a52b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
epm-info
bin/epm-info
+30
-1
No files found.
bin/epm-info
View file @
05e30a42
...
...
@@ -18,6 +18,7 @@
#
load_helper epm-query
load_helper epm-query_file
epm_info_help
()
{
...
...
@@ -27,7 +28,8 @@ Usage: epm info [options] <package>'
echog
'Options:'
get_help HELPOPT
$SHAREDIR
/epm-info
echo
''
info
'Without options prints general package information.'
echog
'Without options prints general package information.'
echog
'If a file path is given, shows info for the package owning that file.'
}
__epm_info_rpm_low
()
...
...
@@ -179,6 +181,30 @@ esac
}
__epm_info_convert_to_pkgnames
()
{
local
f owner
pkg_files
=
pkg_names
=
for
f
in
$1
;
do
if
is_package_file
"
$f
"
;
then
[
-n
"
$pkg_files
"
]
&&
pkg_files
=
"
$pkg_files
$f
"
||
pkg_files
=
"
$f
"
elif
[
-e
"
$f
"
]
;
then
owner
=
"
$(
__do_query_real_file
"
$f
"
)
"
if
[
-n
"
$owner
"
]
;
then
info
'File $f belongs to package $owner'
[
-n
"
$pkg_names
"
]
&&
pkg_names
=
"
$pkg_names
$owner
"
||
pkg_names
=
"
$owner
"
else
warning
'Cannot find package owning $f'
return
1
fi
else
[
-n
"
$pkg_names
"
]
&&
pkg_names
=
"
$pkg_names
$f
"
||
pkg_names
=
"
$f
"
fi
done
pkg_filenames
=
$(
strip_spaces
"
$pkg_files
$pkg_names
"
)
}
# TODO: separate to _files and _names parts
# implement _files part per package, not by PMTYPE (see filelist)
epm_info
()
...
...
@@ -241,6 +267,9 @@ epm_info()
__handle_pkg_urls_to_checking
fi
# convert files/directories to package names
__epm_info_convert_to_pkgnames
"
$pkg_filenames
"
||
exit
if
[
-z
"
$pkg_filenames
"
]
;
then
epm_info_help
>
&2
exit
1
...
...
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