Skip to content

Commit

Permalink
Added hardlinkpy support
Browse files Browse the repository at this point in the history
  • Loading branch information
dagwieers committed Dec 10, 2007
1 parent b7f374b commit a9ef971
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- Added youget tool to download packages from Yast Online Update
- Added new OES1 and OES2 dist configs (Nicole Hähnel)
- Fix elementtree for python 2.5 and higher (Leo Eraly)
- Added hardlinkpy support

* 0.8.4 - Sint-Jacobsplein - released 13/12/2006
- Renamed Yam to mrepo (Matthew Hannigan)
Expand Down
11 changes: 9 additions & 2 deletions mrepo
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ class Config:
self.cmd['createrepo'] = self.getoption('main', 'createrepocmd', '/usr/bin/createrepo')
self.cmd['genbasedir'] = self.getoption('main', 'genbasedircmd', '/usr/bin/genbasedir')
self.cmd['hardlink'] = self.getoption('main', 'hardlinkcmd', '/usr/sbin/hardlink')
self.cmd['hardlink++'] = self.getoption('main', 'hardlinkpluscmd', '/usr/bin/hardlink++')
self.cmd['hardlink++'] = self.getoption('main', 'hardlinkcppcmd', '/usr/bin/hardlink++')
self.cmd['hardlinkpy'] = self.getoption('main', 'hardlinkpycmd', '/usr/bin/hardlinkpy')
self.cmd['lftp'] = self.getoption('main', 'lftpcmd', '/usr/bin/lftp')
self.cmd['mirrordir'] = self.getoption('main', 'mirrordircmd', '/usr/bin/mirrordir')
self.cmd['mount'] = self.getoption('main', 'mountcmd', '/bin/mount')
Expand Down Expand Up @@ -1361,7 +1362,13 @@ def mirroryouget(url, path, dist):
def hardlink(srcdir):
info(1, 'Hardlinking duplicate packages in %s.' % srcdir)
opts = ''
if cf.cmd['hardlink++']:
if cf.cmd['hardlinkpy']:
if op.verbose <= 2:
opts = ' -v 0'
else:
opts = ' -v %d' % (op.verbose - 2)
run('%s %s %s' % (cf.cmd['hardlinkpy'], os.path.join(srcdir, ''), opts))
elif cf.cmd['hardlink++']:
if op.verbose <= 2:
opts = '>/dev/null'
run('%s %s %s' % (cf.cmd['hardlink++'], os.path.join(srcdir, ''), opts))
Expand Down

0 comments on commit a9ef971

Please sign in to comment.