Your message dated Tue, 26 Aug 2014 00:11:19 +0200
with message-id <20140825221119.gb9...@x230-buxy.home.ouaza.com>
and subject line Re: Bug#759171: Subject: [PATCH] Fix links to debci logs for 
lib packages.
has caused the Debian Bug report #759171,
regarding Subject: [PATCH] Fix links to debci logs for lib packages.
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 ow...@bugs.debian.org
immediately.)


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


---
 distro_tracker/vendor/debian/tests.py         | 30 +++++++++++++++++++++++++++
 distro_tracker/vendor/debian/tracker_tasks.py |  6 +++++-
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/distro_tracker/vendor/debian/tests.py
b/distro_tracker/vendor/debian/tests.py
index c98fe7f..ca61f23 100644
--- a/distro_tracker/vendor/debian/tests.py
+++ b/distro_tracker/vendor/debian/tests.py
@@ -4711,6 +4711,36 @@ class UpdateDebciStatusTaskTest(TestCase):

         self.assertEqual(ActionItem.objects.count(), 0)

+    def test_lib_package_link(self, mock_requests):
+        """
+        Tests that links to lib packages' log files are correct.
+        """
+        libpackage = SourcePackageName.objects.create(name='libpackage')
+        json_data = """
+            [{
+                "run_id": "20140705_143518",
+                "package": "libpackage",
+                "version": "3.0-3",
+                "date": "2014-07-05 17:33:08",
+                "status": "fail",
+                "blame": [ ],
+                "previous_status": "fail",
+                "duration_seconds": "222",
+                "duration_human": "0h 3m 42s",
+                "message": "Tests failed"
+            }]
+        """
+        set_mock_response(mock_requests, text=json_data)
+
+        self.run_task()
+
+        action_item = libpackage.action_items.all()[0]
+        action_item_log_url = action_item.extra_data['log']
+        log_url = "http://ci.debian.net/data/packages/unstable/amd64/libp/"; + \
+            "libpackage/latest-autopkgtest/log"
+
+        self.assertEqual(action_item_log_url, log_url)
+

 @mock.patch('distro_tracker.core.utils.http.requests')
 class UpdateAutoRemovalsStatsTaskTest(TestCase):
diff --git a/distro_tracker/vendor/debian/tracker_tasks.py
b/distro_tracker/vendor/debian/tracker_tasks.py
index 7376cb3..42a266c 100644
--- a/distro_tracker/vendor/debian/tracker_tasks.py
+++ b/distro_tracker/vendor/debian/tracker_tasks.py
@@ -2085,9 +2085,13 @@ class UpdateDebciStatusTask(BaseTask):
                 severity=ActionItem.SEVERITY_HIGH)

         package_name = debci_status.get('package')
+        if package_name[:3] == 'lib':
+            log_dir = package_name[:4]
+        else:
+            log_dir = package_name[:1]
         url = 'http://ci.debian.net/#package/' + package_name
         log = 'http://ci.debian.net/data/packages/unstable/amd64/' + \
-            package_name[:1] + "/" + package_name + '/latest-autopkgtest/log'
+            log_dir + "/" + package_name + '/latest-autopkgtest/log'
         debci_action_item.short_description = self.ITEM_DESCRIPTION.format(
             debci_url=url,
             log_url=log)
-- 
1.9.1

--- End Message ---
--- Begin Message ---
On Sun, 24 Aug 2014, Andrew Starr-Bochicchio wrote:
> Package: tracker.debian.org
> Tags: patch

Thanks, merged, will deploy tomorrow.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/

--- End Message ---

Reply via email to