Mailinglist Archive: yast-commit (490 mails)

< Previous Next >
[yast-commit] r38331 - in /trunk/yast2: library/packages/src/PackageSystem.ycp package/yast2.changes
  • From: lslezak@xxxxxxxxxxxxxxxx
  • Date: Thu, 07 Jun 2007 08:26:24 -0000
  • Message-id: <20070607082625.321A29CAA8@xxxxxxxxxxxxxxxx>
Author: lslezak
Date: Thu Jun  7 10:26:24 2007
New Revision: 38331

URL: http://svn.opensuse.org/viewcvs/yast?rev=38331&view=rev
Log:
- speed up PackageSystem::InstallKernel() - call rpm directly
  instead of starting the package manager

Modified:
    trunk/yast2/library/packages/src/PackageSystem.ycp
    trunk/yast2/package/yast2.changes

Modified: trunk/yast2/library/packages/src/PackageSystem.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/packages/src/PackageSystem.ycp?rev=38331&r1=38330&r2=38331&view=diff
==============================================================================
--- trunk/yast2/library/packages/src/PackageSystem.ycp (original)
+++ trunk/yast2/library/packages/src/PackageSystem.ycp Thu Jun  7 10:26:24 2007
@@ -322,6 +322,32 @@
        return true;            // nothing to do
     }
 
+    // check whether tag "kernel" is provided
+    // do not initialize the package manager if it's not necessary
+    string rpm_command = "/bin/rpm -q --whatprovides kernel";
+    y2milestone("Starting RPM query: %1", rpm_command);
+    map output = (map)SCR::Execute(.target.bash_output, rpm_command);
+    y2debug("result of the query: %1", output);
+
+    if (output["exit"]:-1 == 0)
+    {
+       list<string> packages = splitstring(output["stdout"]:"", "\n");
+       packages = filter(string pkg, packages, {return pkg != "";});
+       y2milestone("Packages providing tag 'kernel': %1", packages);
+
+       if (size(packages) > 0)
+       {
+           return true;
+       }
+
+       y2milestone("Huh? Kernel is not installed??");
+    }
+    else
+    {
+       y2warning("RPM query failed, quering the package manager...");
+    }
+
+
     EnsureTargetInit ();
 
     list <list> provides = Pkg::PkgQueryProvides ("kernel");

Modified: trunk/yast2/package/yast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=38331&r1=38330&r2=38331&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Thu Jun  7 10:26:24 2007
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu Jun  7 10:14:06 CEST 2007 - lslezak@xxxxxxx
+
+- speed up PackageSystem::InstallKernel() - call rpm directly
+  instead of starting the package manager
+
+-------------------------------------------------------------------
 Tue Jun  5 21:22:50 CEST 2007 - locilka@xxxxxxx
 
 - Extended PackageLock::Check function to allow to 'Retry' getting

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages