[pkg-wine-party] Bug#733859: /usr/lib/i386-linux-gnu/wine/bin/wine: Re: /usr/lib/i386-linux-gnu/wine/bin/wine: /usr/lib/i386-linux-gnu/wine/bin/wine32 is missing
Alexandre Bruyelles
alexandre.bruyelles at gmail.com
Wed Jan 1 14:31:20 UTC 2014
Package: wine32
Version: 1.6.1-10
Followup-For: Bug #733859
Dear Maintainer,
I guess I have found out the problem
I have written a small patch that will look out for symlink, before preloading the binary (see below).
PS: this bug refers to #733727, mea culpa
*** /tmp/main.patch
--- wine-1.6.1/loader/main.c 2013-11-15 20:30:24.000000000 +0100
+++ wine-good/loader/main.c 2014-01-01 15:22:41.618312694 +0100
@@ -209,6 +209,7 @@
int main( int argc, char *argv[] )
{
char error[1024];
+ char realfile[1024];
int i;
if (!getenv( "WINELOADERNOEXEC" )) /* first time around */
@@ -219,7 +220,15 @@
check_command_line( argc, argv );
if (pre_exec())
{
- wine_init_argv0_path( argv[0] );
+ // Try to find the real binary
+ // If readlink fails, it may be because loader is NOT a symlink
+ ssize_t len = readlink(argv[0], realfile, sizeof(realfile) - 1);
+ if(len != -1){
+ realfile[len] = '\0';
+ wine_init_argv0_path( realfile );
+ } else {
+ wine_init_argv0_path( argv[0] );
+ }
wine_exec_wine_binary( NULL, argv, getenv( "WINELOADER" ));
fprintf( stderr, "wine: could not exec the wine loader\n" );
exit(1);
More information about the pkg-wine-party
mailing list