From 14b281b156f08d01825f638f45b3b35d920ef1c0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 7 Aug 2013 12:46:30 +0000 Subject: [PATCH] [rt] genpatch.py: Accept missing series-rt svn path=/dists/sid/linux/; revision=20449 --- debian/changelog | 1 + debian/patches/features/all/rt/genpatch.py | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 877d20ce9..ca55a6ed8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -77,6 +77,7 @@ linux (3.10.5-1) UNRELEASED; urgency=low * ext4: fix retry handling in ext4_ext_truncate() * atl1c: Fix misuse of netdev_alloc_skb in refilling rx ring (Closes: #718505) + * [rt] genpatch.py: Accept missing series-rt -- Ben Hutchings Tue, 30 Jul 2013 18:09:20 +0200 diff --git a/debian/patches/features/all/rt/genpatch.py b/debian/patches/features/all/rt/genpatch.py index a494f9b38..83a6ccb1c 100755 --- a/debian/patches/features/all/rt/genpatch.py +++ b/debian/patches/features/all/rt/genpatch.py @@ -9,11 +9,15 @@ def main(source_dir, version): old_series = set() new_series = set() - with open(os.path.join(patch_dir, series_name), 'r') as series_fh: - for line in series_fh: - name = line.strip() - if name != '' and name[0] != '#': - old_series.add(name) + try: + with open(os.path.join(patch_dir, series_name), 'r') as series_fh: + for line in series_fh: + name = line.strip() + if name != '' and name[0] != '#': + old_series.add(name) + except IOError, e: + if e.errno != errno.ENOENT: + raise with open(os.path.join(patch_dir, series_name), 'w') as series_fh: # Add directory prefix to all filenames.