Commit ab1f2ba5 authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve opkg support

parent 2ccb246b
......@@ -254,6 +254,13 @@ case $PMTYPE in
fi
sudocmd xbps-remove -O
;;
opkg)
if [ -n "$dryrun" ] ; then
sudocmd opkg --noaction --autoremove
else
sudocmd opkg --autoremove
fi
;;
*)
fatal "Have no suitable command for $PMTYPE"
;;
......
#!/bin/sh
#
# Copyright (C) 2016-2017 Etersoft
# Copyright (C) 2016-2017 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2016-2018 Etersoft
# Copyright (C) 2016-2018 Vitaly Lipatov <lav@etersoft.ru>
#
# 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
......@@ -212,6 +212,9 @@ epm_download()
tce)
sudocmd tce-load -w $pkg_filenames
;;
opkg)
docmd opkg $pkg_filenames
;;
*)
fatal "Have no suitable command for $PMTYPE"
;;
......
#!/bin/sh
#
# Copyright (C) 2012-2017 Etersoft
# Copyright (C) 2012-2017 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2018 Etersoft
# Copyright (C) 2012-2018 Vitaly Lipatov <lav@etersoft.ru>
#
# 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
......@@ -140,6 +140,9 @@ __epm_filelist_name()
pkgng)
CMD="pkg info -l"
;;
opkg)
CMD="opkg files"
;;
xbps)
CMD="xbps-query -f"
;;
......
......@@ -139,7 +139,7 @@ case $PMTYPE in
docmd brew list | xargs -n1 echo
;;
opkg)
CMD="opkg list"
CMD="opkg list-installed"
;;
apk)
CMD="apk info"
......
......@@ -110,7 +110,7 @@ __do_query()
return
;;
opkg)
CMD="opkg files"
CMD="opkg search"
;;
xbps)
# FIXME: maybe it is search file?
......
......@@ -42,6 +42,9 @@ epm_reinstall_names()
pkgng)
sudocmd pkg install -f $@
return ;;
opkg)
sudocmd opkg --force-reinstall install $@
return ;;
slackpkg)
sudocmd_foreach "/usr/sbin/slackpkg reinstall" $@
return ;;
......
#!/bin/sh
#
# Copyright (C) 2012-2013, 2016 Etersoft
# Copyright (C) 2012-2013, 2016 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2013, 2016, 2018 Etersoft
# Copyright (C) 2012-2013, 2016, 2018 Vitaly Lipatov <lav@etersoft.ru>
#
# 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
......@@ -105,6 +105,9 @@ case $PMTYPE in
#CMD="pkg rquery '%dn-%dv'"
CMD="pkg info -d"
;;
opkg)
CMD="opkg depends"
;;
xbps)
CMD="xbps-query -x"
;;
......
#!/bin/sh
#
# Copyright (C) 2012, 2013, 2016-2017 Etersoft
# Copyright (C) 2012, 2013, 2016-2017 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2013, 2016-2018 Etersoft
# Copyright (C) 2012, 2013, 2016-2018 Vitaly Lipatov <lav@etersoft.ru>
#
# 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
......@@ -91,6 +91,9 @@ case $PMTYPE in
return
fi
;;
opkg)
CMD="opkg find"
;;
homebrew)
CMD="brew search"
;;
......
......@@ -84,7 +84,7 @@ case $PMTYPE in
CMD="/usr/sbin/slackpkg file-search"
;;
opkg)
CMD="opkg search"
CMD="opkg -A search"
;;
xbps)
CMD="xbps-query -Ro"
......
#!/bin/sh
#
# Copyright (C) 2012-2015 Etersoft
# Copyright (C) 2012-2015 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2015, 2018 Etersoft
# Copyright (C) 2012-2015, 2018 Vitaly Lipatov <lav@etersoft.ru>
#
# 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
......@@ -103,6 +103,9 @@ EOF
break
done
return $res ;;
opkg)
docmd --noaction install $filenames
return $res ;;
pacman)
LC_ALL=C store_output sudocmd pacman -v -S $filenames <<EOF
no
......
#!/bin/sh
#
# Copyright (C) 2013, 2016 Etersoft
# Copyright (C) 2013, 2016 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2013, 2016, 2018 Etersoft
# Copyright (C) 2013, 2016, 2018 Vitaly Lipatov <lav@etersoft.ru>
#
# 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
......@@ -59,6 +59,9 @@ case $PMTYPE in
aptcyg)
CMD="apt-cyg rdepends"
;;
opkg)
CMD="opkg whatdepends"
;;
xbps)
CMD="xbps-query -X"
;;
......
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