31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From cc718978053dad85ea79a99cc10f0368a1fa1ac3 Mon Sep 17 00:00:00 2001
|
|
From: Jens Petersen <juhpetersen@gmail.com>
|
|
Date: Tue, 9 May 2023 14:39:54 +0800
|
|
Subject: [PATCH] install: correctly handle arch for installed packages (#4)
|
|
|
|
---
|
|
src/Install.hs | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/Install.hs b/src/Install.hs
|
|
index 4571703..cfa6771 100644
|
|
--- a/src/Install.hs
|
|
+++ b/src/Install.hs
|
|
@@ -295,12 +295,14 @@ decideRpms yes listmode mstrategy select prefix nvras = do
|
|
where
|
|
installExists :: NVRA -> IO (Maybe (Existence, NVRA))
|
|
installExists nvra = do
|
|
- minstalled <- cmdMaybe "rpm" ["-q", rpmName nvra]
|
|
+ -- FIXME this will fail for noarch changes
|
|
+ -- FIXME check kernel
|
|
+ minstalled <- cmdMaybe "rpm" ["-q", rpmName nvra <.> rpmArch nvra]
|
|
let existence =
|
|
case minstalled of
|
|
Nothing -> NotInstalled
|
|
Just installed ->
|
|
- if installed == showNVRA nvra
|
|
+ if showNVRA nvra `elem` lines installed
|
|
then ExistingNVR
|
|
else ChangedNVR
|
|
return $
|