[sru][xenial-updates-backport] support dash "-" in a tag name for filters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
simplestreams |
In Progress
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Matching by fields that have a dash in their name fails ("bootloader-type" in this case).
sstream-mirror --progress --max=1 --keyring=
Traceback (most recent call last):
File "/usr/bin/
main()
File "/usr/bin/
filter_list = filters.
File "/usr/lib/
flist.
File "/usr/lib/
raise ValueError("Unable to parse expression %s" % content)
ValueError: Unable to parse expression bootloader-
[Test Case]
This is both a test case and a reproducer on a Xenial machine:
sstream-mirror --progress --max=1 --keyring=
[Regression Potential]
None
[Other Info]
Need to backport this to be able to match tag names that contain dashes:
http://
commit 2df782018dda0b5
Author: Lee Trager <email address hidden>
Date: Mon Oct 17 13:26:06 2016 -0700
Allow filtered fields to contain a '-'
diff --git a/simplestreams
index 5e93ce4..3818949 100644
--- a/simplestreams
+++ b/simplestreams
@@ -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:
Related branches
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 29 lines (+7/-1)2 files modifieddebian/changelog (+6/-0)
simplestreams/filters.py (+1/-1)
description: | updated |
Changed in simplestreams: | |
status: | New → In Progress |
assignee: | nobody → Dmitrii Shcherbakov (dmitriis) |
summary: |
- [xenial-updates-backport] support dash "-" in a tag name for filters + [sru][xenial-updates-backport] support dash "-" in a tag name for + filters |
Changed in simplestreams: | |
assignee: | Dmitrii Shcherbakov (dmitriis) → nobody |