+
    j                        ^ RI t ^ RIt^ RIt^ RIt^ RItRt]3R lt]3R lt]R8X  Ed   ]P                  ! 4       ^ 8X  g   ]
! R4       ] P                  ! ^4       R] P                  ^ &   ]P                  ! ]P                  RR	R
7       ]P                  ! R] P                  ^ ,          ,          4       ]P                   P#                  ]4      '       g%   ]P                  ! R4       ] P                  ! ^ 4       ]P                   P%                  ]4      ^ 8X  d7   ]P                  ! R4       ]P&                  ! ]4       ] P                  ! ^ 4       ]R,           ]P(                  ! R4      ,           t]P,                  ! R],          4       ]P.                  ! ]]4       Rt ]! R4       U u. uF  q P5                  4       ^ ,          NK  	  up t] F  t]R8X  g   K  Rt M	  ]'       gR   ]! ]4      ;_uu_ 4       tR]P?                  4       9   d"   ]P                  ! R],          4       ]! R4       RRR4       R# R# R# u up i   ] d(    ]P                  ! R4       ] P                  ! ^ 4        Li ; i  + '       g   i     R# ; i)    Nz/etc/X11/xorg.confc                n   \         P                  P                  V4      '       g    \        P                  ! RV,          4       R# . p\        V4      ;_uu_ 4       pV F  pVP                  R4      ^ ,          P                  4       pVP                  4       P                  R4      '       d~   VP                  RV ,          4      '       d`   \        P                  ! RVP                  4       ,          4       RV,          p\        P                  ! RVP                  4       ,          4       VP                  V4       K  	  RRR4       \        V4      ;_uu_ 4       pVP                  4       V8w  d   \        P                  ! R	V: R
V : RV: R24       \        VR,           R4      ;_uu_ 4       pVP!                  RP#                  V4      4       RRR4       \         P$                  ! VR,           V4       RRR4       R#   + '       g   i     L; i  + '       g   i     LK; i  + '       g   i     R# ; i)zZ
this removes old_driver driver from the xorg.conf and substitutes it with
the new_driver
file %s not foundN#driver"%s"line '%s' foundz	Driver	"%s"
replacing with '%s'saving new z (z -> )	.xorg_fixw ospathexistsloggingwarningopensplitstriplower
startswithendswithdebugrstripappend	readlinesinfowritejoinrename)
old_driver
new_driverxorgcontent	xorg_filelinesxorg_fix_files   &&&     B/usr/lib/python3/dist-packages/DistUpgrade/xorg_fix_proprietary.pyreplace_driver_from_xorgr,      sr   
 77>>$+d23G	dyD

3"((*A	$$X..JJv
233/$++-?@)J63dkkmCDNN4   
 
dy G+LL
J8 9d[(#..-##BGGG$45 /IId[($/ 
 
  /.	 
s9   A.G=	A4G=AH#,!H	&H#=H	H H##H4	c           	     f   \         P                  P                  V4      '       g    \        P                  ! RV,          4       R# . p\        V4      ;_uu_ 4       pV F  pVP                  R4      ^ ,          P                  4       pVP                  4       P                  R4      '       d~   VP                  RV ,          4      '       d`   \        P                  ! RVP                  4       ,          4       RV,          p\        P                  ! RVP                  4       ,          4       VP                  V4       K  	  RRR4       \        V4      ;_uu_ 4       pVP                  4       V8w  d   \        P                  ! R	V: R
V : R24       \        VR,           R4      ;_uu_ 4       pVP!                  RP#                  V4      4       RRR4       \         P$                  ! VR,           V4       RRR4       R#   + '       g   i     L; i  + '       g   i     LK; i  + '       g   i     R# ; i)z+
this comments out a driver from xorg.conf
r   Nr   r   r   r   z#%sr	   r
   z (commenting r   r   r   r   r   )r#   r%   r&   r'   r(   r)   r*   s   &&     r+   comment_out_driver_from_xorgr.   .   so    77>>$+d23G	dyD

3"((*A	$$X..JJv
233/$++-?@t|3dkkmCDNN4   
 
dy G+LL
, -d[(#..-##BGGG$45 /IId[($/ 
 
  /.	 
s9   A.G9	A4G9AH(!H		&H9H		HHH0	__main__zNeed to run as rootz/usr/bin/do-release-upgradez$/var/log/dist-upgrade/xorg_fixup.logr   )levelfilenamefilemodez
%s runningzNo xorg.conf, exitingz xorg.conf is zero size, removingz.dist-upgrade-z
%Y%m%d%H%Mzcreating backup '%s'Fz/proc/moduleszCan't read /proc/modulesnvidiaTzRemoving nvidia from %s) sysr   r   timeshutil	XORG_CONFr,   r.   __name__getuidprintexitargvbasicConfigDEBUGr   r   r   getsizeremovestrftimebackupr   copyr3   r   r   modsIOErrormxorg_conf_fileread)r(   s   0r+   <module>rI      s    	    !	 ;D 0< 3< 0: z99;!#$ 0CHHQK gmm!G!$& LL+,77>>)$$,- 
wwy!Q&78
		) ))DMM,,GGFMM(612
KK	6"F,0,AB,AD

Q,AB =F 
 )__>..006BC,X6 _ U B C /0 __s0   
H? 'H:H? 57I0:H? ?+I-,I-0J	