mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-30 01:15:52 +00:00
Fix a segfault on i386 and powerpc64 while registering a port as automatic [1]
Prevent 'pkg update' will always think that the repo is up to date if no mtime header is sent by the http server [2] Bump port revision Reported by: adrian[1], hrs [1] Tested by: hrs [1] Submitted by: cperciva [2]
This commit is contained in:
parent
eb08cfc563
commit
4b812bde72
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=321218
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= pkg
|
||||
DISTVERSION= 1.0.13
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= ports-mgmt
|
||||
MASTER_SITES= LOCAL/portmgr \
|
||||
http://files.etoilebsd.net/pkg/ \
|
||||
|
39
ports-mgmt/pkg/files/patch-fix-register-update
Normal file
39
ports-mgmt/pkg/files/patch-fix-register-update
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git libpkg/fetch.c libpkg/fetch.c
|
||||
index c2e5919..8e902ae 100644
|
||||
--- libpkg/fetch.c
|
||||
+++ libpkg/fetch.c
|
||||
@@ -145,7 +145,7 @@ pkg_fetch_file_to_fd(const char *url, int dest, time_t t)
|
||||
retry = max_retry;
|
||||
|
||||
u = fetchParseURL(url);
|
||||
- if (t != 0)
|
||||
+ if (t != 0 && st.mtime != 0)
|
||||
u->ims_time = t;
|
||||
|
||||
doc = u->doc;
|
||||
diff --git newvers.sh newvers.sh
|
||||
index 207aab0..651231f 100755
|
||||
--- newvers.sh
|
||||
+++ newvers.sh
|
||||
@@ -41,7 +41,7 @@
|
||||
: ${PKG_MINOR_VERSION="0"}
|
||||
: ${PKG_PATCH_LEVEL="13"}
|
||||
|
||||
-: ${PORTREVISION:=""}
|
||||
+: ${PORTREVISION:="1"}
|
||||
: ${PORTEPOCH:=}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
diff --git pkg/register.c pkg/register.c
|
||||
index 385f8a2..ce29612 100644
|
||||
--- pkg/register.c
|
||||
+++ pkg/register.c
|
||||
@@ -119,7 +119,7 @@ exec_register(int argc, char **argv)
|
||||
err(1, "cannot allocate memory");
|
||||
break;
|
||||
case 'd':
|
||||
- pkg_set(pkg, PKG_AUTOMATIC, true);
|
||||
+ pkg_set(pkg, PKG_AUTOMATIC, (int64_t)true);
|
||||
break;
|
||||
case 'i':
|
||||
if ((input_path = strdup(optarg)) == NULL)
|
Loading…
Reference in New Issue
Block a user