socsvn commit: r255802 - soc2013/mattbw/backend
mattbw at FreeBSD.org
mattbw at FreeBSD.org
Sun Aug 11 09:38:41 UTC 2013
Author: mattbw
Date: Sun Aug 11 09:38:41 2013
New Revision: 255802
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=255802
Log:
Use type_of_repo_name in jobs.
This fixes a bug whereby the job repository being '' would break the
set-repository-of-jobs code.
Testing shows that the new error messages aren't working, so more
creativity is required.
Modified:
soc2013/mattbw/backend/jobs.c
Modified: soc2013/mattbw/backend/jobs.c
==============================================================================
--- soc2013/mattbw/backend/jobs.c Sun Aug 11 09:30:46 2013 (r255801)
+++ soc2013/mattbw/backend/jobs.c Sun Aug 11 09:38:41 2013 (r255802)
@@ -29,7 +29,7 @@
#include "db.h" /* db_... */
#include "event.h" /* event_cb */
-#include "utils.h" /* ERR */
+#include "utils.h" /* ERR, type_of_repo_name */
#include "jobs.h" /* jobs_... */
#include "jobs/check.h" /* jobs_check_... */
#include "pkgutils.h" /* pkgutils_... */
@@ -79,22 +79,19 @@
bool
jobs_set_repo(struct pkg_jobs *jobs, const char *reponame)
{
- bool is_remote;
bool success;
- success = true;
+ assert(jobs != NULL);
- is_remote = (reponame != NULL && strcmp(reponame, "installed") != 0);
+ success = true;
- if (is_remote) {
+ if (type_of_repo_name(reponame) == REPO_REMOTE) {
int err;
err = pkg_jobs_set_repository(jobs, reponame);
success = (err == EPKG_OK);
}
- assert(is_remote || success == true);
-
return success;
}
More information about the svn-soc-all
mailing list