Package: pyerge
pyergeIt is small python wrapper tool for emerge (Gentoo package manager - Portage). It can mount RAM disk of defined size and compile packages inside it.
Pyerge provide various tools to check and show emerge/portage status for conky.Sponsored by Jetbrains Open Source Support ProgramTable of ContentsNameRequirementsInstallationMain usageTools for ConkyNameIt should be calledPYMERGEforPYthon and eMERGE, but when I create repository I missspelled the name, and I keep it like that.RequirementsPython-3.6+app-portage/eixInstallationCopy ebuild from GitHub Releases into your local repository (i.e. /usr/local/portage/dev-python/portage) and run as root:cd/usr/local/portage/app-portage/portage
ebuildpyerge-0.7.2.ebuildmanifest
eix-updateecho"app-portage/pyerge ~amd64">>/etc/portage/package.accept_keywords
emergeapp-portage/portageEbuild is good quality as RepoMan sez: "If everyone were like you, I'd be out of business!"Main usagePyerge API/CLI parameter are not stable yes and are subject to change.
Main pyerge script is calledpyeand has two main actions:checkandemergepye checksudopyecheckIt basicly run:sync portageeix-syncsudo emerge -pvNDu --nospinner --with-bdeps=y --color n @world(and save output to log_file_1)Estypete time for runing ememrge @worldgenlop -pn(and save to log_file_2)Some useful switches:-l, --local - run everthing withouteix-sync-q, --quiet - no output from pyerge itself only form other tools likeeix, oremerge-v, --verbose - be more verbosepye emergesudopye-wemergeIt basicly run:check if emerge isn't runnigset envirinment variable PORTAGE_TMPDIR to /var/tmp/portagemount 4G RAM disk to /var/tmp/portagerunemerge -NDu --nospinner  --with-bdeps=y --keep-going=y @worldunmount RAM diskSome useful switches:-d, --clean-print - after runningemerge -pvNDu @worldit will show output from deep clean -emegre -pc-c, --clean-run - after runningemerge -pvNDu @worldit will run deep clean -emerge -c(imply -d)Afteremergeaction you can pass any ememrge parameter, it will be passed directly into emerge. So, you can build:sudopye-s1Gemerge-aapp-admin/conkyIt will mount only 1G RAM disk and ask while comipling app-admin/conky package.-s, --size - size of RAM disk with postfix i.e. 1024K, 512M, 2GTools for ConkyThose tools are crated especialy for Conky monitoring. i.e. part of my .conkyrc:color05b6dad
color17f8ed3
TEXT${color0}Sensors:${color0}CPU1:${color1}${hwmon0 temp 2}°C${color0}CPU2:${color1}${hwmon0 temp 3}°C${color0}md126(root):${color1}${execi60 e_raid -n md126}${color0}md127(swap):${color1}${execi60 e_raid -n md127}${color1}$hr${color0}FileSystems:${color0}root${color1}${fs_used/}/${fs_size/}${color1}${fs_bar/}${color0}boot${color1}${fs_used/boot}/${fs_size/boot}${color1}${fs_bar/boot}${color0}portage${color1}${fs_used/var/tmp/portage}/${fs_size/var/tmp/portage}${color1}${fs_bar6 /var/tmp/portage}${color1}$hr${color0}Portage:${color0}LastSync:${color1}${execi120 e_sync}${color0}Progress:${color1}${execibar30 e_prog}${color0}Package:${color1}${execi30 e_curr}${color0}ETA:${color1}${execi30 e_eta}${color0}Status:${color1}${execi30 e_sta}${color0}Update:${color1}${execi30 e_upd}${color0}Download:${color1}${execi30 e_dl}${color0}EUT:${color1}${execi30 e_eut}${color0}Live:${color1}${execi5400 e_live all}${color1}$hr${color0}GentooLinuxSecurityAdvisories:${color1}${execi5400 glsa list -e 25}${color0}AffectedGLSA:${color1}${execi5400 glsa test -e 40}e_synce_syncPrint date of last emerge syceix-synce_dle_dlRun afterpye checkprint size of downloads of @world
i.e. output - 3,239,589 KiBe_curre_currRun duringsudo pye emeregorsudo emerge- print current building (lastly builded) packagee_eute_eutRun afterpye check- print estimated update time fromgenlop -pni.e. output - 2 days 10h 36mine_etae_etaRun duringsudo pye emeregorsudo emerge- print estimetet left time to end of compilation, based ongenlope_loge_logRun afterpye check- print content of next @world updatee_stae_staStatus of emerge/portage. Possible values: Compiling, Cleaning, Autoclean, Completed, Finished, Synced, Syncing, Unmerging, Merging, Unmergee_proge_progRun duringsudo pye emeregorsudo emerge- print current progress of emerge as float
i.e. output - if emerge is buildeing (5 of 6) package it will return 83.3333
You can use it in conky as: ${execibar 30 e_prog}e_upde_updRun afterpye check- print types of next @world update. Possible values: U, N, NS, R, Un, D, B
i.e. output - 19 U, 2 R, 1 Un, 2 D - it means 19 upgrades, 2 reinstals, 1 uninstall, 2 downgradese_raide_raid<raiddev>Print RAID status form /proc/mdstat
i.e. output for e_raid md126L: [UUU]e_livee_live<action>Print names and number of live ebuild to rebuild
i.e. output for e_live all: cvechecker,openmw (2 of 3)glsaglsa-e5listList last 5 of GLSA enrties
output:202107-55:SDL2:Multiplevulnerabilities202107-54:libyang:Multiplevulnerabilities202107-53:Leptonica:Multiplevulnerabilities202107-52:ApacheVelocity:Multiplevulnerabilities202107-51:IcedTeaWeb:Multiplevulnerabilitiesglsa-e40testCheck system against last 40 of GLSA.
output:SystemisnotaffectedbyanyoflistedGLSAsor list of IDs:202107-53,202107-52