[Interchange-bugs] [Bug 150] New - Fix for the regex in the expireall script
bugzilla-daemon@localhost.akopia.com
bugzilla-daemon@localhost.akopia.com
Tue, 13 Mar 2001 15:03:58 -0500
http://developer.akopia.com/bugs/show_bug.cgi?id=150
*** shadow/150 Tue Mar 13 15:03:58 2001
--- shadow/150.tmp.20431 Tue Mar 13 15:03:58 2001
***************
*** 0 ****
--- 1,45 ----
+ Bug#: 150
+ Product: Interchange
+ Version: 4.5.7
+ Platform: PC
+ OS/Version: Linux
+ Status: NEW
+ Resolution:
+ Severity: minor
+ Priority: P2
+ Component: Scripts
+ AssignedTo: __UNKNOWN__
+ ReportedBy: jpstewart@maxlingua.com
+ URL:
+ Cc:
+ Summary: Fix for the regex in the expireall script
+
+ The regex in the expireall script that reads in catalog names from the
+ interchange.cfg does not recognize the "." symbol as a valid character in a
+ catalog name. This is unfortunate because all my catalog names are domain1.dom,
+ domain2.dom, etc. I use these as catalog names because for multiple clients it
+ seems logical to use their domain names as catalog names too. Then everything
+ can be easily scripted! A catalog name in the form of "domain3.dom" seems to
+ work out in every other way. Therefore, I suggest a minor improvement of the
+ regex in question. I also took the liberty of removing the superfluous "_"
+ character in the regex ( it is included in the "\w" character class ).
+ Here is the patch:
+
+ *** expireall Tue Mar 13 12:58:31 2001
+ --- expireall.new Tue Mar 13 12:58:00 2001
+ ***************
+ *** 109,115 ****
+ @cfglines = grep !$seen{$_}++, @cfglines;
+
+ for(@cfglines) {
+ ! next unless /^\s*(?:sub)?catalog\s+([-\w_]+)/i;
+ push(@cats, $1);
+ }
+
+ --- 109,115 ----
+ @cfglines = grep !$seen{$_}++, @cfglines;
+
+ for(@cfglines) {
+ ! next unless /^\s*(?:sub)?catalog\s+([-\w\.]+)/i;
+ push(@cats, $1);
+ }