From e6d9b9bb02d7a7103684a9036f6af89f763e6dad Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 1 Jun 2022 09:46:14 +0300 Subject: Document --root assumptions both in the manual and API Fixes: #2081 (cherry picked from commit 370c58746c3b8c178808aaa95e1acb009fc4a677) --- docs/man/rpm.8.md | 4 ++++ lib/rpmts.h | 5 +++++ 2 files changed, 9 insertions(+) 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) -- cgit v1.2.1