Commit da9db639 authored by TotallyNotElite's avatar TotallyNotElite

Add some more patches

parent 8d941e63
From 3705e3f8f8a40ed9b28e364c54f159eca93f346b Mon Sep 17 00:00:00 2001
From: TotallyNotElite <[email protected]>
Date: Tue, 7 Jan 2020 12:16:30 +0100
Subject: [PATCH] Don't install configs with priority 0 by default
---
src/Mhwd.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/Mhwd.cpp b/src/Mhwd.cpp
index 2ff7f72..2dcca04 100644
--- a/src/Mhwd.cpp
+++ b/src/Mhwd.cpp
@@ -1107,6 +1107,9 @@ int Mhwd::launch(int argc, char *argv[])
for (auto&& availableConfig : device->availableConfigs_)
{
+ // Never autoinstall drivers with priority 0 (vesa)
+ if (availableConfig->priority_ == 0)
+ continue;
if (autoConfigureNonFreeDriver || availableConfig->freedriver_)
{
config = availableConfig;
--
2.24.1
From dc4259ac25f400d3e0ace73848f09859da60b7dc Mon Sep 17 00:00:00 2001
From: TotallyNotElite <[email protected]>
Date: Tue, 7 Jan 2020 12:16:30 +0100
Subject: Don't install configs with priority 0 by default
---
src/Mhwd.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/Mhwd.cpp b/src/Mhwd.cpp
index 2ff7f72..2dcca04 100644
--- a/src/Mhwd.cpp
+++ b/src/Mhwd.cpp
@@ -1107,6 +1107,9 @@ int Mhwd::launch(int argc, char *argv[])
for (auto&& availableConfig : device->availableConfigs_)
{
+ // Never autoinstall drivers with priority 0 (vesa)
+ if (availableConfig->priority_ == 0)
+ continue;
if (autoConfigureNonFreeDriver || availableConfig->freedriver_)
{
config = availableConfig;
--
2.24.1
From 4a6e439563dbdc2debc84f824a7e4166cb17d45b Mon Sep 17 00:00:00 2001
From: TotallyNotElite <[email protected]>
Date: Wed, 8 Jan 2020 20:56:29 +0100
Subject: Add optional removal dependencies
---
scripts/MHWDCONFIG | 4 ++++
scripts/mhwd | 45 ++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/scripts/MHWDCONFIG b/scripts/MHWDCONFIG
index b1a5240..8e6804a 100644
--- a/scripts/MHWDCONFIG
+++ b/scripts/MHWDCONFIG
@@ -25,6 +25,10 @@ DEPENDS_32="..."
DEPENDS_64="lib32-..."
DEPKMOD="..."
+# Optional remove dependencies
+OPTREMDEPENDS="..."
+OPTREMDEPENDS_32="..."
+OPTREMDEPENDS_64="lib32-..."
# Conflicts
MHWDCONFLICTS="..."
diff --git a/scripts/mhwd b/scripts/mhwd
index d885246..9a62a62 100755
--- a/scripts/mhwd
+++ b/scripts/mhwd
@@ -268,7 +268,7 @@ if [ "${INSTALL}" == "true" ]; then
MHWD_CHECK_PKGS
if [ "${PACKAGES}" != "" ]; then
- ${PACMAN} -Rsu ${PACKAGES}
+ ${PACMAN} -Rs ${PACKAGES}
if [ "$?" -ne "0" ]; then
echo "Error: pacman failed!"
exit 1
@@ -277,6 +277,10 @@ if [ "${INSTALL}" == "true" ]; then
PACKAGES=""
+ [ "${OPTREMDEPENDS}" != "" ] && DEPENDS="${DEPENDS} ${OPTREMDEPENDS}"
+ [ "${OPTREMDEPENDS_32}" != "" ] && DEPENDS_32="${DEPENDS_32} ${OPTREMDEPENDS_32}"
+ [ "${OPTREMDEPENDS_64}" != "" ] && DEPENDS_64="${DEPENDS_64} ${OPTREMDEPENDS_64}"
+
# Install dependencies
if [ "${DEPENDS}" != "" ]; then
PACKAGES="${DEPENDS}"
@@ -316,6 +320,7 @@ if [ "${REMOVE}" == "true" ]; then
fi
PACKAGES=""
+ OPTREMPACKAGES=""
# Check for extramodules
MHWD_CHECK_KMODS
@@ -349,6 +354,44 @@ if [ "${REMOVE}" == "true" ]; then
fi
fi
+ PACKAGES=""
+
+ # Remove OPTREM dependencies
+ # Has to be run after normal dependencies were removed, since said dependencies may optionally depend on an OPTREM package
+ if [ "${OPTREMDEPENDS}" != "" ]; then
+ OPTREMPACKAGES="${OPTREMDEPENDS}"
+ fi
+ if [ "${ARCH}" == "i686" ] && [ "${OPTREMDEPENDS_32}" != "" ]; then
+ OPTREMPACKAGES="${PACKAGES} ${OPTREMDEPENDS_32}"
+ fi
+ if [ "${ARCH}" == "x86_64" ] && [ "${OPTREMDEPENDS_64}" != "" ]; then
+ if [ "${MHWD64_IS_LIB32}" == "true" ]; then
+ OPTREMPACKAGES="${PACKAGES} ${OPTREMDEPENDS_64}"
+ else
+ OPTREMPACKAGES="${PACKAGES}"
+ fi
+ fi
+
+ for PKG in "${OPTREMPACKAGES}"
+ do
+ # Check if package is needed anywhere, otherwise remove packages
+ # Usage of -Rsu is not enough, since pacman doesn't consider optional dependencies
+ if [ "$(pacman -Qi ${PKG} | egrep "Required By|Optional For" | awk '{ print $4}' | grep -v 'None')" == "" ]; then
+ PACKAGES="${PACKAGES} ${PKG}"
+ fi
+ done
+
+ # Check if packages are installed
+ MHWD_CHECK_PKGS
+
+ if [ "${PACKAGES}" != "" ]; then
+ ${PACMAN} -Rs ${PACKAGES}
+ if [ "$?" -ne "0" ]; then
+ echo "Error: pacman failed!"
+ exit 1
+ fi
+ fi
+
# Run postremove function
if [ "`grep "post_remove" "${CONFIGPATH}" | cut -d"#" -f1 | cut -d"(" -f1 | grep "post_remove"`" == "post_remove" ]; then
post_remove
--
2.24.1
From 2a83cd4e8bb26190eccbcdf4b1ce873ec31f6c42 Mon Sep 17 00:00:00 2001
From: TotallyNotElite <[email protected]>
Date: Tue, 7 Jan 2020 18:03:41 +0100
Subject: [PATCH] [video-modesetting] Replace default config video-vesa with video-modesetting
Subject: [video-modesetting] Replace default config video-vesa
with video-modesetting
---
pci/graphic_drivers/video-linux/MHWDCONFIG | 2 ++
......@@ -140,3 +141,30 @@ index 6513eeb..2098c44 100644
--
2.24.1
From 226a68b32c66c92e25d55addc923fe7c11e58088 Mon Sep 17 00:00:00 2001
From: TotallyNotElite <[email protected]>
Date: Wed, 8 Jan 2020 20:41:08 +0100
Subject: [video-virtualmachine] gtkmm3 as optremdepends
---
pci/graphic_drivers/video-virtualmachine/MHWDCONFIG | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pci/graphic_drivers/video-virtualmachine/MHWDCONFIG b/pci/graphic_drivers/video-virtualmachine/MHWDCONFIG
index c29226b..1c70f73 100644
--- a/pci/graphic_drivers/video-virtualmachine/MHWDCONFIG
+++ b/pci/graphic_drivers/video-virtualmachine/MHWDCONFIG
@@ -12,7 +12,8 @@ VENDORIDS="80ee 15AD"
DEVICEIDS="*"
# Dependencies, gtkmm3 is needed to enable copy/paste support with vmware
-DEPENDS="virtualbox-guest-utils xf86-video-vmware open-vm-tools xf86-input-vmmouse gtkmm3"
+DEPENDS="virtualbox-guest-utils xf86-video-vmware open-vm-tools xf86-input-vmmouse"
+OPTREMDEPENDS="gtkmm3"
DEPKMOD="virtualbox-guest-modules"
XDGAUTOSTARTFILE="/etc/xdg/autostart/mhwd-vmsvga-alert.desktop"
--
2.24.1
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