[med-svn] [Git][med-team/community/helper-scripts][master] Script to seek outdated Debian Med packages (as its regularly runned by pkg R team)

Andreas Tille gitlab at salsa.debian.org
Sun Jul 1 08:00:25 BST 2018


Andreas Tille pushed to branch master at Debian Med / community / helper-scripts


Commits:
a88d96a4 by Andreas Tille at 2018-07-01T08:59:35+02:00
Script to seek outdated Debian Med packages (as its regularly runned by pkg R team)

- - - - -


1 changed file:

- + seek_outdated_med-packages


Changes:

=====================================
seek_outdated_med-packages
=====================================
--- /dev/null
+++ b/seek_outdated_med-packages
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+OUTFILE=outdated_med-packages.txt
+
+export LC_ALL=C.UTF-8
+
+echo "Last-Update: `date -R`" > $OUTFILE
+echo >> $OUTFILE
+
+export PGPASSWORD="public-udd-mirror"
+psql --host=public-udd-mirror.xvm.mit.edu --username=public-udd-mirror udd >> $OUTFILE <<EOT
+SELECT source  AS "source                       ", version, upstream_version, 
+       array_to_string(uploaders,',') AS "uploaders                      ",
+        changed_by_name AS "Last uploader       ", date AS "Last uploaded" FROM (
+  SELECT distinct u.source,
+         regexp_replace(regexp_replace(regexp_replace(u.version, '^[0-9]:', ''), '-[0-9]+$', ''), '\+dfsg[0-9]*', '') AS version,
+         upstream_version, status, up.uploaders, uh.changed_by_name, uh.date
+    FROM upstream u 
+    JOIN (SELECT source, package, release, maintainer_email, regexp_replace(version, '\+b[0-9]+$', '') AS version FROM packages)  p ON p.source=u.source -- make sure binNMU version will be stripped
+    JOIN (SELECT DISTINCT array_agg(name) AS uploaders, source, version FROM uploaders WHERE release = 'sid' GROUP by source, version) up ON up.source=p.source AND up.version = p.version
+    JOIN (SELECT source, changed_by_name, version, date, row_number FROM
+             (SELECT source, changed_by_name, version, date, row_number() OVER (PARTITION BY source ORDER BY date DESC) FROM upload_history ) tmp
+              WHERE row_number = 1) uh ON uh.source=p.source AND uh.version = p.version
+    WHERE p.maintainer_email = 'debian-med-packaging at lists.alioth.debian.org'
+      AND status NOT in ( 'up to date', 'only older package available')
+      AND upstream_version is not null -- this is caused by missing or broken watch files - it would better to fix these instead
+      AND p.release = 'sid' order by source
+ ) tmp;
+EOT
+
+echo
+
+psql --host=public-udd-mirror.xvm.mit.edu --username=public-udd-mirror udd >> $OUTFILE <<EOT
+  SELECT b.source AS "source                       ", id, -- status,
+         severity, title FROM bugs b
+  JOIN (SELECT source, maintainer_email FROM (
+          SELECT source, maintainer_email, version, row_number() OVER (PARTITION BY source ORDER BY version DESC) FROM sources
+       ) tmp WHERE row_number = 1 ) s ON s.source = b.source
+  WHERE maintainer_email = 'debian-med-packaging at lists.alioth.debian.org' AND status != 'done'
+  ORDER BY b.source, id;
+EOT



View it on GitLab: https://salsa.debian.org/med-team/community/helper-scripts/commit/a88d96a443cafe2e50bfcbb8656328d59c839168

-- 
View it on GitLab: https://salsa.debian.org/med-team/community/helper-scripts/commit/a88d96a443cafe2e50bfcbb8656328d59c839168
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180701/4e6336ef/attachment-0001.html>


More information about the debian-med-commit mailing list