Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Side by Side Diff: cros_mark_as_stable.py

Issue 3330013: Fix keywords issue (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """This module uprevs a given package's ebuild to the next revision.""" 7 """This module uprevs a given package's ebuild to the next revision."""
8 8
9 9
10 import fileinput 10 import fileinput
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 self.ebuild_path = self._FindEBuildPath(package) 204 self.ebuild_path = self._FindEBuildPath(package)
205 (self.ebuild_path_no_revision, 205 (self.ebuild_path_no_revision,
206 self.ebuild_path_no_version, 206 self.ebuild_path_no_version,
207 self.current_revision) = self._ParseEBuildPath(self.ebuild_path) 207 self.current_revision) = self._ParseEBuildPath(self.ebuild_path)
208 self.commit_id = commit_id 208 self.commit_id = commit_id
209 209
210 @classmethod 210 @classmethod
211 def _FindEBuildPath(cls, package): 211 def _FindEBuildPath(cls, package):
212 """Static method that returns the full path of an ebuild.""" 212 """Static method that returns the full path of an ebuild."""
213 _Print('Looking for unstable ebuild for %s' % package) 213 _Print('Looking for unstable ebuild for %s' % package)
214 equery_cmd = 'equery-%s which %s 2> /dev/null' \ 214 equery_cmd = (
215 % (gflags.FLAGS.board, package) 215 'ACCEPT_KEYWORDS="x86 arm amd64" equery-%s which %s 2> /dev/null'
216 % (gflags.FLAGS.board, package))
216 path = _SimpleRunCommand(equery_cmd) 217 path = _SimpleRunCommand(equery_cmd)
217 if path: 218 if path:
218 _Print('Unstable ebuild found at %s' % path) 219 _Print('Unstable ebuild found at %s' % path)
219 return path 220 return path
220 221
221 @classmethod 222 @classmethod
222 def _ParseEBuildPath(cls, ebuild_path): 223 def _ParseEBuildPath(cls, ebuild_path):
223 """Static method that parses the path of an ebuild 224 """Static method that parses the path of an ebuild
224 225
225 Returns a tuple containing the (ebuild path without the revision 226 Returns a tuple containing the (ebuild path without the revision
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 'and reset the git repo yourself.' % 369 'and reset the git repo yourself.' %
369 (package_list[:index], overlay_directory)) 370 (package_list[:index], overlay_directory))
370 raise e 371 raise e
371 elif command == 'push': 372 elif command == 'push':
372 _PushChange() 373 _PushChange()
373 374
374 375
375 if __name__ == '__main__': 376 if __name__ == '__main__':
376 main(sys.argv) 377 main(sys.argv)
377 378
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698