Fixed several debugprints (#785581).

Clean up and modernize spec file.
This commit is contained in:
Jiri Popelka 2012-01-30 16:13:49 +01:00
parent ae1c65f3a3
commit 989eac41de
2 changed files with 48 additions and 17 deletions

View File

@ -0,0 +1,39 @@
diff -up system-config-printer-1.3.8/newprinter.py.debuginfo system-config-printer-1.3.8/newprinter.py
--- system-config-printer-1.3.8/newprinter.py.debuginfo 2012-01-06 15:20:36.000000000 +0100
+++ system-config-printer-1.3.8/newprinter.py 2012-01-30 15:44:03.860339396 +0100
@@ -1429,7 +1429,7 @@ class NewPrinterGUI(GtkGUI):
new_environ['LC_ALL'] = "C"
new_environ['DISPLAY'] = ""
args = ["hp-info", "-x", "-i", "-d" + faxuri]
- debugprint (faxuri + ": " + args)
+ debugprint (faxuri + ": " + repr(args))
try:
p = subprocess.Popen (args, env=new_environ, close_fds=True,
stdin=file("/dev/null"),
@@ -1459,7 +1459,7 @@ class NewPrinterGUI(GtkGUI):
def get_hplip_scan_type_for_uri(self, uri):
args = ["hp-query", "-k", "scan-type", "-d", uri]
- debugprint (uri + ": " + args)
+ debugprint (uri + ": " + repr(args))
try:
p = subprocess.Popen (args, close_fds=True,
stdin=file("/dev/null"),
@@ -1488,7 +1488,7 @@ class NewPrinterGUI(GtkGUI):
elif mode == "fax": mod = "-f"
else: mod = "-c"
args = ["hp-makeuri", mod, host]
- debugprint (host + ": " + args)
+ debugprint (host + ": " + repr(args))
uri = None
try:
p = subprocess.Popen (args, close_fds=True,
@@ -1528,7 +1528,7 @@ class NewPrinterGUI(GtkGUI):
# Try to get make and model via SNMP
if host:
args = ["/usr/lib/cups/backend/snmp", host]
- debugprint (host + ": " + args)
+ debugprint (host + ": " + repr(args))
stdout = None
try:
p = subprocess.Popen (args, close_fds=True,

View File

@ -1,12 +1,13 @@
Summary: A printer administration tool Summary: A printer administration tool
Name: system-config-printer Name: system-config-printer
Version: 1.3.8 Version: 1.3.8
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/ URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base Group: System Environment/Base
Source0: http://cyberelk.net/tim/data/system-config-printer/1.3/%{name}-%{version}.tar.xz Source0: http://cyberelk.net/tim/data/system-config-printer/1.3/%{name}-%{version}.tar.xz
Patch1: system-config-printer-no-applet-in-gnome.patch Patch1: system-config-printer-no-applet-in-gnome.patch
Patch2: system-config-printer-1.3.8-debuginfo.patch
BuildRequires: cups-devel >= 1.2 BuildRequires: cups-devel >= 1.2
BuildRequires: desktop-file-utils >= 0.2.92 BuildRequires: desktop-file-utils >= 0.2.92
BuildRequires: gettext-devel BuildRequires: gettext-devel
@ -15,8 +16,6 @@ BuildRequires: libusb-devel, libudev-devel, glib2-devel
BuildRequires: xmlto BuildRequires: xmlto
BuildRequires: systemd-units BuildRequires: systemd-units
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: pygtk2%{?_isa} >= 2.12 Requires: pygtk2%{?_isa} >= 2.12
Requires: pygobject2%{?_isa} Requires: pygobject2%{?_isa}
Requires: desktop-file-utils >= 0.2.92 Requires: desktop-file-utils >= 0.2.92
@ -34,12 +33,6 @@ Requires(post): systemd-units
Requires(preun): systemd-units Requires(preun): systemd-units
Requires(postun): systemd-units Requires(postun): systemd-units
Obsoletes: system-config-printer-gui <= 0.6.152
Provides: system-config-printer-gui = 0.6.152
Obsoletes: desktop-printing <= 0.20-7.fc7
Provides: desktop-printing = 0.20-7.fc7
%description %description
system-config-printer is a graphical user interface that allows system-config-printer is a graphical user interface that allows
the user to configure a CUPS print server. the user to configure a CUPS print server.
@ -58,7 +51,7 @@ the configuration tool.
Summary: Rules for udev for automatic configuration of USB printers Summary: Rules for udev for automatic configuration of USB printers
Group: System Environment/Base Group: System Environment/Base
Requires: system-config-printer-libs = %{version}-%{release} Requires: system-config-printer-libs = %{version}-%{release}
Obsoletes: hal-cups-utils <= 0.6.20 Obsoletes: hal-cups-utils < 0.6.20
Provides: hal-cups-utils = 0.6.20 Provides: hal-cups-utils = 0.6.20
%description udev %description udev
@ -70,12 +63,13 @@ printers.
# Don't start the applet in GNOME. # Don't start the applet in GNOME.
%patch1 -p1 -b .no-applet-in-gnome %patch1 -p1 -b .no-applet-in-gnome
# Fix several debugprints (#785581)
%patch2 -p1 -b .debugprint
%build %build
%configure --with-udev-rules %configure --with-udev-rules
%install %install
rm -rf %buildroot
make DESTDIR=%buildroot install \ make DESTDIR=%buildroot install \
udevrulesdir=/lib/udev/rules.d \ udevrulesdir=/lib/udev/rules.d \
udevhelperdir=/lib/udev udevhelperdir=/lib/udev
@ -85,11 +79,7 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
%find_lang system-config-printer %find_lang system-config-printer
%clean
rm -rf %buildroot
%files libs -f system-config-printer.lang %files libs -f system-config-printer.lang
%defattr(-,root,root,-)
%doc COPYING %doc COPYING
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.NewPrinterNotification.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.NewPrinterNotification.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.PrinterDriversInstaller.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.PrinterDriversInstaller.conf
@ -141,7 +131,6 @@ rm -rf %buildroot
%{python_sitelib}/*.egg-info %{python_sitelib}/*.egg-info
%files udev %files udev
%defattr(-,root,root,-)
/lib/udev/rules.d/*.rules /lib/udev/rules.d/*.rules
/lib/udev/udev-*-printer /lib/udev/udev-*-printer
%ghost %dir %{_localstatedir}/run/udev-configure-printer %ghost %dir %{_localstatedir}/run/udev-configure-printer
@ -149,7 +138,6 @@ rm -rf %buildroot
%{_unitdir}/udev-configure-printer.service %{_unitdir}/udev-configure-printer.service
%files %files
%defattr(-,root,root,-)
%doc ChangeLog README %doc ChangeLog README
%{_bindir}/%{name} %{_bindir}/%{name}
%{_bindir}/%{name}-applet %{_bindir}/%{name}-applet
@ -197,6 +185,10 @@ if [ $1 -ge 1 ] ; then
fi fi
%changelog %changelog
* Mon Jan 30 2012 Jiri Popelka <jpopelka@redhat.com> 1.3.8-2
- Fixed several debugprints (#785581).
- Clean up and modernize spec file.
* Tue Jan 24 2012 Tim Waugh <twaugh@redhat.com> 1.3.8-1 * Tue Jan 24 2012 Tim Waugh <twaugh@redhat.com> 1.3.8-1
- 1.3.8: - 1.3.8:
- Avoid AttributeError in on_btnNPApply_clicked() (bug #772112). - Avoid AttributeError in on_btnNPApply_clicked() (bug #772112).