Mon Apr 6 14:34:15 2009 UTC ()
pkg_install-20090406:
Remove premature return that broke dependency tracking for pkg_add -u.
Fixes PR 41143.


(joerg)
diff -r1.84 -r1.85 pkgsrc/pkgtools/pkg_install/files/add/perform.c
diff -r1.120 -r1.121 pkgsrc/pkgtools/pkg_install/files/lib/version.h

cvs diff -r1.84 -r1.85 pkgsrc/pkgtools/pkg_install/files/add/perform.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/add/perform.c 2009/03/08 14:50:36 1.84
+++ pkgsrc/pkgtools/pkg_install/files/add/perform.c 2009/04/06 14:34:15 1.85
@@ -1,22 +1,22 @@ @@ -1,22 +1,22 @@
1/* $NetBSD: perform.c,v 1.84 2009/03/08 14:50:36 joerg Exp $ */ 1/* $NetBSD: perform.c,v 1.85 2009/04/06 14:34:15 joerg Exp $ */
2#if HAVE_CONFIG_H 2#if HAVE_CONFIG_H
3#include "config.h" 3#include "config.h"
4#endif 4#endif
5#include <nbcompat.h> 5#include <nbcompat.h>
6#if HAVE_SYS_CDEFS_H 6#if HAVE_SYS_CDEFS_H
7#include <sys/cdefs.h> 7#include <sys/cdefs.h>
8#endif 8#endif
9__RCSID("$NetBSD: perform.c,v 1.84 2009/03/08 14:50:36 joerg Exp $"); 9__RCSID("$NetBSD: perform.c,v 1.85 2009/04/06 14:34:15 joerg Exp $");
10 10
11/*- 11/*-
12 * Copyright (c) 2003 Grant Beattie <grant@NetBSD.org> 12 * Copyright (c) 2003 Grant Beattie <grant@NetBSD.org>
13 * Copyright (c) 2005 Dieter Baron <dillo@NetBSD.org> 13 * Copyright (c) 2005 Dieter Baron <dillo@NetBSD.org>
14 * Copyright (c) 2007 Roland Illig <rillig@NetBSD.org> 14 * Copyright (c) 2007 Roland Illig <rillig@NetBSD.org>
15 * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org> 15 * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org>
16 * All rights reserved. 16 * All rights reserved.
17 * 17 *
18 * Redistribution and use in source and binary forms, with or without 18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions 19 * modification, are permitted provided that the following conditions
20 * are met: 20 * are met:
21 * 21 *
22 * 1. Redistributions of source code must retain the above copyright 22 * 1. Redistributions of source code must retain the above copyright
@@ -753,29 +753,26 @@ out: @@ -753,29 +753,26 @@ out:
753/* 753/*
754 * Register dependencies after sucessfully installing the package. 754 * Register dependencies after sucessfully installing the package.
755 */ 755 */
756static void 756static void
757pkg_register_depends(struct pkg_task *pkg) 757pkg_register_depends(struct pkg_task *pkg)
758{ 758{
759 int fd; 759 int fd;
760 size_t text_len, i; 760 size_t text_len, i;
761 char *required_by, *text; 761 char *required_by, *text;
762 762
763 if (Fake) 763 if (Fake)
764 return; 764 return;
765 765
766 if (pkg->other_version != NULL) 
767 return; /* XXX It's using the old dependencies. */ 
768 
769 text = xasprintf("%s\n", pkg->pkgname); 766 text = xasprintf("%s\n", pkg->pkgname);
770 text_len = strlen(text); 767 text_len = strlen(text);
771 768
772 for (i = 0; i < pkg->dep_length; ++i) { 769 for (i = 0; i < pkg->dep_length; ++i) {
773 required_by = pkgdb_pkg_file(pkg->dependencies[i], REQUIRED_BY_FNAME); 770 required_by = pkgdb_pkg_file(pkg->dependencies[i], REQUIRED_BY_FNAME);
774 771
775 fd = open(required_by, O_WRONLY | O_APPEND | O_CREAT, 0644); 772 fd = open(required_by, O_WRONLY | O_APPEND | O_CREAT, 0644);
776 if (fd == -1) { 773 if (fd == -1) {
777 warn("can't open dependency file '%s'," 774 warn("can't open dependency file '%s',"
778 "registration is incomplete!", required_by); 775 "registration is incomplete!", required_by);
779 } else if (write(fd, text, text_len) != text_len) { 776 } else if (write(fd, text, text_len) != text_len) {
780 warn("can't write to dependency file `%s'", required_by); 777 warn("can't write to dependency file `%s'", required_by);
781 close(fd); 778 close(fd);

cvs diff -r1.120 -r1.121 pkgsrc/pkgtools/pkg_install/files/lib/version.h (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/lib/version.h 2009/03/26 14:32:39 1.120
+++ pkgsrc/pkgtools/pkg_install/files/lib/version.h 2009/04/06 14:34:15 1.121
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: version.h,v 1.120 2009/03/26 14:32:39 joerg Exp $ */ 1/* $NetBSD: version.h,v 1.121 2009/04/06 14:34:15 joerg Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Thomas Klausner. All rights reserved. 4 * Copyright (c) 2001 Thomas Klausner. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 14 *
@@ -17,16 +17,16 @@ @@ -17,16 +17,16 @@
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27#ifndef _INST_LIB_VERSION_H_ 27#ifndef _INST_LIB_VERSION_H_
28#define _INST_LIB_VERSION_H_ 28#define _INST_LIB_VERSION_H_
29 29
30#define PKGTOOLS_VERSION "20090326" 30#define PKGTOOLS_VERSION "20090406"
31 31
32#endif /* _INST_LIB_VERSION_H_ */ 32#endif /* _INST_LIB_VERSION_H_ */