Hello community,
here is the log from the commit of package zmd
checked in at Thu Mar 30 10:47:19 CEST 2006.
--------
--- zmd/zmd.changes 2006-03-30 10:12:57.000000000 +0200
+++ zmd/zmd.changes 2006-03-30 10:46:04.000000000 +0200
@@ -2 +2 @@
-Thu Mar 30 10:10:52 CEST 2006 - aj@suse.de
+Thu Mar 30 10:45:52 CEST 2006 - aj@suse.de
@@ -7,12 +6,0 @@
-Thu Mar 30 04:03:14 CEST 2006 - maw@suse.de
-
-- Teach zmd to restart when it's updated (#162043).
-
--------------------------------------------------------------------
-Thu Mar 30 02:42:17 CEST 2006 - thunder@suse.de
-
-- New source drop (r26462) which:
-- Adds arch filtering (#158187).
-- Expires the web cache after refresh.
-
--------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ zmd.spec ++++++
--- /var/tmp/diff_new_pack.UqeNsd/_old 2006-03-30 10:46:58.000000000 +0200
+++ /var/tmp/diff_new_pack.UqeNsd/_new 2006-03-30 10:46:58.000000000 +0200
@@ -14,7 +14,7 @@
BuildRequires: dbus-1-mono log4net mono-basic mono-data-sqlite mono-devel perl-XML-Parser rpm-devel sqlite-devel
URL: http://www.novell.com
Version: 7.1.1
-Release: 33
+Release: 34
License: LGPL
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %name-7.1.1.tar.bz2
@@ -106,7 +106,6 @@
%{insserv_force_if_yast novell-zmd}
%postun
-%{restart_on_update zmd}
%{insserv_cleanup}
%files -f %{name}.lang
@@ -158,12 +157,6 @@
%changelog -n zmd
* Thu Mar 30 2006 - aj@suse.de
- Package /var/run/zmd [#162079].
-* Thu Mar 30 2006 - maw@suse.de
-- Teach zmd to restart when it's updated (#162043).
-* Thu Mar 30 2006 - thunder@suse.de
-- New source drop (r26462) which:
-- Adds arch filtering (#158187).
-- Expires the web cache after refresh.
* Wed Mar 29 2006 - maw@suse.de
- New source drop (r26368) which:
- Makes sure there is sufficient disk space before downloading
++++++ zmd-7.1.1.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-7.1.1/modules/ChangeLog new/zmd-7.1.1/modules/ChangeLog
--- old/zmd-7.1.1/modules/ChangeLog 2006-03-30 02:29:20.000000000 +0200
+++ new/zmd-7.1.1/modules/ChangeLog 2006-03-29 02:26:06.000000000 +0200
@@ -1,14 +1,3 @@
-2006-03-29 Chris Rivera
-
- * linux/PackageManager.cs: Add arch filtering for QueryLatest and
- GetLatestVersion.
-
-2006-03-28 James Willcox
-
- * linux/RPMBackend.cs: only delay loading the installed packages
- when the db changes outsize of zmd. After transactions, do it
- immediately.
-
2006-03-28 James Willcox
* linux/Transaction.cs: check to make sure we have enough disk
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-7.1.1/modules/linux/Backend.cs new/zmd-7.1.1/modules/linux/Backend.cs
--- old/zmd-7.1.1/modules/linux/Backend.cs 2006-03-29 17:32:10.000000000 +0200
+++ new/zmd-7.1.1/modules/linux/Backend.cs 2006-03-25 01:29:42.000000000 +0100
@@ -49,6 +49,19 @@
public event EventHandler InstalledPackagesChanged;
public void OnInstalledPackagesChanged () {
+ lock (this) {
+ if (delayedSchedule != null) {
+ ScheduleManager.Instance.RemoveSchedule (delayedSchedule);
+ delayedSchedule = null;
+ }
+ delayedSchedule = new SimpleSchedule ("Package DB changed delay");
+ delayedSchedule.Triggered += DelayedInstalledPackagesChanged;
+ delayedSchedule.StartTime = DateTime.Now + TimeSpan.FromSeconds (30);
+ ScheduleManager.Instance.AddSchedule (delayedSchedule);
+ }
+ }
+
+ private void DelayedInstalledPackagesChanged (object o, EventArgs args) {
if (InstalledPackagesChanged != null)
InstalledPackagesChanged (this, null);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-7.1.1/modules/linux/PackageManager.cs new/zmd-7.1.1/modules/linux/PackageManager.cs
--- old/zmd-7.1.1/modules/linux/PackageManager.cs 2006-03-30 02:12:02.000000000 +0200
+++ new/zmd-7.1.1/modules/linux/PackageManager.cs 2006-03-29 02:07:30.000000000 +0200
@@ -141,12 +141,27 @@
}
public static Package GetLatestVersion (string name, bool subscribedOnly) {
- IEnumerable pkgs = Query ("Name", "is", name, "and", "IsSubscribed", "is", subscribedOnly);
- foreach (Package pkg in FilterPackagesForArch (pkgs)) {
- return pkg;
+ // Find latest installed version
+ Package latestInstalled = null;
+ foreach (Package pkg in Query ("Name", QueryType.Equal, name, QueryType.And,
+ "IsInstalled", QueryType.Equal, true)) {
+ if (latestInstalled == null || pkg.CompareTo (latestInstalled) > 0)
+ latestInstalled = pkg;
}
- return null;
+ // Find latest version
+ Package latest = null;
+ foreach (Package pkg in Query ("Name", QueryType.Equal, name,
+ QueryType.And,
+ "IsSubscribed", QueryType.Equal, subscribedOnly)) {
+ if (latestInstalled != null && latestInstalled.CompareTo (pkg) >= 0)
+ continue;
+
+ if (latest == null || pkg.CompareTo (latest) > 0)
+ latest = pkg;
+ }
+
+ return latest;
}
public static ResolverResult Verify () {
@@ -304,72 +319,6 @@
return packages.Query (query);
}
- // -1: old package 0: update 1: new install
- private static int GetPackageStatus (Package pkg) {
- foreach (Package p in installed.Query ("Name", "is", pkg.Name, "and", "IsInstalled", "is", true, "and",
- "Arch", "is", pkg.Arch)) {
- return pkg.CompareTo (p) > 0 ? 0 : -1;
- }
-
- return 1;
- }
-
- /*
- * This function returns all updates for all arches and at most one "best"
- * installation per package name.
- */
- private static IEnumerable FilterPackagesForArch (IEnumerable list) {
- Hashtable installs = new Hashtable ();
- Hashtable updates = new Hashtable ();
-
- foreach (IResolvable res in list) {
- Package pkg = res as Package;
- if (pkg == null)
- continue;
-
- int pkgScore = ArchUtility.GetCompatability (DaemonProperties.Target.Arch, pkg.Arch);
- if (pkgScore < 0)
- continue;
-
- int packageStatus = GetPackageStatus (pkg);
- if (packageStatus == 0) {
- string key = String.Format ("{0}.{1}", pkg.Name, pkg.Arch);
- Package existing = updates[key] as Package;
- if (existing == null || pkg.CompareTo (existing) > 0) {
- updates[key] = pkg;
- }
- } else if (packageStatus == 1) {
- Package existing = installs[pkg.Name] as Package;
- if (existing == null) {
- installs[pkg.Name] = pkg;
- } else {
- int exScore = ArchUtility.GetCompatability (DaemonProperties.Target.Arch, existing.Arch);
- if (pkgScore == 0 && exScore == 0) {
- if (pkg.CompareTo (existing) > 0) {
- installs[pkg.Name] = pkg;
- }
- } else if (pkgScore == 0) {
- installs[pkg.Name] = pkg;
- } else if (exScore != 0) {
- installs[pkg.Name] = pkgScore > exScore ? pkg : existing;
- }
- }
- }
- }
-
- // We want to remove installs for packages we are going to upgrade
- ArrayList ret = new ArrayList ();
- foreach (Package up in updates.Values) {
- if (installs[up.Name] != null) {
- installs.Remove (up.Name);
- }
- }
-
- ret.AddRange (updates.Values);
- ret.AddRange (installs.Values);
- return ret;
- }
-
public static ICollection FilterResolvables (IEnumerable list) {
Hashtable hash = new Hashtable ();
Backend be = Backend.Current;
@@ -385,7 +334,7 @@
}
public static IEnumerable QueryLatest (IList query) {
- return FilterPackagesForArch (packages.Query (query));
+ return FilterResolvables (packages.Query (query));
}
public static Package QueryFile (string path) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-7.1.1/modules/linux/RPMBackend.cs new/zmd-7.1.1/modules/linux/RPMBackend.cs
--- old/zmd-7.1.1/modules/linux/RPMBackend.cs 2006-03-29 17:32:10.000000000 +0200
+++ new/zmd-7.1.1/modules/linux/RPMBackend.cs 2006-03-16 16:53:22.000000000 +0100
@@ -2,7 +2,6 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
-using Novell.Zenworks.Zmd.Scheduling;
using log4net;
@@ -10,7 +9,6 @@
public abstract class RPMBackend : Backend {
private FileSystemWatcher watcher;
private bool ignoring;
- private SimpleSchedule delayedSchedule;
private static bool useLibrpm = true;
private static readonly ILog log = LogManager.GetLogger (typeof (RPMBackend));
@@ -181,21 +179,8 @@
}
private void Changed (object sender, FileSystemEventArgs e) {
- if (ignoring)
- return;
-
- lock (this) {
- if (delayedSchedule != null) {
- ScheduleManager.Instance.RemoveSchedule (delayedSchedule);
- delayedSchedule = null;
- }
- delayedSchedule = new SimpleSchedule ("Package DB changed delay");
- delayedSchedule.Triggered += delegate {
- OnInstalledPackagesChanged ();
- };
-
- delayedSchedule.StartTime = DateTime.Now + TimeSpan.FromSeconds (30);
- ScheduleManager.Instance.AddSchedule (delayedSchedule);
+ if (!ignoring) {
+ OnInstalledPackagesChanged ();
}
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-7.1.1/po/zmd.pot new/zmd-7.1.1/po/zmd.pot
--- old/zmd-7.1.1/po/zmd.pot 2006-03-30 02:30:58.000000000 +0200
+++ new/zmd-7.1.1/po/zmd.pot 2006-03-29 02:30:22.000000000 +0200
@@ -9,7 +9,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-29 19:30-0500\n"
+"POT-Creation-Date: 2006-03-28 19:30-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -102,16 +102,16 @@
msgid "Save transaction history and changed files, allowing rollback"
msgstr ""
-#: modules/linux/PackageManager.cs:155 modules/linux/PackageManager.cs:163
-#: modules/linux/PackageManager.cs:246 modules/linux/PackageManager.cs:273
+#: modules/linux/PackageManager.cs:170 modules/linux/PackageManager.cs:178
+#: modules/linux/PackageManager.cs:261 modules/linux/PackageManager.cs:288
msgid "Another transaction is already running."
msgstr ""
-#: modules/linux/PackageManager.cs:243 modules/linux/PackageManager.cs:268
+#: modules/linux/PackageManager.cs:258 modules/linux/PackageManager.cs:283
msgid "You do not have permission to install and/or remove packages."
msgstr ""
-#: modules/linux/PackageManager.cs:408
+#: modules/linux/PackageManager.cs:357
msgid "File list not available."
msgstr ""
@@ -696,12 +696,12 @@
msgid "Refreshing Services"
msgstr ""
-#: src/ServiceManager.cs:622
+#: src/ServiceManager.cs:621
#, csharp-format
msgid "The '{0}' service does not support registration."
msgstr ""
-#: src/ServiceManager.cs:785
+#: src/ServiceManager.cs:784
#, csharp-format
msgid "Unknown service storage version '{0}'"
msgstr ""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-7.1.1/src/BuildConfig.cs new/zmd-7.1.1/src/BuildConfig.cs
--- old/zmd-7.1.1/src/BuildConfig.cs 2006-03-30 02:15:40.000000000 +0200
+++ new/zmd-7.1.1/src/BuildConfig.cs 2006-03-27 00:42:20.000000000 +0200
@@ -1,14 +1,14 @@
namespace Novell.Zenworks.Zmd {
public class BuildConfig {
- public const string PREFIX = "/usr";
- public const string SYSCONFDIR = "/etc";
- public const string DATADIR = "/usr/share";
- public const string LIBDIR = "/usr/lib64";
- public const string LIBDIR_MANAGED = "/usr" + "/lib";
- public const string LOCALSTATEDIR = "/var";
+ public const string PREFIX = "/opt/zypp";
+ public const string SYSCONFDIR = "/opt/zypp/etc";
+ public const string DATADIR = "/opt/zypp/share";
+ public const string LIBDIR = "/opt/zypp/lib";
+ public const string LIBDIR_MANAGED = "/opt/zypp" + "/lib";
+ public const string LOCALSTATEDIR = "/opt/zypp/var";
- public const string LOGDIR = "/var/log";
+ public const string LOGDIR = "/opt/zypp/var/log";
public const string LOGFILE = LOGDIR + "/zmd-messages.log";
public const string MODULE_PATH = LIBDIR_MANAGED + "/zmd/modules";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-7.1.1/src/ChangeLog new/zmd-7.1.1/src/ChangeLog
--- old/zmd-7.1.1/src/ChangeLog 2006-03-30 02:26:02.000000000 +0200
+++ new/zmd-7.1.1/src/ChangeLog 2006-03-29 02:26:06.000000000 +0200
@@ -1,7 +1,3 @@
-2006-03-29 James Willcox
-
- * ServiceManager.cs: expire the cache after refresh
-
2006-03-28 James Willcox
* DaemonProperties.cs: add MonoVersion property, which uses evil
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-7.1.1/src/ServiceManager.cs new/zmd-7.1.1/src/ServiceManager.cs
--- old/zmd-7.1.1/src/ServiceManager.cs 2006-03-30 02:26:02.000000000 +0200
+++ new/zmd-7.1.1/src/ServiceManager.cs 2006-03-27 02:51:26.000000000 +0200
@@ -559,7 +559,6 @@
public static void OnRefreshFinished (Progress progress) {
WebCache.ForceCache = false;
- WebCache.Expire ();
if (progress.Status == ProgressStatus.Finished) {
log.Info ("Finished Service Refresh");
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...