Commit bcb434ab authored by Vitaly Lipatov's avatar Vitaly Lipatov

add Void Linux initial support

parent 66d8f76d
#!/bin/sh
# Author: Vitaly Lipatov <lav@etersoft.ru>
# 2007, 2009, 2010, 2012 (c) Etersoft
# 2007 Public domain
# 2007, 2009, 2010, 2012, 2016 (c) Etersoft
# 2007-2016 Public domain
# Detect the distro and version
# Welcome to send updates!
......@@ -32,6 +32,7 @@ rpmvendor()
[ "$DISTRIB_ID" = "AstraLinux" ] && echo "astra" && return
[ "$DISTRIB_ID" = "LinuxXP" ] && echo "lxp" && return
[ "$DISTRIB_ID" = "TinyCoreLinux" ] && echo "tcl" && return
[ "$DISTRIB_ID" = "VoidLinux" ] && echo "void" && return
echo "$DISTRIB_ID" | tr "[A-Z]" "[a-z]"
}
......@@ -55,6 +56,7 @@ pkgtype()
android) echo "apk" ;;
alpine) echo "apk" ;;
tinycorelinux) echo "tcz" ;;
voidlinux) echo "xbps" ;;
cygwin) echo "tar.xz" ;;
debian|ubuntu|mint|runtu|mcst|astra) echo "deb" ;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles)
......@@ -147,6 +149,11 @@ elif distro os-release && which tce-ab 2>/dev/null >/dev/null ; then
DISTRIB_ID="TinyCoreLinux"
DISTRIB_RELEASE="$VERSION_ID"
elif distro os-release && which xbps-query 2>/dev/null >/dev/null ; then
. $ROOTDIR/etc/os-release
DISTRIB_ID="VoidLinux"
DISTRIB_RELEASE="Live"
elif distro arch-release ; then
DISTRIB_ID="ArchLinux"
DISTRIB_RELEASE="2010"
......@@ -333,7 +340,7 @@ case $1 in
exit 0
;;
-V)
echo "20120519"
echo "20160822"
exit 0
;;
*)
......
......@@ -90,6 +90,9 @@ case $PMTYPE in
local PKGLIST=$(zypper packages --orphaned | tail -n +5 | cut -d \| -f 3 | sort -u)
sudocmd zypper remove --clean-deps $PKGLIST
;;
xbps)
CMD="xbps-remove -o"
;;
*)
fatal "Have no suitable command for $PMTYPE"
;;
......
......@@ -127,6 +127,9 @@ case $PMTYPE in
local PKGLIST=$(zypper packages --unneeded | tail -n +5 | cut -d \| -f 3 | sort -u)
sudocmd zypper remove --clean-deps $PKGLIST
;;
xbps)
CMD="xbps-remove -O"
;;
*)
fatal "Have no suitable command for $PMTYPE"
;;
......
......@@ -77,6 +77,9 @@ case $PMTYPE in
pkgng)
sudocmd pkg clean -a
;;
xbps)
sudocmd xbps-remove -O
;;
*)
fatal "Have no suitable command for $PMTYPE"
;;
......
#!/bin/sh
#
# Copyright (C) 2012-2015 Etersoft
# Copyright (C) 2012-2015 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2016 Etersoft
# Copyright (C) 2012-2016 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
......@@ -123,6 +123,9 @@ __epm_filelist_name()
pkgng)
CMD="pkg info -l"
;;
xbps)
CMD="xbps-query -f"
;;
aptcyg)
docmd apt-cyg listfiles $@ | sed -e "s|^|/|g"
return
......
#!/bin/sh
#
# Copyright (C) 2012,2014 Etersoft
# Copyright (C) 2012,2014 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2014, 2016 Etersoft
# Copyright (C) 2012, 2014, 2016 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 @@ case $PMTYPE in
pkgng)
docmd pkg info $pkg_names
;;
xbps)
docmd xbps-query --show $pkg_names
;;
homebrew)
docmd brew info $pkg_names
;;
......
......@@ -170,6 +170,9 @@ epm_install_names()
aptcyg)
sudocmd apt-cyg install $@
return ;;
xbps)
sudocmd xbps-install $@
return ;;
*)
fatal "Have no suitable install command for $PMTYPE"
;;
......@@ -235,6 +238,9 @@ epm_ni_install_names()
tce)
sudocmd tce-load -wi $@
return ;;
xbps)
sudocmd xbps-install -y $@
return ;;
#android)
# sudocmd pm install $@
# return ;;
......@@ -475,6 +481,10 @@ epm_print_install_command()
tce)
echo "tce-load -wi $@"
;;
xbps)
echo "xbps-install -y $@"
;;
*)
fatal "Have no suitable appropriate install command for $PMTYPE"
;;
......
#!/bin/sh
#
# Copyright (C) 2012 Etersoft
# Copyright (C) 2012 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2016 Etersoft
# Copyright (C) 2012, 2016 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
......@@ -131,6 +131,9 @@ case $PMTYPE in
guix)
CMD="guix package -I"
;;
xbps)
CMD="xbps-query -l"
;;
android)
CMD="pm list packages"
docmd $CMD | sed -e "s|^package:||g"
......
#!/bin/sh
#
# Copyright (C) 2009, 2012 Etersoft
# Copyright (C) 2009, 2012 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2009, 2012, 2016 Etersoft
# Copyright (C) 2009, 2012, 2016 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
......@@ -98,6 +98,10 @@ __do_query()
ipkg)
CMD="ipkg files"
;;
xbps)
# FIXME: maybe it is search file?
CMD="xbps-query -Ro"
;;
aptcyg)
#CMD="apt-cyg packageof"
# do not realized locally
......
#!/bin/sh
#
# Copyright (C) 2012-2014 Etersoft
# Copyright (C) 2012-2014 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2014, 2016 Etersoft
# Copyright (C) 2012-2014, 2016 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
......@@ -128,6 +128,9 @@ epm_remove_names()
aptcyg)
sudocmd apt-cyg remove $@
return ;;
xbps)
sudocmd xbps remove -R $@
return ;;
ipkg)
sudocmd ipkg $(subst_option force -force-depends) remove $@
return ;;
......@@ -171,6 +174,9 @@ epm_remove_nonint()
ipkg)
sudocmd ipkg -force-defaults remove $@
return ;;
xbps)
sudocmd xbps remove -y $@
return ;;
esac
return 5
}
......@@ -205,6 +211,9 @@ epm_print_remove_command()
aptcyg)
echo "apt-cyg remove $@"
;;
xbps)
echo "xbps remove -y $@"
;;
*)
fatal "Have no suitable appropriate remove command for $PMTYPE"
;;
......
......@@ -84,14 +84,18 @@ case $PMTYPE in
__fix_apt_sources_list /etc/apt/sources.list
__fix_apt_sources_list /etc/apt/sources.list.d/*.list
docmd apt-repo list
# FIXME: what the best place?
# rebuild rpm database
#sudocmd rm -fv /var/lib/rpm/__db*
#sudocmd rpm --rebuilddb
;;
yum-rpm|dnf-rpm)
sudocmd rm -fv /var/lib/rpm/__db*
sudocmd rpm --rebuilddb
# FIXME: what the best place?
#sudocmd rm -fv /var/lib/rpm/__db*
#sudocmd rpm --rebuilddb
;;
xbps)
sudocmd xbps-pkgdb -a
;;
*)
fatal "Have no suitable command for $PMTYPE"
......
#!/bin/sh
#
# Copyright (C) 2012 Etersoft
# Copyright (C) 2012 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2016 Etersoft
# Copyright (C) 2012, 2016 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
......@@ -58,6 +58,9 @@ case $PMTYPE in
docmd eselect profile list
docmd layman -L
;;
xbps)
docmd xbps-query -L
;;
pacman)
docmd grep -v -- "^#\|^$" /etc/pacman.conf
;;
......
......@@ -105,6 +105,9 @@ case $PMTYPE in
#CMD="pkg rquery '%dn-%dv'"
CMD="pkg info -d"
;;
xbps)
CMD="xbps-query -x"
;;
aptcyg)
#CMD="apt-cyg depends"
# print show version
......
#!/bin/sh
#
# Copyright (C) 2012,2013 Etersoft
# Copyright (C) 2012,2013 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2013, 2016 Etersoft
# Copyright (C) 2012, 2013, 2016 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
......@@ -97,6 +97,9 @@ case $PMTYPE in
aptcyg)
CMD="apt-cyg searchall"
;;
xbps)
CMD="xbps-query -s"
;;
*)
fatal "Have no suitable search command for $PMTYPE"
;;
......
......@@ -424,6 +424,8 @@ if [ -n "$FORCEPM" ] ; then
return
fi
# TODO: move it in distr_vendor?
# FIXME: some problems with multibased distros (Server Edition on CentOS and Desktop Edition on Ubuntu)
case $DISTRNAME in
ALTLinux)
CMD="apt-rpm"
......@@ -487,6 +489,9 @@ case $DISTRNAME in
TinyCoreLinux)
CMD="tce"
;;
VoidLinux)
CMD="xbps"
;;
*)
fatal "Have no suitable DISTRNAME $DISTRNAME"
;;
......
#!/bin/sh
#
# Copyright (C) 2012,2014 Etersoft
# Copyright (C) 2012,2014 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2014, 2016 Etersoft
# Copyright (C) 2012, 2014, 2016 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
......@@ -90,6 +90,9 @@ case $PMTYPE in
aptcyg)
sudocmd apt-cyg update
;;
xbps)
sudocmd xbps-install -S
;;
*)
fatal "Have no suitable update command for $PMTYPE"
;;
......
......@@ -97,6 +97,9 @@ epm_upgrade()
docmd_foreach "epm install" $(short=1 epm packages)
return
;;
xbps)
CMD="xbps-install -Su"
;;
*)
fatal "Have no suitable command for $PMTYPE"
;;
......
......@@ -56,6 +56,9 @@ case $PMTYPE in
aptcyg)
CMD="apt-cyg rdepends"
;;
xbps)
CMD="xbps-query -X"
;;
*)
fatal "Have no suitable command for $PMTYPE"
;;
......
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