reject("%s: Depends field is empty." % (file))
# Sanity-check the Provides field
- provides = re_spacestrip.sub('', control.Find("Provides"))
- if provides == '':
- reject("%s: Provides field is empty." % (file))
- prov_list = provides.split(",")
- for prov in prov_list:
- if not re_valid_pkg_name.match(prov):
- reject("%s: Invalid Provides field content %s." % (file, prov))
+ provides = control.Find("Provides")
+ if provides:
+ provide = re_spacestrip.sub('', provides)
+ if provide == '':
+ reject("%s: Provides field is empty." % (file))
+ prov_list = provide.split(",")
+ for prov in prov_list:
+ if not re_valid_pkg_name.match(prov):
+ reject("%s: Invalid Provides field content %s." % (file, prov))
# Check the section & priority match those given in the .changes (non-fatal)