SF.net SVN: gar:[23111] csw/mgar/gar/v2/lib/python
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Mar 2 22:38:48 CET 2014
Revision: 23111
http://sourceforge.net/p/gar/code/23111
Author: wahwah
Date: 2014-03-02 21:38:46 +0000 (Sun, 02 Mar 2014)
Log Message:
-----------
checkpkg: Remove quotations from original checkpkg
Quotations from the old checkpkg written in shell qre not necessary any
more.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/package_checks.py
csw/mgar/gar/v2/lib/python/package_checks_test.py
Modified: csw/mgar/gar/v2/lib/python/package_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks.py 2014-03-02 21:24:45 UTC (rev 23110)
+++ csw/mgar/gar/v2/lib/python/package_checks.py 2014-03-02 21:38:46 UTC (rev 23111)
@@ -492,39 +492,6 @@
def CheckPkginfoSanity(pkg_data, error_mgr, logger, messenger):
- """pkginfo sanity checks.
-
-if [ "$maintname" = "" ] ; then
- # the old format, in the DESC field
- maintname=`sed -n 's/^DESC=.*for CSW by //p' $TMPFILE`
-
- # Since the DESC field has been coopted, take
- # description from second half of NAME field now.
- desc=`sed -n 's/^NAME=[^ -]* - //p' $TMPFILE`
-else
- if [ "$desc" = "" ] ; then
- desc=`sed -n 's/^NAME=[^ -]* - //p' $TMPFILE`
- fi
-fi
-
-software=`sed -n 's/^NAME=\([^ -]*\) -.*$/\1/p' $TMPFILE`
-version=`sed -n 's/^VERSION=//p' $TMPFILE`
-desc=`sed -n 's/^DESC=//p' $TMPFILE`
-email=`sed -n 's/^EMAIL=//p' $TMPFILE`
-maintname=`sed -n 's/^VENDOR=.*for CSW by //p' $TMPFILE`
-hotline=`sed -n 's/^HOTLINE=//p' $TMPFILE`
-basedir=`sed -n 's/^BASEDIR=//p' $TMPFILE`
-pkgarch=`sed -n 's/^ARCH=//p' $TMPFILE|head -1`
-
-if [ "$software" = "" ] ; then errmsg $f: software field not set properly in NAME ; fi
-if [ "$pkgname" = "" ] ; then errmsg $f: pkgname field blank ; fi
-if [ "$desc" = "" ] ; then errmsg $f: no description in either NAME or DESC field ; fi
-if [ ${#desc} -gt 100 ] ; then errmsg $f: description greater than 100 chars ; fi
-if [ "$version" = "" ] ; then errmsg $f: VERSION field blank ; fi
-if [ "$maintname" = "" ] ; then errmsg $f: maintainer name not detected. Fill out VENDOR field properly ; fi
-if [ "$email" = "" ] ; then errmsg $f: EMAIL field blank ; fi
-if [ "$hotline" = "" ] ; then errmsg $f: HOTLINE field blank ; fi
- """
catalogname = pkg_data["basic_stats"]["catalogname"]
pkgname = pkg_data["basic_stats"]["pkgname"]
pkginfo = pkg_data["pkginfo"]
Modified: csw/mgar/gar/v2/lib/python/package_checks_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks_test.py 2014-03-02 21:24:45 UTC (rev 23110)
+++ csw/mgar/gar/v2/lib/python/package_checks_test.py 2014-03-02 21:38:46 UTC (rev 23111)
@@ -2634,8 +2634,7 @@
self.error_mgr_mock.ReportError('obsolete-dependency', 'CSWlibcups')
-class TestCheckBaseDirs(CheckTestHelper,
- unittest.TestCase):
+class TestCheckBaseDirs(CheckTestHelper, unittest.TestCase):
"""Test whether appropriate base directories are provided."""
FUNCTION_NAME = 'CheckBaseDirs'
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