[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: File relocation/dupe file checking



w/ --prefix=/ that results in:
"//bin/bash" (Yes, I have verified there is a "//" stored in the rpmdb and such, which is of course a non-defined POSIX path, but it works w/o problems on Linux...)



Hmmm, there's a call to rpmCleanPath() that needs to be added somewhere deep in
the relocate code.


I can look into that... if I find out where it goes I'll send a patch..


Patch attached below:


--- rpm-4.1.orig/lib/rpmfi.c    Sun Jan 26 05:51:45 2003
+++ rpm-4.1/lib/rpmfi.c Sun Jan 26 05:50:09 2003
@@ -816,8 +816,14 @@
            if (relocations[j].newPath) { /* Relocate the path */
                const char * s = relocations[j].newPath;
                char * t = alloca(strlen(s) + strlen(dirNames[i]) - len + 1);
+               size_t slen;

                (void) stpcpy( stpcpy(t, s) , dirNames[i] + len);
+               /* Unfortunatly rpmCleanPath strips the trailing slash.. */
+               (void)rpmCleanPath(t);
+               slen=strlen(t);
+               t[slen]='/';
+               t[slen+1]='\0';
                if (actions)
                    rpmMessage(RPMMESS_DEBUG,
                        _("relocating directory %s to %s\n"), dirNames[i], t);





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []