mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
Exit if proposed version is not greater than already available one
This commit is contained in:
parent
764290cb9a
commit
4ab0673c80
@ -18,6 +18,7 @@
|
||||
#
|
||||
# ##################################################################
|
||||
|
||||
import apt_pkg
|
||||
import os, os.path, sys, urllib, subprocess, shutil
|
||||
from ubuntutools.requestsync.lp import getUbuntuSrcPkg
|
||||
|
||||
@ -68,6 +69,11 @@ new_ver = new_ver[:-4] # strip off '.dsc'
|
||||
|
||||
cur_ver = getUbuntuSrcPkg(srcpkg, release).getVersion()
|
||||
|
||||
# No need to continue if version is not greater than current one
|
||||
apt_pkg.init()
|
||||
if not apt_pkg.check_dep(new_ver, '>', cur_ver):
|
||||
raise Exception('%s version %s is not greater than already available %s' % (srcpkg, new_ver, cur_ver))
|
||||
|
||||
retrieve_file(dscurl)
|
||||
files = dsc_getfiles(dscname)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user