Enable the script along with a proper cache location
This commit is contained in:
parent
6fa4bc7aea
commit
e4ad93c52b
1 changed files with 6 additions and 6 deletions
|
@ -67,11 +67,11 @@ def run_osc(repository, package_name):
|
|||
|
||||
logging.debug("Running {}".format(cmd))
|
||||
|
||||
# pid = sarge.run(cmd)
|
||||
pid = sarge.run(cmd)
|
||||
|
||||
# if pid.returncode != 0:
|
||||
# logging.error("Error during service run, package {}".format(
|
||||
# package_name))
|
||||
if pid.returncode != 0:
|
||||
logging.error("Error during service run, package {}".format(
|
||||
package_name))
|
||||
|
||||
logging.debug("Package {} complete".format(package_name))
|
||||
|
||||
|
@ -90,7 +90,7 @@ def update_package(hash_data, package_name, remote_name, obs_repository,
|
|||
if remote_hash != current_hash:
|
||||
logging.debug("Hash doesn't match, updating")
|
||||
run_osc(obs_repository, package_name)
|
||||
# hash_data[remote_name] = remote_hash
|
||||
hash_data[remote_name] = remote_hash
|
||||
|
||||
|
||||
def update_packages(cache_file, obs_repository, repo_mapping_file):
|
||||
|
@ -122,7 +122,7 @@ def main():
|
|||
|
||||
options = parser.parse_args()
|
||||
|
||||
cache_file = Path.home() / ".local/share/obs_{}_cache".format(options.repository)
|
||||
cache_file = Path.home() / ".local/share/obs_{}_cache".format(options.repository.replace(":", "_")
|
||||
cache_file = str(cache_file)
|
||||
|
||||
update_packages(cache_file, options.repository, options.mapping_file)
|
||||
|
|
Loading…
Add table
Reference in a new issue