aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/pkg/files
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2017-12-04 21:32:01 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2017-12-04 21:32:01 +0000
commitd389ce1e3ec9c7154c5a90a3b9809775aeb56b10 (patch)
treec1cedcaf0d107978800534f241db3fe051aa60a1 /ports-mgmt/pkg/files
parente68441c15775ac7da2dd43ef70c1e43836773363 (diff)
downloadports-d389ce1e3ec9c7154c5a90a3b9809775aeb56b10.tar.gz
ports-d389ce1e3ec9c7154c5a90a3b9809775aeb56b10.zip
Notes
Diffstat (limited to 'ports-mgmt/pkg/files')
-rw-r--r--ports-mgmt/pkg/files/0001-Do-not-use-the-origin-at-all-anymore-when-looking-fo.patch114
-rw-r--r--ports-mgmt/pkg/files/0002-Fix-finding-ports-updates-with-flavors.patch64
2 files changed, 0 insertions, 178 deletions
diff --git a/ports-mgmt/pkg/files/0001-Do-not-use-the-origin-at-all-anymore-when-looking-fo.patch b/ports-mgmt/pkg/files/0001-Do-not-use-the-origin-at-all-anymore-when-looking-fo.patch
deleted file mode 100644
index bdaf0b172ac1..000000000000
--- a/ports-mgmt/pkg/files/0001-Do-not-use-the-origin-at-all-anymore-when-looking-fo.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 7242a137ae73ad0da08d57c09901219179b19b14 Mon Sep 17 00:00:00 2001
-From: Baptiste Daroussin <bapt@FreeBSD.org>
-Date: Fri, 1 Dec 2017 14:26:59 +0100
-Subject: [PATCH 1/2] Do not use the origin at all anymore when looking for new
- version from the INDEX files, this makes finding new version of flavoured
- ports working again
-
----
- src/version.c | 33 +++++++++++----------------------
- 1 file changed, 11 insertions(+), 22 deletions(-)
-
-diff --git a/src/version.c b/src/version.c
-index ee955bef..75d9e922 100644
---- a/src/version.c
-+++ b/src/version.c
-@@ -56,7 +56,7 @@
- extern char **environ;
-
- struct index_entry {
-- char *origin;
-+ char *name;
- char *version;
- };
-
-@@ -286,10 +286,10 @@ hash_indexfile(const char *indexfilename)
- FILE *indexfile;
- kh_index_t *index = NULL;
- struct index_entry *entry;
-- char *version, *origin;
-- char *line = NULL, *l, *p;
-+ char *version, *name;
-+ char *line = NULL, *l;
- size_t linecap = 0;
-- int dirs, ret;
-+ int ret;
- khint_t k;
-
-
-@@ -306,40 +306,30 @@ hash_indexfile(const char *indexfilename)
- l = line;
-
- version = strsep(&l, "|");
-+ name = version;
- version = strrchr(version, '-');
- version[0] = '\0';
- version++;
-
-- origin = strsep(&l, "|");
-- for (dirs = 0, p = l; p > origin; p--) {
-- if ( p[-1] == '/' ) {
-- dirs++;
-- if (dirs == 2) {
-- origin = p;
-- break;
-- }
-- }
-- }
--
- entry = malloc(sizeof(struct index_entry));
- if (entry != NULL) {
-+ entry->name = strdup(name);
- entry->version = strdup(version);
-- entry->origin = strdup(origin);
- }
-
- if (entry == NULL || entry->version == NULL ||
-- entry->origin == NULL)
-+ entry->name == NULL)
- err(EX_SOFTWARE, "Out of memory while reading %s",
- indexfilename);
-
- if (index == NULL)
- index = kh_init_index();
-- k = kh_put_index(index, entry->origin, &ret);
-+ k = kh_put_index(index, entry->name, &ret);
- if (ret != 0) {
- kh_value(index, k) = entry;
- } else {
-- free(entry->origin);
- free(entry->version);
-+ free(entry->name);
- free(entry);
- }
- }
-@@ -381,8 +371,8 @@ free_index(kh_index_t *index)
- return;
-
- kh_foreach_value(index, entry, {
-- free(entry->origin);
- free(entry->version);
-+ free(entry->name);
- free(entry);
- });
- kh_destroy_index(index);
-@@ -460,7 +450,7 @@ do_source_index(unsigned int opt, char limchar, char *pattern, match_t match,
- strcmp(name, matchname) != 0)
- continue;
-
-- k = kh_get_index(index, origin);
-+ k = kh_get_index(index, name);
- print_version(pkg, "index",
- k != kh_end(index) ? (kh_value(index, k))->version : NULL, limchar, opt);
- }
-@@ -751,7 +741,6 @@ do_source_ports(unsigned int opt, char limchar, char *pattern, match_t match,
- return (EX_USAGE);
- }
-
--
- if (chdir(portsdir) != 0)
- err(EX_SOFTWARE, "Cannot chdir to %s\n", portsdir);
-
---
-2.15.1
-
diff --git a/ports-mgmt/pkg/files/0002-Fix-finding-ports-updates-with-flavors.patch b/ports-mgmt/pkg/files/0002-Fix-finding-ports-updates-with-flavors.patch
deleted file mode 100644
index 0b5bf1506c9b..000000000000
--- a/ports-mgmt/pkg/files/0002-Fix-finding-ports-updates-with-flavors.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From ab5d49c07944d6a9f3a61de4c830a0130feccbd7 Mon Sep 17 00:00:00 2001
-From: Baptiste Daroussin <bapt@FreeBSD.org>
-Date: Fri, 1 Dec 2017 14:53:41 +0100
-Subject: [PATCH 2/2] Fix finding ports updates with flavors
-
-Use the new target from flavors to list all potential packages and we
-match against them
----
- src/version.c | 20 +++++++++++++++-----
- 1 file changed, 15 insertions(+), 5 deletions(-)
-
-diff --git a/src/version.c b/src/version.c
-index 75d9e922..f2a24186 100644
---- a/src/version.c
-+++ b/src/version.c
-@@ -696,9 +696,10 @@ validate_origin(const char *portsdir, const char *origin)
- }
-
- static const char *
--port_version(UT_string *cmd, const char *portsdir, const char *origin)
-+port_version(UT_string *cmd, const char *portsdir, const char *origin,
-+ const char *pkgname)
- {
-- char *output;
-+ char *output, *walk, *name;
- char *version = NULL;
- char *argv[5];
-
-@@ -712,12 +713,21 @@ port_version(UT_string *cmd, const char *portsdir, const char *origin)
- argv[0] = "make";
- argv[1] = "-C";
- argv[2] = utstring_body(cmd);
-- argv[3] = "-VPKGVERSION";
-+ argv[3] = "flavors-package-names";
- argv[4] = NULL;
-
- if (exec_buf(cmd, argv) != 0) {
- output = utstring_body(cmd);
-- version = strsep(&output, "\n");
-+ while ((walk = strsep(&output, "\n")) != NULL) {
-+ name = walk;
-+ walk = strrchr(walk, '-');
-+ walk[0] = '\0';
-+ walk++;
-+ if (strcmp(name, pkgname) == 0) {
-+ version = walk;
-+ break;
-+ }
-+ }
- }
- }
-
-@@ -772,7 +782,7 @@ do_source_ports(unsigned int opt, char limchar, char *pattern, match_t match,
- strcmp(name, matchname) != 0)
- continue;
-
-- version = port_version(cmd, portsdir, origin);
-+ version = port_version(cmd, portsdir, origin, name);
- print_version(pkg, "port", version, limchar, opt);
- utstring_clear(cmd);
- }
---
-2.15.1
-