From bba61b6b25d9e8f5415fcb8b8aaff710100ac9c7f33826a473db0070506fa9d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 15 Feb 2012 16:15:04 +0000 Subject: [PATCH] Accepting request 105038 from home:aspiers:branches:openSUSE:Tools As discussed with Adrian, there's no reason to ever keep the temporary uncompressed file. OBS-URL: https://build.opensuse.org/request/show/105038 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-recompress?expand=0&rev=9 --- obs-service-recompress.changes | 5 +++++ obs-service-recompress.spec | 7 ++++--- recompress | 6 ++---- 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 obs-service-recompress.changes diff --git a/obs-service-recompress.changes b/obs-service-recompress.changes new file mode 100644 index 0000000..3f43ccf --- /dev/null +++ b/obs-service-recompress.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Thu Feb 14 15:52:17 UTC 2012 - aspiers@suse.com + +- always remove uncompressed files +- fix rpmlint warnings diff --git a/obs-service-recompress.spec b/obs-service-recompress.spec index b92139e..5c3cf69 100644 --- a/obs-service-recompress.spec +++ b/obs-service-recompress.spec @@ -1,7 +1,7 @@ # # spec file for package obs-service-recompress # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,11 +18,12 @@ Name: obs-service-recompress -License: GPL v2 or later +License: GPL-2.0+ Group: Development/Tools/Building Summary: An OBS source service: Recompress files -Version: 0.1 +Version: 0.2 Release: 1 +Url: https://build.opensuse.org/package/show?package=obs-service-recompress&project=openSUSE%3ATools Source: recompress Source1: recompress.service Requires: xz gzip bzip2 diff --git a/recompress b/recompress index 2abb0cd..ddddff1 100644 --- a/recompress +++ b/recompress @@ -91,10 +91,8 @@ for i in $FILES; do # do the real work $UNCOMPRESS "$FILE" | $COMPRESS > "$MYOUTDIR/$NEWFILE" || exit 1 - if [ "${FILE#_service:}" != "$FILE" ]; then - # we can remove service files, no need to store them twice - rm -f "$FILE" - fi + # we can remove service files, no need to store them twice + rm -f "$FILE" done exit 0