]> git.donarmstrong.com Git - wannabuild.git/commitdiff
Allow importing packages without version if the state is not-for-us.
authorKurt Roeckx <kurt@roeckx.be>
Fri, 4 Sep 2009 18:02:16 +0000 (18:02 +0000)
committerKurt Roeckx <kurt@roeckx.be>
Fri, 4 Sep 2009 18:02:16 +0000 (18:02 +0000)
The version doesn't get updated anyway.

bin/wanna-build

index 8401dff42a9b8d93bd25682eb1c20cb53c4b9424..5b6fd6784b3ed1a748b5f189dad5a8eebe918a3e 100755 (executable)
@@ -1938,14 +1938,14 @@ sub check_entry {
                          join( "\n", map { "$_: $pkg->{$_}" } keys %$pkg ), "\n";
                die "Database entry lacks package or username field\n";
        }
-       if (!exists $pkg->{'version'}) {
-               die "Database entry for $pkg->{'package'} lacks Version: field\n";
-       }
        # if no State: field, generate one (for old db compat)
        if (!exists($pkg->{'state'})) {
                $pkg->{'state'} =
                        exists $pkg->{'failed'} ? 'Failed' : 'Building';
        }
+       if (!exists $pkg->{'version'} and $pkg->{'state'} ne 'Not-For-Us') {
+               die "Database entry for $pkg->{'package'} lacks Version: field\n";
+       }
        # check state field
        die "Bad state $pkg->{'state'} of package $pkg->{Package}\n"
                if !isin( $pkg->{'state'},