qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Mateusz Krawczuk <mat.krawczuk@gmail.com>
Cc: "John Snow" <jsnow@redhat.com>, "Cleber Rosa" <crosa@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>
Subject: Re: [PATCH] Add information how to fix common build error on Windows in symlink-install-tree
Date: Thu, 4 May 2023 08:51:09 +0200	[thread overview]
Message-ID: <6aa44584-3a3a-e1b8-db7d-04dbbd82e68e@redhat.com> (raw)
In-Reply-To: <20230503150855.1182-1-mat.krawczuk@gmail.com>

On 03/05/2023 17.08, Mateusz Krawczuk wrote:
> By default, Windows doesn't allow to create soft links for user account and only administrator is allowed to do this. To fix this problem you have to raise your permissions or enable Developer Mode, which available since Windows 10. Additional explanation when build fails will allow developer to fix the problem on his computer faster.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1386
> Signed-off-by: Mateusz Krawczuk <mat.krawczuk@gmail.com>
> ---
>   scripts/symlink-install-tree.py | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/scripts/symlink-install-tree.py b/scripts/symlink-install-tree.py
> index 67cb86dd52..bb3a2d708c 100644
> --- a/scripts/symlink-install-tree.py
> +++ b/scripts/symlink-install-tree.py
> @@ -7,12 +7,14 @@
>   import subprocess
>   import sys
>   
> +
>   def destdir_join(d1: str, d2: str) -> str:
>       if not d1:
>           return d2
>       # c:\destdir + c:\prefix must produce c:\destdir\prefix
>       return str(PurePath(d1, *PurePath(d2).parts[1:]))
>   
> +

Please avoid such white space damage. QEMU coding style is to use only one 
empty line between functions.

  Thomas


>   introspect = os.environ.get('MESONINTROSPECT')
>   out = subprocess.run([*introspect.split(' '), '--installed'],
>                        stdout=subprocess.PIPE, check=True).stdout
> @@ -28,5 +30,8 @@ def destdir_join(d1: str, d2: str) -> str:
>           os.symlink(source, bundle_dest)
>       except BaseException as e:
>           if not isinstance(e, OSError) or e.errno != errno.EEXIST:
> +            if os.name == 'nt':
> +                print('\nPlease enable Developer Mode to support soft link '
> +                      'without Administrator permission\n')
>               print(f'error making symbolic link {dest}', file=sys.stderr)
>               raise e



      reply	other threads:[~2023-05-04  6:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03 15:08 [PATCH] Add information how to fix common build error on Windows in symlink-install-tree Mateusz Krawczuk
2023-05-04  6:51 ` Thomas Huth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6aa44584-3a3a-e1b8-db7d-04dbbd82e68e@redhat.com \
    --to=thuth@redhat.com \
    --cc=berrange@redhat.com \
    --cc=crosa@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mat.krawczuk@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).