summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-06-01 09:46:14 +0300
committerMichal Domonkos <mdomonko@redhat.com>2022-07-01 10:52:14 +0200
commite6d9b9bb02d7a7103684a9036f6af89f763e6dad (patch)
treefe8ca0c75237defd04efd79bc9792201d1c13b85
parentf4d86a744016890e3a08e9e50616ff4cbae41333 (diff)
downloadrpm-e6d9b9bb02d7a7103684a9036f6af89f763e6dad.tar.gz
Document --root assumptions both in the manual and API
Fixes: #2081 (cherry picked from commit 370c58746c3b8c178808aaa95e1acb009fc4a677)
-rw-r--r--docs/man/rpm.8.md4
-rw-r--r--lib/rpmts.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/docs/man/rpm.8.md b/docs/man/rpm.8.md
index a643964ef..a8ea69225 100644
--- a/docs/man/rpm.8.md
+++ b/docs/man/rpm.8.md
@@ -205,6 +205,10 @@ These options can be used in all the different modes.
installing, or **%prep** if building, a package) will be run after a
chroot(2) to *DIRECTORY*.
+ Note that rpm assumes the environment inside the root is set up by
+ the caller, such as any mounts needed for the operation inside the
+ root directory.
+
**-D, \--define=\'***MACRO EXPR***\'**
: Defines *MACRO* with value *EXPR*.
diff --git a/lib/rpmts.h b/lib/rpmts.h
index eca179009..4908b36e4 100644
--- a/lib/rpmts.h
+++ b/lib/rpmts.h
@@ -453,6 +453,11 @@ const char * rpmtsRootDir(rpmts ts);
/** \ingroup rpmts
* Set transaction rootDir, i.e. path to chroot(2).
+ *
+ * Note that rpm assumes the environment inside the root is set up by
+ * the caller, such as any mounts needed for the operation inside the
+ * root directory.
+ *
* @param ts transaction set
* @param rootDir new transaction rootDir (or NULL)
* @return 0 on success, -1 on error (invalid rootDir)