summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/perforce.py
AgeCommit message (Collapse)Author
2015-06-27bitbake: fetch/perforce: Fix single file checkoutsRichard Purdie
Fetching directories with p4 worked but single files did not. This patch from Helmut Auer (helmut.auer@harman.com) fixes that issue. [YOCTO #7891] (Bitbake rev: 39da6579901c62a83ed9319c2016c58fbbc108fe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23bitbake: bitbake: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` (Bitbake rev: 659ef95c9b8aced3c4ded81c48bcc0fbde4d429f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23bitbake: fetch2/perforce: Use replace (1 line) instead of find (3 lines)Chad Nelson
(Bitbake rev: 5bf5a937b26896bedbfea78dd1d62bce5a26ac2a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23bitbake: fetch2/perforce: Fix localfile name if labels are usedChad Nelson
I could apply the label "release_1.0" to a super project that contains many sub projects. If my recipes have SRC_URI's that use that label but grab different sub-folders, than there's a bug where the cached localfile (tar.gz) will not be unique and reused at the wrong times. SRC_URI = "p4://perforce::1234@//depot/SuperProject/MiniProjectAAA/...;label=release_1.0 \ p4://perforce::1234@//depot/SuperProject/MiniProjectBBB/...;label=release_1.0" (Bitbake rev: 3b5b1703b77490116dda895b29737cea51a3d6a0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-11bitbake: fetch2/perforce: Ensure command has a defaultRichard Purdie
Ensure there is default command available if FETCHCMD_p4 isn't set. Also clean up the getVar references whilst here. (Bitbake rev: d150226d11d5f041f78c8c3ce4abc5465dbc81d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-02bitbake: fetch/perforce: Drop usage of old style *COMMAND variable and ↵Richard Purdie
MKTEMPDIRCMD Clean up some horrible old code and drop usage of the old style *COMMAND variable and MKTEMPDIRCMD whilst in here. This means we don't need to touch OVERRIDES either. (Bitbake rev: 6b79789769da160d0e7fca0f9c6044dc1e11a107) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-24bitbake: perforce: Fix path subdirectory issuesRichard Purdie
With a SRC_URI = " \ p4://depot/folder/...;module=localfolder/localsubfolder;changeslist=${P4CHANGELIST} \ " the subfolders of //depot/folder/... get renamed when mapped to the local folder structure. They lose the first 3 letters. This patch fixes that. Issue reported by and patch sent from katutxakurra@gmail.com [YOCTO #5380] (Bitbake rev: 40e06dc459d9c0b5d42d65b2d2c846196fd36b1f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22bitbake: fetch2: Stop passing around the pointless url parameterRichard Purdie
There is no good reason to keep passing around the url parameter when its contained within urldata (ud). This is left around due to legacy reasons, some functions take it, some don't and its time to cleanup. This is fetcher internal API, there are a tiny number of external users of the internal API (buildhistory and distrodata) which can be fixed up after this change. (Bitbake rev: 6a48474de9505a3700863f31839a7c53c5e18a8d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-25bitbake: perforce.py: fix the perforce fetcherRobert Yang
The bb.process.run() will return one tuple, e.g: p4file = ('strA\nStrB\nstrC\n'), then there will be an iteration on p4file: for i in p4file: [snip] The i will be 's t r A ...', this is incorrect. use splitlines() to fix the problem. [YOCTO #3619] (Bitbake rev: b7440fb36b419996046f607e66434ce34722272b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23replace os.popen with subprocess.PopenRobert Yang
Replace os.popen with subprocess.Popen since the older function would fail (more or less) silently if the executed program cannot be found There is a bb.process.run() which will invoke the Popen to run command, use it for simplify the code. For the: p4file = os.popen("%s%s files %s" % (p4cmd, p4opt, depot)) ... for file in p4file: list = file.split() in bitbake/lib/bb/fetch2/perforce.py, it should be an error in the past, since it didn't use readline() to read the pipe, but directly used the split() for the pipe. Use the bb.process.run would fix the problem since bb.process.run will return strings. More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2075] (Bitbake rev: 8d6700255a6d4dda403c89b171a6d4a1883e5aae) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23replace os.system with subprocess.callRobert Yang
Replace os.system with subprocess.call since the older function would fail (more or less) silently if the executed program cannot be found More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2075] (Bitbake rev: f5b3bf115dc1ffbfb241a49cec0fc3654cb71021) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-03fetch, fetch2: Get rid of DeprecationWarning noticeKhem Raj
* This patch fixes a cosmetic issue currently we get with master WARNING: /home/kraj/work/bitbake/lib/bb/fetch2/__init__.py:733: DeprecationWarning: Call to deprecated function bb.mkdirhier: Please use bb.utils.mkdirhier instead. bb.mkdirhier("%s/%s" % (rootdir, destdir)) (Bitbake rev: 36fe59ce314c295d239b76de34c8714def2c32d5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07fetch2: add runfetchcmd to import for fetchersSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-02-07bitbake/fetch2: Use True instead of integer valuesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Rename Fetch class to FetchMethodRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Rewrite and improve exception handling, reusing core ↵Richard Purdie
functions for common operations where possible Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Define a sane localpath function and remove code duplicationRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Move ud.localfile setup into urldata_initRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-25bb.fetch2: rename "go" with "download" to better reflect its functionalityYu Ke
no functional change Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-10bb.fetch2: replace bb.fetch with bb.fetch2 in the bb.fetchYu Ke
bb.fetch2 is copied from bb.fetch, and has many bb.fetch referrence. Fix these referrence with bb.fetch2 referrence Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10bitbake: copy bb.fetch to bb.fetch2 as initial code base for fetcher overhaulYu Ke
Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>