summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorEmilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>2013-03-22 10:30:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-22 16:54:37 +0000
commitfdd76ead8573a6c0ca39602b8e894291edc171aa (patch)
tree34fe2396af4cc567ca0f37a3bad6b76d99dde066 /meta/classes
parent0e727639875d06bf1af9df1dc0ac26a5998bcc6d (diff)
downloadpoky-fdd76ead8573a6c0ca39602b8e894291edc171aa.tar.gz
distrodata.bbclass: added some more git processing
* Truncated all git MD5 sums to 7 digits * Added regex checking for git packages as well (From OE-Core rev: bc830ab3f6e9704c830e934c6f39c85ef11f867d) Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/distrodata.bbclass32
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}