Skip to content

Commit

Permalink
Pass more attributes to hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
jrha committed Jul 19, 2024
1 parent a833f67 commit 5e3ff5a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions mrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,13 @@ def mirror(self):
global EXITCODE

if CONFIG.hooks['pre-update']:
run('%s %s' % (CONFIG.hooks['pre-update'], self.srcdir))
run(' '.join([
CONFIG.hooks['pre-update'],
'pre-update',
self.name,
self.url,
self.srcdir,
]))

### Make a snapshot of the directory
self.oldlist = self.rpmlist()
Expand Down Expand Up @@ -515,7 +521,13 @@ def mirror(self):
self.newlist = self.rpmlist()

if CONFIG.hooks['post-update']:
run('%s %s' % (CONFIG.hooks['post-update'], self.srcdir))
run(' '.join([
CONFIG.hooks['post-update'],
'post-update',
self.name,
self.url,
self.srcdir,
]))

def rpmlist(self):
"Capture a list of packages in the repository"
Expand Down

0 comments on commit 5e3ff5a

Please sign in to comment.