Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package obs-service-node_modules for 
openSUSE:Factory checked in at 2023-09-07 21:13:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-node_modules (Old)
 and      /work/SRC/openSUSE:Factory/.obs-service-node_modules.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "obs-service-node_modules"

Thu Sep  7 21:13:29 2023 rev:4 rq:1109450 version:2.2.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/obs-service-node_modules/obs-service-node_modules.changes
        2023-08-08 15:55:31.697216264 +0200
+++ 
/work/SRC/openSUSE:Factory/.obs-service-node_modules.new.1766/obs-service-node_modules.changes
      2023-09-07 21:14:50.917825863 +0200
@@ -1,0 +2,8 @@
+Tue Sep 05 15:50:00 UTC 2023 - [email protected]
+
+- Update to version 2.2.0:
+  * Remove obsolete filename heuristics
+  * Refactor function name to better reflect functionality
+  * Incorporate the entire path into filename
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ obs-service-node_modules.spec ++++++
--- /var/tmp/diff_new_pack.uzOH7C/_old  2023-09-07 21:14:52.113868618 +0200
+++ /var/tmp/diff_new_pack.uzOH7C/_new  2023-09-07 21:14:52.113868618 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           obs-service-node_modules
-Version:        2.1.0
+Version:        2.2.0
 Release:        0
 Summary:        OBS service to download node_modules specified in 
package-lock.json
 License:        MIT

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.uzOH7C/_old  2023-09-07 21:14:52.149869905 +0200
+++ /var/tmp/diff_new_pack.uzOH7C/_new  2023-09-07 21:14:52.153870048 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">http://github.com/openSUSE/obs-service-node_modules.git</param>
-              <param 
name="changesrevision">6a9cfe1c3f4e5a5f3aec36bc6c6f191ccf1775ca</param></service></servicedata>
+              <param 
name="changesrevision">ece610a866f0b8be531b288c99658d001ce83a6f</param></service></servicedata>
 (No newline at EOF)
 

++++++ obs-service-node_modules.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-service-node_modules/node_modules.py 
new/obs-service-node_modules/node_modules.py
--- old/obs-service-node_modules/node_modules.py        2023-08-03 
10:31:41.000000000 +0200
+++ new/obs-service-node_modules/node_modules.py        2023-09-05 
15:26:41.000000000 +0200
@@ -174,7 +174,7 @@
         with open(name, 'rb') as fh:
             self.addstream(name, fh)
 
-def is_supported_fetch_url(from_entry):
+def parse_supported_fetch_url(from_entry):
     if from_entry[0] == '@':
         from_entry = from_entry[1:]
     end_name_pos = from_entry.find('@')
@@ -212,15 +212,25 @@
     MODULE_MAP[fn].setdefault("path", set()).add(install_path)
     return True
 
-def add_standard_dependency(url, integrity, module, install_path):
+def make_unique_fn_from_path(o):
+    path = o.path.split('/')
+    original_fn = path[-1]
+    prepended = []
+
+    for pos in range(1,len(path)-1):
+        s = path[pos]
+        if original_fn[:len(s)] == s or s == '-':
+            continue
+        prepended = prepended + [s]
+
+    return '-'.join(prepended + [original_fn])
+
+def add_standard_dependency(o, integrity, module, install_path):
+    url = urllib.parse.urlunparse(o)
     algo, chksum = integrity.split("-", 2)
     chksum = hexlify(b64decode(chksum)).decode("ascii")
-    fn = os.path.basename(url)
-    # looks like some module are from some kind of branch and
-    # may use the same file name. So prefix with this
-    # namespace.
-    if "/" in module:
-        fn = module.split("/")[0] + "-" + fn
+    fn = make_unique_fn_from_path(o)
+
     if fn in MODULE_MAP:
         if (
             MODULE_MAP[fn]["url"] != url
@@ -250,7 +260,7 @@
     for label in labels:
         if (label not in entry):
             continue
-        o = is_supported_fetch_url(entry[label])
+        o = parse_supported_fetch_url(entry[label])
         if (o != False):
             break
 
@@ -269,7 +279,7 @@
 
     if o.scheme == "https":
         integrity = entry["integrity"]
-        return add_standard_dependency(urllib.parse.urlunparse(o), integrity, 
module, install_path)
+        return add_standard_dependency(o, integrity, module, install_path)
     elif o.scheme.startswith("git+"):
         return add_git_dependency(o, module, install_path)
 
@@ -291,7 +301,7 @@
                 integrity = 'NONE-'
             else:
                 integrity = entry["integrity"]
-            add_standard_dependency(url, integrity, module, path)
+            add_standard_dependency(parse_supported_fetch_url(url), integrity, 
module, path)
 
         if "dependencies" in entry:
             collect_v2_deps_recursive(path, entry["dependencies"])
@@ -313,7 +323,7 @@
         else:
             url = entry["resolved"]
             integrity = entry["integrity"]
-            add_standard_dependency(url, integrity, module, path)
+            add_standard_dependency(parse_supported_fetch_url(url), integrity, 
module, path)
 
 def write_rpm_sources(fh, args):
     i = args.source_offset if args.source_offset is not None else ''

++++++ obs-service-node_modules.obsinfo ++++++
--- /var/tmp/diff_new_pack.uzOH7C/_old  2023-09-07 21:14:52.249873480 +0200
+++ /var/tmp/diff_new_pack.uzOH7C/_new  2023-09-07 21:14:52.253873623 +0200
@@ -1,5 +1,5 @@
 name: obs-service-node_modules
-version: 2.1.0
-mtime: 1691051501
-commit: 6a9cfe1c3f4e5a5f3aec36bc6c6f191ccf1775ca
+version: 2.2.0
+mtime: 1693920401
+commit: ece610a866f0b8be531b288c99658d001ce83a6f
 

Reply via email to