[csw-devel] SF.net SVN: gar:[8060] csw/mgar/gar/v2/bin/checkpkg.d/checkpkg.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Jan 18 00:12:00 CET 2010


Revision: 8060
          http://gar.svn.sourceforge.net/gar/?rev=8060&view=rev
Author:   wahwah
Date:     2010-01-17 23:12:00 +0000 (Sun, 17 Jan 2010)

Log Message:
-----------
mGAR v2: checkpkg, recognizing .pm files as Perl

Modified Paths:
--------------
    csw/mgar/gar/v2/bin/checkpkg.d/checkpkg.py

Modified: csw/mgar/gar/v2/bin/checkpkg.d/checkpkg.py
===================================================================
--- csw/mgar/gar/v2/bin/checkpkg.d/checkpkg.py	2010-01-17 22:42:37 UTC (rev 8059)
+++ csw/mgar/gar/v2/bin/checkpkg.d/checkpkg.py	2010-01-17 23:12:00 UTC (rev 8060)
@@ -28,6 +28,12 @@
 # This shared library is present on Solaris 10 on amd64, but it's missing on
 # Solaris 8 on i386.  It's okay if it's missing.
 ALLOWED_ORPHAN_SONAMES = set([u"libm.so.2"])
+DEPENDENCY_FILENAME_REGEXES = (
+    (r".*\.pl", u"CSWperl"),
+    (r".*\.pm", u"CSWperl"),
+    (r".*\.py", u"CSWpython"),
+    (r".*\.rb", u"CSWruby"),
+)
 
 REPORT_TMPL = u"""$pkgname:
 #if $missing_deps
@@ -337,12 +343,7 @@
 def GuessDepsByFilename(pkgname, pkg_by_any_filename):
   """Guesses dependencies based on filename regexes."""
   guessed_deps = set()
-  patterns = (
-      (r".*\.py", u"CSWpython"),
-      (r".*\.pl", u"CSWperl"),
-      (r".*\.rb", u"CSWruby"),
-  )
-  for pattern, dep_pkgname in patterns:
+  for pattern, dep_pkgname in DEPENDENCY_FILENAME_REGEXES:
     # If any file name matches, add the dep, go to the next pattern/pkg
     # combination.
     pattern_re = re.compile("^%s$" % pattern)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list