typedef struct rpmfcAttr_s {
char *name;
- regex_t *pattern;
+ regex_t *path;
regex_t *magic;
- regex_t *pattern_excl;
+ regex_t *path_excl;
regex_t *magic_excl;
ARGV_t flags;
} * rpmfcAttr;
free(flags);
attr->name = xstrdup(name);
- attr->pattern = rpmfcAttrReg(name, "pattern");
+ attr->path = rpmfcAttrReg(name, "path");
attr->magic = rpmfcAttrReg(name, "magic");
- attr->pattern_excl = rpmfcAttrReg(name, "exclude_pattern");
+ attr->path_excl = rpmfcAttrReg(name, "exclude_path");
attr->magic_excl = rpmfcAttrReg(name, "exclude_magic");
return attr;
static rpmfcAttr rpmfcAttrFree(rpmfcAttr attr)
{
if (attr) {
- if (attr->pattern) {
- regfree(attr->pattern);
- rfree(attr->pattern);
+ if (attr->path) {
+ regfree(attr->path);
+ rfree(attr->path);
}
if (attr->magic) {
regfree(attr->magic);
rfree(attr->magic);
}
- if (attr->pattern_excl) {
- regfree(attr->pattern_excl);
- rfree(attr->pattern_excl);
+ if (attr->path_excl) {
+ regfree(attr->path_excl);
+ rfree(attr->path_excl);
}
if (attr->magic_excl) {
regfree(attr->magic_excl);
/* Filter out path and magic exclude-matches */
if (regMatch((*attr)->magic_excl, ftype))
continue;
- if (regMatch((*attr)->pattern_excl, path))
+ if (regMatch((*attr)->path_excl, path))
continue;
/* Add attributes on libmagic type & path pattern matches */
if (regMatch((*attr)->magic, ftype))
argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name);
- if (regMatch((*attr)->pattern, path))
+ if (regMatch((*attr)->path, path))
argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name);
}
}
%__python_provides %{_rpmconfigdir}/pythondeps.sh --provides
%__python_requires %{_rpmconfigdir}/pythondeps.sh --requires
-%__python_pattern ^((/usr/lib(64)?/python[[:digit:]]\\.[[:digit:]]/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]\\.[[:digit:]]))$
+%__python_path ^((/usr/lib(64)?/python[[:digit:]]\\.[[:digit:]]/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]\\.[[:digit:]]))$
%__python_magic ^python.*(executable|byte-compiled)$
# %__myattr_requires path + args to requires finder script for <myattr>
# %__myattr_provides path + args to provides finder script for <myattr>
# %__myattr_magic libmagic classification match regex
-# %__myattr_pattern path based classification match regex
+# %__myattr_path path based classification match regex
# %__myattr_flags flags to control behavior (just "exeonly" for now)
# %__myattr_exclude_magic exclude by magic regex
-# %__myattr_exclude_pattern exclude by path regex
+# %__myattr_exclude_path exclude by path regex
#
%_fileattrsdir %{_rpmconfigdir}/fileattrs