* [PATCH rebase] Fix handling of newly added non-rebaseable DLLs
@ 2022-07-18 14:17 Christian Franke
2022-07-18 15:09 ` Christian Franke
0 siblings, 1 reply; 3+ messages in thread
From: Christian Franke @ 2022-07-18 14:17 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 90 bytes --]
The current behavior in this (possibly rare) case is misleading.
--
Regards,
Christian
[-- Attachment #2: 0001-Fix-handling-of-newly-added-non-rebaseable-DLLs.patch --]
[-- Type: text/plain, Size: 1713 bytes --]
From 6a68800512ce80689efbf43e639e7c1f38371636 Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Mon, 18 Jul 2022 16:07:26 +0200
Subject: [PATCH] Fix handling of newly added non-rebaseable DLLs
Reset needs_rebasing flag to avoid that such a DLL is later removed
from the list due to rebase failure. Add related verbose messages.
---
rebase.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/rebase.c b/rebase.c
index 39759a9..56d743d 100644
--- a/rebase.c
+++ b/rebase.c
@@ -705,6 +705,16 @@ merge_image_info ()
if (verbose)
fprintf (stderr, "rebasing %s because not in database yet\n", img_info_list[i].name);
}
+ else if (img_info_list[i].flag.cannot_rebase == 1)
+ {
+ /* Not in database yet and not rebaseable. Add without rebasing. */
+ img_info_list[i].flag.needs_rebasing = 0;
+ if (verbose)
+ fprintf (stderr, "adding %s without rebasing because file is not writable\n",
+ img_info_list[i].name);
+ /* FIXME: Overlaps of DLLs in the database with this DLL will
+ not be detected below. */
+ }
}
}
if (!img_info_rebase_start || force_rebase_flag)
@@ -715,7 +725,12 @@ merge_image_info ()
{
/* Test DLLs already in database for writability. */
if (i < img_info_rebase_start)
- set_cannot_rebase (&img_info_list[i]);
+ {
+ set_cannot_rebase (&img_info_list[i]);
+ if (img_info_list[i].flag.cannot_rebase == 1 && verbose)
+ fprintf (stderr, "not rebasing %s because file is not writable\n",
+ img_info_list[i].name);
+ }
if (!img_info_list[i].flag.cannot_rebase)
{
img_info_list[i].base = 0;
--
2.37.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH rebase] Fix handling of newly added non-rebaseable DLLs
2022-07-18 14:17 [PATCH rebase] Fix handling of newly added non-rebaseable DLLs Christian Franke
@ 2022-07-18 15:09 ` Christian Franke
2022-07-18 20:55 ` Corinna Vinschen
0 siblings, 1 reply; 3+ messages in thread
From: Christian Franke @ 2022-07-18 15:09 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 82 bytes --]
Revised version which also handles the --oblivious case.
--
Regards,
Christian
[-- Attachment #2: 0001-Fix-handling-of-newly-added-non-rebaseable-DLLs.patch --]
[-- Type: text/plain, Size: 1743 bytes --]
From 19139e1b984eb3f4d11f83e6951c66064a2f2dd3 Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Mon, 18 Jul 2022 17:06:05 +0200
Subject: [PATCH] Fix handling of newly added non-rebaseable DLLs
Reset needs_rebasing flag to avoid that such a DLL is later removed
from the list due to rebase failure. Add related verbose messages.
---
rebase.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/rebase.c b/rebase.c
index 39759a9..1f9f74b 100644
--- a/rebase.c
+++ b/rebase.c
@@ -705,6 +705,17 @@ merge_image_info ()
if (verbose)
fprintf (stderr, "rebasing %s because not in database yet\n", img_info_list[i].name);
}
+ else if (img_info_list[i].flag.needs_rebasing)
+ {
+ /* Not in database yet and not rebaseable. Add without rebasing or
+ skip if --oblivious is active. */
+ img_info_list[i].flag.needs_rebasing = 0;
+ if (verbose)
+ fprintf (stderr, "not rebasing %s because file is not writable\n",
+ img_info_list[i].name);
+ /* FIXME: Overlaps of DLLs in the database with this DLL will
+ not be detected below. */
+ }
}
}
if (!img_info_rebase_start || force_rebase_flag)
@@ -715,7 +726,12 @@ merge_image_info ()
{
/* Test DLLs already in database for writability. */
if (i < img_info_rebase_start)
- set_cannot_rebase (&img_info_list[i]);
+ {
+ set_cannot_rebase (&img_info_list[i]);
+ if (img_info_list[i].flag.cannot_rebase == 1 && verbose)
+ fprintf (stderr, "not rebasing %s because file is not writable\n",
+ img_info_list[i].name);
+ }
if (!img_info_list[i].flag.cannot_rebase)
{
img_info_list[i].base = 0;
--
2.37.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH rebase] Fix handling of newly added non-rebaseable DLLs
2022-07-18 15:09 ` Christian Franke
@ 2022-07-18 20:55 ` Corinna Vinschen
0 siblings, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2022-07-18 20:55 UTC (permalink / raw)
To: cygwin-apps
On Jul 18 17:09, Christian Franke wrote:
> Revised version which also handles the --oblivious case.
>
> --
> Regards,
> Christian
>
> Reset needs_rebasing flag to avoid that such a DLL is later removed
> from the list due to rebase failure. Add related verbose messages.
Pushed. Do you have a few more changes in the loop? When you're
finished, I'll release a new rebase.
Thanks,
Corinna
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-18 20:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18 14:17 [PATCH rebase] Fix handling of newly added non-rebaseable DLLs Christian Franke
2022-07-18 15:09 ` Christian Franke
2022-07-18 20:55 ` Corinna Vinschen
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 read-only IMAP folder(s) and NNTP newsgroup(s).