return rc;
}
- umask(0); /* we know what we're doing */
-
/* Do this now so we can give error messages, even though we'll just
do it again after relocating everything */
headerGetEntry(h, RPMTAG_NAME, &type, (void **) &name, &fileCount);
return 2;
}
- if (labelFormat) {
- printf(labelFormat, name, version, release);
- fflush(stdout);
- }
-
rpmMessage(RPMMESS_DEBUG, "package: %s-%s-%s files test = %d\n",
name, version, release, flags & RPMINSTALL_TEST);
return 2;
}
+ if (labelFormat) {
+ printf(labelFormat, name, version, release);
+ fflush(stdout);
+ }
+
/* the file pointer for fd is pointing at the cpio archive */
if (installArchive(archivePrefix, fd, files, archiveFileCount, notify,
NULL, tmpPath,
sourceDir = rpmGetVar(RPMVAR_SOURCEDIR);
specDir = rpmGetVar(RPMVAR_SPECDIR);
- if (access(sourceDir, W_OK)) {
- rpmError(RPMERR_CREATE, "cannot write to %s", sourceDir);
- return 2;
- }
-
- if (access(specDir, W_OK)) {
- rpmError(RPMERR_CREATE, "cannot write to %s", specDir);
- return 2;
- }
-
realSourceDir = alloca(strlen(rootdir) + strlen(sourceDir) + 2);
strcpy(realSourceDir, rootdir);
strcat(realSourceDir, "/");
strcat(realSpecDir, "/");
strcat(realSpecDir, specDir);
+ if (access(realSourceDir, W_OK)) {
+ rpmError(RPMERR_CREATE, "cannot write to %s", realSourceDir);
+ return 2;
+ }
+
+ if (access(realSpecDir, W_OK)) {
+ rpmError(RPMERR_CREATE, "cannot write to %s", realSpecDir);
+ return 2;
+ }
+
rpmMessage(RPMMESS_DEBUG, "sources in: %s\n", realSourceDir);
rpmMessage(RPMMESS_DEBUG, "spec file in: %s\n", realSpecDir);