From 28616db2c57d3a65cc2a700759188659d9149572 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 24 Dec 2017 12:53:41 +0100 Subject: [PATCH] Replace smart usages with pkcon --- mambabase/mambabase.sh | 46 ++++++++++++++--------------- openmamba-update/openmamba-netsrpms | 6 ++-- openmamba-update/openmamba-update | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/mambabase/mambabase.sh b/mambabase/mambabase.sh index f6e8f6b..34c5e59 100644 --- a/mambabase/mambabase.sh +++ b/mambabase/mambabase.sh @@ -1,5 +1,5 @@ # openmamba post installation script -# Copyright (c) 2007-2015 by Silvan Calarco +# Copyright (c) 2007-2017 by Silvan Calarco # # Released under the terms of the GNU GPLv3 License @@ -42,8 +42,8 @@ function apt_parser() { exit 0 } -function apt_get_parsed() { - sudo smart $@ | apt_parser +function pkg_tool() { + pkcon $@ | apt_parser } DCOPID=$2 @@ -95,13 +95,13 @@ TOTAL_PROGRESS=10 if [ "$INSTALL_BASE" = "1" ]; then echo $"Installing openmamba base packages" dcop_write $"Updating packages list..." 10 - apt_get_parsed update + pkg_tool update dcop_write $"Removing packages that are no longer needed..." 10 - rpm -q msysklogd >/dev/null && apt_get_parsed remove -y msysklogd + rpm -q msysklogd >/dev/null && pkg_tool remove -y msysklogd dcop_write $"Installing/updating openmamba base packages..." 15 - rpm -q --whatprovides $BASE_PKGS >/dev/null || apt_get_parsed install -y $BASE_PKGS + rpm -q --whatprovides $BASE_PKGS >/dev/null || pkg_tool install -y $BASE_PKGS # first time: remove mambabase from autostart [ -e /home/$USER/.kde4/Autostart/mambabase.desktop ] && \ @@ -116,86 +116,86 @@ fi if [ "$INSTALL_UPDATE" = "1" ]; then echo $"Updating installed packages" dcop_write $"Updating installed packages..." 15 - apt_get_parsed upgrade -y + pkg_tool update -y fi if [ "$INSTALL_OFFICE" = "1" ]; then echo $"Installing Office packages" dcop_write $"Installing/updating Office packages..." 15 - rpm -q --whatprovides $OFFICE_PKGS >/dev/null || apt_get_parsed install -y $OFFICE_PKGS + rpm -q --whatprovides $OFFICE_PKGS >/dev/null || pkg_tool install -y $OFFICE_PKGS fi if [ "$INSTALL_PLAYERS" = "1" ]; then echo $"Installing Audio and Video players" dcop_write $"Installing/updating Audio and Video players..." 15 - rpm -q --whatprovides $MULTIMEDIA_PLAYERS_PKGS >/dev/null || apt_get_parsed install -y $MULTIMEDIA_PLAYERS_PKGS + rpm -q --whatprovides $MULTIMEDIA_PLAYERS_PKGS >/dev/null || pkg_tool install -y $MULTIMEDIA_PLAYERS_PKGS fi if [ "$INSTALL_MULTIMEDIA_EDITING" = "1" ]; then echo $"Installing multimedia editing and production packages" dcop_write $"Installing/updating multimedia editing and production packages..." 15 - rpm -q --whatprovides $MULTIMEDIA_EDITING_PKGS >/dev/null || apt_get_parsed install -y $MULTIMEDIA_EDITING_PKGS + rpm -q --whatprovides $MULTIMEDIA_EDITING_PKGS >/dev/null || pkg_tool install -y $MULTIMEDIA_EDITING_PKGS fi if [ "$INSTALL_INTERNET" = "1" ]; then echo $"Installing Internet packages" dcop_write $"Installing/updating Internet packages..." 15 - rpm -q --whatprovides $INTERNET_PKGS >/dev/null || apt_get_parsed install -y $INTERNET_PKGS + rpm -q --whatprovides $INTERNET_PKGS >/dev/null || pkg_tool install -y $INTERNET_PKGS fi if [ "$INSTALL_GRAPHICS" = "1" ]; then echo $"Installing Graphics packages" dcop_write $"Installing/updating Graphics packages..." 15 - rpm -q --whatprovides $GRAPHICS_PKGS >/dev/null || apt_get_parsed install -y $GRAPHICS_PKGS + rpm -q --whatprovides $GRAPHICS_PKGS >/dev/null || pkg_tool install -y $GRAPHICS_PKGS fi if [ "$INSTALL_GAMES" = "1" ]; then echo $"Installing Games packages" dcop_write $"Installing/updating Games packages..." 15 - rpm -q --whatprovides $GAMES_PKGS >/dev/null || apt_get_parsed install -y $GAMES_PKGS + rpm -q --whatprovides $GAMES_PKGS >/dev/null || pkg_tool install -y $GAMES_PKGS fi if [ "$INSTALL_VIRTUALIZATION" = "1" ]; then echo $"Installing Virtualization packages" dcop_write $"Installing/updating Virtualization packages..." 15 - rpm -q --whatprovides $VIRTUALIZATION_PKGS >/dev/null || apt_get_parsed install -y $VIRTUALIZATION_PKGS + rpm -q --whatprovides $VIRTUALIZATION_PKGS >/dev/null || pkg_tool install -y $VIRTUALIZATION_PKGS fi if [ "$INSTALL_SERVER" = "1" ]; then echo $"Installing Server packages" dcop_write $"Installing/updating Server packages..." 15 - rpm -q --whatprovides $SERVER_PKGS >/dev/null || apt_get_parsed install -y $SERVER_PKGS + rpm -q --whatprovides $SERVER_PKGS >/dev/null || pkg_tool install -y $SERVER_PKGS fi if [ "$INSTALL_DEVEL" = "1" ]; then echo $"Installing openmamba packages" dcop_write $"Installing/updating Development packages..." 15 - rpm -q --whatprovides $DEVEL_PKGS >/dev/null || apt_get_parsed install -y $DEVEL_PKGS + rpm -q --whatprovides $DEVEL_PKGS >/dev/null || pkg_tool install -y $DEVEL_PKGS fi if [ "$INSTALL_NVIDIA" = "1" ]; then echo $"Installing NVIDIA proprietary video driver (autodetected) packages" dcop_write $"Installing/updating NVIDIA proprietary video driver (autodetected) packages..." 10 NVIDIA_DETECTED=$(/sbin/nvidia-autoselect-driver | sed "s|.* ||") - rpm -q --whatprovides $NVIDIA_DETECTED >/dev/null || apt_get_parsed install -y $NVIDIA_DETECTED + rpm -q --whatprovides $NVIDIA_DETECTED >/dev/null || pkg_tool install -y $NVIDIA_DETECTED fi if [ "$INSTALL_FGLRX" = "1" ]; then echo $"Installing AMD/ATI proprietary video driver packages" dcop_write $"Installing/updating AMD/ATI proprietary video driver packages..." 10 - rpm -q --whatprovides xorg-drv-video-fglrx >/dev/null || apt_get_parsed install -y xorg-drv-video-fglrx + rpm -q --whatprovides xorg-drv-video-fglrx >/dev/null || pkg_tool install -y xorg-drv-video-fglrx fi if [ "$INSTALL_FGLRX_LEGACY" = "1" ]; then echo $"Installing AMD/ATI proprietary (legacy) video driver packages" dcop_write $"Installing/updating AMD/ATI proprietary (legacy) video driver packages..." 10 - rpm -q --whatprovides xorg-drv-video-fglrx-legacy >/dev/null || apt_get_parsed install -y xorg-drv-video-fglrx-legacy + rpm -q --whatprovides xorg-drv-video-fglrx-legacy >/dev/null || pkg_tool install -y xorg-drv-video-fglrx-legacy fi if [ "$INSTALL_BROADCOM_STA" = "1" ]; then echo $"Installing Broadcom proprietary wireless driver" dcop_write $"Installing Broadcom proprietary wireless driver..." 10 - rpm -q --whatprovides broadcom-sta >/dev/null || apt_get_parsed install -y broadcom-sta + rpm -q --whatprovides broadcom-sta >/dev/null || pkg_tool install -y broadcom-sta fi if [ "$INSTALL_B43" = "1" ]; then @@ -246,7 +246,7 @@ if [ "$INSTALL_MSTTCF" = "1" ]; then fi if [ "$INSTALL_SKYPE" = "1" ]; then - rpm -q libqt4 >/dev/null || apt_get_parsed install -y libqt4 + rpm -q libqt4 >/dev/null || pkg_tool install -y libqt4 dcop_write $"Installing Skype software..." 10 /usr/bin/openmamba-netsrpms skype fi @@ -258,12 +258,12 @@ fi if [ "$INSTALL_JRE" = "1" ]; then dcop_write $"Installing Sun Java Runtime Environment..." 10 - apt_get_parsed install -y $SUN_JAVA_RUNTIME_PKGS + pkg_tool install -y $SUN_JAVA_RUNTIME_PKGS fi if [ "$INSTALL_JDK" = "1" ]; then dcop_write $"Installing Sun Java Developers Kit..." 10 - apt_get_parsed install -y $SUN_JAVA_PKGS + pkg_tool install -y $SUN_JAVA_PKGS fi dcop_write $"Installation completed." -1 diff --git a/openmamba-update/openmamba-netsrpms b/openmamba-update/openmamba-netsrpms index b7e70e2..f15b194 100755 --- a/openmamba-update/openmamba-netsrpms +++ b/openmamba-update/openmamba-netsrpms @@ -2,7 +2,7 @@ # # netsrpm-install.sh - Build srpms that download sources from network # -# Copyright (C) 2003-2014 by Silvan Calarco +# Copyright (C) 2003-2017 by Silvan Calarco # Copyright (C) 2005 by Massimo Pintore # Copyright (C) 2005-2007 by Davide Madrisan @@ -135,9 +135,9 @@ for pckname in $PACKAGES; do # install rpm if [ "$FORCE_MODE" = "1" ]; then - sudo smart remove -y $pckname + pkcon remove -y $pckname fi - sudo smart install -y $RPM_PATH + pkcon install-local -y $RPM_PATH if [ $? -gt 0 ]; then echo "$me: "$"error installing \`$RPM_PATH'."" "$"Aborting..." >&2 check_if_already_installed $pckname diff --git a/openmamba-update/openmamba-update b/openmamba-update/openmamba-update index 548001f..befd7a3 100755 --- a/openmamba-update/openmamba-update +++ b/openmamba-update/openmamba-update @@ -22,7 +22,7 @@ function pkg_parser() { } function pkg_tool() { - sudo smart $@ | pkg_parser + pkcon $@ | pkg_parser } echo $"\