Mailinglist Archive: opensuse-buildservice (327 mails)

< Previous Next >
[opensuse-buildservice] [PATCH] Also check if files are tracked by osc
Signed-off-by: Michal Marek <mmarek@xxxxxxx>
---
20-files-present-and-referenced | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/20-files-present-and-referenced b/20-files-present-and-referenced
index 146bd84..a456e0e 100755
--- a/20-files-present-and-referenced
+++ b/20-files-present-and-referenced
@@ -135,11 +135,26 @@ for i in `cat $TMPDIR/sources` ; do
done
mv $TMPDIR/sources.t $TMPDIR/sources

+check_tracked()
+{
+ local file=${1##*/}
+
+ if ! test -f "$DIR_TO_CHECK/$file"; then
+ echo "$file mentioned in spec file does not exist."
+ return 1
+ fi
+ if test -f "$DESTINATIONDIR/$file"; then
+ return 0
+ fi
+ if grep -qsFx "$file" "$DESTINATIONDIR/_to_be_added"; then
+ return 0
+ fi
+ echo "$file mentioned in spec file is not tracked."
+ return 1
+}
+
for HASTOBETHER in `cat $TMPDIR/sources` ; do
- test -f $DIR_TO_CHECK/$HASTOBETHER || {
- echo $HASTOBETHER mentioned in spec file does not exist.
- RETURN=1
- }
+ check_tracked "$HASTOBETHER" || RETURN=1
done

#
--
1.7.4.1

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References