more check about specfile
authorZhang Qiang <qiang.z.zhang@intel.com>
Sun, 16 Sep 2012 06:02:32 +0000 (14:02 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Sun, 16 Sep 2012 06:02:32 +0000 (14:02 +0800)
Change-Id: I8f2aafc7fdf8976613af2d3d46cc1ba5cf62dba0

depanneur

index e1201ba..5f579b6 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -372,8 +372,8 @@ sub prepare_git {
     my $prj = basename($base);
 
     my $pack = Build::Rpm::parse($config, $spec);
-    if (! exists $pack->{name}) {
-        debug("failed to parse spec file: $spec");
+    if (! exists $pack->{name} || ! exists $pack->{version} || ! exists $pack->{release}) {
+        debug("failed to parse spec file: $spec, name,version,release fields must be present");
         return;
     }
     my $pkg_name = $pack->{name};