diff mbox series

[v2] Windows installer: keep dependency cache

Message ID 20230114184003.76193-1-arthur.sengileyev@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v2] Windows installer: keep dependency cache | expand

Commit Message

Arthur Sengileyev Jan. 14, 2023, 6:40 p.m. UTC
It should be possible to reuse cache built by previous iteration
to process next executables. Processed dependencies are already
skipped later based on dll name.

Changes for v2:
(1) changed variable name
(2) changed wording in description

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---
 scripts/nsis.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bin Meng Jan. 15, 2023, 3:16 p.m. UTC | #1
On Sun, Jan 15, 2023 at 2:40 AM Arthur Sengileyev
<arthur.sengileyev@gmail.com> wrote:
>
> It should be possible to reuse cache built by previous iteration
> to process next executables. Processed dependencies are already
> skipped later based on dll name.
>
> Changes for v2:
> (1) changed variable name
> (2) changed wording in description

The changelog should not be in the commit message.

>
> Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>  scripts/nsis.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/nsis.py b/scripts/nsis.py
> index 03ed7608a2..7cffba70ff 100644
> --- a/scripts/nsis.py
> +++ b/scripts/nsis.py
> @@ -91,12 +91,13 @@ def main():
>          print("Searching '%s' for the dependent dlls ..." % search_path)
>          dlldir = os.path.join(destdir + prefix, "dll")
>          os.mkdir(dlldir)
> +        deps_cache = set()
>
>          for exe in glob.glob(os.path.join(destdir + prefix, "*.exe")):
>              signcode(exe)
>
>              # find all dll dependencies
> -            deps = set(find_deps(exe, search_path, set()))
> +            deps = set(find_deps(exe, search_path, deps_cache))
>              deps.remove(exe)
>
>              # copy all dlls to the DLLDIR
> --

Regards,
Bin
Arthur Sengileyev Jan. 15, 2023, 3:19 p.m. UTC | #2
Will resubmit v3 fixing this. Sorry for this. This is my first time using
the mailing list to submit changes.

Regards,
Arthur

On Sun, Jan 15, 2023 at 5:16 PM Bin Meng <bmeng.cn@gmail.com> wrote:

> On Sun, Jan 15, 2023 at 2:40 AM Arthur Sengileyev
> <arthur.sengileyev@gmail.com> wrote:
> >
> > It should be possible to reuse cache built by previous iteration
> > to process next executables. Processed dependencies are already
> > skipped later based on dll name.
> >
> > Changes for v2:
> > (1) changed variable name
> > (2) changed wording in description
>
> The changelog should not be in the commit message.
>
> >
> > Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
> > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> > ---
> >  scripts/nsis.py | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/scripts/nsis.py b/scripts/nsis.py
> > index 03ed7608a2..7cffba70ff 100644
> > --- a/scripts/nsis.py
> > +++ b/scripts/nsis.py
> > @@ -91,12 +91,13 @@ def main():
> >          print("Searching '%s' for the dependent dlls ..." % search_path)
> >          dlldir = os.path.join(destdir + prefix, "dll")
> >          os.mkdir(dlldir)
> > +        deps_cache = set()
> >
> >          for exe in glob.glob(os.path.join(destdir + prefix, "*.exe")):
> >              signcode(exe)
> >
> >              # find all dll dependencies
> > -            deps = set(find_deps(exe, search_path, set()))
> > +            deps = set(find_deps(exe, search_path, deps_cache))
> >              deps.remove(exe)
> >
> >              # copy all dlls to the DLLDIR
> > --
>
> Regards,
> Bin
>
diff mbox series

Patch

diff --git a/scripts/nsis.py b/scripts/nsis.py
index 03ed7608a2..7cffba70ff 100644
--- a/scripts/nsis.py
+++ b/scripts/nsis.py
@@ -91,12 +91,13 @@  def main():
         print("Searching '%s' for the dependent dlls ..." % search_path)
         dlldir = os.path.join(destdir + prefix, "dll")
         os.mkdir(dlldir)
+        deps_cache = set()
 
         for exe in glob.glob(os.path.join(destdir + prefix, "*.exe")):
             signcode(exe)
 
             # find all dll dependencies
-            deps = set(find_deps(exe, search_path, set()))
+            deps = set(find_deps(exe, search_path, deps_cache))
             deps.remove(exe)
 
             # copy all dlls to the DLLDIR