| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/landscape/manager/ |
Upload File : |
ó
}9Rc @ s¸ d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l
m Z d d l m
Z
d e f d „ ƒ YZ d e f d „ ƒ YZ d S(
iÿÿÿÿN( t succeed( t
spawn_process( t
ManagerPlugin( t find_reporter_commandt ProcessErrorc B s e Z d Z RS( s. Exception raised when running a process fails.( t __name__t
__module__t __doc__( ( ( s@ /usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyR s t
AptSourcesc B sh e Z d Z d Z d Z d „ Z d d d „ Z d „ Z d „ Z d „ Z
d „ Z d „ Z d
„ Z
RS( s' A plugin managing sources.list content.s /etc/apt/sources.lists /etc/apt/sources.list.dc C s- t t | ƒ j | ƒ | j d | j ƒ d S( Ns apt-sources-replace( t superR t registert register_messaget _handle_repositories( t selft registry( ( s@ /usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyR
s c C s t | | d | d | ƒS( sW
Run the process in an asynchronous fashion, to be overriden in tests.
t uidt gid( R ( R
t commandt argsR R ( ( s@ /usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt _run_process s c C s2 | \ } } } | r. t d | | f ƒ ‚ n d S( sQ
Turn a failed process command (code != 0) to a C{ProcessError}.
s %s
%sN( R ( R
t resultt outt errt code( ( s@ /usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt _handle_process_error% s c C sB | j t ƒ s: | j \ } } } t d | | f ƒ ‚ n | Sd S( sG
Turn a signaled process command to a C{ProcessError}.
s %s
%sN( t checkR t value( R
t failureR R t signal( ( s@ /usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt _handle_process_failure- s c C s t j | ƒ | S( sd
Remove the temporary file created for the process, and forward the
result.
( t ost unlink( R
t passthrought path( ( s@ /usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt _remove_and_continue7 s
c sâ t d ƒ ‰ x“ | d D]‡ } t j ƒ \ } } t j | ƒ t | d ƒ } | j | ƒ | j ƒ ˆ j | ‡ f d † ƒ ˆ j ˆ j ƒ ˆ j
ˆ j | ƒ q Wˆ j ˆ j
ƒ ˆ j ˆ j | d ƒ ˆ j | ‡ f d † ƒ S( sE
Handle a list of repositories to set on the machine.
The format is the following:
{"sources": [
{"name": "repository-name",
"content":
"deb http://archive.ubuntu.com/ubuntu/ maverick main
"deb-src http://archive.ubuntu.com/ubuntu/ maverick main"}
{"name": "repository-name-dev",
"content":
"deb http://archive.ubuntu.com/ubuntu/ maverick universe
"deb-src http://archive.ubuntu.com/ubuntu/ maverick universe"}],
"gpg-keys": ["-----BEGIN PGP PUBLIC KEY BLOCK-----
XXXX
-----END PGP PUBLIC KEY BLOCK-----",
"-----BEGIN PGP PUBLIC KEY BLOCK-----
YYY
-----END PGP PUBLIC KEY BLOCK-----"]}
s gpg-keyst wc s ˆ j d d | g ƒ S( Ns /usr/bin/apt-keyt add( R ( t ignoreR! ( R
( s@ /usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt <lambda>] s t sourcesc s ˆ S( N( ( ( t deferred( s@ /usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyR&