Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-rpm-macros for openSUSE:Factory checked in at 2021-07-09 23:56:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-rpm-macros (Old) and /work/SRC/openSUSE:Factory/.python-rpm-macros.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rpm-macros" Fri Jul 9 23:56:35 2021 rev:36 rq:904437 version:20210628.eccf3f2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-rpm-macros/python-rpm-macros.changes 2021-02-08 11:47:14.101691299 +0100 +++ /work/SRC/openSUSE:Factory/.python-rpm-macros.new.2625/python-rpm-macros.changes 2021-07-09 23:56:36.745796834 +0200 @@ -1,0 +2,14 @@ +Tue Jun 29 20:51:43 UTC 2021 - mc...@cepl.eu + +- Update to version 20210628.eccf3f2: + * fix boolean split gh#openSUSE/python-rpm-macros#111 + +------------------------------------------------------------------- +Mon Jun 07 12:15:13 UTC 2021 - mc...@cepl.eu + +- Update to version 20210607.c22f1cc: + * increase default python3 update-alternative prio by 1000 + * Update default-prjconf + * Support flavor rewriting of boolean runtime dependencies + +------------------------------------------------------------------- Old: ---- python-rpm-macros-20210204.937b8d8.tar.xz New: ---- python-rpm-macros-20210628.eccf3f2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rpm-macros.spec ++++++ --- /var/tmp/diff_new_pack.Rsa3i6/_old 2021-07-09 23:56:37.125793879 +0200 +++ /var/tmp/diff_new_pack.Rsa3i6/_new 2021-07-09 23:56:37.129793848 +0200 @@ -17,7 +17,7 @@ Name: python-rpm-macros -Version: 20210204.937b8d8 +Version: 20210628.eccf3f2 Release: 0 Summary: RPM macros for building of Python modules License: WTFPL ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.Rsa3i6/_old 2021-07-09 23:56:37.165793569 +0200 +++ /var/tmp/diff_new_pack.Rsa3i6/_new 2021-07-09 23:56:37.165793569 +0200 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/openSUSE/python-rpm-macros.git</param> - <param name="changesrevision">fa7e1c660af29c643cdc478cafed01042f95fad7</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">045846b919fb55800c8e3a47681cefd006e0a83f</param></service></servicedata> \ No newline at end of file ++++++ python-rpm-macros-20210204.937b8d8.tar.xz -> python-rpm-macros-20210628.eccf3f2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-rpm-macros-20210204.937b8d8/.gitignore new/python-rpm-macros-20210628.eccf3f2/.gitignore --- old/python-rpm-macros-20210204.937b8d8/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/python-rpm-macros-20210628.eccf3f2/.gitignore 2021-06-28 11:59:37.000000000 +0200 @@ -0,0 +1,6 @@ +/macros.python_all +/macros/020-flavor-* +/macros/035-default-pythons +/macros/040-buildset +/macros/050-automagic +*.swp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-rpm-macros-20210204.937b8d8/default-prjconf new/python-rpm-macros-20210628.eccf3f2/default-prjconf --- old/python-rpm-macros-20210204.937b8d8/default-prjconf 2021-02-04 22:47:54.000000000 +0100 +++ new/python-rpm-macros-20210628.eccf3f2/default-prjconf 2021-06-28 11:59:37.000000000 +0200 @@ -7,7 +7,7 @@ ## PYTHON MACROS BEGIN # order of %pythons is important: The last flavor overrides any operation on conflicting files and definitions during expansions, # making it the "default" in many cases --> keep the primary python3 provider at the end. -%pythons %{?!skip_python3:%{?!skip_python36:python36} %{?!skip_python38:python38}} +%pythons %{?!skip_python3:%{?!skip_python36:python36} %{?!skip_python39:python39} %{?!skip_python38:python38}} %add_python() %{expand:%%define pythons %1 %pythons} %_without_python2 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-rpm-macros-20210204.937b8d8/functions.lua new/python-rpm-macros-20210628.eccf3f2/functions.lua --- old/python-rpm-macros-20210204.937b8d8/functions.lua 2021-02-04 22:47:54.000000000 +0100 +++ new/python-rpm-macros-20210628.eccf3f2/functions.lua 2021-06-28 11:59:37.000000000 +0200 @@ -122,6 +122,12 @@ local prio = rpm.expand("%" .. flavor .. "_version_nodots") local binsuffix = rpm.expand("%" .. flavor .. "_bin_suffix") + -- increase priority for primary python3 flavor + local provides = rpm.expand("%" .. flavor .. "_provides") .. " " + if provides:match("python3%s") then + prio = prio + 1000 + end + local params = {} for p in string.gmatch(rpm.expand("%*"), "%S+") do table.insert(params, p) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-rpm-macros-20210204.937b8d8/macros.lua new/python-rpm-macros-20210628.eccf3f2/macros.lua --- old/python-rpm-macros-20210204.937b8d8/macros.lua 2021-02-04 22:47:54.000000000 +0100 +++ new/python-rpm-macros-20210628.eccf3f2/macros.lua 2021-06-28 11:59:37.000000000 +0200 @@ -104,48 +104,39 @@ } local function process_package_line(line) - -- This function processes lines like "Requires: something something". + -- This function processes package tags like requirements and capabilities. + -- It supports the python- prefix for plain packages, packageand(python-a:python-b:...), and boolean dependencies. -- "Requires: python-foo" -> "Requires: python3-foo" -- "Requires: %{name} = %{version}" -> "Requires: python3-modname = %{version}" - -- "Supplements: packageand(python-a:python-b)" -> "Supplements: packageand(python3-a:python3-b)" - -- you get the idea. - -- TODO implement %$flavor_only support here? -- first split Property: value local property, value = line:match("^([A-Z%%]%S+)%s*(.*)$") - -- "python-foo" -> "python3-foo" - local function rename_package(package, flavor) - if package == "python" or package == flavor then - -- specialcase plain "python" - package = current_flavor - else - package = package:gsub("^" .. flavor .. "(%W)", current_flavor .. "%1") - package = package:gsub("^python(%W)", current_flavor .. "%1") + -- split and rewrite every package value either plain or inside boolean dependencies and packageand() -- recursive + local function replace_prefix(value, flavor) + local function replace_prefix_r(ivalue) + return replace_prefix(ivalue, flavor) end - return package - end - - -- split and rewrite "packageand(a:b:c)", using rename_package() for each of a, b, c - local function fix_packageand(packageand, flavor) - local inner = packageand:match("^packageand%((.*)%)$") - if not inner then return packageand end - local eat = inner - local result = "packageand(" - while eat do - local idx = eat:find(":") - local n = "" - if idx then - n = eat:sub(1, idx) - eat = eat:sub(idx+1) + local function rename_package(package) + if package == "python" or package == flavor then + -- specialcase plain "python" + package = current_flavor else - n = eat - eat = nil + package = package:gsub("^" .. flavor .. "(%W)", current_flavor .. "%1") + package = package:gsub("^python(%W)", current_flavor .. "%1") end - n = n:gsub("^%s*", "") - result = result .. rename_package(n, flavor) + return package + end + local before, inner, space, remainder + inner, space, remainder = value:match("^packageand(%b())(%s*)(.*)$") + if inner then + return "packageand(" .. inner:sub(2,-2):gsub("[^:]+", rename_package) .. ")" .. space .. replace_prefix_r(tostring(remainder)) end - return result .. ")" + before, inner, space, remainder = value:match("^([^()]*)(%b())(%s*)(.*)$") + if inner then + return replace_prefix_r(tostring(before)) .. "(".. replace_prefix_r(inner:sub(2, -2)) .. ")" .. space .. replace_prefix_r(tostring(remainder)) + end + return value:gsub("%S+", rename_package) end if PROPERTY_COPY_UNMODIFIED[property] then @@ -156,12 +147,7 @@ line = line:gsub("%%{?name}?", current_flavor .. "-" .. modname) end local function print_property_copy_modified(value) - -- convert value using the appropriate function - if value:startswith("packageand") then - value = fix_packageand(value, flavor) - else - value = rename_package(value, flavor) - end + value = replace_prefix(value, flavor) -- rely on print_altered to perform expansion on the result print_altered(string.format("%s %s", property, value)) end