[csw-maintainers] [PATCH 4/5] checkpkg: Adding MakeCatalognameByPkgname

Ben Walton bwalton at opencsw.org
Sun Feb 13 03:23:18 CET 2011


Excerpts from Maciej Blizinski's message of Sat Feb 12 06:16:37 -0500 2011:

Hi Maciej,

> +def MakeCatalognameByPkgname(pkgname):
> +  catalogname = re.sub(r'^CSW', '', pkgname)
> +  catalogname = re.sub('[^A-Za-z0-9]', '_', catalogname)
> +  return catalogname
> diff --git a/gar/v2/lib/python/struct_util_test.py b/gar/v2/lib/python/struct_util_test.py
> index 98d9dbd..6046ed6 100755
> --- a/gar/v2/lib/python/struct_util_test.py
> +++ b/gar/v2/lib/python/struct_util_test.py
> @@ -47,5 +47,17 @@ class IndexByUnitTest(unittest.TestCase):
>          struct_util.ResolveSymlink("/opt/csw/bin/foo",
> "/libexec/foo-exec"))

This is good.  It doesn't force what the standard catalog name is, it
simply ensures that they match and tosses an error otherwise.  This
makes a good deal of sense to me.  Presumably there are other parts of
the code that look at things like 'devel' vs 'dev' etc?

I like the changes.

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302



More information about the maintainers mailing list