View | Details | Raw Unified | Return to bug 186406
Collapse All | Expand All

(-)pkg_replace (-1 / +7 lines)
Lines 1290-1296 Link Here
1290
}
1290
}
1291
1291
1292
do_replace() {
1292
do_replace() {
1293
	local pkg_log pkg_tmpdir old_package old_required_by preserved_files
1293
	local pkg_log pkg_tmpdir old_package old_required_by preserved_files \
1294
		automatic_flag
1294
1295
1295
	if is_yes ${use_pkgng}; then
1296
	if is_yes ${use_pkgng}; then
1296
		local old_origin new_origin
1297
		local old_origin new_origin
Lines 1365-1370 Link Here
1365
		backup_package "${cur_pkg_name}" "${old_package}" &&
1366
		backup_package "${cur_pkg_name}" "${old_package}" &&
1366
		if is_yes ${use_pkgng}; then
1367
		if is_yes ${use_pkgng}; then
1367
			old_origin=`${PKG_INFO} -qo ${cur_pkg_name}` || return 1
1368
			old_origin=`${PKG_INFO} -qo ${cur_pkg_name}` || return 1
1369
			automatic_flag=$(${PKG_QUERY} %a "${cur_pkg_name}")
1368
		else
1370
		else
1369
			backup_file "${cur_pkg_pkgdir}/+REQUIRED_BY" "${old_required_by}"
1371
			backup_file "${cur_pkg_pkgdir}/+REQUIRED_BY" "${old_required_by}"
1370
		fi &&
1372
		fi &&
Lines 1381-1386 Link Here
1381
			cur_pkg_pkgdir=${PKG_DBDIR}/${pkg_name}
1383
			cur_pkg_pkgdir=${PKG_DBDIR}/${pkg_name}
1382
			if is_yes ${use_pkgng}; then
1384
			if is_yes ${use_pkgng}; then
1383
				new_origin=`${PKG_INFO} -qo ${pkg_name}`
1385
				new_origin=`${PKG_INFO} -qo ${pkg_name}`
1386
				${PKG_SET} -y -A "${automatic_flag}" "${pkg_name}"
1384
			fi
1387
			fi
1385
		else
1388
		else
1386
			log="install error"
1389
			log="install error"
Lines 1389-1394 Link Here
1389
				"please reinstall '${old_package}' manually."
1392
				"please reinstall '${old_package}' manually."
1390
				return 1
1393
				return 1
1391
			}
1394
			}
1395
			if is_yes ${use_pkgng}; then
1396
				${PKG_SET} -y -A "${automatic_flag}" "${old_package}"
1397
			fi
1392
		fi
1398
		fi
1393
	else
1399
	else
1394
		log="deinstall error"
1400
		log="deinstall error"

Return to bug 186406