summaryrefslogtreecommitdiffstats
path: root/pym/portage/getbinpkg.py
Commit message (Collapse)AuthorAgeFilesLines
* Use unicode_literals more.Zac Medico2013-01-181-1/+3
| | | | | This helps to ensure consistent results, regardless of whether we're using Python 2 or Python 3.
* Handle closed sys.__stdin__, for multiprocessingZac Medico2012-12-151-1/+1
| | | | | | | Buggy code in python's multiprocessing/process.py closes sys.stdin and reassigns it to open(os.devnull), but fails to update the corresponding __stdin__ reference. So, detect that case and handle it appropriately. The buggy code is visible in http://hg.python.org/lookup/r73708.
* Remove old binhost protocol for bug #438640.Zac Medico2012-10-171-0/+40
| | | | | The old protocol has been deprecated since portage-2.1.6 (2009), so it should be completely irrelevant now.
* Handle KeyError when loading pickles.Zac Medico2012-09-281-1/+3
| | | | See http://forums.gentoo.org/viewtopic-t-938022.html for example.
* Use sys.__std*.fileno() in case of overrides.Zac Medico2012-08-221-3/+5
| | | | | This fixes AttributeError exceptions for API consumers that override sys.std* streams pseudo-file objects.
* Split out _hide_url_passwd() and use it more.Zac Medico2012-05-131-2/+4
|
* getbinpkg: fix base64 usage for python3Zac Medico2012-05-131-4/+9
|
* getbinpkg: fix old binhost protocol for python3Zac Medico2011-09-081-3/+12
| | | | This will fix bug #382233.
* Handle unpickle EOFError.Zac Medico2011-09-031-1/+1
|
* Handle unpickle AttributeError (bug #381705).Zac Medico2011-09-031-1/+1
|
* make_http_request: fix request argumentsZac Medico2011-06-031-1/+1
| | | | | This will fix "TypeError: must be string or buffer, not dict" with python 2.7, as reported in bug #369913.
* Update date headers for modified files.v2.2.0_alpha24Zac Medico2011-02-151-1/+1
|
* Add support for grabbing Packages files using external programs.David James2011-02-131-2/+4
| | | | | | | | | | | | | If the user specifies FETCHCOMMAND_*, Portage should honor this when grabbing Packages files. This allows users to setup support for grabbing Packages files from other protocols. BUG=chrome-os-partner:2026 TEST=Try downloading prebuilts from gs:// when FETCHCOMMAND_GS is setup in make.conf Change-Id: I96b239819351633dd02d608954e81a1c363a4687 Review URL: http://codereview.chromium.org/6458015
* getbinpkg.py: auto-handle NotImplementedErrorZac Medico2010-12-161-1/+1
| | | | This should have been done as part of bug #338190.
* getbinpkg.py: use local HTTPSConnection importv2.2.0_alpha9Zac Medico2010-12-151-2/+12
| | | | | | | Use local import since https typically isn't needed, and this way we can usually avoid triggering the global scope http.client ImportError handler (like during stage1 -> stage2 builds where USE=ssl is disabled for python).
* Bug #338190 - Handle more exceptions inside getbinpkg.dir_get_metadata().Zac Medico2010-09-211-1/+11
| | | | | | The ftplib.all_errors attribute is a useful collection of exceptions to handle here. Thanks to Christian Kauhaus <kc@gocept.com> for the suggestion.
* Ensure SystemExit is never caught.Zac Medico2010-08-261-1/+1
|
* Remove all svn $Id keywords.Zac Medico2010-03-241-1/+0
|
* Bug #300388 - Fix terminal handling code to so term codes aren't sent whenZac Medico2010-01-111-1/+1
| | | | | | TERM=dumb. svn path=/main/trunk/; revision=15191
* Bug #274497 - Misc spelling, grammar, and terminology fixes, includingZac Medico2009-10-091-5/+5
| | | | | | URL -> URI and FOO's -> FOOs. svn path=/main/trunk/; revision=14531
* Replace dict.keys() usage with __iter__(), since it behaves identically inZac Medico2009-09-221-2/+2
| | | | | | both python 2.x and 3.x. svn path=/main/trunk/; revision=14385
* Fix sorted() keyword arg for py3k.Zac Medico2009-09-211-1/+2
| | | | svn path=/main/trunk/; revision=14368
* Define long as int when Python 3 is used.Arfrever Frehtes Taifersar Arahesis2009-09-211-0/+3
| | | | svn path=/main/trunk/; revision=14343
* Use dict.(keys|values|items)() instead of ↵Arfrever Frehtes Taifersar Arahesis2009-09-211-4/+4
| | | | | | | | dict.(iterkeys|itervalues|iteritems)() for compatibility with Python 3. (2to3-3.1 -f dict -nw ${FILES}) svn path=/main/trunk/; revision=14327
* Use range() instead of xrange() for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-211-1/+1
| | | | | | (2to3-3.1 -f xrange -nw ${FILES}) svn path=/main/trunk/; revision=14317
* Fix all remaining SyntaxErrors with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-211-1/+1
| | | | svn path=/main/trunk/; revision=14315
* Fix typos in http.client imports.Zac Medico2009-09-201-6/+6
| | | | svn path=/main/trunk/; revision=14307
* Update system imports for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-11/+28
| | | | svn path=/main/trunk/; revision=14294
* Update syntax of 'except' statements for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-16/+16
| | | | | | (2to3-3.1 -f except -nw ${FILES}) svn path=/main/trunk/; revision=14289
* Use portage.os and _encodings['fs'] where appropriate.Zac Medico2009-08-181-5/+12
| | | | svn path=/main/trunk/; revision=14093
* Prepare 308 messages to localization.Arfrever Frehtes Taifersar Arahesis2009-08-151-26/+27
| | | | svn path=/main/trunk/; revision=14067
* Add a new portage.util.shlex_split() function to wrap all shlex.split() calls,Zac Medico2009-08-061-3/+3
| | | | | | since shlex.split() doesn't behave well with unicode strings. svn path=/main/trunk/; revision=13939
* Use protocol=2 for pickle.dump() calls, so that pickles written by py3k willZac Medico2009-03-101-3/+3
| | | | | | be backward compatible. svn path=/main/trunk/; revision=12821
* Set Unpickler.find_global = None when possible and handle AttributeErrorZac Medico2009-03-051-1/+7
| | | | | | for py3k. svn path=/main/trunk/; revision=12751
* Fix StringIO imports so that 2to3 can handle them. Also, replace shlex +Zac Medico2009-02-201-4/+3
| | | | | | StringIO usage with shlex.split() where appropriate. svn path=/main/trunk/; revision=12662
* Handle ValueError when unpickling, since this can be triggered by anZac Medico2009-02-191-1/+1
| | | | | | unsupported pickle protocol. svn path=/main/trunk/; revision=12648
* For compatibility with python-3.0, always open streams for pickles in binaryZac Medico2009-02-191-4/+5
| | | | | | mode. svn path=/main/trunk/; revision=12641
* Bug #254421 - Make dir_get_metadata() handle 'Connection refused' socket.errorZac Medico2009-01-101-1/+9
| | | | | | from ftplib connection attempt. svn path=/main/trunk/; revision=12418
* Bug #253563 - Replace hardcoded green/red color strings with GOOD/BAD. ThanksZac Medico2009-01-091-9/+16
| | | | | | to Vsevolod Kozlov <sevakda@gmail.com> for the initial patch. svn path=/main/trunk/; revision=12401
* Import cPickle as pickle instead of vice versa. Eases 2to3's job becauseZac Medico2008-09-231-8/+8
| | | | | | | cPickle won't exist in py3k and 2to3 does s/cPickle/pickle. Thanks to Ali Polatel <hawking@g.o> for this patch. svn path=/main/trunk/; revision=11536
* Py3k compatibility patch by Ali Polatel <hawking@g.o>.Zac Medico2008-07-021-5/+6
| | | | | | Don't use the format raise Exception, "string" svn path=/main/trunk/; revision=10890
* Py3k compatibility patch #1 by Ali Polatel <hawking@g.o>.Zac Medico2008-07-011-6/+6
| | | | | | Replace dict.has_key() calls with "in" and "not in" operators.. svn path=/main/trunk/; revision=10870
* Make PackageIndex use SlotDict for package metadata storage. The set ofZac Medico2008-06-261-6/+27
| | | | | | | | | allowed keys is passed into the PackageIndex constructor (normal dict instances will be used if the set of keys is not passed in for some reason). A SlotDict.allowed_keys attribute now provides access to a frozenset of allowed keys. svn path=/main/trunk/; revision=10797
* Make dir_get_metadata() retry if a httplib.ResponseNotReady exceptionZac Medico2008-04-221-0/+8
| | | | | | occurs. svn path=/main/trunk/; revision=9943
* Make file_get() redirect FETCHCOMMAND output to stdout just likeZac Medico2008-04-111-1/+6
| | | | | | portage.fetch() does. Thanks to Ramereth for reporting. svn path=/main/trunk/; revision=9844
* When reading and writing the Packages index file, translate metadata keysZac Medico2008-04-071-4/+10
| | | | | | | | on the fly. Current translations: DESC <-> DESCRIPTION REPO <-> repository svn path=/main/trunk/; revision=9742
* * Optimize metadata caching in pordbapi and bindbapi so that cache isZac Medico2008-04-071-2/+7
| | | | | | | | never pulled for the same package twice. * Cache a Package instances constructed during package selection and reuse them during later package selections. svn path=/main/trunk/; revision=9741
* Make readpkgindex() and writepkgindex() private methods of PackageIndex.v2.2_pre4Zac Medico2008-03-081-24/+24
| | | | svn path=/main/trunk/; revision=9453
* Convert PackageIndex.packages from a dict to a list so that in the futureZac Medico2008-03-071-7/+16
| | | | | | it will be possible to support multiple packages with the same cpv. svn path=/main/trunk/; revision=9452
* Bug #200231 - Make dir_get_metadata() handle an exception thrownZac Medico2007-11-271-2/+11
| | | | | | from dir_get_list() when there's a problem connection problem. svn path=/main/trunk/; revision=8702