11 #define _RPMEVR_INTERNAL
17 #define SKIPWHITE(_x) {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;}
18 #define SKIPNONWHITE(_x){while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;}
24 const char *r, *re, *v, *ve;
34 tagflags |= RPMSENSE_PROVIDES;
38 tagflags |= RPMSENSE_OBSOLETES;
42 tagflags |= RPMSENSE_CONFLICTS;
46 tagflags |= RPMSENSE_CONFLICTS;
50 tagflags |= RPMSENSE_ANY;
54 tagflags |= RPMSENSE_TRIGGERPREIN;
58 tagflags |= RPMSENSE_TRIGGERIN;
62 tagflags |= RPMSENSE_TRIGGERPOSTUN;
66 tagflags |= RPMSENSE_TRIGGERUN;
71 tagflags |= RPMSENSE_MISSINGOK;
76 tagflags |= RPMSENSE_ANY;
80 tagflags |= RPMSENSE_PROVIDES;
84 tagflags |= RPMSENSE_OBSOLETES;
89 tagflags |= RPMSENSE_ANY;
94 for (r = field; *r !=
'\0'; r = re) {
113 if (!(
xisalnum(N[ix]) || N[ix] ==
'_' || N[ix] ==
'/'
114 || (nr > 5 && N[ix] ==
'%' && N[ix+1] ==
'{' && N[nr-1] ==
'}')))
117 _(
"line %d: Dependency \"%s\" must begin with alpha-numeric, '_' or '/': %s\n"),
135 if (F && r[0] ==
'/') {
137 _(
"line %d: Versioned file name not permitted: %s\n"),
157 while (v < ve && *v !=
'\0')
160 default: *t++ = *v++;
break;
177 if (!(nr > 3 && EVR[0] ==
'%' && EVR[1] ==
'{' && EVR[nr-1] ==
'}'))
179 memset(evr, 0,
sizeof(*evr));
181 evr->str =
_free(evr->str);
rpmlog(RPMLOG_ERR,"%s\n", buf)
#define RPMSENSE_SENSEMASK
static int xisalnum(int c)
int addReqProv(Spec spec, Header h, rpmTag tagN, const char *N, const char *EVR, rpmsenseFlags Flags, rpmuint32_t index)
Add dependency to header, filtering duplicates.
rpmsenseFlags rpmEVRflags(const char *op, const char **end)
Return comparison operator sense flags.
int rpmEVRparse(const char *evrstr, EVR_t evr)
Split EVR string into epoch, version, and release components.
enum rpmRC_e rpmRC
RPM return codes.
Yet Another syslog(3) API clone.
memset(_r, 0, sizeof(*_r))
enum evrFlags_e rpmsenseFlags
The structure used to store values parsed from a spec file.
This is the only module users of librpmbuild should need to include.
static void
Print copy of spec file, filling in Group/Description/Summary from specspo.
rpmRC parseRCPOT(Spec spec, Package pkg, const char *field, rpmTag tagN, rpmuint32_t index, rpmsenseFlags tagflags)
Parse dependency relations from spec file and/or autogenerated output buffer.
The structure used to store values for a package.
static void * _free(const void *p)
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.