Commit ba4b18fc authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm mark: resolve virtual packages before marking

parent ebdad28f
......@@ -17,6 +17,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
__epm_mark_resolve()
{
local i pkg
for i in "$@" ; do
pkg="$(epm query --short "$i" 2>/dev/null)" || { warning "Package '$i' is not installed" ; continue ; }
echo "$pkg"
done
}
__alt_mark_hold_package()
{
local pkg="$1"
......@@ -89,6 +98,11 @@ case $BASEDISTRNAME in
;;
esac
local resolved
resolved="$(__epm_mark_resolve "$@")" || return 1
[ -n "$resolved" ] || return 1
set -- $resolved
case $PMTYPE in
apt-dpkg)
sudocmd apt-mark hold "$@"
......@@ -124,6 +138,11 @@ case $BASEDISTRNAME in
;;
esac
local resolved
resolved="$(__epm_mark_resolve "$@")" || return 1
[ -n "$resolved" ] || return 1
set -- $resolved
case $PMTYPE in
apt-dpkg)
sudocmd apt-mark unhold "$@"
......@@ -212,6 +231,11 @@ epm_mark_showhold | grep -q "^$1$"
epm_mark_auto()
{
local resolved
resolved="$(__epm_mark_resolve "$@")" || return 1
[ -n "$resolved" ] || return 1
set -- $resolved
case $BASEDISTRNAME in
"alt")
sudocmd apt-mark auto "$@"
......@@ -246,6 +270,11 @@ esac
epm_mark_manual()
{
local resolved
resolved="$(__epm_mark_resolve "$@")" || return 1
[ -n "$resolved" ] || return 1
set -- $resolved
case $BASEDISTRNAME in
"alt")
sudocmd apt-mark manual "$@"
......
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