diff options
author | kensmith <kensmith@FreeBSD.org> | 2006-11-19 08:12:54 +0000 |
---|---|---|
committer | kensmith <kensmith@FreeBSD.org> | 2006-11-19 08:12:54 +0000 |
commit | d93d3ea462204e8e8d7d3753dcce8c0288eb1e2a (patch) | |
tree | 85174e8cd30e4d95bcbb97342f0eb9eb909886e3 /usr.sbin/sysinstall/index.c | |
parent | 683ec6284c45d2451ce62bf6c392593db0903d1a (diff) | |
download | FreeBSD-src-d93d3ea462204e8e8d7d3753dcce8c0288eb1e2a.zip FreeBSD-src-d93d3ea462204e8e8d7d3753dcce8c0288eb1e2a.tar.gz |
Move the check for which disc volume we have/want to after we install
the package dependencies. Installation of the dependencies may leave
us on the wrong disc volume.
MFC after: 3 days
Diffstat (limited to 'usr.sbin/sysinstall/index.c')
-rw-r--r-- | usr.sbin/sysinstall/index.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c index a20dfb4..34d42f8 100644 --- a/usr.sbin/sysinstall/index.c +++ b/usr.sbin/sysinstall/index.c @@ -692,25 +692,6 @@ index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended) if (id->installed == 1) return DITEM_SUCCESS; - /* - * Prompt user if the package is not available on the current volume. - */ - - if(mediaDevice->type == DEVICE_TYPE_CDROM) { - while (id->volume != dev->volume) { - if (!msgYesNo("This is disc #%d. Package %s is on disc #%d\n" - "Would you like to switch discs now?\n", dev->volume, - id->name, id->volume)) { - DEVICE_SHUTDOWN(mediaDevice); - msgConfirm("Please remove disc #%d from your drive, and add disc #%d\n", - dev->volume, id->volume); - DEVICE_INIT(mediaDevice); - } else { - return DITEM_FAILURE; - } - } - } - if (id && id->deps && strlen(id->deps)) { char t[2048 * 8], *cp, *cp2; @@ -742,6 +723,21 @@ index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended) } /* Done with the deps? Load the real m'coy */ if (DITEM_STATUS(status) == DITEM_SUCCESS) { + /* Prompt user if the package is not available on the current volume. */ + if(mediaDevice->type == DEVICE_TYPE_CDROM) { + while (id->volume != dev->volume) { + if (!msgYesNo("This is disc #%d. Package %s is on disc #%d\n" + "Would you like to switch discs now?\n", dev->volume, + id->name, id->volume)) { + DEVICE_SHUTDOWN(mediaDevice); + msgConfirm("Please remove disc #%d from your drive, and add disc #%d\n", + dev->volume, id->volume); + DEVICE_INIT(mediaDevice); + } else { + return DITEM_FAILURE; + } + } + } status = package_extract(dev, who->name, depended); if (DITEM_STATUS(status) == DITEM_SUCCESS) id->installed = 1; |