- Fixes the long standing obscure behavior of missing %files
section causes build to complete without errors but without producing
any packages either. Packages without files in them are perfectly
valid (eg metapackages), requiring empty %files section for those
is just unnecessary spec noise.
- Remove %files section on one of the test-suite specs to create
a test-case for this as a side-effect.
- This of course introduces a slight incompatibility with older rpm's,
if compatibility is required then just add those empty %files in the
spec, they dont hurt anything but the readers eyes.
const char *a;
headerPutString(pkg->header, RPMTAG_SOURCERPM, spec->sourceRpmName);
- if (pkg->fileList == NULL)
- continue;
-
nvr = headerGetAsString(pkg->header, RPMTAG_NVRA);
rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr);
free(nvr);
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
char *fn;
- if (pkg->fileList == NULL)
- continue;
-
if ((rc = processScriptFiles(spec, pkg)))
return rc;
}
}
- pkg->fileList = newStringBuf();
-
if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) {
nextPart = PART_NONE;
} else if (rc < 0) {
p->header = headerNew();
p->autoProv = 1;
p->autoReq = 1;
+ p->fileList = newStringBuf();
if (spec->packages == NULL) {
spec->packages = p;
%clean
rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root,-)