Hello community,

here is the log from the commit of package cdemu-client for openSUSE:Factory 
checked in at 2013-12-02 07:20:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cdemu-client (Old)
 and      /work/SRC/openSUSE:Factory/.cdemu-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cdemu-client"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cdemu-client/cdemu-client.changes        
2013-06-11 09:25:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cdemu-client.new/cdemu-client.changes   
2013-12-02 07:20:45.000000000 +0100
@@ -1,0 +2,6 @@
+Sun Nov 24 11:31:22 UTC 2013 - [email protected]
+
+- Update to new upstream release 2.1.1
+* added handling of bad sector verification option
+
+-------------------------------------------------------------------

Old:
----
  cdemu-client-2.1.0.tar.bz2

New:
----
  cdemu-client-2.1.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cdemu-client.spec ++++++
--- /var/tmp/diff_new_pack.tbU1Qq/_old  2013-12-02 07:20:45.000000000 +0100
+++ /var/tmp/diff_new_pack.tbU1Qq/_new  2013-12-02 07:20:45.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           cdemu-client
-Version:        2.1.0
+Version:        2.1.1
 Release:        0
 Summary:        Command-line client to control cdemu-daemon
 License:        GPL-2.0+

++++++ cdemu-client-2.1.0.tar.bz2 -> cdemu-client-2.1.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-2.1.0/CMakeLists.txt 
new/cdemu-client-2.1.1/CMakeLists.txt
--- old/cdemu-client-2.1.0/CMakeLists.txt       2013-06-07 21:33:47.000000000 
+0200
+++ new/cdemu-client-2.1.1/CMakeLists.txt       2013-09-19 00:09:40.000000000 
+0200
@@ -9,7 +9,6 @@
 include (GNUInstallDirs)
 
 # Options
-option (BUILD_NLS "Support for multiple languages" on)
 option (POST_INSTALL_HOOKS "Run post-install hooks" on)
 
 # If install prefix is /usr, override the sysconf dir to be /etc instead of 
/usr/etc
@@ -28,7 +27,6 @@
 endif ()
 
 # Installation
-
 install (
     PROGRAMS src/cdemu
     DESTINATION ${CMAKE_INSTALL_BINDIR}
@@ -56,8 +54,15 @@
     )
 endif ()
 
-if (BUILD_NLS AND GETTEXT_FOUND)
-    # We use the version provided by our FindIntlTool.cmake instead of the 
gettext version...
-    intltool_process_po_files(${PROJECT_SOURCE_DIR}/po ${PROJECT_NAME})
-endif ()
-
+# Translations; we use the version provided by our FindIntlTool.cmake 
+# instead of the gettext version...
+intltool_process_po_files(${PROJECT_SOURCE_DIR}/po ${PROJECT_NAME})
+
+# *** Configuration summary ***
+message(STATUS "")
+message(STATUS "*** CDEmu client configuration summary ***")
+message(STATUS "Installation:")
+message(STATUS " install prefix: " ${CMAKE_INSTALL_PREFIX})
+message(STATUS "Options:")
+message(STATUS " run post-install hooks: " ${POST_INSTALL_HOOKS})
+message(STATUS "")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-2.1.0/README 
new/cdemu-client-2.1.1/README
--- old/cdemu-client-2.1.0/README       2013-06-07 21:33:47.000000000 +0200
+++ new/cdemu-client-2.1.1/README       2013-09-19 00:09:40.000000000 +0200
@@ -1,5 +1,5 @@
 CDEmu client
-2.1.0
+2.1.1
 ~~~~~
 
 Table of Contents:
@@ -97,6 +97,9 @@
 Enabling transfer rate emulation on first device:
  cdemu tr-emulation 0 1
 
+Enabling bad sector emulation on first device:
+ cdemu bad-sector-emulation 0 1
+
 Changing device ID of first device:
  cdemu device-id 0 "MyVendor" "MyProduct" "1.0.0" "Test device ID"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-2.1.0/debian/changelog 
new/cdemu-client-2.1.1/debian/changelog
--- old/cdemu-client-2.1.0/debian/changelog     2013-06-07 21:33:47.000000000 
+0200
+++ new/cdemu-client-2.1.1/debian/changelog     2013-09-19 00:09:40.000000000 
+0200
@@ -1,5 +1,5 @@
-cdemu-client (2.1.0-1ubuntu0~raring1~ppa1) raring; urgency=low
+cdemu-client (2.1.1-1ubuntu0~raring1~ppa1) raring; urgency=low
 
   * Initial Release. Closes: (LP: #105452, LP: #184657)
 
- -- Henrik Stokseth <[email protected]>  Fri, 31 May 2013 12:00:00 +0100
+ -- Henrik Stokseth <[email protected]>  Wed, 18 Sep 2013 12:00:00 +0100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-2.1.0/man/cdemu.1 
new/cdemu-client-2.1.1/man/cdemu.1
--- old/cdemu-client-2.1.0/man/cdemu.1  2013-06-07 21:33:47.000000000 +0200
+++ new/cdemu-client-2.1.1/man/cdemu.1  2013-09-19 00:09:40.000000000 +0200
@@ -1,4 +1,4 @@
-.TH CDEMU 1 "Jan 4, 2013"
+.TH CDEMU 1 "Jul 14, 2013"
 .SH NAME
 cdemu \- a simple command-line CDEmu client
 .SH SYNOPSIS
@@ -114,6 +114,11 @@
 desired device, or \fIall\fR. \fBnew-value\fR is the new value to be set.
 If this argument is ommited, currently set value is displayed.
 .TP
+.B bad-sector-emulation <device> [new-value]
+Displays/sets bad sector emulation flag. \fBdevice\fR is the number of the
+desired device, or \fIall\fR. \fBnew-value\fR is the new value to be set.
+If this argument is ommited, currently set value is displayed.
+.TP
 .B device-id <device> [new-vendor-id] [new-product-id] [new-revision] 
[new-vendor-specific]
 Displays/sets device ID. \fBdevice\fR is the number of the desired device.
 \fBnew-vendor-id\fR is the new vendor ID string to be set (8 characters max).
@@ -174,6 +179,9 @@
 .B Enabling transfer rate emulation on first device:
 cdemu tr-emulation 0 1
 .TP
+.B Enabling bad sector emulation on first device:
+cdemu tr-emulation 0 1
+.TP
 .B Changing device ID of first device:
 cdemu device-id 0 "MyVendor" "MyProduct" "1.0.0" "Test device ID"
 .TP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-2.1.0/src/cdemu 
new/cdemu-client-2.1.1/src/cdemu
--- old/cdemu-client-2.1.0/src/cdemu    2013-06-07 21:33:47.000000000 +0200
+++ new/cdemu-client-2.1.1/src/cdemu    2013-09-19 00:09:40.000000000 +0200
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 #
 # cdemu: command line CDEmu client
-# Copyright (C) 2006-2012 Rok Mandeljc
+# Copyright (C) 2006-2013 Rok Mandeljc
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,8 +35,8 @@
 
 # *** Globals ***
 app_name = "cdemu-client"
-app_version = "2.1.0"
-supported_daemon_interface_version = 5
+app_version = "2.1.1"
+supported_daemon_interface_version = 6
 
 
 # I18n
@@ -554,7 +554,7 @@
 
                 print(_("Transfer rate emulation flag of device %i: %i") % 
(device, enabled))
 
-        # Set DPM emulation flag
+        # Set TR emulation flag
         elif len(arguments) == 2:
             try:
                 enabled = int(arguments[1], 0) and True or False
@@ -592,6 +592,80 @@
             return False
 
         return True
+        
+    def cmd_bad_sector_emulation (self, arguments):
+        # Get bad sector emulation flag
+        if len(arguments) == 1:
+            # Particular device vs. all devices
+            if arguments[0] == "all":
+                try:
+                    nr_devices = self.dbus_iface.GetNumberOfDevices()
+                except dbus.DBusException as e:
+                    self.print_error(_("Failed to get number of devices: %s") 
% (e))
+                    return False
+
+                print(_("Devices' bad sector emulation flag:"))
+                print("%-5s %-10s" % (_("DEV"), _("ENABLED")))
+
+                for device in range(0, nr_devices):
+                    try:
+                        enabled = self.dbus_iface.DeviceGetOption(device, 
"bad-sector-emulation")
+                    except dbus.DBusException as e:
+                        self.print_error(_("Failed to get bad sector emulation 
flag of device %i: %s") % (device, e))
+                        continue
+
+                    print("%-5s %i" % (device, enabled))
+            else:
+                try:
+                    device = int(arguments[0], 0)
+                    enabled = self.dbus_iface.DeviceGetOption(device, 
"bad-sector-emulation")
+                except dbus.DBusException as e:
+                    self.print_error(_("Failed to get bad sector emulation 
flag of device %i: %s") % (device, e))
+                    return False
+                except ValueError:
+                    self.print_error(_("String '%s' is not a number") % 
(arguments[0]))
+                    return False
+
+                print(_("Bad sector emulation flag of device %i: %i") % 
(device, enabled))
+
+        # Set bad sector emulation flag
+        elif len(arguments) == 2:
+            try:
+                enabled = int(arguments[1], 0) and True or False
+            except ValueError:
+                self.print_error(_("String '%s' is not a number") % 
(arguments[1]))
+                return False
+            if arguments[0] == "all":
+                try:
+                    nr_devices = self.dbus_iface.GetNumberOfDevices()
+                except dbus.DBusException as e:
+                    self.print_error(_("Failed to get number of devices: %s") 
% (e))
+                    return False
+
+                print(_("Setting bad sector emulation flag of all devices to 
%i.") % (enabled))
+                for device in range(0, nr_devices):
+                    try:
+                        self.dbus_iface.DeviceSetOption(device, 
"bad-sector-emulation", enabled)
+                    except dbus.DBusException as e:
+                        self.print_error(_("Failed to set bad sector emulation 
flag of device %i to %i: %s") % (device, enabled, e))
+                        continue
+            else:
+                try:
+                    device = int(arguments[0], 0)
+                except ValueError:
+                    self.print_error(_("String '%s' is not a number") % 
(arguments[0]))
+                    return False
+                print(_("Setting bad sector emulation flag of device %i to 
%i.") % (device, enabled))
+                try:
+                    self.dbus_iface.DeviceSetOption(device, 
"bad-sector-emulation", enabled)
+                except dbus.DBusException as e:
+                    self.print_error(_("Failed to set bad sector emulation 
flag of device %i to %i: %s") % (device, enabled, e))
+                    return False
+        else:
+            self.print_invalid_number_of_parameters("bad-sector-emulation")
+            return False
+
+        return True
 
     def cmd_device_id (self, arguments):
         # Get device ID
@@ -913,6 +987,11 @@
             _("displays/sets transfer rate emulation flag"),
             cmd_tr_emulation
         ], [
+            "bad-sector-emulation",
+            _("<device> [new value]"),
+            _("displays/sets bad sector emulation flag"),
+            cmd_bad_sector_emulation
+        ], [
             "device-id",
             _("<device> [new vendor_id] [new product_id] [new revision] [new 
vendor_specific]"),
             _("displays/sets device ID"),

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to