Commit f22e8861 authored by Trent Piepho's avatar Trent Piepho Committed by Damien George

py/makeqstrdefs.py: Don't skip output for stale hash file.

In "cat" mode a "$output_file.hash" file is checked to see if the hash of
the new output is the same as the existing, and if so the output file isn't
updated.

However, it's possible that the output file has been deleted but the hash
file has not.  In this case the output file is not created.

Change the logic so that a hash file is considered stale if there is no
output file and still create the output.
Signed-off-by: default avatarTrent Piepho <tpiepho@gmail.com>
parent 0d93392f
...@@ -163,7 +163,7 @@ def cat_together(): ...@@ -163,7 +163,7 @@ def cat_together():
mode_full = "Module registrations" mode_full = "Module registrations"
elif args.mode == _MODE_ROOT_POINTER: elif args.mode == _MODE_ROOT_POINTER:
mode_full = "Root pointer registrations" mode_full = "Root pointer registrations"
if old_hash != new_hash: if old_hash != new_hash or not os.path.exists(args.output_file):
print(mode_full, "updated") print(mode_full, "updated")
try: try:
# rename below might fail if file exists # rename below might fail if file exists
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment