Skip to content

Commit

Permalink
Addition of exported_repos.pkl output
Browse files Browse the repository at this point in the history
  • Loading branch information
ggatward committed Aug 1, 2016
1 parent e1fc689 commit 2fba0b1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
8 changes: 4 additions & 4 deletions config/EXAMPLE.yml.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
env:
name: EXAMPLE
repos: [
Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server,
Red_Hat_Enterprise_Linux_7_Server_-_Extras_RPMs_x86_64,
Red_Hat_Enterprise_Linux_7_Server_-_RH_Common_RPMs_x86_64_7Server,
]
Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server,
Red_Hat_Enterprise_Linux_7_Server_-_Extras_RPMs_x86_64,
Red_Hat_Enterprise_Linux_7_Server_-_RH_Common_RPMs_x86_64_7Server,
]
19 changes: 17 additions & 2 deletions sat_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,13 +549,21 @@ def main():

# Update the export timestamp for this repo
export_times['DoV'] = start_time

# Generate a list of repositories that were exported
for repo_result in repolist['results']:
if repo_result['content_type'] == 'yum':
# Add the repo to the successfully exported list
exported_repos.append(repo_result['label'])

else:
msg = "Content View Export FAILED"
helpers.log_msg(msg, 'ERROR')
sys.exit(-1)

else:
# Verify that defined repos exist in our DoV
exported_repos = []
for repo_result in repolist['results']:
if repo_result['content_type'] == 'yum':
# If we have a match, do the export
Expand Down Expand Up @@ -593,6 +601,9 @@ def main():

# Update the export timestamp for this repo
export_times[repo_result['label']] = start_time

# Add the repo to the successfully exported list
exported_repos.append(repo_result['label'])
else:
msg = "Export FAILED"
helpers.log_msg(msg, 'ERROR')
Expand All @@ -606,10 +617,14 @@ def main():
# Combine resulting directory structures into a single repo format (top level = /content)
prep_export_tree(org_name)

# Now we need to process the on-disk export data
# Find the name of our export dir.
# Now we need to process the on-disk export data.
# Define the location of our exported data.
export_dir = helpers.EXPORTDIR + "/export"

# Write out the list of exported repos. This will be transferred to the disconnected system
# and used to perform the repo sync tasks during the import.
pickle.dump(exported_repos, open(export_dir + '/exported_repos.pkl', 'wb'))

# Run GPG Checks on the exported RPMs
do_gpg_check(export_dir)

Expand Down

0 comments on commit 2fba0b1

Please sign in to comment.