Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package obs-scm-bridge for openSUSE:Factory checked in at 2023-06-09 20:40:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/obs-scm-bridge (Old) and /work/SRC/openSUSE:Factory/.obs-scm-bridge.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-scm-bridge" Fri Jun 9 20:40:04 2023 rev:6 rq:1091771 version:0.4.2 Changes: -------- --- /work/SRC/openSUSE:Factory/obs-scm-bridge/obs-scm-bridge.changes 2023-05-31 21:55:12.073254974 +0200 +++ /work/SRC/openSUSE:Factory/.obs-scm-bridge.new.15902/obs-scm-bridge.changes 2023-06-09 20:43:30.328668463 +0200 @@ -1,0 +2,6 @@ +Fri Jun 2 06:59:02 UTC 2023 - Adrian Schröter <adr...@suse.de> + +- update to 0.4.2 + * various fixes to handle additional git meta informations right + +------------------------------------------------------------------- Old: ---- obs-scm-bridge-0.4.1.obscpio New: ---- obs-scm-bridge-0.4.2.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ obs-scm-bridge.spec ++++++ --- /var/tmp/diff_new_pack.DEfHjg/_old 2023-06-09 20:43:30.984672272 +0200 +++ /var/tmp/diff_new_pack.DEfHjg/_new 2023-06-09 20:43:30.992672318 +0200 @@ -23,7 +23,7 @@ %endif Name: obs-scm-bridge -Version: 0.4.1 +Version: 0.4.2 Release: 0 Summary: A help service to work with git repositories in OBS License: GPL-2.0-or-later ++++++ _service ++++++ --- /var/tmp/diff_new_pack.DEfHjg/_old 2023-06-09 20:43:31.032672551 +0200 +++ /var/tmp/diff_new_pack.DEfHjg/_new 2023-06-09 20:43:31.036672574 +0200 @@ -2,8 +2,8 @@ <service name="obs_scm" mode="manual"> <param name="url">https://github.com/openSUSE/obs-scm-bridge</param> <param name="scm">git</param> - <param name="revision">0.4.1</param> - <param name="version">0.4.1</param> + <param name="revision">0.4.2</param> + <param name="version">0.4.2</param> </service> <service mode="manual" name="set_version" /> ++++++ obs-scm-bridge-0.4.1.obscpio -> obs-scm-bridge-0.4.2.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-scm-bridge-0.4.1/obs_scm_bridge new/obs-scm-bridge-0.4.2/obs_scm_bridge --- old/obs-scm-bridge-0.4.1/obs_scm_bridge 2023-05-24 14:26:04.000000000 +0200 +++ new/obs-scm-bridge-0.4.2/obs_scm_bridge 2023-06-01 14:02:20.000000000 +0200 @@ -80,6 +80,9 @@ if self.url[5]: self.revision = self.url[5] self.url[5] = '' + # if we keep the meta files we always want a deep clone + if self.keep_meta: + shallow_clone = False # scmtoolurl is the url we pass to the the scm tool scmtoolurl = self.url.copy() if scmtoolurl[0] and scmtoolurl[0][0:4] == 'git+': @@ -150,9 +153,9 @@ cmd = [ 'git', '-C', outdir, 'submodule', 'update' ] self.run_cmd(cmd, fatal="git submodule update") - def do_clone(self, outdir: str, shallow: bool, include_submodules: bool=False) -> None: + def do_clone(self, outdir: str, include_submodules: bool=False) -> None: if self.revision and re.match(r"^[0-9a-fA-F]{40,}$", self.revision): - self.do_clone_commit(outdir, include_submodules) + self.do_clone_commit(outdir, include_submodules=include_submodules) return cmd = [ 'git', 'clone', self.scmtoolurl, outdir ] if include_submodules: @@ -160,7 +163,7 @@ cmd += [ "--recurse-submodules=" + self.subdir ] else: cmd += [ '--recurse-submodules' ] - if shallow: + if shallow_clone: cmd += [ '--depth', '1' ] if self.revision: cmd.insert(2, '-b') @@ -190,13 +193,13 @@ if self.projectscmsync: obsinfo.write("projectscmsync: " + self.projectscmsync + "\n") - def clone(self, shallow_clone: bool, include_submodules: bool=False) -> None: + def clone(self, include_submodules: bool=False) -> None: if not self.subdir: - self.do_clone(self.outdir, (shallow_clone and not self.enforced_deep_clone), include_submodules) + self.do_clone(self.outdir, include_submodules=include_submodules) self.write_obsinfo(self.outdir) return clonedir = tempfile.mkdtemp(prefix="obs-scm-bridge") - self.do_clone(clonedir, (shallow_clone and not self.enforced_deep_clone), include_submodules) + self.do_clone(clonedir, include_submodules=include_submodules) fromdir = os.path.join(clonedir, self.subdir) if os.path.islink(fromdir): target = os.readlink(fromdir).rstrip('/') # this is no recursive lookup, but is there a usecase? @@ -208,7 +211,7 @@ shutil.rmtree(clonedir) clonedir = tempfile.mkdtemp(prefix="obs-scm-bridge") fromdir = os.path.join(clonedir, self.subdir) - self.do_clone(clonedir, (shallow_clone and not self.enforced_deep_clone), include_submodules) + self.do_clone(clonedir, include_submodules=include_submodules) self.write_obsinfo(clonedir) if not os.path.realpath(fromdir+'/').startswith(os.path.realpath(clonedir+'/')): @@ -231,18 +234,16 @@ def cpio_directory(self, directory: str) -> None: logging.info("create archivefile for %s", directory) cmd = [ download_assets, '--create-cpio', '--', directory ] - archivefile = open(directory + '.obscpio', 'w') - self.run_cmd(cmd, stdout=archivefile, fatal="cpio creation") - archivefile.close() + with open(directory + '.obscpio', 'w') as archivefile: + self.run_cmd(cmd, stdout=archivefile, fatal="cpio creation") def cpio_specials(self, specials: List[str]) -> None: if not specials: return logging.info("create archivefile for specials") cmd = [ download_assets, '--create-cpio', '--', '.' ] + specials - archivefile = open('build.specials.obscpio', 'w') - self.run_cmd(cmd, stdout=archivefile, fatal="cpio creation") - archivefile.close() + with open('build.specials.obscpio', 'w') as archivefile: + self.run_cmd(cmd, stdout=archivefile, fatal="cpio creation") def cpio_directories(self) -> None: logging.debug("walk via %s", self.outdir) @@ -322,7 +323,7 @@ if info: self.write_info_file(os.path.join(self.outdir, "_service_info"), info) - def write_package_xml_file(self, name: str, url: str, projectscmsync: str) -> None: + def write_package_xml_file(self, name: str, url: str, projectscmsync: str=None) -> None: projecturlxml='' if projectscmsync: projecturlxml=f"""\n <url>{escape(projectscmsync)}</url>""" @@ -414,7 +415,7 @@ # add subdir parameter to url url = self.url.copy() query = urllib.parse.parse_qs(url[4]) - query['subdir'] = list(directory) + query['subdir'] = directory url[4] = urllib.parse.urlencode(query) if self.revision: url[5] = self.revision @@ -506,11 +507,11 @@ # workflow obsgit = ObsGit(outdir, url, projectscmsync) if project_mode == 'true' or project_mode == '1': - obsgit.clone(shallow_clone) + obsgit.clone() obsgit.generate_package_xml_files() sys.exit(0) - obsgit.clone(shallow_clone, include_submodules=True) + obsgit.clone(include_submodules=True) if pack_directories: obsgit.add_service_info() ++++++ obs-scm-bridge.obsinfo ++++++ --- /var/tmp/diff_new_pack.DEfHjg/_old 2023-06-09 20:43:31.152673248 +0200 +++ /var/tmp/diff_new_pack.DEfHjg/_new 2023-06-09 20:43:31.156673271 +0200 @@ -1,5 +1,5 @@ name: obs-scm-bridge -version: 0.4.1 -mtime: 1684931164 -commit: 3710c1f7695d57c99dc5bb5c1877595ecaa33773 +version: 0.4.2 +mtime: 1685620940 +commit: f590a184dcb19d85e78e51f6d83cae4315928dd4