Bug 11510 - rpm does not work wit --root option
Summary: rpm does not work wit --root option
Status: CLOSED DUPLICATE of bug 19382
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-05-18 17:44 UTC by mal
Modified: 2008-05-01 15:37 UTC (History)
0 users

Clone Of:
Last Closed: 2001-04-03 12:18:53 UTC

Attachments (Terms of Use)

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.


--- /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 ***

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