aboutsummaryrefslogtreecommitdiffstats
path: root/ports-mgmt
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2012-05-23 00:49:26 +0800
committerbapt <bapt@FreeBSD.org>2012-05-23 00:49:26 +0800
commitfb3edc9032fbd21001f1f8d398f01e9ba7381439 (patch)
treef0a102652e7f7c7d2f7457aa39c0c0b123ae5672 /ports-mgmt
parent6c67bfe781c248d4a103a913d0d3fa144624e78e (diff)
downloadfreebsd-ports-gnome-fb3edc9032fbd21001f1f8d398f01e9ba7381439.tar.gz
freebsd-ports-gnome-fb3edc9032fbd21001f1f8d398f01e9ba7381439.tar.zst
freebsd-ports-gnome-fb3edc9032fbd21001f1f8d398f01e9ba7381439.zip
- Fix pkg update adding repo.txz twice
PR: ports/168235 Submitted by: Andriy Syrovenko <andriys@gmail.com>
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/pkg/Makefile1
-rw-r--r--ports-mgmt/pkg/files/patch-pkg__update.c38
2 files changed, 39 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index 336c7c7e1d8d..b087bb30fc47 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pkg
DISTVERSION= 1.0-beta14
+PORTREVISION= 1
CATEGORIES= ports-mgmt
MASTER_SITES= LOCAL/portmgr \
http://files.etoilebsd.net/pkg/
diff --git a/ports-mgmt/pkg/files/patch-pkg__update.c b/ports-mgmt/pkg/files/patch-pkg__update.c
new file mode 100644
index 000000000000..2c0ae1741cb0
--- /dev/null
+++ b/ports-mgmt/pkg/files/patch-pkg__update.c
@@ -0,0 +1,38 @@
+--- ./pkg/update.c.orig 2012-05-22 14:26:11.000000000 +0200
++++ ./pkg/update.c 2012-05-22 18:44:42.324768000 +0200
+@@ -45,7 +45,6 @@
+ */
+ int
+ pkgcli_update(void) {
+- char url[MAXPATHLEN];
+ const char *packagesite = NULL;
+ const char *repo_name;
+ bool multi_repos = false;
+@@ -70,12 +69,7 @@
+ return (1);
+ }
+
+- if (packagesite[strlen(packagesite) - 1] == '/')
+- snprintf(url, MAXPATHLEN, "%srepo.txz", packagesite);
+- else
+- snprintf(url, MAXPATHLEN, "%s/repo.txz", packagesite);
+-
+- retcode = pkg_update("repo", url);
++ retcode = pkg_update("repo", packagesite);
+ if (retcode == EPKG_UPTODATE) {
+ if (!quiet)
+ printf("Remote repository up-to-date, no need to upgrade\n");
+@@ -87,12 +81,7 @@
+ repo_name = pkg_config_kv_get(repokv, PKG_CONFIG_KV_KEY);
+ packagesite = pkg_config_kv_get(repokv, PKG_CONFIG_KV_VALUE);
+
+- if (packagesite[strlen(packagesite) - 1] == '/')
+- snprintf(url, MAXPATHLEN, "%srepo.txz", packagesite);
+- else
+- snprintf(url, MAXPATHLEN, "%s/repo.txz", packagesite);
+-
+- retcode = pkg_update(repo_name, url);
++ retcode = pkg_update(repo_name, packagesite);
+ if (retcode == EPKG_UPTODATE) {
+ if (!quiet)
+ printf("%s repository up-to-date, no need to upgrade\n", repo_name);