Bug#495482: Minor Debcheck patch: Availability state

View: New views
2 Messages — Rating Filter:   Alert me  

Bug#495482: Minor Debcheck patch: Availability state

by Christoph Berg-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Package: qa.debian.org
Severity: normal
Tags: patch
User: qa.debian.org@...
Usertags: debcheck

Christoph
--
cb@... | http://www.df7cb.de/

Hi weasel, hi debian-qa,

I’m looking around the various qa scripts and did a mini patch to get
used to the tools.

This patch strips changes the output from

Package has a Depends on ghc6 (<< 6.6+) which cannot be satisfied on
mips. ghc6 (<< 6.6+) 6.8.2-5 is available.

to

Package has a Depends on ghc6 (<< 6.6+) which cannot be satisfied on
mips. ghc6 6.8.2-5 is available.

i.e. it prints the package name, no the whole dependency string in the
"is available" part.

Please consider applying it to the qa repository.

Thanks and greetings from Mar del Plata,
Joachim

--
Joachim "nomeata" Breitner
Debian Developer
  nomeata@... | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@... | http://people.debian.org/~nomeata

[debcheck-avilability.patch]

Index: debcheck
===================================================================
--- debcheck (Revision 1924)
+++ debcheck (Arbeitskopie)
@@ -569,6 +569,18 @@
 ###########################################################################
 ################### OUTPUT ################################################
 ###########################################################################
+
+# This helper function takes a partdependency (e.g. "hello (= 1.10)") and
+# returns just the package name.
+sub extract_package_name($) {
+  my ($partdependency) = @_;
+  if ($partdependency =~ /^\s*([a-zA-Z0-9.+_-]+)\s*(?:\((.*)\))?\s*(?:\[\s*(.*?)\s*\])?$/x) {
+ return $1;
+ } else {
+ return "parse error";
+ }
+}
+
 sub builddepends($$$$$) {
  my ($pkg, $prob, $maint, $section, $Rarchs) = @_;
   print FILE "<h1>BuildDepends</h1><p>";
@@ -578,7 +590,7 @@
  for my $arch (keys %{$prob->{$dependency}->{$partdependency}}) {
  print FILE "Package declares a build time dependency on $dependency which cannot be satisfied on $arch.";
  if ($prob->{$dependency}->{$partdependency}->{$arch} ne '') {
- print FILE " $partdependency ".$prob->{$dependency}->{$partdependency}->{$arch}." is available.";
+ print FILE " ".extract_package_name($partdependency)." ".$prob->{$dependency}->{$partdependency}->{$arch}." is available.";
  };
  my $exists = exists $Rarchs->{$arch}->{'packages'}->{$pkg};
  unless ($exists) {
@@ -602,7 +614,7 @@
  for my $arch (keys %{$prob->{$dependency}->{$partdependency}}) {
  print FILE "Package declares a build time dependency on $partdependency which cannot be satisfied on $arch.";
  if ($prob->{$dependency}->{$partdependency}->{$arch} ne '') {
- print FILE " $partdependency ".$prob->{$dependency}->{$partdependency}->{$arch}." is available.";
+ print FILE " ".extract_package_name($partdependency)." ".$prob->{$dependency}->{$partdependency}->{$arch}." is available.";
  };
  print FILE " At least one of $dependency can be satisfied however.<br>\n";
  $broken_archs{$arch}=1;
@@ -740,7 +752,7 @@
  for my $arch (keys %{$prob->{$depType}->{$depTarget}->{$partdepTarget}}) {
  print FILE "Package has a $depType on $depTarget which cannot be satisfied on $arch.";
  if ($prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch} ne '') {
- print FILE " $partdepTarget ".$prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch}." is available.";
+  print FILE " ".extract_package_name($partdepTarget)." ".$prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch}." is available.";
  };
  print FILE "<br>\n";
  $broken_archs{$arch}=1;
@@ -763,7 +775,7 @@
  for my $arch (keys %{$prob->{$depType}->{$depTarget}->{$partdepTarget}}) {
  print FILE "Package has a $depType on $partdepTarget which cannot be satisfied on $arch.";
  if ($prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch} ne '') {
- print FILE " $partdepTarget ".$prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch}." is available.";
+  print FILE " ".extract_package_name($partdepTarget)." ".$prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch}." is available.";
  };
  print FILE " At least one of $depTarget can be satisfied however.<br>\n";
  $broken_archs{$arch}=1;




signature.asc (204 bytes) Download Attachment
signature.asc (204 bytes) Download Attachment

Bug#495482: marked as done (Minor Debcheck patch: Availability state)

by Debian Bug Tracking System :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Your message dated Sat, 26 Sep 2009 23:33:47 +0000
with message-id <E1Mrglv-00048j-S3@...>
and subject line qa.debian.org bug fixed in revision 2282
has caused the Debian Bug report #495482,
regarding Minor Debcheck patch: Availability state
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@...
immediately.)


--
495482: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495482
Debian Bug Tracking System
Contact owner@... with problems

Package: qa.debian.org
Severity: normal
Tags: patch
User: qa.debian.org@...
Usertags: debcheck

Christoph
--
cb@... | http://www.df7cb.de/

Hi weasel, hi debian-qa,

I’m looking around the various qa scripts and did a mini patch to get
used to the tools.

This patch strips changes the output from

Package has a Depends on ghc6 (<< 6.6+) which cannot be satisfied on
mips. ghc6 (<< 6.6+) 6.8.2-5 is available.

to

Package has a Depends on ghc6 (<< 6.6+) which cannot be satisfied on
mips. ghc6 6.8.2-5 is available.

i.e. it prints the package name, no the whole dependency string in the
"is available" part.

Please consider applying it to the qa repository.

Thanks and greetings from Mar del Plata,
Joachim

--
Joachim "nomeata" Breitner
Debian Developer
  nomeata@... | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@... | http://people.debian.org/~nomeata

[debcheck-avilability.patch]

Index: debcheck
===================================================================
--- debcheck (Revision 1924)
+++ debcheck (Arbeitskopie)
@@ -569,6 +569,18 @@
 ###########################################################################
 ################### OUTPUT ################################################
 ###########################################################################
+
+# This helper function takes a partdependency (e.g. "hello (= 1.10)") and
+# returns just the package name.
+sub extract_package_name($) {
+  my ($partdependency) = @_;
+  if ($partdependency =~ /^\s*([a-zA-Z0-9.+_-]+)\s*(?:\((.*)\))?\s*(?:\[\s*(.*?)\s*\])?$/x) {
+ return $1;
+ } else {
+ return "parse error";
+ }
+}
+
 sub builddepends($$$$$) {
  my ($pkg, $prob, $maint, $section, $Rarchs) = @_;
   print FILE "<h1>BuildDepends</h1><p>";
@@ -578,7 +590,7 @@
  for my $arch (keys %{$prob->{$dependency}->{$partdependency}}) {
  print FILE "Package declares a build time dependency on $dependency which cannot be satisfied on $arch.";
  if ($prob->{$dependency}->{$partdependency}->{$arch} ne '') {
- print FILE " $partdependency ".$prob->{$dependency}->{$partdependency}->{$arch}." is available.";
+ print FILE " ".extract_package_name($partdependency)." ".$prob->{$dependency}->{$partdependency}->{$arch}." is available.";
  };
  my $exists = exists $Rarchs->{$arch}->{'packages'}->{$pkg};
  unless ($exists) {
@@ -602,7 +614,7 @@
  for my $arch (keys %{$prob->{$dependency}->{$partdependency}}) {
  print FILE "Package declares a build time dependency on $partdependency which cannot be satisfied on $arch.";
  if ($prob->{$dependency}->{$partdependency}->{$arch} ne '') {
- print FILE " $partdependency ".$prob->{$dependency}->{$partdependency}->{$arch}." is available.";
+ print FILE " ".extract_package_name($partdependency)." ".$prob->{$dependency}->{$partdependency}->{$arch}." is available.";
  };
  print FILE " At least one of $dependency can be satisfied however.<br>\n";
  $broken_archs{$arch}=1;
@@ -740,7 +752,7 @@
  for my $arch (keys %{$prob->{$depType}->{$depTarget}->{$partdepTarget}}) {
  print FILE "Package has a $depType on $depTarget which cannot be satisfied on $arch.";
  if ($prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch} ne '') {
- print FILE " $partdepTarget ".$prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch}." is available.";
+  print FILE " ".extract_package_name($partdepTarget)." ".$prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch}." is available.";
  };
  print FILE "<br>\n";
  $broken_archs{$arch}=1;
@@ -763,7 +775,7 @@
  for my $arch (keys %{$prob->{$depType}->{$depTarget}->{$partdepTarget}}) {
  print FILE "Package has a $depType on $partdepTarget which cannot be satisfied on $arch.";
  if ($prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch} ne '') {
- print FILE " $partdepTarget ".$prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch}." is available.";
+  print FILE " ".extract_package_name($partdepTarget)." ".$prob->{$depType}->{$depTarget}->{$partdepTarget}->{$arch}." is available.";
  };
  print FILE " At least one of $depTarget can be satisfied however.<br>\n";
  $broken_archs{$arch}=1;




Version: 2282

This bug was closed by Raphael Geissert (geissert) in SVN revision 2282.
Note that it might take some time until the qa.debian.org code has
been updated and cronjobs have picked up changed data.

Commit message:

Strip the version constraint on debcheck when printing available
version (Closes: #495482). Based on patch by Joachim Breitner, thanks.




signature.asc (204 bytes) Download Attachment
signature.asc (204 bytes) Download Attachment