mirror of https://github.com/peridotbuild/pv2.git
Compare commits
7 Commits
01a6696adc
...
38405b883b
Author | SHA1 | Date |
---|---|---|
Louis Abel | 38405b883b | |
Louis Abel | e8b72866ae | |
Louis Abel | d9e2f2b370 | |
Louis Abel | 32642b1efd | |
Louis Abel | ff35a29d08 | |
Louis Abel | 7f2004719a | |
Louis Abel | c2297d6189 |
|
@ -765,6 +765,7 @@ class GitImport(Import):
|
|||
# Within the confines of the source git repo, we need to find a
|
||||
# "sources" file or a metadata file. One of these will determine which
|
||||
# route we take.
|
||||
metafile_to_use = None
|
||||
if os.path.exists(metadata_file):
|
||||
no_metadata_list = ['stream', 'fedora']
|
||||
if any(ignore in self.upstream_lookaside for ignore in no_metadata_list):
|
||||
|
@ -779,10 +780,16 @@ class GitImport(Import):
|
|||
metafile_to_use = sources_file
|
||||
else:
|
||||
#raise err.GenericError('sources or metadata file NOT found')
|
||||
print('WARNING: There was no sources or metadata found. Making blank file.')
|
||||
# There isn't a reason to make a blank file right now.
|
||||
print('WARNING: There was no sources or metadata found.')
|
||||
with open(metadata_file, 'w+') as metadata_handle:
|
||||
pass
|
||||
|
||||
if not metafile_to_use:
|
||||
print('Source: There was no metadata file found. Skipping import attempt.')
|
||||
self.perform_cleanup([source_git_repo_path, dest_git_repo_path])
|
||||
return False
|
||||
|
||||
sources_dict = self.parse_metadata_file(metafile_to_use)
|
||||
|
||||
# We need to check if there is a SPECS directory and make a SOURCES
|
||||
|
@ -811,7 +818,8 @@ class GitImport(Import):
|
|||
source_git_repo_spec = self.find_spec_file(source_git_repo_path)
|
||||
|
||||
# do rpm autochangelog logic here
|
||||
if HAS_RPMAUTOSPEC and os.path.exists(source_git_repo_changelog):
|
||||
#if HAS_RPMAUTOSPEC and os.path.exists(source_git_repo_changelog):
|
||||
if HAS_RPMAUTOSPEC:
|
||||
# Check that the spec file really has %autochangelog
|
||||
AUTOCHANGELOG = False
|
||||
with open(source_git_repo_spec, 'r') as spec_file:
|
||||
|
@ -1142,7 +1150,7 @@ class ModuleImport(Import):
|
|||
|
||||
with open(modulemd_file, 'r') as module_yaml:
|
||||
content = module_yaml.read()
|
||||
content_new = re.sub('ref:\s+(.*)', f'ref: {dest_branch}', content)
|
||||
content_new = re.sub(r'ref:\s+(.*)', f'ref: {dest_branch}', content)
|
||||
module_yaml.close()
|
||||
|
||||
# Write to the root
|
||||
|
|
|
@ -139,8 +139,11 @@ def tag(repo, tag_name:str, message: str):
|
|||
|
||||
def lsremote(url):
|
||||
"""
|
||||
Helps check if a repo exists, and if it does, return references. If not,
|
||||
return None and assume it doesn't exist.
|
||||
Helps check if a repo exists.
|
||||
|
||||
If repo exists: return references
|
||||
If repo exists and is completely empty: return empty dict
|
||||
If repo does not exist: return None
|
||||
"""
|
||||
remote_refs = {}
|
||||
git_cmd = rawgit.cmd.Git()
|
||||
|
@ -153,5 +156,6 @@ def lsremote(url):
|
|||
|
||||
for ref in git_cmd.ls_remote(url).split('\n'):
|
||||
hash_ref_list = ref.split('\t')
|
||||
remote_refs[hash_ref_list[1]] = hash_ref_list[0]
|
||||
if len(hash_ref_list) > 1:
|
||||
remote_refs[hash_ref_list[1]] = hash_ref_list[0]
|
||||
return remote_refs
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "pv2"
|
||||
version = "0.11.0"
|
||||
version = "0.12.0"
|
||||
description = "PV2 backend framework module"
|
||||
readme = "README.md"
|
||||
authors = [
|
||||
|
@ -11,7 +11,7 @@ maintainers = [
|
|||
{ name = "Louis Abel", email = "label@rockylinux.org" }
|
||||
]
|
||||
|
||||
requires-python = ">=3.6"
|
||||
requires-python = ">=3.9"
|
||||
|
||||
dependencies = [
|
||||
"GitPython >= 3.1.30",
|
||||
|
|
Loading…
Reference in New Issue