summaryrefslogtreecommitdiff
path: root/gbp/scripts/common
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2012-11-14 09:03:37 +0200
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-06-05 14:20:04 +0300
commite0324a9d8127b949b27fe2f1d0b4b4e76368ffda (patch)
tree4ee80b801fc52a06571f5d8a0d59d8542822cb68 /gbp/scripts/common
parentc203f35e994dd686cc63e6217ad4b0151faacba5 (diff)
downloadgit-buildpackage-e0324a9d8127b949b27fe2f1d0b4b4e76368ffda.tar.gz
git-buildpackage-e0324a9d8127b949b27fe2f1d0b4b4e76368ffda.tar.bz2
git-buildpackage-e0324a9d8127b949b27fe2f1d0b4b4e76368ffda.zip
import-orig: rework sourcecode preparation and filtering
Take in to use the newly added prepare_sources() function. Drop dead, unneeded code. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/scripts/common')
-rw-r--r--gbp/scripts/common/import_orig.py40
1 files changed, 0 insertions, 40 deletions
diff --git a/gbp/scripts/common/import_orig.py b/gbp/scripts/common/import_orig.py
index 964e400a..adbfff5e 100644
--- a/gbp/scripts/common/import_orig.py
+++ b/gbp/scripts/common/import_orig.py
@@ -33,28 +33,6 @@ except ImportError:
pass
-def orig_needs_repack(upstream_source, options):
- """
- Determine if the upstream sources needs to be repacked
-
- We repack if
- 1. we want to filter out files and use pristine tar since we want
- to make a filtered tarball available to pristine-tar
- 2. when we don't have a suitable upstream tarball (e.g. zip archive or unpacked dir)
- and want to use filters
- 3. when we don't have a suitable upstream tarball (e.g. zip archive or unpacked dir)
- and want to use pristine-tar
- """
- if ((options.pristine_tar and options.filter_pristine_tar and len(options.filters) > 0)):
- return True
- elif not upstream_source.is_tarball():
- if len(options.filters):
- return True
- elif options.pristine_tar:
- return True
- return False
-
-
def cleanup_tmp_tree(tree):
"""remove a tree of temporary files"""
try:
@@ -63,14 +41,6 @@ def cleanup_tmp_tree(tree):
gbp.log.err("Removal of tmptree %s failed." % tree)
-def is_link_target(target, link):
- """does symlink link already point to target?"""
- if os.path.exists(link):
- if os.path.samefile(target, link):
- return True
- return False
-
-
def ask_package_name(default, name_validator_func, err_msg):
"""
Ask the user for the source package name.
@@ -109,16 +79,6 @@ def ask_package_version(default, ver_validator_func, err_msg):
gbp.log.warn("\nNot a valid upstream version: '%s'.\n%s" % (version, err_msg))
-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):
"""