Bug 160817
Summary: | Several general changes to swatch; handling of quotes corrected | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | John Horne <john.horne> | ||||
Component: | swatch | Assignee: | Jose Pedro Oliveira <jose.p.oliveira.oss> | ||||
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 4 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-01-06 15:09:36 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
John Horne
2005-06-17 15:40:12 UTC
Created attachment 115614 [details]
Patch for swatch
I'm not an expert on producing patch files but hopefully this one is okay! I
used 'diff -ruN'.
John, Diff -ruN is fine for generating patches. I skimmed through your patch and I wouldn't change the regular expression that detects empty lines. The original one is better as it also ignores lines with only white spaces (the \s* should stay). ... @@ -569,8 +576,8 @@ s/^\s+//; ## strip off leading blank space s/\s+$//; ## strip off trailing blank space - ### Skip comments blank lines ### - next if (/^\#/ or /^\s*$/); + ### Skip comments and blank lines ### + next if (/^\#/ or /^$/); s/\#.*$//; ## strip trailing comments ... By the way, have you tried to send the patch to the author (http://swatch.sourceforge.net/) ? Regards, jpo No, the '\s*' is not required because the previous 2 lines remove trailing and leading blanks: s/^\s+//; ## strip off leading blank space s/\s+$//; ## strip off trailing blank space As such you can't possibly have a line with only spaces or tabs in it by the time you reach the 'next' statement. Yes I submitted the patch to the author at sourceforge - look at July 2004, patches '[ 986013 ] Fix exec command and awk option'. It wasn't picked up by the author, but has a comment by another user who had problems downloading the patch. I have, however, just downloaded the patch myself (again), and it is still fine - all there, no funny characters or anything. I've just noticed that there are one or two differences between the patch at sourceforge and the one I submitted here. I would use the patch submitted here because it was produced later, and it is what we have been using on FC3 and FC4 with no problems. John, Sorry for the delay. Could you build this SRPM http://gsd.di.uminho.pt/jpo/software/fedora/swatch-3.1.1-4.src.rpm http://gsd.di.uminho.pt/jpo/software/fedora/swatch.spec and give it a test run? TIA, jpo Built the RPM from the SRPM/spec file and installed it. Tested by sending some messages to the swatch monitored log files. All were detected fine - including the ones using "$0" :-) John. Built for FC-3, FC-4, and devel. |