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
67a24504
Commit
67a24504
authored
Nov 03, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-filelist: add support for filelist of file package
parent
9cb26905
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
34 deletions
+66
-34
epm-filelist
bin/epm-filelist
+66
-34
No files found.
bin/epm-filelist
View file @
67a24504
...
...
@@ -20,41 +20,73 @@
load_helper epm-query
__epm_filelist_file
()
{
local
CMD
[
-z
"
$@
"
]
&&
return
case
$PMTYPE
in
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm
)
CMD
=
"rpm -qlp"
;;
apt-dpkg
)
CMD
=
"dpkg --contents"
;;
*
)
fatal
"Do not known query command for
$PMTYPE
"
;;
esac
docmd
$CMD
$@
}
__epm_filelist_name
()
{
local
CMD
[
-z
"
$@
"
]
&&
return
case
$PMTYPE
in
apt-rpm
)
CMD
=
"rpm -ql"
;;
apt-dpkg
)
CMD
=
"dpkg -L"
;;
yum-rpm
)
CMD
=
"rpm -ql"
;;
urpm-rpm
)
CMD
=
"rpm -ql"
;;
zypper-rpm
)
CMD
=
"rpm -ql"
;;
pacman
)
CMD
=
"pacman -Ql"
;;
slackpkg
)
epm_query
>
/dev/null
||
fatal
"Query filelist for non installed packages does not realized"
docmd
awk
'BEGIN{desk=1}{if(/^FILE LIST:$/){desk=0} else if (desk==0) {print}}'
/var/log/packages/
${
pkg_filenames
}*
return
;;
*
)
fatal
"Do not known query command for
$PMTYPE
"
;;
esac
docmd
$CMD
$pkg_names
&&
return
epm_query
>
/dev/null
||
fatal
"Query filelist for non installed packages does not realized"
}
epm_filelist
()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
case
$PMTYPE
in
apt-rpm
)
CMD
=
"rpm -ql"
;;
apt-dpkg
)
CMD
=
"dpkg -L"
;;
yum-rpm
)
CMD
=
"rpm -ql"
;;
urpm-rpm
)
CMD
=
"rpm -ql"
;;
zypper-rpm
)
CMD
=
"rpm -ql"
;;
pacman
)
CMD
=
"pacman -Ql"
;;
slackpkg
)
epm_query
>
/dev/null
||
fatal
"Query filelist for non installed packages does not realized"
docmd
awk
'BEGIN{desk=1}{if(/^FILE LIST:$/){desk=0} else if (desk==0) {print}}'
/var/log/packages/
${
pkg_filenames
}*
return
;;
*
)
fatal
"Do not known query command for
$PMTYPE
"
;;
esac
docmd
$CMD
$pkg_filenames
&&
return
epm_query
>
/dev/null
||
fatal
"Query filelist for non installed packages does not realized"
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
__epm_filelist_file
$pkg_files
||
return
__epm_filelist_name
$pkg_names
||
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