Bug 37709 - bulkmarcimport.pl should die when the file cannot be opened
Summary: bulkmarcimport.pl should die when the file cannot be opened
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Julian Maurice
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-22 11:35 UTC by Nick Clemens (kidclamp)
Modified: 2024-11-18 22:55 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06
Circulation function:


Attachments
Bug 37709: Die and notify if file cannot be opened (1.53 KB, patch)
2024-08-22 11:37 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 37709: Die and notify if file cannot be opened (1.58 KB, patch)
2024-08-22 12:56 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 37709: Die and notify if file cannot be opened (1.64 KB, patch)
2024-10-04 07:50 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2024-08-22 11:35:31 UTC
To recreate:
1 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
2 - Output:
Characteristic MARC flavour: MARC21

0 MARC records done in 0.00804400444030762 seconds
Comment 1 Nick Clemens (kidclamp) 2024-08-22 11:37:26 UTC
Created attachment 170602 [details] [review]
Bug 37709: Die and notify if file cannot be opened

1 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
2 - Output:
    Characteristic MARC flavour: MARC21

    0 MARC records done in 0.00804400444030762 seconds
3 - Apply patch
4 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
5 - Output:
    Characteristic MARC flavour: MARC21
    Could not open notafile.mrc: No such file or directory at misc/migration_tools/bulkmarcimport.pl line 262.
Comment 2 Roman Dolny 2024-08-22 12:56:05 UTC
Created attachment 170608 [details] [review]
Bug 37709: Die and notify if file cannot be opened

1 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
2 - Output:
    Characteristic MARC flavour: MARC21

    0 MARC records done in 0.00804400444030762 seconds
3 - Apply patch
4 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
5 - Output:
    Characteristic MARC flavour: MARC21
    Could not open notafile.mrc: No such file or directory at misc/migration_tools/bulkmarcimport.pl line 262.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Julian Maurice 2024-10-04 07:50:54 UTC
Created attachment 172378 [details] [review]
Bug 37709: Die and notify if file cannot be opened

1 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
2 - Output:
    Characteristic MARC flavour: MARC21

    0 MARC records done in 0.00804400444030762 seconds
3 - Apply patch
4 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
5 - Output:
    Characteristic MARC flavour: MARC21
    Could not open notafile.mrc: No such file or directory at misc/migration_tools/bulkmarcimport.pl line 262.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 4 Katrin Fischer 2024-10-11 09:15:35 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 5 Lucas Gass (lukeg) 2024-11-18 22:55:45 UTC
Backported to 24.05.x for upcoming 24.05.06