Search
j0ke.net Open Build Service
>
Projects
>
SUSE
:
Manager
:
1.2
>
createrepo
> createrepo-0.4.11-skip-symlinked-directories.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File createrepo-0.4.11-skip-symlinked-directories.patch of Package createrepo
--- genpkgmetadata.py.orig 2010-07-30 11:56:09.000000000 +0200 +++ genpkgmetadata.py 2010-07-30 12:23:03.000000000 +0200 @@ -60,6 +60,7 @@ -C, --checkts = don't generate repo metadata, if their ctimes are newer than the rpm ctimes. -i, --pkglist = use only these files from the directory specified + --skip-symlinked-dirs = ignore symlinked directories -h, --help = show this help -V, --version = output version -p, --pretty = output xml files in pretty format. @@ -88,6 +89,9 @@ func(arg, top, names) for name in names: name = os.path.join(top, name) + + if self.cmds['skip-symlinked-dirs'] and os.path.islink(name): + continue if os.path.isdir(name): self._os_path_walk(name, func, arg) @@ -107,7 +111,6 @@ relativepath = dirname.replace(startdir, "", 1) relativepath = relativepath.lstrip("/") filelist.append(os.path.join(relativepath,fn)) - filelist = [] startdir = os.path.join(basepath, directory) + '/' self._os_path_walk(startdir, extension_visitor, filelist) @@ -434,6 +437,7 @@ cmds['file-pattern-match'] = ['.*bin\/.*', '^\/etc\/.*', '^\/usr\/lib\/sendmail$'] cmds['dir-pattern-match'] = ['.*bin\/.*', '^\/etc\/.*'] cmds['skip-symlinks'] = False + cmds['skip-symlinked-dirs'] = False cmds['pkglist'] = [] try: @@ -442,7 +446,7 @@ 'baseurl=', 'groupfile=', 'checksum=', 'version', 'pretty', 'split', 'outputdir=', 'noepoch', 'checkts', 'database', 'update', - 'skip-symlinks', 'pkglist=']) + 'skip-symlinks', 'skip-symlinked-dirs', 'pkglist=']) except getopt.error, e: errorprint(_('Options Error: %s.') % e) usage() @@ -514,6 +518,8 @@ cmds['database'] = True elif arg in ['-S', '--skip-symlinks']: cmds['skip-symlinks'] = True + elif arg == '--skip-symlinked-dirs': + cmds['skip-symlinked-dirs'] = True elif arg in ['-i', '--pkglist']: cmds['pkglist'] = a