Bug 10127 - Printoverdues.sh should tar only pdf files
Summary: Printoverdues.sh should tar only pdf files
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-26 13:00 UTC by Sophie MEYNIEUX
Modified: 2014-12-07 20:02 UTC (History)
8 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:


Attachments
Bug 10127 : Printoverdues.sh should tar only pdf files (671 bytes, patch)
2013-04-26 13:07 UTC, Sophie MEYNIEUX
Details | Diff | Splinter Review
Bug 10127 : Printoverdues.sh should tar only pdf files (674 bytes, patch)
2013-06-18 15:46 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 10127 : Printoverdues.sh should tar only pdf files (728 bytes, patch)
2013-06-30 04:26 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 10127 : Printoverdues.sh should tar only pdf files (1.16 KB, patch)
2013-07-14 10:40 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Sophie MEYNIEUX 2013-04-26 13:00:37 UTC
At the end of printoverdues.sh, an archive is generated containing all files present in  directory given as parameter. 
As archives are generated in this given directory, they contain previously generated tar files, creating oversized files.

Only .pdf files should be archived
Comment 1 Sophie MEYNIEUX 2013-04-26 13:07:47 UTC Comment hidden (obsolete)
Comment 2 Sophie MEYNIEUX 2013-04-26 13:18:32 UTC
Test plan :

* you must have a directory with some *.html files inside (ideally some files generated by overdue_notices.pl with -html parameter or by gather_print_notices.pl)

Without the patch : 
* run several times (not the same day):
misc/cronjobs/printoverdues.sh <directory_path>
* look into the last generated tar file with 
tar tvf <my file>.tar.gz
=> you can see that the file contains *.tar.gz files

With the patch : 
* proceed as described above
=> you can see that the file only contains *.pdf file (and is smaller)
Comment 3 Sophie MEYNIEUX 2013-04-26 13:40:28 UTC
I am not quite sure if it is an enhancement or a bugfix
Comment 4 Robin Sheat 2013-04-28 23:17:44 UTC
I'd say it's a bugfix. Repeatedly archiving other archives sounds like a bug to me.
Comment 5 Katrin Fischer 2013-04-29 04:24:20 UTC
I agree with Robin - can we get a sign-of on this?
Comment 6 Kyle M Hall 2013-05-03 16:58:05 UTC
Tried to test. Pre-patch the nested tar.gz file are created. Post-patch no tar.gz files of any kind are created. Any ideas?
Comment 7 Fridolin Somers 2013-06-18 15:46:05 UTC Comment hidden (obsolete)
Comment 8 Chris Cormack 2013-06-30 04:26:22 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2013-07-14 10:40:45 UTC
Created attachment 19624 [details] [review]
[PASSED QA] Bug 10127 : Printoverdues.sh should tar only pdf files

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

From the bug report:
At the end of printoverdues.sh, an archive is generated
containing all files present in  directory given as parameter.
As archives are generated in this given directory, they
contain previously generated tar files, creating oversized files.
Only .pdf files should be archived

All tests and QA script pass.
Worked ok in my tests, only packign PDF in the given directory.
Comment 10 Galen Charlton 2013-07-16 15:47:32 UTC
Pushed to master.  Thanks, Sophie!
Comment 11 Tomás Cohen Arazi 2013-08-12 16:05:58 UTC
This patch has been pushed to 3.12.x, will be in 3.12.4.

Thanks Sophie!
Comment 12 Bernardo Gonzalez Kriegel 2013-08-13 13:33:08 UTC
Pushed to 3.10.x, will be in 3.10.10
Comment 13 Chris Hall 2013-08-20 09:53:29 UTC
Pushed to 3.8.x, will be in 3.8.17