'allow-unauthenticated': 'False',
'symlink-orig': 'True',
'purge': 'True',
- 'tmp-dir' : '/var/tmp/gbp/',
'drop': 'False',
'commit': 'False',
'tmp-dir' : '/var/tmp/gbp/',
"'%(symlink-orig)s'"),
'purge':
"Purge exported package build directory. Default is '%(purge)s'",
- 'tmp-dir':
- ("Base directory under which temporary directories are "
- "created, default is '%(tmp-dir)s'"),
'drop':
("In case of 'export' drop the patch-queue branch "
"after export. Default is '%(drop)s'"),
pristine_path = pristine.path if pristine else ''
return (filtered.unpacked, pristine_path)
-def repack_source(source, new_name, unpack_dir, filters, new_prefix=None):
- """Repack the source tree"""
- repacked = source.pack(new_name, filters, new_prefix)
- if source.is_tarball(): # the tarball was filtered on unpack
- repacked.unpacked = source.unpacked
- else: # otherwise unpack the generated tarball get a filtered tree
- repacked.unpack(unpack_dir)
- return repacked
-
-
def prepare_pristine_tar(source, pkg_name, pkg_version, pristine_commit_name,
filters=None, prefix=None, tmpdir=None):
"""
ask_package_version,
prepare_sources)
-def prepare_pristine_tar(archive, pkg, version):
- """
- Prepare the upstream source for pristine tar import.
-
- This checks if the upstream source is actually a tarball
- and creates a symlink from I{archive}
- to I{<pkg>_<version>.orig.tar.<ext>} so pristine-tar will
- see the correct basename.
-
- @param archive: the upstream source's name
- @type archive: C{str}
- @param pkg: the source package's name
- @type pkg: C{str}
- @param version: the upstream version number
- @type version: C{str}
- @rtype: C{str}
- """
- linked = False
- if os.path.isdir(archive):
- return None
-
- ext = os.path.splitext(archive)[1]
- if ext in ['.tgz', '.tbz2', '.tlz', '.txz' ]:
- ext = ".%s" % ext[2:]
-
- link = "../%s_%s.orig.tar%s" % (pkg, version, ext)
-
- if os.path.basename(archive) != os.path.basename(link):
- try:
- if not is_link_target(archive, link):
- os.symlink(os.path.abspath(archive), link)
- linked = True
- except OSError as err:
- raise GbpError("Cannot symlink '%s' to '%s': %s" % (archive, link, err[1]))
- return (link, linked)
- else:
- return (archive, linked)
-
-
def upstream_import_commit_msg(options, version):
return options.import_msg % dict(version=version)
parser.add_config_file_option(option_name="color", dest="color", type='tristate')
parser.add_config_file_option(option_name="color-scheme",
dest="color_scheme")
- parser.add_config_file_option(option_name="tmp-dir", dest="tmp_dir")
parser.add_config_file_option(option_name="meta-closes", dest="meta_closes")
parser.add_config_file_option(option_name="tmp-dir", dest="tmp_dir")
return parser