Commit 6db3a8b5 authored by Clément Schreiner's avatar Clément Schreiner
Browse files

Update the repository before plugins are run.

parent 495c47d4
...@@ -526,8 +526,6 @@ class Importer(object): ...@@ -526,8 +526,6 @@ class Importer(object):
if not os.access(pylons.config['debexpo.repository'], os.W_OK): if not os.access(pylons.config['debexpo.repository'], os.W_OK):
self._fail('debexpo.repository is not writeable') self._fail('debexpo.repository is not writeable')
# Create th§e database rows
self._create_db_entries()
# Loop through parent directories in the target installation directory to make sure they # Loop through parent directories in the target installation directory to make sure they
...@@ -546,6 +544,14 @@ class Importer(object): ...@@ -546,6 +544,14 @@ class Importer(object):
self._remove_temporary_files() self._remove_temporary_files()
# Create the database rows
self._create_db_entries()
# Refresh the Sources/Packages files.
log.debug('Updating Sources and Packages files')
r = Repository(pylons.config['debexpo.repository'])
r.update()
# Run QA plugins # Run QA plugins
self._run_plugins('qa') self._run_plugins('qa')
...@@ -553,16 +559,13 @@ class Importer(object): ...@@ -553,16 +559,13 @@ class Importer(object):
f = open(self.changes_file) f = open(self.changes_file)
changes_contents = f.read() changes_contents = f.read()
f.close() f.close()
#Plugins('post-successful-upload', self.changes, self.changes_file, #Plugins('post-successful-upload', self.changes, self.changes_file,
# changes_contents=changes_contents) # changes_contents=changes_contents)
# Remove the changes file # Remove the changes file
self._remove_changes() self._remove_changes()
# Refresh the Sources/Packages files.
log.debug('Updating Sources and Packages files')
r = Repository(pylons.config['debexpo.repository'])
r.update()
log.debug('Done') log.debug('Done')
return 0 return 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment