canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #04017
[Merge] ubuntu-qa-website:branch-series-lts into ubuntu-qa-website:main
Steve Langasek has proposed merging ubuntu-qa-website:branch-series-lts into ubuntu-qa-website:main.
Requested reviews:
Ubuntu QA Website Developers (ubuntu-qa-website-devel)
For more details, see:
https://code.launchpad.net/~ubuntu-qa-website-devel/ubuntu-qa-website/+git/ubuntu-qa-website/+merge/465935
Extend the branch-series handling for the case where the previous release is an LTS, as determined by distro-info:
- don't close the previous daily milestone
- do create download link records for the new stable series
The new SQL has been used to populate the download links for noble, so this should be good.
https://bugs.launchpad.net/bugs/2065306
--
Your team Ubuntu QA Website Developers is requested to review the proposed merge of ubuntu-qa-website:branch-series-lts into ubuntu-qa-website:main.
diff --git a/scripts/branch-series b/scripts/branch-series
index 3cda0af..05f387a 100755
--- a/scripts/branch-series
+++ b/scripts/branch-series
@@ -20,12 +20,18 @@ if [ -z "$OLDSERIES" ] || [ -z "$NEWSERIES" ]; then
exit 1
fi
-if ! distro-info --series $(echo "$OLDSERIES" | tr [A-Z] [a-z]) >/dev/null 2>&1
+oldseries=$(echo "$OLDSERIES" | tr [A-Z] [a-z])
+if ! distro-info --series $oldseries >/dev/null 2>&1
then
echo "Unknown series: $OLDSERIES" >&2
usage >&2
exit 1
fi
+LTS=0
+if [ "$oldseries" = $(distro-info --lts) ]; then
+ LTS=1
+fi
psql -U qatracker qatracker -f branch-series.sql \
- -v "OLDSERIES='$OLDSERIES'" -v "NEWSERIES='$NEWSERIES'"
+ -v "OLDSERIES='$OLDSERIES'" -v "NEWSERIES='$NEWSERIES'" \
+ -v "LTS=$LTS"
diff --git a/scripts/branch-series.sql b/scripts/branch-series.sql
index 17e4b58..5aafbfc 100644
--- a/scripts/branch-series.sql
+++ b/scripts/branch-series.sql
@@ -19,8 +19,17 @@ INSERT INTO qatracker_milestone (seriesid, siteid, title, notify, status,
autofill)
SELECT id, 1, INITCAP(:NEWSERIES) || ' Daily', 0, 0, 0
FROM qatracker_milestone_series WHERE title=INITCAP(:NEWSERIES);
--- correct for the common non-LTS case; make the calling script know the
--- difference
-UPDATE qatracker_milestone SET status=1 WHERE title=INITCAP(:OLDSERIES) || ' Daily';
+UPDATE qatracker_milestone SET status=1
+WHERE title=INITCAP(:OLDSERIES) || ' Daily' AND :LTS=0;
+INSERT INTO qatracker_product_download
+ (productid, seriesid, filename, path, type)
+ SELECT DISTINCT d.productid, s.id, d.filename,
+ REPLACE(d.path,'/d','/SERIES/d'), d.type
+ FROM qatracker_milestone_series s
+ LEFT JOIN qatracker_milestone_series_manifest m ON s.id=m.seriesid
+ LEFT JOIN qatracker_product p ON m.productid=p.id
+ LEFT JOIN qatracker_product_download d ON p.id=d.productid
+ WHERE s.title='Noble' AND d.seriesid IS NULL
+ AND d.productid IS NOT NULL AND :LTS=1;
DROP TABLE nextid;
COMMIT;
Follow ups