diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-11-19 16:25:24 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-11-19 16:25:24 +0200 |
commit | 43c5de66fb90cbc59dc23eb0774d66c66d34b37d (patch) | |
tree | 1e43219542c3ce060b4ce3c430a38aed45a62767 /build.c | |
parent | db4e34966ed9d52a920ab1b135309e6e21f12473 (diff) | |
download | rpm-43c5de66fb90cbc59dc23eb0774d66c66d34b37d.tar.gz rpm-43c5de66fb90cbc59dc23eb0774d66c66d34b37d.tar.bz2 rpm-43c5de66fb90cbc59dc23eb0774d66c66d34b37d.zip |
Replace all RPMERR_* etc uses with corresponding RPMLOG_* levels
Diffstat (limited to 'build.c')
-rw-r--r-- | build.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -56,7 +56,7 @@ static int isSpecFile(const char * specfile) fd = Fopen(specfile, "r.ufdio"); if (fd == NULL || Ferror(fd)) { - rpmlog(RPMERR_OPEN, _("Unable to open spec file %s: %s\n"), + rpmlog(RPMLOG_ERR, _("Unable to open spec file %s: %s\n"), specfile, Fstrerror(fd)); return 0; } @@ -133,7 +133,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) sprintf(cmd, "%s < '%s' | tar xOvf - Specfile 2>&1 > '%s'", zcmds[res & 0x3], arg, tmpSpecFile); if (!(fp = popen(cmd, "r"))) { - rpmlog(RPMERR_POPEN, _("Failed to open tar pipe: %m\n")); + rpmlog(RPMLOG_ERR, _("Failed to open tar pipe: %m\n")); specDir = _free(specDir); tmpSpecFile = _free(tmpSpecFile); return 1; @@ -145,14 +145,14 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) sprintf(cmd, "%s < '%s' | tar xOvf - --wildcards \\*.spec 2>&1 > '%s'", zcmds[res & 0x3], arg, tmpSpecFile); if (!(fp = popen(cmd, "r"))) { - rpmlog(RPMERR_POPEN, _("Failed to open tar pipe: %m\n")); + rpmlog(RPMLOG_ERR, _("Failed to open tar pipe: %m\n")); specDir = _free(specDir); tmpSpecFile = _free(tmpSpecFile); return 1; } if (!fgets(buf, sizeof(buf) - 1, fp)) { /* Give up */ - rpmlog(RPMERR_READ, _("Failed to read spec file from %s\n"), + rpmlog(RPMLOG_ERR, _("Failed to read spec file from %s\n"), arg); (void) unlink(tmpSpecFile); specDir = _free(specDir); @@ -180,7 +180,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) specDir = _free(specDir); if (res) { - rpmlog(RPMERR_RENAME, _("Failed to rename %s to %s: %m\n"), + rpmlog(RPMLOG_ERR, _("Failed to rename %s to %s: %m\n"), tmpSpecFile, s); (void) unlink(tmpSpecFile); tmpSpecFile = _free(tmpSpecFile); @@ -193,7 +193,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) if (*arg != '/') { if (!getcwd(buf, BUFSIZ)) { - rpmlog(RPMERR_STAT, "getcwd failed: %m\n"); + rpmlog(RPMLOG_ERR, "getcwd failed: %m\n"); return 1; } strcat(buf, "/"); @@ -214,7 +214,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) if (*specFile != '/') { char *s = alloca(BUFSIZ); if (!getcwd(s, BUFSIZ)) { - rpmlog(RPMERR_STAT, "getcwd failed: %m\n"); + rpmlog(RPMLOG_ERR, "getcwd failed: %m\n"); rc = 1; goto exit; } @@ -226,12 +226,12 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) if (specut != URL_IS_DASH) { struct stat st; if (Stat(specURL, &st) < 0) { - rpmlog(RPMERR_STAT, _("failed to stat %s: %m\n"), specURL); + rpmlog(RPMLOG_ERR, _("failed to stat %s: %m\n"), specURL); rc = 1; goto exit; } if (! S_ISREG(st.st_mode)) { - rpmlog(RPMERR_NOTREG, _("File %s is not a regular file.\n"), + rpmlog(RPMLOG_ERR, _("File %s is not a regular file.\n"), specURL); rc = 1; goto exit; @@ -239,7 +239,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) /* Try to verify that the file is actually a specfile */ if (!isSpecFile(specURL)) { - rpmlog(RPMERR_BADSPEC, + rpmlog(RPMLOG_ERR, _("File %s does not appear to be a specfile.\n"), specURL); rc = 1; goto exit; |