Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 11510

Summary: rpm does not work wit --root option
Product: [Retired] Red Hat Linux Reporter: mal
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-03 12:18:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mal 2000-05-18 17:44:47 UTC
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.

Vladislav

--- /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 23:39:04 UTC
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 16:06:26 UTC
Still under development, deferred yet again.

Comment 3 Jeff Johnson 2001-07-29 18:21:49 UTC
I'm including this problem with other --root problems.

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