[pkg-wine-party] Bug#714556: wine-bin-unstable: failed to update wineprefix, wine.inf: no such file or directory

Andrey Gursky andrey.gursky at e-mail.ua
Wed Jul 17 00:54:10 UTC 2013


Hi!

Here is how it got this way (for instance in 1.6rc4):

wine_init_argv0_path in libs/wine/config.c:
373	    bindir = get_runtime_bindir( argv0 );
(gdb) print bindir
$2 = 0x7bf03138 "/usr/bin"
Good.

379	        free( bindir );
(gdb)
No more bindir.

382	    if (libdir && !bindir && !build_dir)
(gdb)
384	        build_dir = running_from_build_dir( libdir );
(gdb)
385	        if (!build_dir) bindir = build_path( libdir, LIB_TO_BINDIR );
(gdb)
394	        if (libdir) dlldir = build_path( libdir, LIB_TO_DLLDIR );
(gdb) print bindir
$15 = 0x7bf03170 "/usr/lib/i386-linux-gnu/wine-unstable/wine"
Oh, bindir = dlldir

397	        if (bindir) datadir = build_path( bindir, BIN_TO_DATADIR );
(gdb)
398	        argv0_name = xstrdup( basename );
(gdb) print datadir
$25 = 0x7bf031d0
"/usr/lib/i386-linux-gnu/wine-unstable/wine/../share/wine-unstable"
Wrong datadir.

Now looking into wineserver.patch:
--- wine-unstable-1.6rc4.orig/libs/wine/Makefile.in	2013-07-12
02:43:40.688614425 +0200
+++ wine-unstable-1.6rc4/libs/wine/Makefile.in	2013-07-12
02:43:40.680614425 +0200
@@ -103,9 +103,9 @@ EXTRA_OBJS = version.o
 # Special defines needed for config.c

 CONFIGDIRS = \
-	-DBINDIR='"$(bindir)"' \
+	-DBINDIR='"$(dlldir)"' \
 	-DDLLDIR='"$(dlldir)"' \
-	-DLIB_TO_BINDIR=\"`$(RELPATH) $(libdir) $(bindir)`\" \
+	-DLIB_TO_BINDIR=\"`$(RELPATH) $(libdir) $(dlldir)`\" \
 	-DLIB_TO_DLLDIR=\"`$(RELPATH) $(libdir) $(dlldir)`\" \
 	-DBIN_TO_DLLDIR=\"`$(RELPATH) $(bindir) $(dlldir)`\" \
 	-DBIN_TO_DATADIR=\"`$(RELPATH) $(bindir) $(datadir)/wine$(DATASUFFIX)`\"

Aha. Without this patch we'd have:
bindir = /usr/bin
libdir = /usr/lib/i386-linux-gnu/wine-unstable
dlldir = /usr/lib/i386-linux-gnu/wine-unstable/wine
datadir = /usr/share
LIB_TO_BINDIR = ../../../bin
BIN_TO_DATADIR = ../share/wine-unstable
Thus
385	        if (!build_dir) bindir = build_path( libdir, LIB_TO_BINDIR );
would gives us
bindir = /usr/lib/i386-linux-gnu/wine-unstable/../../../bin
and
397	        if (bindir) datadir = build_path( bindir, BIN_TO_DATADIR );
would gives us
datadir = /usr/bin/../share/wine-unstable
That's where the wine.inf resides.

But after patch:
BINDIR='"$(dlldir)"'
LIB_TO_BINDIR = wine
Thus
385	        if (!build_dir) bindir = build_path( libdir, LIB_TO_BINDIR );
gives us
bindir = /usr/lib/i386-linux-gnu/wine-unstable/wine
and
397	        if (bindir) datadir = build_path( bindir, BIN_TO_DATADIR );
gives us
datadir = /usr/lib/i386-linux-gnu/wine-unstable/wine/../share/wine-unstable

I assume one should just replace also the rest:
- 	-DBIN_TO_DLLDIR=\"`$(RELPATH) $(bindir) $(dlldir)`\" \
+ 	-DBIN_TO_DLLDIR=\"`$(RELPATH) $(dlldir) $(dlldir)`\" \
- 	-DBIN_TO_DATADIR=\"`$(RELPATH) $(bindir) $(datadir)/wine$(DATASUFFIX)`\"
+ 	-DBIN_TO_DATADIR=\"`$(RELPATH) $(dlldir) $(datadir)/wine$(DATASUFFIX)`\"
which would give us the properly
datadir =  /usr/lib/i386-linux-gnu/wine-unstable/wine/../../../../share/wine-unstable

Regards,
Andrey



More information about the pkg-wine-party mailing list