0x1949 Team - FAZEMRX - MANAGER
Edit File: DistUpgradeMain.cpython-310.pyc
o >I�c�$ � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m Z d dl mZ d dlmZ g d�Z ddlmZ dd � Zd d� Zdd � Zdd� Zdd� Zdd� ZdS )� N)�datetime)�OptionParser)�gettext) z/binz/bootz/etcz/initrdz/libz/lib32z/lib64z/sbinz/usrz/var� )�DistUpgradeConfigc C s� t � } | jddddd� | jdddd� | jd dd d� | jddd td�d� | jdddtd�d� | jddddtd�d� | jdddtd�d� | jdddtd�d� | jddd dtd!�d"� | �� S )#z/ setup option parser and parse the commandline z--have-prerequists�havePrerequists� store_trueF)�dest�action�defaultz--with-network�withNetwork)r r z--without-network�store_falsez --frontend�frontendNz_Use frontend. Currently available: DistUpgradeViewText, DistUpgradeViewGtk, DistUpgradeViewKDE)r r �helpz--mode�mode�desktopz(*DEPRECATED* this option will be ignoredz --partial�partialz:Perform a partial upgrade only (no sources.list rewriting))r r r r z--disable-gnu-screenzDisable GNU screen support)r r r z --datadir�datadir�.zSet datadirz--devel-release� devel_releasez"Upgrade to the development release)r r r r )r � add_option�_� parse_args)�parser� r �=/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeMain.py�do_commandline6 s8 � � � �� ��r c C s^ |� ddd�}tj�|�st�|� t�|d �rQt�� }|d|j|j |j |j|jf }tj�|�s8t�|� t�|d �D ]}t �|tj�|tj�|��� q?tj�|d�}| jr_|d7 }t|d�� W d � n1 sow Y tjtj|d dd� t�d |j � t�dd�t�� � � tj�d �}|d jj}t�d| � t�dtj � |S )z setup the logging �Files�LogDirz/var/log/dist-upgrade/z/*.logz/%04i%02i%02i-%02i%02izmain.logz.partial�aNz%%(asctime)s %(levelname)s %(message)s�w)�level�filename�format�filemodezUsing config files '%s'zuname information: '%s'� �aptzapt version: '%s'zpython version: '%s') �getWithDefault�os�path�exists�mkdir�globr �now�year�month�day�hour�minute�shutil�move�join�basenamer �open�logging�basicConfig�DEBUG�info�config_files�unamer&