[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] modify blends_prospective_gatherer.py: check if dpkg-parsechangelog exists



Hi Akshita,

I applied your patch and commited another change:

$ git diff HEAD^
diff --git a/udd/blends_prospective_gatherer.py b/udd/blends_prospective_gatherer.py
index 3850e9f..bb646f8 100644
--- a/udd/blends_prospective_gatherer.py
+++ b/udd/blends_prospective_gatherer.py
@@ -147,7 +147,7 @@ class blends_prospective_gatherer(gatherer):
           if errstring != '':
             self.log.warning("Error parsing changelog of '%s' of %s\n %s:" % (source, sprosp['blend'], errstring))
        else:
-         self.log.warning("dpkg-parsechangelog file does not exist - make sure dpkg-dev is installed")
+         self.log.error("dpkg-parsechangelog file does not exist - make sure dpkg-dev is installed")
 
         for stanza in deb822.Sources.iter_paragraphs(p.stdout):
           if source != stanza['source']:

since the missing dpkg-parsechangelog has a major effect on the result.
May be its even better to stop execution at all.

Kind regards

       Andreas.

On Sat, Apr 18, 2015 at 03:11:04AM +0530, Akshita Jha wrote:
> ---
>  udd/blends_prospective_gatherer.py | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/udd/blends_prospective_gatherer.py b/udd/blends_prospective_gatherer.py
> index f8cb64a..3594e1a 100644
> --- a/udd/blends_prospective_gatherer.py
> +++ b/udd/blends_prospective_gatherer.py
> @@ -140,11 +140,15 @@ class blends_prospective_gatherer(gatherer):
>      	vcs.close()
>  
>          # Read output of dpkg-parsechangelog
> -        p = Popen("LC_ALL=C dpkg-parsechangelog -l"+upath+'/'+source+'.changelog', shell=True, bufsize=4096,
> -          stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
> -        errstring = p.stderr.read()
> -        if errstring != '':
> -          self.log.warning("Error parsing changelog of '%s' of %s\n %s:" % (source, sprosp['blend'], errstring))
> +	if exists('/usr/bin/dpkg-parsechangelog'):
> +          p = Popen("LC_ALL=C dpkg-parsechangelog -l"+upath+'/'+source+'.changelog', shell=True, bufsize=4096,
> +          	stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
> +          errstring = p.stderr.read()
> +          if errstring != '':
> +            self.log.warning("Error parsing changelog of '%s' of %s\n %s:" % (source, sprosp['blend'], errstring))
> +	else:
> +	  self.log.warning("dpkg-parsechangelog file does not exist")
> +
>          for stanza in deb822.Sources.iter_paragraphs(p.stdout):
>            if source != stanza['source']:
>              print >>stderr, "Something is wrong with changelog data of package '%s' of %s.  Changelog says source = '%s'." % (source, sprosp['blend'], stanza['source'])
> -- 
> 1.9.1
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-blends-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 1429306864-1287-1-git-send-email-akshita-guest@users.alioth.debian.org">https://lists.debian.org/[🔎] 1429306864-1287-1-git-send-email-akshita-guest@users.alioth.debian.org
> 
> 

-- 
http://fam-tille.de


Reply to: