- // create a installation progress report proxy
- RpmInstallPackageReceiver progress(it->resolvable());
-
- progress.connect();
- bool success = true;
-
- try {
- progress.tryLevel( target::rpm::InstallResolvableReport::RPM );
-
- rpm().installPackage(localfile,
- p->installOnly() ? rpm::RpmDb::RPMINST_NOUPGRADE : 0);
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT(excpt_r);
-
- WAR << "Install failed, retrying with --nodeps" << endl;
- try {
- progress.tryLevel( target::rpm::InstallResolvableReport::RPM_NODEPS );
- rpm().installPackage(localfile,
- p->installOnly() ? rpm::RpmDb::RPMINST_NOUPGRADE : rpm::RpmDb::RPMINST_NODEPS);
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT(excpt_r);
- WAR << "Install failed again, retrying with --force --nodeps" << endl;
-
- try {
- progress.tryLevel( target::rpm::InstallResolvableReport::RPM_NODEPS_FORCE );
- rpm().installPackage(localfile,
- p->installOnly() ? rpm::RpmDb::RPMINST_NOUPGRADE : (rpm::RpmDb::RPMINST_NODEPS|rpm::RpmDb::RPMINST_FORCE));
- }
- catch (Exception & excpt_r) {
- remaining.push_back( *it );
- success = false;
- ZYPP_CAUGHT(excpt_r);
- }
- }
- }
- if (success) {
- it->status().setStatus( ResStatus::installed );
- }
- progress.disconnect();
-
- }
- else
- {
- RpmRemovePackageReceiver progress(it->resolvable());
-
- progress.connect();
-
- try {
- rpm().removePackage(p);
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT(excpt_r);
- WAR << "Remove failed, retrying with --nodeps" << endl;
- rpm().removePackage(p, rpm::RpmDb::RPMINST_NODEPS);
- }
- progress.disconnect();
- it->status().setStatus( ResStatus::uninstalled );
- }
-
- }
-#warning FIXME other resolvables
- }
-
+ // create a installation progress report proxy
+ RpmInstallPackageReceiver progress(it->resolvable());
+ progress.connect();
+ bool success = true;
+
+ try {
+ progress.tryLevel( target::rpm::InstallResolvableReport::RPM );
+
+ rpm().installPackage(localfile,
+ p->installOnly() ? rpm::RpmDb::RPMINST_NOUPGRADE : 0);
+ }
+ catch (Exception & excpt_r) {
+ ZYPP_CAUGHT(excpt_r);
+ WAR << "Install failed, retrying with --nodeps" << endl;
+ try {
+ progress.tryLevel( target::rpm::InstallResolvableReport::RPM_NODEPS );
+ rpm().installPackage(localfile,
+ p->installOnly() ? rpm::RpmDb::RPMINST_NOUPGRADE : rpm::RpmDb::RPMINST_NODEPS);
+ }
+ catch (Exception & excpt_r)
+ {
+ ZYPP_CAUGHT(excpt_r);
+ WAR << "Install failed again, retrying with --force --nodeps" << endl;
+
+ try {
+ progress.tryLevel( target::rpm::InstallResolvableReport::RPM_NODEPS_FORCE );
+ rpm().installPackage(localfile,
+ p->installOnly() ? rpm::RpmDb::RPMINST_NOUPGRADE : (rpm::RpmDb::RPMINST_NODEPS|rpm::RpmDb::RPMINST_FORCE));
+ }
+ catch (Exception & excpt_r) {
+ remaining.push_back( *it );
+ success = false;
+ ZYPP_CAUGHT(excpt_r);
+ }
+ }
+ }
+ if (success) {
+ it->status().setStatus( ResStatus::installed );
+ }
+ progress.disconnect();
+ }
+ else
+ {
+ RpmRemovePackageReceiver progress(it->resolvable());
+ progress.connect();
+ try {
+ rpm().removePackage(p);
+ }
+ catch (Exception & excpt_r) {
+ ZYPP_CAUGHT(excpt_r);
+ WAR << "Remove failed, retrying with --nodeps" << endl;
+ rpm().removePackage(p, rpm::RpmDb::RPMINST_NODEPS);
+ }
+ progress.disconnect();
+ it->status().setStatus( ResStatus::uninstalled );
+ }
+ }
+#ifndef STORAGE_DISABLED
+ else // other resolvables
+ {
+ if (it->status().isToBeInstalled())
+ {
+ bool success = false;
+ try
+ {
+ _storage.storeObject(it->resolvable());
+ success = true;
+ }
+ catch (Exception & excpt_r)
+ {
+ ZYPP_CAUGHT(excpt_r);
+ WAR << "Install of Resolvable from storage failed" << endl;
+ }
+ if (success)
+ it->status().setStatus( ResStatus::installed );
+ }
+ else
+ {
+ bool success = false;
+ try
+ {
+ _storage.deleteObject(it->resolvable());
+ success = true;
+ }
+ catch (Exception & excpt_r)
+ {
+ ZYPP_CAUGHT(excpt_r);
+ WAR << "Uninstall of Resolvable from storage failed" << endl;
+ }
+ if (success)
+ it->status().setStatus( ResStatus::uninstalled );
+ }
+ }
+ #endif
+ }