- for build operations and src.rpm install this is known
a = stpcpy(a, "./");
a = stpcpy(a, (flp->cpioPath + skipLen));
a++; /* skip apath NUL */
-
- if (flp->flags & RPMFILE_GHOST) {
- fi->actions[i] = FA_SKIP;
- continue;
- }
- fi->actions[i] = FA_COPYOUT;
}
if (fip)
*fip = fi;
fi->astriplen = 0;
fi->striplen = 0;
- for (i = 0; i < fi->fc; i++)
- fi->actions[i] = FA_CREATE;
-
i = fi->fc;
if (fi->h != NULL) { /* XXX can't happen */
fi->action = FA_UNKNOWN;
fi->flags = 0;
+ /* For build and src.rpm's the file actions are known at this point */
fi->actions = xcalloc(fi->fc, sizeof(*fi->actions));
+ if (isBuild) {
+ for (int i = 0; i < fi->fc; i++) {
+ int ghost = fi->fflags[i] & RPMFILE_GHOST;
+ fi->actions[i] = ghost ? FA_SKIP : FA_COPYOUT;
+ }
+ } else if (isSource) {
+ for (int i = 0; i < fi->fc; i++) {
+ fi->actions[i] = FA_CREATE;
+ }
+ }
/* XXX TR_REMOVED needs CPIO_MAP_{ABSOLUTE,ADDDOT} CPIO_ALL_HARDLINKS */