1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579 | diff --git a/conf/areas.json b/conf/areas.json
index 417d488..9ed41d5 100644
--- a/conf/areas.json
+++ b/conf/areas.json
@@ -1,5 +1,4 @@
{
"_comment":"Directories are relative to the directory containing the debian/* files",
- "build-area":"../build-area",
"upload-area":"../upload"
}
diff --git a/conf/git-clone-all.json b/conf/git-clone-all.json
index a1a4e11..29d8aea 100644
--- a/conf/git-clone-all.json
+++ b/conf/git-clone-all.json
@@ -1,7 +1,6 @@
{
"clone-this-one":"git-ssh-kubuntu",
"extra-remotes":["git-anon-neon", "git-anon-debian"],
- "clone-this-one-qt":"git-anon-debian",
"git-ssh-kubuntu":"git+ssh://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/%(repo)s",
"git-anon-kubuntu":"git://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/%(repo)s",
diff --git a/dev-package-name-list b/dev-package-name-list
index 47916f1..1ccbd5a 100755
--- a/dev-package-name-list
+++ b/dev-package-name-list
@@ -27,8 +27,8 @@ from debian.changelog import Changelog, Version
parser = argparse.ArgumentParser(description="Update -dev package name list used by bump-build-dep-versions")
parser.add_argument("-d", "--dist", help="Distribution name", required=True)
-parser.add_argument("-r", "--releasetype", help="Type [qt,frameworks,plasma,applications]", required=True)
-parser.add_argument("-m", "--merge", nargs="*", help="Type [qt,frameworks,plasma,applications]", required=False)
+parser.add_argument("-r", "--releasetype", help="Type [frameworks,plasma,applications]", required=True)
+parser.add_argument("-m", "--merge", nargs="*", help="Type [frameworks,plasma,applications]", required=False)
args = parser.parse_args()
dist = args.dist
releasetype = args.releasetype
@@ -49,8 +49,6 @@ build_depends_set = set()
#Populate the vars above inspecting the control files and changelogs
dirs = getFtpVersionMap(releasetype)
for d in dirs:
- if releasetype == "qt":
- d = d.split("-opensource-src")[0]
#Find out source package version
changelog = Changelog()
changelog_file_name = d + '/' + subdir + '/debian/changelog'
@@ -62,12 +60,13 @@ for d in dirs:
except:
print("Failed to parse changelog file: " + changelog_file_name)
continue
- if releasetype != "qt":
- upstream_name = os.path.basename( d )
- else:
- upstream_name = os.path.basename( d ) + "-opensource-src"
- if upstream_name in getFtpVersionMap(releasetype):
- src_package_version = getFtpVersionMap(releasetype)[upstream_name]
+ upstream_name = os.path.basename( d )
+ if upstream_name in getFtpVersionMap("frameworks"):
+ src_package_version = getFtpVersionMap("frameworks")[upstream_name]
+ elif upstream_name in getFtpVersionMap("plasma"):
+ src_package_version = getFtpVersionMap("plasma")[upstream_name]
+ elif upstream_name in getFtpVersionMap("applications"):
+ src_package_version = getFtpVersionMap("applications")[upstream_name]
#Find out if the package has epoch or not, if so preprend it to the version
epoch = changelog.get_version().epoch
@@ -87,33 +86,25 @@ for d in dirs:
except FileNotFoundError:
print("WARNING: File " + control_file_name + " not found!")
continue
- except:
- print("WARNING: File " + control_file_name + " failed to parse!")
- continue
warnings.simplefilter('ignore', UserWarning) #Ignore the warnings from python-debian
warnings.simplefilter('ignore', FutureWarning) #Ignore the warnings from python-debian
- try:
- for pkg in control_file:
- if 'Source' in pkg:
- #Read the build depends of the current package and add them to build_depends_set
- relation_structured = deb822.PkgRelation.parse_relations(pkg['Build-Depends'])
- for i in relation_structured:
- for j in i:
- build_depends_set.add(j['name'])
- if 'Build-Depends-Indep' in pkg:
- relation_structured = deb822.PkgRelation.parse_relations(pkg['Build-Depends-Indep'])
- for i in relation_structured:
- for j in i:
- build_depends_set.add(j['name'])
- if 'Package' in pkg:
- #Find out binary package names and add them to dev_package_version_map with their version
- bin_package_name = pkg['Package']
- bin_package_version_map[bin_package_name] = src_package_version
- except:
- print("WARNING: File " + control_file_name + " failed to parse!")
- continue
+ for pkg in control_file:
+ if 'Source' in pkg:
+ #Read the build depends of the current package and add them to build_depends_set
+ relation_structured = deb822.PkgRelation.parse_relations(pkg['Build-Depends'])
+ for i in relation_structured:
+ for j in i:
+ build_depends_set.add(j['name'])
+ if 'Build-Depends-Indep' in pkg:
+ relation_structured = deb822.PkgRelation.parse_relations(pkg['Build-Depends-Indep'])
+ for i in relation_structured:
+ for j in i:
+ build_depends_set.add(j['name'])
+ if 'Package' in pkg:
+ #Find out binary package names and add them to dev_package_version_map with their version
+ bin_package_name = pkg['Package']
+ bin_package_version_map[bin_package_name] = src_package_version
control_file.close()
- warnings.simplefilter('default', FutureWarning) #Reset the future warnings
warnings.simplefilter('default', UserWarning) #Reset the user warnings
#Now its easy, we have bin_package_version_map mapping all (binary_package -> version)
diff --git a/dev-package-name-lists/qt-yakkety.json b/dev-package-name-lists/qt-yakkety.json
deleted file mode 100644
index 6d9086f..0000000
--- a/dev-package-name-lists/qt-yakkety.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "_comment": "This file was generated automatically by dev-package-name-list.",
- "libenginio1-dev": "1.6.1~",
- "libqt5opengl5-dev": "5.6.1~",
- "libqt5sensors5-dev": "5.6.1~",
- "libqt5serialport5-dev": "5.6.1~",
- "libqt5sql5-sqlite": "5.6.1~",
- "libqt5svg5-dev": "5.6.1~",
- "libqt5waylandclient5-dev": "5.6.1~",
- "libqt5webchannel-dev": "5.6.1~",
- "libqt5webengine5-dev": "5.6.1~",
- "libqt5websockets5-dev": "5.6.1~",
- "libqt5x11extras5-dev": "5.6.1~",
- "libqt5xmlpatterns5-dev": "5.6.1~",
- "qml-module-qtquick-window2": "5.6.1~",
- "qml-module-qtquick2": "5.6.1~",
- "qt3d5-dev": "5.6.1~",
- "qt5-qmake": "5.6.1~",
- "qtbase5-dev": "5.6.1~",
- "qtbase5-dev-tools": "5.6.1~",
- "qtbase5-doc-html": "5.6.1~",
- "qtbase5-private-dev": "5.6.1~",
- "qtconnectivity5-dev": "5.6.1~",
- "qtconnectivity5-doc-html": "5.6.1~",
- "qtdeclarative5-dev": "5.6.1~",
- "qtdeclarative5-doc-html": "5.6.1~",
- "qtdeclarative5-private-dev": "5.6.1~",
- "qtgraphicaleffects5-doc-html": "5.6.1~",
- "qtlocation5-dev": "5.6.1~",
- "qtlocation5-doc-html": "5.6.1~",
- "qtmultimedia5-dev": "5.6.1~",
- "qtmultimedia5-doc-html": "5.6.1~",
- "qtpositioning5-dev": "5.6.1~",
- "qtquickcontrols2-5-dev": "5.6.1~",
- "qtquickcontrols5-doc-html": "5.6.1~",
- "qtscript5-dev": "5.6.1~",
- "qtscript5-doc-html": "5.6.1~",
- "qtscript5-private-dev": "5.6.1~",
- "qtsensors5-doc-html": "5.6.1~",
- "qtserialport5-doc-html": "5.6.1~",
- "qtsvg5-doc-html": "5.6.1~",
- "qttools5-dev": "5.6.1~",
- "qttools5-dev-tools": "5.6.1~",
- "qttools5-doc-html": "5.6.1~",
- "qttools5-private-dev": "5.6.1~",
- "qtwebsockets5-doc-html": "5.6.1~",
- "qtx11extras5-doc-html": "5.6.1~",
- "qtxmlpatterns5-doc-html": "5.6.1~"
-}
\ No newline at end of file
diff --git a/git-buildpackage-ppa b/git-buildpackage-ppa
index c95c19a..5f7ed3a 100755
--- a/git-buildpackage-ppa
+++ b/git-buildpackage-ppa
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/python
# Script to be run in git branch of debian/ packaging,
# it adds a ppa version number to the changelog
@@ -14,13 +14,10 @@ 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)")
-parser.add_argument("-s", "--suffix", default="1", help="PPA version suffix, i.e. ~ppaX (default: 1)")
+parser.add_argument("-s", "--suffix", default=1, help="PPA version suffix, i.e. ~ppaX (default: 1)")
parser.add_argument("-y", "--distversion", default="16.10", help="distro version number")
parser.add_argument("options", nargs="*", help="debuild options")
@@ -35,38 +32,32 @@ lines = f.readlines()
f.close()
if not "UNRELEASED" in lines[0]:
- print("Error: Distribution is not \"UNRELEASED\".", file=sys.stderr)
+ print >> sys.stderr, "Error: Distribution is not \"UNRELEASED\"."
sys.exit(1)
if "ppa" in lines[0]:
- print("Error: Version contains \"ppa\".", file=sys.stderr)
+ print >> sys.stderr, "Error: Version contains \"ppa\"."
sys.exit(1)
if not os.path.exists('../build-area/'):
os.makedirs('../build-area/')
-changelog = changelog.Changelog(open('debian/changelog'))
-name = changelog.get_package()
-version = changelog.get_version().upstream_version
+d = changelog.Changelog(open('debian/changelog'))
+name = d.get_package()
+version = d.get_version().upstream_version
tarname = "%s_%s.orig.tar.xz" % (name, version)
-#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
+#subprocess.call(["apt-get", "source", ("%s" % name)])
+subprocess.call(["uscan", "--download-current-version", "--destdir=../build-area"])
-#Get a link to the upstream tarball, this function downloads if needed
-link_upstream_tarball(release_type)
+if os.path.isfile("../%s" % tarname) and not os.path.isfile("../build-area/%s" % tarname):
+ os.symlink("../%s" % tarname, "../build-area/%s" % tarname)
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)
+ print "Didn't manage to find %s anywhere in an appropriate version, put one in build-area, kthxbai" % tarname
sys.exit(1)
-version = str(changelog.get_version())
+version = str(d.get_version())
version += "~ubuntu" + str(args.distversion) + "~ppa" + str(args.suffix)
application = ["gbp", "buildpackage",
@@ -78,30 +69,13 @@ application = ["gbp", "buildpackage",
"--git-ignore-new",
"--git-prebuild=dch -b -v " + version + " PPA build; dch -D " + args.dist + " -r PPA build",
"-S"]
-
-if (args.suffix == "1") or (args.suffix == "0"):
- application += ["-sa"]
-else:
+if args.suffix > 1:
application += ["-sd"]
+else:
+ application += ["-sa"]
application += args.options
-print("calling: " + " ".join(application))
+print "calling: " + " ".join(application)
subprocess.call(application)
-#Put the resulting source package files also in the upload area
-src_pkg = changelog.get_package()
-version = changelog.upstream_version
-if changelog.debian_revision != None:
- version += "-" + changelog.debian_revision
- version += "~ubuntu" + str(args.distversion) + "~ppa" + str(args.suffix)
-upload_area_dir = readConfigFile("areas.json")["upload-area"]
-build_area_dir = readConfigFile("areas.json")["build-area"]
-
-os.makedirs(upload_area_dir, exist_ok=True)
-
-command = "dcmd ln -f %s/%s_%s_source.changes %s" % (build_area_dir,src_pkg,version,upload_area_dir)
-print(command)
-returncode = subprocess.call(command,shell=True)
-sys.exit(returncode)
-
# kate: space-indent on; indent-width 4; replace-tabs on; indent-mode python; remove-trailing-space on;
diff --git a/git-clone-all b/git-clone-all
index 830b265..753ac0f 100755
--- a/git-clone-all
+++ b/git-clone-all
@@ -19,14 +19,14 @@ from lib.utils import *
#Argument parser
parser = argparse.ArgumentParser(
- description="Clones all the qt, frameworks, plasma or apps git repositories"
+ description="Clones all the frameworks, plasma or apps git repositories"
" from Launchpad to the current directory")
parser.add_argument("-r", "--releasetype",
help="KDE Release Type [frameworks,plasma,applications]"
"if not specified downloads all the git repositories",
required=False)
parser.add_argument("-d", "--dist",
- help="KDE Release Type [qt,frameworks,plasma,applications]",
+ help="KDE Release Type [frameworks,plasma,applications]",
default="yakkety", required=False)
parser.add_argument("-t", "--tmpdir",
help="Temporary dir where the packages are prepared",
@@ -38,9 +38,9 @@ args = parser.parse_args()
releaseTypes = []
if args.releasetype != None:
- if args.releasetype not in ["qt", "frameworks", "plasma", "applications"]:
+ if args.releasetype not in ["frameworks", "plasma", "applications"]:
print("Invalid releasetype %s" % args.releasetype)
- print("Accepted release types are qt, frameworks, plasma, applications")
+ print("Accepted release types are frameworks, plasma, applications")
sys.exit(1)
else:
releaseTypes.append(args.releasetype)
@@ -52,9 +52,7 @@ workdir = args.tmpdir if args.tmpdir else os.getcwd()
#Find out the base url to clone and the extra remotes
config_map = readConfigFile("git-clone-all.json")
template_url_clone = config_map[config_map["clone-this-one"]]
-template_url_clone_qt = config_map[config_map["clone-this-one-qt"]]
print("Template url to clone: %s" % template_url_clone)
-print("Template url for Qt: %s" % template_url_clone_qt)
remotes_list = config_map["extra-remotes"]
packages_not_cloned = []
@@ -68,14 +66,9 @@ for releaseType in releaseTypes:
#Get package list
packages = getFtpVersionMap(releaseType)
for package in packages:
- print("\n ==== Kloning package " + package + "===")
- if releaseType == "qt":
- repo_name = package.split("-opensource-src")[0]
- final_url = template_url_clone_qt % {'component': releaseType, 'repo': repo_name}
- else:
- repo_name = package
- final_url = template_url_clone % {'component': releaseType, 'repo': repo_name}
- command = "git clone " + final_url + " git"
+ repo_name = package
+ print("\n ==== Kloning package " + repo_name + "===")
+ command = "git clone " + (template_url_clone % {'component': releaseType, 'repo': repo_name}) + " git"
print("Executing: " + command)
try:
old_cwd = os.getcwd()
@@ -89,7 +82,6 @@ for releaseType in releaseTypes:
except:
#In any other exception we continue, this way we can use
#git-clone-all against a directory with some repositories already cloned.
- os.chdir(old_cwd)
if not os.path.exists(workdir + '/' + repo_name + '/git/'):
packages_not_cloned.append(package)
else:
diff --git a/lib/get_tarball.py b/lib/get_tarball.py
index c10daad..cdee14e 100755
--- a/lib/get_tarball.py
+++ b/lib/get_tarball.py
@@ -1,5 +1,4 @@
#!/usr/bin/python3
-# -*- coding: utf-8 -*-
# kate: space-indent on; indent-width 4; replace-tabs on; indent-mode python; remove-trailing-space modified;
# vim: expandtab ts=4
@@ -14,28 +13,11 @@
import os
import json
-import subprocess
from debian import deb822
from debian.changelog import Changelog, Version
-#Downloads the tarball of the current version but it doesn't symlink it; see
-#the other function below
-
-def download_tarball_uscan(releaseType):
- cwd = os.path.dirname(os.path.realpath(__file__))
- destdir = json.load(open(cwd + "/../conf/tarball-locations.json"))[releaseType]
- version = json.load(open(cwd + "/../conf/versions.json"))[releaseType]
- destdir += "/" + version
- destdir = os.path.expanduser(destdir)
- os.makedirs(destdir, exist_ok=True)
- subprocess.call(["uscan", "--download-current-version", "--no-symlink", "--destdir="+destdir])
-
-
-#Creates a link to the upstream tarball, if the target file pointed by the link
-#doesn't exit, the tarball is downloaded before making the link
-
def link_upstream_tarball(releaseType):
#Find out the tarball link name
upstream_name = os.path.basename(os.path.split(os.getcwd())[0])
@@ -53,33 +35,22 @@ def link_upstream_tarball(releaseType):
real_upstream_version = upstream_version.rstrip(last_char)
else:
real_upstream_version = upstream_version
-
- #Find out the link name
- cwd = os.path.dirname(os.path.realpath(__file__))
- config_areas = json.load(open(cwd + "/../conf/areas.json"))
- try:
- os.makedirs(config_areas["build-area"])
- except:
- pass
- link_name = config_areas["build-area"] + '/' + src_package_name + '_' + upstream_version + '.orig.tar.xz'
-
+
+ link_name = '../' + src_package_name + '_' + upstream_version + '.orig.tar.xz'
#Find out the tarball link target path
+ cwd = os.path.dirname(os.path.realpath(__file__))
config_tarball_loc = json.load(open(cwd + "/../conf/tarball-locations.json"))
config_versions = json.load(open(cwd + "/../conf/versions.json"))
link_target = os.path.expanduser(config_tarball_loc[releaseType])
link_target += '/' + config_versions[releaseType] + '/'
link_target += upstream_name + '-' + real_upstream_version + ".tar.xz"
-
- #If the tarball isn't there already, download it with uscan
- if not os.path.isfile(link_target):
- download_tarball_uscan(releaseType)
-
#Create the link
try:
os.symlink(link_target,link_name)
except:
pass
+
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description="Link the orig tarball.")
diff --git a/lib/utils.py b/lib/utils.py
index 95c7d91..4599098 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -17,8 +17,6 @@ import os
import subprocess
import re
import sys
-from ftplib import FTP
-from io import StringIO
def readAllFromFile(filename):
f = open(filename, "r")
@@ -93,8 +91,6 @@ def getFtpVersionMap(releaseType):
ftp_subdirs = [""]
elif releaseType == "applications":
ftp_subdirs = ["src"]
- elif releaseType == "qt":
- ftp_subdirs = [""]
#Find out the stability
versionParts = version.split(".")
lastDigit = int(versionParts[-1])
@@ -104,24 +100,15 @@ def getFtpVersionMap(releaseType):
stability = "stable"
#Inspect the ftp
for subdir in ftp_subdirs:
- if releaseType != "qt":
- ftp_command = ["sftp", "-b", "-", "depot.kde.org:%s/%s/%s/%s" % (stability, releaseType, version, subdir)]
- p = subprocess.Popen(ftp_command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
- output, _ = p.communicate(bytes("ls *xz", 'utf-8'))
- if p.returncode != 0:
- print("The sftp process failed with return code: " + str(p.returncode))
- print("Command attempted: " + " ".join(ftp_command))
- sys.exit(1)
- else:
- ftp = FTP("ftp.mirrorservice.org")
- ftp.login()
- version_short = versionParts[0] + "." + versionParts[1]
- ftp.cwd("sites/download.qt-project.org/official_releases/qt/" + version_short + "/" + version + "/submodules/")
- output = StringIO()
- callback = lambda s: output.write(s+'\n')
- ftp.retrlines("NLST *.xz",callback)
- output = bytes(output.getvalue(),'utf-8')
- #Fill the map inspecting the "ls" results from the ftp
+ ftp_command = ["sftp", "-b", "-", "depot.kde.org:%s/%s/%s/%s" % (stability, releaseType, version, subdir)]
+ p = subprocess.Popen(ftp_command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+ output, _ = p.communicate(bytes("ls *xz", 'utf-8'))
+
+ if p.returncode != 0:
+ print("The sftp process failed with return code: " + str(p.returncode))
+ print("Command attempted: " + " ".join(ftp_command))
+ sys.exit(1)
+
for line in output.splitlines():
line = line.decode('utf-8')
match = re.search(r'([a-zA-Z0-9\-]+)-' + '([\d.]*)' + r'\.tar\.', line)
diff --git a/new-release b/new-release
index 735264e..53b0722 100755
--- a/new-release
+++ b/new-release
@@ -21,8 +21,6 @@ from lib.bump_build_dep_versions import *
import warnings
-import subprocess
-
#Parse arguments
parser = argparse.ArgumentParser(description="Makes the changes needed in debian/* to provide a new upstream release.")
parser.add_argument("-d", "--dist", help="Distribution name", required=True)
@@ -52,27 +50,21 @@ epoch = changelog.get_version().epoch
if epoch != None:
version_str = epoch + ":" + version_str
-if changelog.distributions != "UNRELEASED":
- changelog.new_block(package = changelog.get_package(),
+changelog.new_block(package = changelog.get_package(),
version = version_str,
#distributions = args.dist,
distributions = "UNRELEASED",
urgency = 'low',
author = maintainer_str,
date = time.strftime('%a, %d %b %Y %X %z') )
- #Add the first changelog entry
- changelog.add_change('')
- changelog.add_change(' * New upstream release ('+changelog.upstream_version+')')
- changelog.add_change('')
- #Dump the contents to the file
- changelog.write_to_open_file(open('./debian/changelog', 'w'))
-else:
- #Set the new version
- changelog.set_version(version_str)
- changelog.write_to_open_file(open('./debian/changelog', 'w'))
- #Add the "New upstream release" entry
- #Apparently we can't do this with python-debian right now
- subprocess.call(["dch","New upstream release ("+changelog.upstream_version+')'])
+
+#Add the first changelog entry
+changelog.add_change('')
+changelog.add_change(' * New upstream release')
+changelog.add_change('')
+
+#Dump the contents to the file
+changelog.write_to_open_file(open('./debian/changelog', 'w'))
#Bump the build depends
bump_build_depends(releasetype,args.dist)
diff --git a/uploadsource b/uploadsource
index 3a8605a..bc37f26 100755
--- a/uploadsource
+++ b/uploadsource
@@ -14,7 +14,6 @@
import subprocess
import sys
import argparse
-import glob
from debian.changelog import Changelog, Version
@@ -36,26 +35,13 @@ if changelog.debian_revision != None:
version += "-" + changelog.debian_revision
upload_area_dir = readConfigFile("areas.json")["upload-area"]
-#Read configurations
+
config = readConfigFile("uploadsource.json")
config_areas = readConfigFile("areas.json")
-
-#Find out the filename ot upload
-file_pattern = config_areas["upload-area"] + "/" + src_pkg + "_" + version + "*_source.changes"
-files = glob.glob(file_pattern)
-
-if not files:
- print("No files matching the pattern " + file_pattern + " were found, aborting")
- sys.exit(1)
+changes_file = config_areas["upload-area"] + "/" + src_pkg + "_" + version + "_source.changes"
+command = config["upload_command"]
+command = command % (host, changes_file)
#Upload the source package
-uploader_failed = False
-for changes_file in files:
- command = config["upload_command"]
- command = command % (host, changes_file)
- returncode = subprocess.call(command,shell=True)
- if returncode != 0:
- uploader_failed = True
-
-if uploader_failed:
- sys.exit(1)
+returncode = subprocess.call(command,shell=True)
+sys.exit(returncode)
|