On Friday 15 April 2011 11:06:22 Michal Marek wrote:
Hi Rudi, can you have a look at this patch? I also created a merge request on gitorious: https://gitorious.org/opensuse/osc-source_validator/merge_requests/1
well, this just opens up another hole to keep arbitrary files in the sources without having them mentioned in the specfile. What's the rationale to do this (and potentially not being able to rebuild a package from it's src-rpm) ?
Michal
On 14.4.2011 14:05, Michal Marek wrote:
Signed-off-by: Michal Marek
--- 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
#
-- with kind regards (mit freundlichem Grinsen), Ruediger Oertel (ro@novell.com,ro@suse.de,bugfinder@t-online.de) ---------------------------------------------------------------------- Linux fatou 2.6.38-2-desktop #1 SMP PREEMPT 2011-03-15 17:12:01 +0100 x86_64 Key fingerprint = 17DC 6553 86A7 384B 53C5 CA5C 3CE4 F2E7 23F2 B417 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org