Hello community,
here is the log from the commit of package osc-source_validator for
openSUSE:Factory
checked in at Mon Apr 18 12:26:30 CEST 2011.
--------
--- osc-source_validator/osc-source_validator.changes 2011-04-12
16:41:33.000000000 +0200
+++
/mounts/work_src_done/STABLE/osc-source_validator/osc-source_validator.changes
2011-04-18 01:07:34.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Apr 18 01:06:59 CEST 2011 - [email protected]
+
+- Also check if files are tracked by osc
+- catch some more syntax variants in check_patches_applied
+- do tracked-check only in osc mode
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ osc-source_validator.spec ++++++
--- /var/tmp/diff_new_pack.powERG/_old 2011-04-18 12:26:12.000000000 +0200
+++ /var/tmp/diff_new_pack.powERG/_new 2011-04-18 12:26:12.000000000 +0200
@@ -19,7 +19,7 @@
Name: osc-source_validator
Version: 0.1
-Release: 12
+Release: 14
License: GPLv2+
Summary: osc source validator
Url:
http://en.opensuse.org/openSUSE:Build_Service_Tools#OSC_source_validator
++++++ osc-source_validator-0.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/osc-source_validator-0.1/20-files-present-and-referenced
new/osc-source_validator-0.1/20-files-present-and-referenced
--- old/osc-source_validator-0.1/20-files-present-and-referenced
2011-04-12 16:39:54.000000000 +0200
+++ new/osc-source_validator-0.1/20-files-present-and-referenced
2011-04-18 01:02:49.000000000 +0200
@@ -4,9 +4,12 @@
test "$1" = "--batchmode" && { BATCHMODE=true ; shift ; }
DIR_TO_CHECK=$1
DESTINATIONDIR=$2
+OSC_MODE=""
test -n "$DIR_TO_CHECK" || DIR_TO_CHECK=`pwd`
-test -z "$DESTINATIONDIR" -a -d "$DIR_TO_CHECK/.osc" &&
DESTINATIONDIR="$DIR_TO_CHECK/.osc"
-
+test -z "$DESTINATIONDIR" -a -d "$DIR_TO_CHECK/.osc" && {
+ DESTINATIONDIR="$DIR_TO_CHECK/.osc"
+ OSC_MODE="true"
+}
RETURN=0
@@ -49,6 +52,7 @@
/^%global/{;p;d;}
/^%include/d
/^%rubygems_requires/d
+ /^%gconf_schemas_prereq/d
/^%requires_eq/{;p;d;}
/^%requires_ge/{;p;d;}
/^%ifarch/{
@@ -123,23 +127,40 @@
#
touch $TMPDIR/sources.t
grep -aq "command not found" $TMPDIR/sources && {
- echo "$0 seems to have problems evaluating macros in specfile."
- COMD=`grep -a "command not found" $TMPDIR/sources | head -n 1 | sed -e
"s@.*: \([^:]*\): command not found@\1@"`
- echo "command \"$COMD\" is not available used in the following defines:"
- grep -a "%define.*$COMD" $DIR_TO_CHECK/*.spec
- cleanup_and_exit 1
+ echo "$0 seems to have problems evaluating macros in specfile."
+ COMD=`grep -a "command not found" $TMPDIR/sources | head -n 1 | sed -e
"s@.*: \([^:]*\): command not found@\1@"`
+ echo "command \"$COMD\" is not available used in the following defines:"
+ grep -a "%define.*$COMD" $DIR_TO_CHECK/*.spec
+ cleanup_and_exit 1
}
for i in `cat $TMPDIR/sources` ; do
- echo "${i##*/}" >> $TMPDIR/sources.t
+ echo "${i##*/}" >> $TMPDIR/sources.t
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 "$OSC_MODE" = "true" ; then
+ 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
+ fi
+}
+
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
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/osc-source_validator-0.1/helpers/check_patches_applied
new/osc-source_validator-0.1/helpers/check_patches_applied
--- old/osc-source_validator-0.1/helpers/check_patches_applied 2011-04-12
16:39:54.000000000 +0200
+++ new/osc-source_validator-0.1/helpers/check_patches_applied 2011-04-18
01:02:49.000000000 +0200
@@ -41,7 +41,8 @@
my $applied = (/^#/) ? 2 :1;
my @line = split (/\s+/,$_);
my $had_P = grep {/^-P/} @line;
- while (my $arg = shift (@line)) {
+ while (@line) {
+ my $arg = shift (@line);
if ($arg eq "-P") {
$arg = shift (@line);
if ($arg =~ /^[0-9]/) {
@@ -53,7 +54,7 @@
} elsif ($arg =~ /^-P/) {
$arg =~ s/^-P//;
if ($arg =~ /^[0-9]/) {
- $APPLIED[$arg] = $applied;
+ $APPLIED[$arg] = $applied unless $APPLIED[$arg];
} else {
print STDERR "$col_red(E) %patch -P without
following numeric argument$col_norm\n";
$errors++;
@@ -61,12 +62,12 @@
} elsif ($arg =~ /^(#.*)?%[Pp]atch$/) {
unless ($had_P) {
$arg = 0;
- $APPLIED[$arg] = $applied;
+ $APPLIED[$arg] = $applied unless $APPLIED[$arg];
}
} elsif ($arg =~ /^(#.*)?%[Pp]atch/) {
$arg =~ s/^(#.*)?%[Pp]atch//;
if ($arg =~ /^[0-9]/) {
- $APPLIED[$arg] = $applied;
+ $APPLIED[$arg] = $applied unless $APPLIED[$arg];
} else {
print STDERR "$col_red(E) %patchZZZ without
following numeric argument$col_norm\n";
$errors++;
@@ -78,7 +79,7 @@
if (/%\{?(PATCH|Patch|patch|P:)[0-9]+\}?/) {
$_ =~ s/^.*%\{?(PATCH|Patch|patch|P:)//;
$_ =~ s/^([0-9]*).*$/$1/;
- $APPLIED[$_] = 3 if (/[0-9]+/);
+ $APPLIED[$_] = 3 if (/[0-9]+/ && !$APPLIED[$_]);
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]