3
import re, sys, fileinput
5
skip_packages = ('openoffice.org-dbg')
7
def gen_transitonal_packages():
9
copy_fields = ('Section', 'Architecture', 'Priority', 'Description')
10
copy_fields = ('Section', 'Priority', 'Description')
12
for line in fileinput.input():
16
f, v = line.split(':', 1)
19
if v.startswith('libreoffice-'):
20
n = v.replace('libreoffice-', 'openoffice.org-')
26
if not skip and f in copy_fields:
29
for p, attrs in pkgs.iteritems():
30
if p in skip_packages:
32
print "Package: %s" % p
33
print "Architecture: all"
34
for f, v in attrs.items():
35
if f in ('Depends', 'Description'):
37
print "%s: %s" % (f, v)
38
print "Depends: %s" % attrs['Depends']
39
print "Description: %s" % attrs['Description']
40
print " This is a transitional package, replacing the OpenOffice.org packaging"
41
print " with the LibreOffice packaging."
43
print " It can be safely removed after an upgrade."
47
gen_transitonal_packages()