summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-04-09 08:58:46 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-04-09 08:58:46 +0300
commit6c4b0cbd93709a0fa18af1ef07af44da585bb5f6 (patch)
treeb13a95d172b4747551f1d138eccf33b707d86303 /build
parent7c0b42146764c9ece60039de9cc1be36adb0f71c (diff)
downloadrpm-6c4b0cbd93709a0fa18af1ef07af44da585bb5f6.tar.gz
rpm-6c4b0cbd93709a0fa18af1ef07af44da585bb5f6.tar.bz2
rpm-6c4b0cbd93709a0fa18af1ef07af44da585bb5f6.zip
Rip the last remaining disk/file URL stuff in processSourceFiles()
Diffstat (limited to 'build')
-rw-r--r--build/files.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/build/files.c b/build/files.c
index 5ab544128..b21c8023c 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1767,7 +1767,7 @@ static rpmRC processPackageFiles(rpmSpec spec, Package pkg,
FILE * f;
FD_t fd;
- /* XXX W2DO? */
+ /* XXX W2DO? urlPath might be useful here. */
if (*pkg->fileFile == '/') {
ffn = rpmGetPath(pkg->fileFile, NULL);
} else {
@@ -2146,38 +2146,34 @@ int processSourceFiles(rpmSpec spec)
/* The first source file is the spec file */
x = 0;
for (fp = files; *fp != NULL; fp++) {
- const char * diskURL, *diskPath;
+ const char *diskPath;
FileListRec flp;
- diskURL = *fp;
- SKIPSPACE(diskURL);
- if (! *diskURL)
+ diskPath = *fp;
+ SKIPSPACE(diskPath);
+ if (! *diskPath)
continue;
flp = &fl.fileList[x];
flp->flags = isSpec ? RPMFILE_SPECFILE : 0;
/* files with leading ! are no source files */
- if (*diskURL == '!') {
+ if (*diskPath == '!') {
flp->flags |= RPMFILE_GHOST;
- diskURL++;
+ diskPath++;
}
- (void) urlPath(diskURL, &diskPath);
-
- flp->diskPath = xstrdup(diskURL);
+ flp->diskPath = xstrdup(diskPath);
diskPath = strrchr(diskPath, '/');
if (diskPath)
diskPath++;
- else
- diskPath = diskURL;
flp->cpioPath = xstrdup(diskPath);
flp->verifyFlags = RPMVERIFY_ALL;
- if (stat(diskURL, &flp->fl_st)) {
+ if (stat(diskPath, &flp->fl_st)) {
rpmlog(RPMLOG_ERR, _("Bad file: %s: %s\n"),
- diskURL, strerror(errno));
+ diskPath, strerror(errno));
fl.processingFailed = 1;
}
@@ -2200,7 +2196,7 @@ int processSourceFiles(rpmSpec spec)
fl.totalFileSize += flp->fl_size;
if (! (flp->uname && flp->gname)) {
- rpmlog(RPMLOG_ERR, _("Bad owner/group: %s\n"), diskURL);
+ rpmlog(RPMLOG_ERR, _("Bad owner/group: %s\n"), diskPath);
fl.processingFailed = 1;
}