Activity log for bug #1737126

Date Who What changed Old value New value Message
2017-12-08 09:28:06 Dmitrii Shcherbakov bug added bug
2018-05-28 10:16:12 Dmitrii Shcherbakov description Need to backport this to be able to match tag names that contain dashes: http://bazaar.launchpad.net/~simplestreams-dev/simplestreams/trunk/revision/445 commit 2df782018dda0b58f2296b981e6eef2cc08b9ab0 Author: Lee Trager <lee.trager@canonical.com> Date: Mon Oct 17 13:26:06 2016 -0700 Allow filtered fields to contain a '-' diff --git a/simplestreams/filters.py b/simplestreams/filters.py index 5e93ce4..3818949 100644 --- a/simplestreams/filters.py +++ b/simplestreams/filters.py @@ -22,7 +22,7 @@ import re class ItemFilter(object): def __init__(self, content, noneval=""): - rparsefmt = r"(\w+)[ ]*([!]{0,1}[=~])[ ]*(.*)[ ]*$" + rparsefmt = r"([\w|\-]+)[ ]*([!]{0,1}[=~])[ ]*(.*)[ ]*$" parsed = re.match(rparsefmt, content) if not parsed: I was trying to match by bootloader-type: sstream-mirror --progress --max=1 --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg http://images.maas.io/ephemeral-v3/daily/ ~/mirror/images.maas.io/ephemeral-v3/daily/ 'bootloader-type=~(pxe|(^$))' 'arch=amd64' 'subarch~((ga-16.04)|(^$))' 'kflavor~((generic)|(^$))' 'content_id~((com.ubuntu.maas:daily:1:bootloader-download)|com.ubuntu.maas.daily:v3)' Traceback (most recent call last): File "/usr/bin/sstream-mirror", line 157, in <module> main() File "/usr/bin/sstream-mirror", line 112, in main filter_list = filters.get_filters(args.filters) File "/usr/lib/python3/dist-packages/simplestreams/filters.py", line 62, in get_filters flist.append(ItemFilter(f, noneval=noneval)) File "/usr/lib/python3/dist-packages/simplestreams/filters.py", line 29, in __init__ raise ValueError("Unable to parse expression %s" % content) ValueError: Unable to parse expression bootloader-type=~(pxe|(^$)) [Impact] Matching by fields that have a dash in their name fails ("bootloader-type" in this case). sstream-mirror --progress --max=1 --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg http://images.maas.io/ephemeral-v3/daily/ ~/mirror/images.maas.io/ephemeral-v3/daily/ 'bootloader-type=~(pxe|(^$))' 'arch=amd64' 'subarch~((ga-16.04)|(^$))' 'kflavor~((generic)|(^$))' 'content_id~((com.ubuntu.maas:daily:1:bootloader-download)|com.ubuntu.maas.daily:v3)' Traceback (most recent call last):   File "/usr/bin/sstream-mirror", line 157, in <module>     main()   File "/usr/bin/sstream-mirror", line 112, in main     filter_list = filters.get_filters(args.filters)   File "/usr/lib/python3/dist-packages/simplestreams/filters.py", line 62, in get_filters     flist.append(ItemFilter(f, noneval=noneval))   File "/usr/lib/python3/dist-packages/simplestreams/filters.py", line 29, in __init__     raise ValueError("Unable to parse expression %s" % content) ValueError: Unable to parse expression bootloader-type=~(pxe|(^$)) [Test Case] This is both a test case and a reproducer on a Xenial machine: sstream-mirror --progress --max=1 --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg http://images.maas.io/ephemeral-v3/daily/ ~/mirror/images.maas.io/ephemeral-v3/daily/ 'bootloader-type=~(pxe|(^$))' 'arch=amd64' 'subarch~((ga-16.04)|(^$))' 'kflavor~((generic)|(^$))' 'content_id~((com.ubuntu.maas:daily:1:bootloader-download)|com.ubuntu.maas.daily:v3)' [Regression Potential] None [Other Info] Need to backport this to be able to match tag names that contain dashes: http://bazaar.launchpad.net/~simplestreams-dev/simplestreams/trunk/revision/445 commit 2df782018dda0b58f2296b981e6eef2cc08b9ab0 Author: Lee Trager <lee.trager@canonical.com> Date: Mon Oct 17 13:26:06 2016 -0700     Allow filtered fields to contain a '-' diff --git a/simplestreams/filters.py b/simplestreams/filters.py index 5e93ce4..3818949 100644 --- a/simplestreams/filters.py +++ b/simplestreams/filters.py @@ -22,7 +22,7 @@ import re  class ItemFilter(object):      def __init__(self, content, noneval=""): - rparsefmt = r"(\w+)[ ]*([!]{0,1}[=~])[ ]*(.*)[ ]*$" + rparsefmt = r"([\w|\-]+)[ ]*([!]{0,1}[=~])[ ]*(.*)[ ]*$"          parsed = re.match(rparsefmt, content)          if not parsed:
2018-05-28 10:31:47 Launchpad Janitor merge proposal linked https://code.launchpad.net/~dmitriis/ubuntu/+source/simplestreams/+git/simplestreams/+merge/346958
2018-05-28 10:35:24 Dmitrii Shcherbakov simplestreams: status New In Progress
2018-05-28 10:35:31 Dmitrii Shcherbakov simplestreams: assignee Dmitrii Shcherbakov (dmitriis)
2018-05-28 10:37:01 Dmitrii Shcherbakov bug added subscriber Ubuntu Sponsors Team
2018-05-28 10:43:59 Dmitrii Shcherbakov summary [xenial-updates-backport] support dash "-" in a tag name for filters [sru][xenial-updates-backport] support dash "-" in a tag name for filters
2019-12-23 17:36:33 Dmitrii Shcherbakov simplestreams: assignee Dmitrii Shcherbakov (dmitriis)