diff options
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/scripts/common/import_orig.py | 8 | ||||
-rw-r--r-- | gbp/scripts/import_orig.py | 11 |
2 files changed, 10 insertions, 9 deletions
diff --git a/gbp/scripts/common/import_orig.py b/gbp/scripts/common/import_orig.py index fe38d90..4381b96 100644 --- a/gbp/scripts/common/import_orig.py +++ b/gbp/scripts/common/import_orig.py @@ -57,6 +57,14 @@ 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. diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py index 4ba9bf8..feb5a60 100644 --- a/gbp/scripts/import_orig.py +++ b/gbp/scripts/import_orig.py @@ -31,7 +31,8 @@ from gbp.errors import (GbpError, GbpNothingImported) import gbp.log from gbp.scripts.common.import_orig import (OrigUpstreamSource, cleanup_tmp_tree, ask_package_name, ask_package_version, - repacked_tarball_name, repack_source) + repacked_tarball_name, repack_source, + is_link_target) # Try to import readline, since that will cause raw_input to get fancy # line editing and history capabilities. However, if readline is not @@ -42,14 +43,6 @@ except ImportError: pass -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 symlink_orig(archive, pkg, version): """ Create a symlink from I{archive} ti I{<pkg>_<version>.orig.tar.<ext>} so |