diff options
author | lukem <lukem> | 2002-06-21 12:26:31 +0000 |
---|---|---|
committer | lukem <lukem> | 2002-06-21 12:26:31 +0000 |
commit | 097ba503f7bbd60ae3d7eb0837ff9ef24a030e47 (patch) | |
tree | ff9f09c57f58524bc0ee95597b23a1e95ef713f6 /devel | |
parent | 3583e461d64d9bfdc18e8433686af982909953b0 (diff) | |
download | pkgsrc-097ba503f7bbd60ae3d7eb0837ff9ef24a030e47.tar.gz |
+ In assert_writeable(), don't depend upon dirname(3) not modifying the
argument; POSIX allows this, even though the replacement lib/dirname.c
(from glibc?) returns a strndup-ed strings *except* for the "." case.
[mmm, possible memory leaks]. Instead, just implement most of guts of
lib/dirname.c directly in assert_writeable(), always copy string, and
always free it. This fixes ``mkid -f /some/path/to/id''
+ Crank PKGREVISION.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/id-utils/Makefile | 4 | ||||
-rw-r--r-- | devel/id-utils/distinfo | 4 | ||||
-rw-r--r-- | devel/id-utils/patches/patch-ak | 32 |
3 files changed, 31 insertions, 9 deletions
diff --git a/devel/id-utils/Makefile b/devel/id-utils/Makefile index 344dd6f0dad..964430c0c1c 100644 --- a/devel/id-utils/Makefile +++ b/devel/id-utils/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.24 2002/03/01 01:51:53 wiz Exp $ +# $NetBSD: Makefile,v 1.25 2002/06/21 12:26:31 lukem Exp $ # FreeBSD Id: Makefile,v 1.4 1996/11/18 10:22:47 asami Exp # DISTNAME= id-utils-3.2 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNU:=id-utils/} diff --git a/devel/id-utils/distinfo b/devel/id-utils/distinfo index e1e289351c7..72f0f97bc87 100644 --- a/devel/id-utils/distinfo +++ b/devel/id-utils/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.9 2002/04/03 16:26:54 joda Exp $ +$NetBSD: distinfo,v 1.10 2002/06/21 12:26:32 lukem Exp $ SHA1 (id-utils-3.2.tar.gz) = 14d96a2170745883d077fa8c436e4380f28951a5 Size (id-utils-3.2.tar.gz) = 388012 bytes @@ -12,7 +12,7 @@ SHA1 (patch-ag) = 9039dfd96f320f6da6dbeb1012fcd5c554500beb SHA1 (patch-ah) = 962276de4a6582e88e3eea8a6c2f8246c958bea0 SHA1 (patch-ai) = be9f59a6a2e84338d6df945ba5d10285d3205560 SHA1 (patch-aj) = 7f2b3f1eaadfc3a71169d16010375eaf0ce96b46 -SHA1 (patch-ak) = 4d7807168b4fa9e3d497c943f45892e6d574ef9d +SHA1 (patch-ak) = c9f017d6ba122ae1dabf10e97dea640e2b10ef76 SHA1 (patch-al) = 5ff628040e5f3c27263bded593deea57ad0847f5 SHA1 (patch-am) = 137ffa727d505975b775c0a877f1ac9af9cf58a7 SHA1 (patch-an) = 6e300f1c175085fe4190e31a0f3673714b51585b diff --git a/devel/id-utils/patches/patch-ak b/devel/id-utils/patches/patch-ak index 207d0df3289..e4b211313f9 100644 --- a/devel/id-utils/patches/patch-ak +++ b/devel/id-utils/patches/patch-ak @@ -1,7 +1,7 @@ -$NetBSD: patch-ak,v 1.1 2001/09/19 08:57:07 joda Exp $ +$NetBSD: patch-ak,v 1.2 2002/06/21 12:26:32 lukem Exp $ ---- src/mkid.c~ Tue Jul 9 06:19:09 1996 -+++ src/mkid.c Wed Sep 19 10:21:00 2001 +--- src/mkid.c.orig Tue Jul 9 14:19:09 1996 ++++ src/mkid.c @@ -33,7 +33,6 @@ #include "hash.h" #include "scanners.h" @@ -10,7 +10,29 @@ $NetBSD: patch-ak,v 1.1 2001/09/19 08:57:07 joda Exp $ #if HAVE_LIMITS_H # include <limits.h> #endif -@@ -363,7 +362,7 @@ +@@ -304,12 +303,18 @@ + { + if (errno == ENOENT) + { +- char const *dir_name = dirname (file_name); +- if (!dir_name || !*dir_name) +- dir_name = "."; ++ char *dir_name = strrchr (file_name, '/'); ++ if (dir_name) ++ { ++ while (*--dir_name == '/') ++ ; ++ dir_name++; ++ } ++ dir_name = dir_name ? strndup (file_name, dir_name - file_name) : strdup("."); + if (access (dir_name, 06) < 0) + error (1, errno, _("can't create `%s' in `%s'"), + basename (file_name), dir_name); ++ free (dir_name); + } + else + error (1, errno, _("can't modify `%s'"), file_name); +@@ -363,7 +368,7 @@ { if (fstat (fileno (source_FILE), &st) < 0) { @@ -19,7 +41,7 @@ $NetBSD: patch-ak,v 1.1 2001/09/19 08:57:07 joda Exp $ maybe_relative_file_name (file_name, flink, cw_dlink); error (0, errno, _("can't stat `%s'"), file_name); } -@@ -372,7 +371,7 @@ +@@ -372,7 +377,7 @@ } if (verbose_flag) { |