summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Manuel Santamaría Lema <panfaust@gmail.com>2016-07-20 20:25:59 (GMT)
committerJosé Manuel Santamaría Lema <panfaust@gmail.com>2016-07-20 20:53:14 (GMT)
commit27a2f2512b315da3da938380f54a7c06589a353b (patch)
tree79158944e21aaac3417fc4ced7e50f768cdaccf2
parent46a715da8063ddca8b34c4547190a8c2085f4b56 (diff)
git-buildpackage-ppa: get the orig tarball from lib.get_tarball
-rwxr-xr-xgit-buildpackage-ppa19
1 files changed, 14 insertions, 5 deletions
diff --git a/git-buildpackage-ppa b/git-buildpackage-ppa
index 5f7ed3a..34bdbc1 100755
--- a/git-buildpackage-ppa
+++ b/git-buildpackage-ppa
@@ -14,6 +14,9 @@ import subprocess
import sys
from debian import changelog
+from lib.utils import *
+from lib.get_tarball import *
+
parser = argparse.ArgumentParser(description="Build source packages for PPAs.")
#parser.add_argument("-d", "--dist", default=UbuntuDistroInfo().devel(), help="Distribution name (default: current development release)")
parser.add_argument("-d", "--dist", default="yakkety", help="Distribution name (default: current development release)")
@@ -47,11 +50,17 @@ name = d.get_package()
version = d.get_version().upstream_version
tarname = "%s_%s.orig.tar.xz" % (name, version)
-#subprocess.call(["apt-get", "source", ("%s" % name)])
-subprocess.call(["uscan", "--download-current-version", "--destdir=../build-area"])
-
-if os.path.isfile("../%s" % tarname) and not os.path.isfile("../build-area/%s" % tarname):
- os.symlink("../%s" % tarname, "../build-area/%s" % tarname)
+#Check if the package is from qt, frameworks, plasma or applications
+upstream_name = os.path.basename(os.path.split(os.getcwd())[0])
+release_types = ["qt", "frameworks", "plasma", "applications"]
+for rt in release_types:
+ version_map = getFtpVersionMap(rt)
+ if upstream_name in version_map:
+ release_type = rt
+ break
+
+#Get a link to the upstream tarball, this function downloads if needed
+link_upstream_tarball(release_type)
if not os.path.isfile("../build-area/%s" % tarname):
print "Didn't manage to find %s anywhere in an appropriate version, put one in build-area, kthxbai" % tarname