pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkg_install-renovation]: pkgsrc/pkgtools/pkg_install/files/add Open t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/de0348467ccb
branches:  pkg_install-renovation
changeset: 541577:de0348467ccb
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Aug 05 18:09:01 2008 +0000

description:
Open the database first and chdir later to emphase that the chdir is
required for the extraction.

diffstat:

 pkgtools/pkg_install/files/add/perform.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r f8aacb929b59 -r de0348467ccb pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c  Sat Aug 02 20:33:50 2008 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c  Tue Aug 05 18:09:01 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: perform.c,v 1.70.4.14 2008/08/02 20:33:50 joerg Exp $  */
+/*     $NetBSD: perform.c,v 1.70.4.15 2008/08/05 18:09:01 joerg Exp $  */
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -6,7 +6,7 @@
 #if HAVE_SYS_CDEFS_H
 #include <sys/cdefs.h>
 #endif
-__RCSID("$NetBSD: perform.c,v 1.70.4.14 2008/08/02 20:33:50 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.70.4.15 2008/08/05 18:09:01 joerg Exp $");
 
 /*-
  * Copyright (c) 2003 Grant Beattie <grant%NetBSD.org@localhost>
@@ -620,13 +620,13 @@
                return -1;
        }
 
-       if (chdir(pkg->install_prefix) == -1) {
-               warn("Can't change into prefix: %s", pkg->install_prefix);
+       if (!NoRecord && !pkgdb_open(ReadWrite)) {
+               warn("Can't open pkgdb for writing");
                return -1;
        }
 
-       if (!NoRecord && !pkgdb_open(ReadWrite)) {
-               warn("Can't open pkgdb for writing");
+       if (chdir(pkg->install_prefix) == -1) {
+               warn("Can't change into prefix: %s", pkg->install_prefix);
                return -1;
        }
 



Home | Main Index | Thread Index | Old Index