Commit ab1f2ba5 authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve opkg support

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