diff options
| -rw-r--r-- | meta/classes/distrodata.bbclass | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass index bd3a6a96ab..cedacc214c 100644 --- a/meta/classes/distrodata.bbclass +++ b/meta/classes/distrodata.bbclass | |||
| @@ -246,7 +246,7 @@ python checkpkg_eventhandler() { | |||
| 246 | 246 | ||
| 247 | lf = bb.utils.lockfile("%s.lock" % logfile) | 247 | lf = bb.utils.lockfile("%s.lock" % logfile) |
| 248 | f = open(logfile, "a") | 248 | f = open(logfile, "a") |
| 249 | f.write("Package\tVersion\tUpver\tLicense\tSection\tHome\tRelease\tDepends\tBugTracker\tPE\tDescription\tStatus\tTracking\tURI\tMAINTAINER\n") | 249 | f.write("Package\tVersion\tUpver\tLicense\tSection\tHome\tRelease\tDepends\tBugTracker\tPE\tDescription\tStatus\tTracking\tURI\tMAINTAINER\tNoUpReason\n") |
| 250 | f.close() | 250 | f.close() |
| 251 | bb.utils.unlockfile(lf) | 251 | bb.utils.unlockfile(lf) |
| 252 | elif bb.event.getName(e) == "BuildCompleted": | 252 | elif bb.event.getName(e) == "BuildCompleted": |
| @@ -670,16 +670,22 @@ python do_checkpkg() { | |||
| 670 | if tmp: | 670 | if tmp: |
| 671 | tmpline = tmp.split("\n") | 671 | tmpline = tmp.split("\n") |
| 672 | verflag = 0 | 672 | verflag = 0 |
| 673 | phash = tmpline[0].rsplit("\t")[0] | ||
| 674 | pupver = pversion | ||
| 673 | for line in tmpline: | 675 | for line in tmpline: |
| 674 | if len(line)==0: | 676 | if len(line)==0: |
| 675 | break; | 677 | break; |
| 676 | puptag = line.split("/")[-1] | 678 | puptag = line.split("/")[-1] |
| 677 | puptag = re.search("([0-9][\.|_]?)+", puptag) | 679 | upstr_regex = d.getVar('REGEX', True) |
| 680 | if upstr_regex: | ||
| 681 | puptag = re.search(upstr_regex, puptag) | ||
| 682 | else: | ||
| 683 | puptag = re.search("([0-9][\.|_]?)+", puptag) | ||
| 678 | if puptag == None: | 684 | if puptag == None: |
| 679 | continue; | 685 | continue; |
| 680 | puptag = puptag.group() | 686 | puptag = puptag.group() |
| 681 | puptag = re.sub("_",".",puptag) | 687 | puptag = re.sub("_",".",puptag) |
| 682 | plocaltag = pversion.split("+")[0] | 688 | plocaltag = pupver.split("+git")[0] |
| 683 | if "git" in plocaltag: | 689 | if "git" in plocaltag: |
| 684 | plocaltag = plocaltag.split("-")[0] | 690 | plocaltag = plocaltag.split("-")[0] |
| 685 | result = bb.utils.vercmp(("0", puptag, ""), ("0", plocaltag, "")) | 691 | result = bb.utils.vercmp(("0", puptag, ""), ("0", plocaltag, "")) |
| @@ -687,18 +693,33 @@ python do_checkpkg() { | |||
| 687 | verflag = 1 | 693 | verflag = 1 |
| 688 | pstatus = "UPDATE" | 694 | pstatus = "UPDATE" |
| 689 | pupver = puptag | 695 | pupver = puptag |
| 696 | phash = line.split("\t")[0] | ||
| 690 | elif verflag == 0 : | 697 | elif verflag == 0 : |
| 691 | pupver = plocaltag | 698 | pupver = plocaltag |
| 692 | pstatus = "MATCH" | 699 | pstatus = "MATCH" |
| 693 | #This is for those no tag repo | 700 | #This is for those no tag repo |
| 694 | elif tmp2: | 701 | elif tmp2: |
| 695 | pupver = tmp2.split("\t")[0] | 702 | pupver = tmp2.split("\t")[0] |
| 703 | phash = pupver | ||
| 696 | if pupver in pversion: | 704 | if pupver in pversion: |
| 697 | pstatus = "MATCH" | 705 | pstatus = "MATCH" |
| 698 | else: | 706 | else: |
| 699 | pstatus = "UPDATE" | 707 | pstatus = "UPDATE" |
| 700 | else: | 708 | else: |
| 701 | pstatus = "ErrGitAccess" | 709 | pstatus = "ErrGitAccess" |
| 710 | |||
| 711 | tmp3 = re.search('(?P<git_ver>(\d+[\.-]?)+)(?P<git_prefix>(\+git[r|\-|]?)AUTOINC\+)(?P<head_md5>(.+))', pversion) | ||
| 712 | if tmp3: | ||
| 713 | pversion = tmp3.group('git_ver') + tmp3.group('git_prefix') + tmp3.group('head_md5')[:7] | ||
| 714 | git_prefix = tmp3.group('git_prefix') | ||
| 715 | if not (git_prefix in pupver): | ||
| 716 | if len(pupver) < 40: | ||
| 717 | """This is not the HEAD of the repository""" | ||
| 718 | pupver = pupver + tmp3.group('git_prefix') + phash[:7] | ||
| 719 | else: | ||
| 720 | """This is the HEAD of the repository""" | ||
| 721 | pupver = tmp3.group('git_ver') + tmp3.group('git_prefix') + phash[:7] | ||
| 722 | |||
| 702 | elif type == 'svn': | 723 | elif type == 'svn': |
| 703 | options = [] | 724 | options = [] |
| 704 | if user: | 725 | if user: |
| @@ -755,10 +776,11 @@ python do_checkpkg() { | |||
| 755 | psrcuri = psrcuri.split()[0] | 776 | psrcuri = psrcuri.split()[0] |
| 756 | pdepends = "".join(pdepends.split("\t")) | 777 | pdepends = "".join(pdepends.split("\t")) |
| 757 | pdesc = "".join(pdesc.split("\t")) | 778 | pdesc = "".join(pdesc.split("\t")) |
| 779 | no_upgr_reason = d.getVar('RECIPE_NO_UPDATE_REASON', True) | ||
| 758 | lf = bb.utils.lockfile("%s.lock" % logfile) | 780 | lf = bb.utils.lockfile("%s.lock" % logfile) |
| 759 | f = open(logfile, "a") | 781 | f = open(logfile, "a") |
| 760 | f.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % \ | 782 | f.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % \ |
| 761 | (pname,pversion,pupver,plicense,psection, phome,prelease, pdepends,pbugtracker,ppe,pdesc,pstatus,pmver,psrcuri,maintainer)) | 783 | (pname,pversion,pupver,plicense,psection, phome,prelease, pdepends,pbugtracker,ppe,pdesc,pstatus,pmver,psrcuri,maintainer, no_upgr_reason)) |
| 762 | f.close() | 784 | f.close() |
| 763 | bb.utils.unlockfile(lf) | 785 | bb.utils.unlockfile(lf) |
| 764 | } | 786 | } |
