Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/sysinst Change the pkgin repository *before* r...



details:   https://anonhg.NetBSD.org/src/rev/af7808680e48
branches:  trunk
changeset: 778752:af7808680e48
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Apr 12 16:05:48 2012 +0000

description:
Change the pkgin repository *before* running pkgin update.  Spotted
by imil@.

diffstat:

 distrib/utils/sysinst/configmenu.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (26 lines):

diff -r d6724def5a20 -r af7808680e48 distrib/utils/sysinst/configmenu.c
--- a/distrib/utils/sysinst/configmenu.c        Thu Apr 12 15:39:09 2012 +0000
+++ b/distrib/utils/sysinst/configmenu.c        Thu Apr 12 16:05:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: configmenu.c,v 1.1 2012/04/06 23:48:53 riz Exp $ */
+/* $NetBSD: configmenu.c,v 1.2 2012/04/12 16:05:48 riz Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -258,12 +258,13 @@
                return 0;
        }
 
+       /* configure pkgin to use $pkgpath as a repository */
+       snprintf(pattern, STRSIZE, "s,^[^#].*$,%s,", pkgpath);
+       replace("/usr/pkg/etc/pkgin/repositories.conf", pattern);
+
        run_program(RUN_DISPLAY | RUN_PROGRESS | RUN_CHROOT,
                "/usr/pkg/bin/pkgin update");
 
-       /* configure pkgin to use $pkgpath as a repository */
-       snprintf(pattern, STRSIZE, "s,^[^#].*$,%s,", pkgpath);
-       replace("/usr/pkg/etc/pkgin/repositories.conf", pattern);
        msg_display(MSG_binpkg_installed);
        process_menu(MENU_ok, NULL);
        



Home | Main Index | Thread Index | Old Index