AbstractDeploymentPackage source = session.getSourceAbstractDeploymentPackage();
LogService log = session.getLog();
BundleInfoImpl[] orderedTargetBundles = target.getOrderedBundleInfos();
for (int i = orderedTargetBundles.length - 1; i >= 0; i--) {
BundleInfoImpl bundleInfo = orderedTargetBundles[i];
String symbolicName = bundleInfo.getSymbolicName();
if (!bundleInfo.isCustomizer() && source.getBundleInfoByName(symbolicName) == null) {
// stale bundle, save a copy for rolling back and uninstall it
try {
Bundle bundle = target.getBundle(symbolicName);
bundle.uninstall();
addRollback(new InstallBundleRunnable(bundle, target, log));