Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 11510 - rpm does not work wit --root option
rpm does not work wit --root option
Status: CLOSED DUPLICATE of bug 19382
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2000-05-18 13:44 EDT by mal
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-04-03 08:18:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description mal 2000-05-18 13:44:47 EDT
Current rpm 3.0.4  does not work when specifying
--root option. It adds it twice  to the path and screws up all filenames.
The following patch fixes the problem:
With the patch below everything is OK because
spec->buildRootURL already has spec->rootURL in the beginning.


--- /tmp/rpm-3.0.4/build/files.c        Tue Feb 22 06:14:59 2000
+++ rpm-3.0.4/build/files.c     Thu May 18 09:45:55 2000
@@ -1175,7 +1175,7 @@
     /* Init the file list structure */

     /* XXX spec->buildRootURL == NULL, then xstrdup("") is returned */
-    fl.buildRootURL = rpmGenPath(spec->rootURL, spec->buildRootURL, NULL);
+    fl.buildRootURL = rpmGenPath(NULL, spec->buildRootURL, NULL);

     if (headerGetEntry(pkg->header, RPMTAG_DEFAULTPREFIX,
                       NULL, (void **)&fl.prefix, NULL)) {
Comment 1 Jeff Johnson 2000-06-21 19:39:04 EDT
The semantics of --root on the build side of rpm are still under development.
The intent is to permit a URL (and possible path) to be prepended to a 
buildroot, and to perform a remote chroot on the path specified in the
--root URL. Hence the apparently double copy, which your patch undoes,
but breaks other things.
Comment 2 Jeff Johnson 2001-01-08 11:06:26 EST
Still under development, deferred yet again.
Comment 3 Jeff Johnson 2001-07-29 14:21:49 EDT
I'm including this problem with other --root problems.

*** This bug has been marked as a duplicate of 19382 ***

Note You need to log in before you can comment on or make changes to this bug.