diff options
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index b708943682..8b144fbee4 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -679,22 +679,22 @@ class BBCooker: | |||
679 | bb.data.setVar("BUILDNAME", time.strftime('%Y%m%d%H%M'), self.configuration.data) | 679 | bb.data.setVar("BUILDNAME", time.strftime('%Y%m%d%H%M'), self.configuration.data) |
680 | bb.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S', time.gmtime()), self.configuration.data) | 680 | bb.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S', time.gmtime()), self.configuration.data) |
681 | 681 | ||
682 | def matchFiles(self, buildfile): | 682 | def matchFiles(self, bf): |
683 | """ | 683 | """ |
684 | Find the .bb files which match the expression in 'buildfile'. | 684 | Find the .bb files which match the expression in 'buildfile'. |
685 | """ | 685 | """ |
686 | 686 | ||
687 | bf = os.path.abspath(buildfile) | 687 | if bf.startswith("/") or bf.startswith("../"): |
688 | bf = os.path.abspath(bf) | ||
688 | filelist, masked = self.collect_bbfiles() | 689 | filelist, masked = self.collect_bbfiles() |
689 | try: | 690 | try: |
690 | os.stat(bf) | 691 | os.stat(bf) |
691 | return [bf] | 692 | return [bf] |
692 | except OSError: | 693 | except OSError: |
693 | regexp = re.compile(buildfile) | 694 | regexp = re.compile(bf) |
694 | matches = [] | 695 | matches = [] |
695 | for f in filelist: | 696 | for f in filelist: |
696 | if regexp.search(f) and os.path.isfile(f): | 697 | if regexp.search(f) and os.path.isfile(f): |
697 | bf = f | ||
698 | matches.append(f) | 698 | matches.append(f) |
699 | return matches | 699 | return matches |
700 | 700 | ||
@@ -725,8 +725,7 @@ class BBCooker: | |||
725 | task = self.configuration.cmd | 725 | task = self.configuration.cmd |
726 | 726 | ||
727 | fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile) | 727 | fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile) |
728 | fn = os.path.abspath(fn) | 728 | fn = self.matchFile(fn) |
729 | buildfile = self.matchFile(fn) | ||
730 | 729 | ||
731 | self.buildSetVars() | 730 | self.buildSetVars() |
732 | 731 | ||
@@ -735,7 +734,7 @@ class BBCooker: | |||
735 | self.configuration.data) | 734 | self.configuration.data) |
736 | infos = dict(infos) | 735 | infos = dict(infos) |
737 | 736 | ||
738 | fn = bb.cache.Cache.realfn2virtual(buildfile, cls) | 737 | fn = bb.cache.Cache.realfn2virtual(fn, cls) |
739 | try: | 738 | try: |
740 | maininfo = infos[fn] | 739 | maininfo = infos[fn] |
741 | except KeyError: | 740 | except KeyError: |