Commit 8e5efef9 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-print: improve print pkgsourcename

parent 926bde34
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2015, 2016, 2018 Etersoft # Copyright (C) 2015, 2016, 2018, 2020 Etersoft
# Copyright (C) 2008, 2015, 2016, 2018 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2008, 2015, 2016, 2018, 2020 Vitaly Lipatov <lav@etersoft.ru>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
...@@ -92,6 +92,29 @@ print_specname() ...@@ -92,6 +92,29 @@ print_specname()
print_srcpkgname() print_srcpkgname()
{ {
if [ -n "$FNFLAG" ] ; then
query_package_field sourcerpm "$@"
return
fi
# if PKFLAG
case $PMTYPE in
apt-dpkg)
fatal "Unknown command for get source package name via dpkg"
;;
urpm-rpm)
docmd urpmq --sourcerpm "$@"
return
;;
dnf-rpm)
showcmd dnf repoquery --qf '%{SOURCERPM}' "$@"
a= dnf repoquery --qf '%{SOURCERPM}' "$@"
return
;;
esac
# FIXME: only for installed rpm packages
query_package_field sourcerpm "$@" query_package_field sourcerpm "$@"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment