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

Bug#779247: marked as done (tracker.debian.org: obsolete build reproducibility action item not removed)



Your message dated Thu, 26 Feb 2015 09:23:40 +0100
with message-id <20150226082340.GA7505@home.ouaza.com>
and subject line Re: Bug#779247: tracker.debian.org: obsolete build reproducibility action item not removed
has caused the Debian Bug report #779247,
regarding tracker.debian.org: obsolete build reproducibility action item not removed
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@bugs.debian.org
immediately.)


-- 
779247: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779247
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: tracker.debian.org
Severity: normal
Tags: patch

Dear Maintainer,

since version 7:2.5.4-1 ffmpeg is listed as "reproducible" in
reproducible.json [1], but the package tracker [2] still claims:
"Fails to build during reproducibility testing"

The info popup shows, that the action item hasn't been updated since
ffmpeg builds reproducibly:
"Severity: normal
Created: 2015-01-29
Last Updated: 2015-02-21"

So it seems the tracker doesn't delete obsolete action items.

The following patch might fix this:
--- a/distro_tracker/vendor/debian/tracker_tasks.py
+++ b/distro_tracker/vendor/debian/tracker_tasks.py
@@ -2349,5 +2349,5 @@ class UpdateBuildReproducibilityTask(BaseTask):
                 extracted_info.append(reproducibility_info)

             ActionItem.objects.delete_obsolete_items([self.action_item_type],
-                                                     packages)
+                                                     [])
             PackageExtractedInfo.objects.bulk_create(extracted_info)

The rationale for this change is that the second argument of delete_obsolete_items is the list of non_obsolete_packages, whose items are not to be removed. But packages contains a list of all packages with a reproducibility status.

However, I haven't tested this patch.

Best regards,
Andreas


1: https://reproducible.debian.net/reproducible.json
2: https://tracker.debian.org/pkg/ffmpeg

--- End Message ---
--- Begin Message ---
Hello Andreas,

On Wed, 25 Feb 2015, Andreas Cadhalpun wrote:
> So it seems the tracker doesn't delete obsolete action items.

Thanks for the report.

> The following patch might fix this:
> --- a/distro_tracker/vendor/debian/tracker_tasks.py
> +++ b/distro_tracker/vendor/debian/tracker_tasks.py
> @@ -2349,5 +2349,5 @@ class UpdateBuildReproducibilityTask(BaseTask):
>                  extracted_info.append(reproducibility_info)
> 
>              ActionItem.objects.delete_obsolete_items([self.action_item_type],
> -                                                     packages)
> +                                                     [])
>              PackageExtractedInfo.objects.bulk_create(extracted_info)
> 
> The rationale for this change is that the second argument of
> delete_obsolete_items is the list of non_obsolete_packages, whose items are
> not to be removed. But packages contains a list of all packages with a
> reproducibility status.

The diagnosis is right but the fix is wrong. The correct fix is to fill
"packages" with only relevant packages. Something like this:

diff --git a/distro_tracker/vendor/debian/tracker_tasks.py b/distro_tracker/vendor/debian/tracker_tasks.py
index 8727981..2e87b55 100644
--- a/distro_tracker/vendor/debian/tracker_tasks.py
+++ b/distro_tracker/vendor/debian/tracker_tasks.py
@@ -2308,8 +2308,8 @@ class UpdateBuildReproducibilityTask(BaseTask):
     def update_action_item(self, package, status):
         description = self.ITEM_DESCRIPTION.get(status)
 
-        if not (status and description):
-            return
+        if not description:  # Not worth an action item
+            return False
 
         action_item = package.get_action_item_for_type(
             self.action_item_type.type_name)
@@ -2322,6 +2322,7 @@ class UpdateBuildReproducibilityTask(BaseTask):
         url = "{}/rb-pkg/{}.html".format(self.BASE_URL, package.name)
         action_item.short_description = description.format(url=url)
         action_item.save()
+        return True
 
     def execute(self):
         reproducibilities = self.get_build_reproducibility()
@@ -2337,8 +2338,8 @@ class UpdateBuildReproducibilityTask(BaseTask):
             for name, status in reproducibilities.items():
                 try:
                     package = SourcePackageName.objects.get(name=name)
-                    packages.append(package)
-                    self.update_action_item(package, status)
+                    if self.update_action_item(package, status):
+                        packages.append(package)
                 except SourcePackageName.DoesNotExist:
                     continue

I have added a non-regression test and pushed a fix.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/

--- End Message ---

Reply to: