aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/scripts/buildpackage.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-02-12 19:43:58 +0100
committerGuido Günther <agx@sigxcpu.org>2017-02-12 19:43:58 +0100
commit87b59a78a808baa50fe41d661cd274f25dce8603 (patch)
treed2d45e26b1bf097931261164748bd8d0da7a0bb2 /gbp/scripts/buildpackage.py
parent8c3ca11b8b31e04d40fb2ec4ae9808cb5e98a047 (diff)
Use vfs upfront
Git-Dch: Ignore
Diffstat (limited to 'gbp/scripts/buildpackage.py')
-rwxr-xr-xgbp/scripts/buildpackage.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index f0f504b0..728af40e 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -29,7 +29,7 @@ from gbp.command_wrappers import (Command,
RemoveTree)
from gbp.config import (GbpOptionParserDebian, GbpOptionGroup)
from gbp.deb.git import (GitRepositoryError, DebianGitRepository)
-from gbp.deb.source import DebianSource, DebianSourceError
+from gbp.deb.source import DebianSource, DebianSourceError, FileVfs
from gbp.deb.format import DebianSourceFormat
from gbp.format import format_str
from gbp.git.vfs import GitVfs
@@ -217,13 +217,10 @@ def extract_orig(orig_tarball, dest_dir):
def source_vfs(repo, options, tree):
"""Init source package info either from git or from working copy"""
- # FIXME: just init the correct vfs
+ vfs = GitVfs(repo, tree) if tree else FileVfs('.')
try:
- if tree:
- source = DebianSource(GitVfs(repo, tree))
- else:
- source = DebianSource('.')
- source.is_native() # check early if this works
+ source = DebianSource(vfs)
+ source.is_native() # check early if this works
except Exception as e:
raise GbpError("Can't determine package type: %s" % e)
return source