socsvn commit: r256826 - soc2013/mattbw/backend/jobs
mattbw at FreeBSD.org
mattbw at FreeBSD.org
Mon Sep 2 08:50:50 UTC 2013
Author: mattbw
Date: Mon Sep 2 08:50:50 2013
New Revision: 256826
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=256826
Log:
Use ident when setting pkgng job repo.
The above case does not work when repository names are given; they must be
idents.
Modified:
soc2013/mattbw/backend/jobs/do.c
Modified: soc2013/mattbw/backend/jobs/do.c
==============================================================================
--- soc2013/mattbw/backend/jobs/do.c Mon Sep 2 08:00:12 2013 (r256825)
+++ soc2013/mattbw/backend/jobs/do.c Mon Sep 2 08:50:50 2013 (r256826)
@@ -49,10 +49,8 @@
jobs_do(const struct jobs_spec *spec)
{
bool success;
-
struct pkgdb *db;
-
assert(spec != NULL);
assert(spec->backend != NULL);
assert(spec->info != NULL);
@@ -172,10 +170,11 @@
/* Nastily inefficient */
splits = pk_package_id_split(package_ids[i]);
- if (splits == NULL)
+ if (splits == NULL) {
repo = strdup("");
- else
+ } else {
repo = strdup(splits[PK_PACKAGE_ID_DATA]);
+ }
g_strfreev(splits);
success = jobs_do_same_repo(db, spec, package_ids + i,
@@ -242,12 +241,22 @@
const char *reponame)
{
bool success;
+ struct pkg_repo *repo;
assert(spec != NULL);
assert(jobs != NULL);
/* reponame can be NULL */
- success = jobs_set_repo(jobs, reponame);
+ success = true;
+
+ /*
+ * We need to convert the repo name to an ident. This is the only
+ * place an ident works but a name doesn't, it seems.
+ */
+ repo = pkg_repo_find_name(reponame);
+ if (repo != NULL) {
+ success = jobs_set_repo(jobs, pkg_repo_ident(repo));
+ }
if (!success) {
char *err_message;
More information about the svn-soc-all
mailing list