SHA256
1
0
forked from pool/supermin
supermin/0005-always-work-with-empty-root-in-zypp-driver.patch

43 lines
1.4 KiB
Diff

From 235933bb68a378cb48c5c740b97e5075975edf9a Mon Sep 17 00:00:00 2001
From: Olaf Hering <olaf@aepfle.de>
Date: Thu, 11 Apr 2013 16:36:40 +0200
Subject: always work with empty --root in zypp driver
The current mode of operation in the zypp driver is to download all
packages into a temporary pkg-cache-dir. Installed packages in the root
filesystem are ignored, otherwise zypper would download only a subset of
packages, and it would not provide a list of all required dependencies.
Remove the getuid check to force an empty root directory and use the
configured system repositories.
This works for root and non-root users.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
src/supermin_zypp_rpm.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/supermin_zypp_rpm.ml b/src/supermin_zypp_rpm.ml
index 51f01eb..2089837 100644
--- a/src/supermin_zypp_rpm.ml
+++ b/src/supermin_zypp_rpm.ml
@@ -50,7 +50,7 @@ pkg_cache_dir=%S
time zypper \
%s \
%s \
- %s \
+ --root %S --reposd-dir /etc/zypp/repos.d \
--cache-dir \"${cache_dir}\" \
--pkg-cache-dir \"${pkg_cache_dir}\" \
--gpg-auto-import-keys \
@@ -65,7 +65,7 @@ time zypper \
(if verbose then "--verbose --verbose" else "--quiet")
(match packager_config with None -> ""
| Some filename -> sprintf "--config %s" filename)
- (if Unix.getuid() > 0 then sprintf "--root %S --reposd-dir /etc/zypp/repos.d" tmp_root else "")
+ tmp_root
in
run_shell sh names;