[Bug 16505] New: rebuild_zebra.pl skips updates if -x is passed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Bug ID: 16505 Summary: rebuild_zebra.pl skips updates if -x is passed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 51476 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51476&action=edit Bug 16505: <collection> is missing the marc namespace and updates fail if -x is passed Using rebuild_zerba.pl with the -x option switch, produces an incorrect output in terms of what our XSLTs expect for indexing. This patch introduces the right namespace information on the exported records so indexing succeeds. To test: - On current master, have some records on your db - Run: $ sudo koha-shell kohadev $ cd kohaclone $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x => you will get a message like this: NOTHING cleaned : the export /tmp/NL5ufjUfpp has been kept. - Run $ less /tmp/NL5ufjUfpp/biblio/exported_records => FAIL: The first line looks like this <?xml version="1.0" encoding="UTF-8"?><collection><record - Now run: $ xsltproc \ /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/NL5ufjUfpp/biblio/exported_records => FAIL: No output - Apply the patch - Run: $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x - Take a look at the result file: $ less /tmp/asdiouqwiue/biblio/exported_records => SUCCESS: The start of the file looks like this: <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"> - Run: $ xsltproc \ /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/asdiouqwiue/biblio/exported_records => SUCCESS: There is actually indexing data :-D - Sign off :-D Sponsored-by: American Numismatic Society -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Minor: use q{} instead of qq{} if you do not need to interpolate variables. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #2)
Minor: use q{} instead of qq{} if you do not need to interpolate variables.
Heh, yes. That's a leftover from the first approach, that changed things a bit more, so I delayed it for an enhancement bug. Good catch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51476|0 |1 is obsolete| | --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 51526 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51526&action=edit Bug 16505: <collection> is missing the marc namespace and updates fail if -x is passed Using rebuild_zerba.pl with the -x option switch, produces an incorrect output in terms of what our XSLTs expect for indexing. This patch introduces the right namespace information on the exported records so indexing succeeds. To test: - On current master, have some records on your db - Run: $ sudo koha-shell kohadev $ cd kohaclone $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x => you will get a message like this: NOTHING cleaned : the export /tmp/NL5ufjUfpp has been kept. - Run $ less /tmp/NL5ufjUfpp/biblio/exported_records => FAIL: The first line looks like this <?xml version="1.0" encoding="UTF-8"?><collection><record - Now run: $ xsltproc \ /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/NL5ufjUfpp/biblio/exported_records => FAIL: No output - Apply the patch - Run: $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x - Take a look at the result file: $ less /tmp/asdiouqwiue/biblio/exported_records => SUCCESS: The start of the file looks like this: <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"> - Run: $ xsltproc \ /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/asdiouqwiue/biblio/exported_records => SUCCESS: There is actually indexing data :-D - Sign off :-D Edit: I changed qq{} for q{} as suggested by Jonathan. Sponsored-by: American Numismatic Society -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16506 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16506 [Bug 16506] rebuild_zebra.pl still using USMARC as default -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51526|0 |1 is obsolete| | --- Comment #5 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 51543 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51543&action=edit [SIGNED-OFF] Bug 16505: <collection> is missing the marc namespace and updates fail if -x is passed Using rebuild_zerba.pl with the -x option switch, produces an incorrect output in terms of what our XSLTs expect for indexing. This patch introduces the right namespace information on the exported records so indexing succeeds. To test: - On current master, have some records on your db - Run: $ sudo koha-shell kohadev $ cd kohaclone $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x => you will get a message like this: NOTHING cleaned : the export /tmp/NL5ufjUfpp has been kept. - Run $ less /tmp/NL5ufjUfpp/biblio/exported_records => FAIL: The first line looks like this <?xml version="1.0" encoding="UTF-8"?><collection><record - Now run: $ xsltproc \ /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/NL5ufjUfpp/biblio/exported_records => FAIL: No output - Apply the patch - Run: $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x - Take a look at the result file: $ less /tmp/asdiouqwiue/biblio/exported_records => SUCCESS: The start of the file looks like this: <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"> - Run: $ xsltproc \ /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/asdiouqwiue/biblio/exported_records => SUCCESS: There is actually indexing data :-D - Sign off :-D Edit: I changed qq{} for q{} as suggested by Jonathan. Sponsored-by: American Numismatic Society Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works as described following test plan No errors -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #6 from David Cook <dcook@prosentient.com.au> --- When did this issue appear? I think rebuild_zebra.pl is working fine in 3.20.3? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51543|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51674 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51674&action=edit Bug 16505: <collection> is missing the marc namespace and updates fail if -x is passed Using rebuild_zerba.pl with the -x option switch, produces an incorrect output in terms of what our XSLTs expect for indexing. This patch introduces the right namespace information on the exported records so indexing succeeds. To test: - On current master, have some records on your db - Run: $ sudo koha-shell kohadev $ cd kohaclone $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x => you will get a message like this: NOTHING cleaned : the export /tmp/NL5ufjUfpp has been kept. - Run $ less /tmp/NL5ufjUfpp/biblio/exported_records => FAIL: The first line looks like this <?xml version="1.0" encoding="UTF-8"?><collection><record - Now run: $ xsltproc \ /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/NL5ufjUfpp/biblio/exported_records => FAIL: No output - Apply the patch - Run: $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x - Take a look at the result file: $ less /tmp/asdiouqwiue/biblio/exported_records => SUCCESS: The start of the file looks like this: <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"> - Run: $ xsltproc \ /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/asdiouqwiue/biblio/exported_records => SUCCESS: There is actually indexing data :-D - Sign off :-D Edit: I changed qq{} for q{} as suggested by Jonathan. Sponsored-by: American Numismatic Society Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works as described following test plan No errors Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51679 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51679&action=edit Bug 16505: Make sure $as_xml will not be used later -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.05, thanks Tomas! NOTE: Only the first patch was pushed. The second warning patch no longer applies. An updated patch should probably be pushed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Second patch has now been pushed! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #11 from Julian Maurice <julian.maurice@biblibre.com> --- This is weird, bug 16506 depends on the first patch of this bug, but the 2nd patch of this bug depends on bug 16506. They have been pushed to master in this order: 16505 (1st) -> 16506 (all) -> 16505 (2nd). I think the 2nd patch here belongs to bug 16506. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #12 from Julian Maurice <julian.maurice@biblibre.com> --- First patch pushed to 3.22.x, will be in 3.22.7 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16505 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Julian Maurice from comment #11)
This is weird, bug 16506 depends on the first patch of this bug, but the 2nd patch of this bug depends on bug 16506. They have been pushed to master in this order: 16505 (1st) -> 16506 (all) -> 16505 (2nd). I think the 2nd patch here belongs to bug 16506.
I take the blame for the circular bug dependency :-D And you are right about Jonathan's followup. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org