- Only run the foomatic PPD update script on update, and make sure the
script can deal with major version upgrades (bug #478328).
This commit is contained in:
parent
20107afb30
commit
4e06115449
@ -5,8 +5,8 @@
|
||||
## A utility for updating foomatic-generated PPDs so that they work with
|
||||
## a newly-installed gutenprint package.
|
||||
|
||||
## Copyright (C) 2007 Red Hat, Inc.
|
||||
## Copyright (C) 2007 Tim Waugh <twaugh@redhat.com
|
||||
## Copyright (C) 2007, 2009 Red Hat, Inc.
|
||||
## Copyright (C) 2007, 2009 Tim Waugh <twaugh@redhat.com
|
||||
|
||||
## 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
|
||||
@ -93,8 +93,15 @@ def update_ppdfile (ppdfile):
|
||||
return
|
||||
|
||||
# Needs updating.
|
||||
firstdot = gutenprint_version.find ('.')
|
||||
seconddot = firstdot + 1 + gutenprint_version[1 + firstdot:].find ('.')
|
||||
major = gutenprint_version[:seconddot]
|
||||
|
||||
driver = IDs[1]
|
||||
dot = driver.find ('.')
|
||||
driver = driver[:dot] + "." + major
|
||||
try:
|
||||
genppd = generate_ppd (ppdfile, IDs[0], IDs[1])
|
||||
genppd = generate_ppd (ppdfile, IDs[0], driver)
|
||||
except:
|
||||
return
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
Name: gutenprint
|
||||
Summary: Printer Drivers Package.
|
||||
Version: 5.2.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Group: System Environment/Base
|
||||
URL: http://gimp-print.sourceforge.net/
|
||||
Source0: http://dl.sf.net/gimp-print/gutenprint-%{version}.tar.bz2
|
||||
@ -246,12 +246,18 @@ exit 0
|
||||
|
||||
%post foomatic
|
||||
/bin/rm -f /var/cache/foomatic/*
|
||||
%{_sbindir}/gutenprint-foomaticppdupdate %{version} || :
|
||||
if [ $1 -eq 2 ]; then
|
||||
%{_sbindir}/gutenprint-foomaticppdupdate %{version} || :
|
||||
fi
|
||||
|
||||
%postun foomatic
|
||||
/bin/rm -f /var/cache/foomatic/*
|
||||
|
||||
%changelog
|
||||
* Thu Jan 8 2009 Tim Waugh <twaugh@redhat.com> 5.2.3-2
|
||||
- Only run the foomatic PPD update script on update, and make sure the
|
||||
script can deal with major version upgrades (bug #478328).
|
||||
|
||||
* Tue Dec 23 2008 Tim Waugh <twaugh@redhat.com> 5.2.3-1
|
||||
- 5.2.3.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user