Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gcarq/portage-lostfiles
A simple script to identify files not tracked by Portage package manager
https://github.com/gcarq/portage-lostfiles
gentoo portage
Last synced: 3 months ago
JSON representation
A simple script to identify files not tracked by Portage package manager
- Host: GitHub
- URL: https://github.com/gcarq/portage-lostfiles
- Owner: gcarq
- License: gpl-2.0
- Created: 2019-05-26T15:04:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-26T20:11:49.000Z (9 months ago)
- Last Synced: 2024-10-14T09:48:58.755Z (3 months ago)
- Topics: gentoo, portage
- Language: Python
- Size: 43.9 KB
- Stars: 20
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Portage Lostfiles
A simple script to identify files not tracked by
[Portage](https://wiki.gentoo.org/wiki/Portage) package manager.
This package can be installed via the [GURU overlay](https://wiki.gentoo.org/wiki/Project:GURU).```
# emerge -av app-portage/portage-lostfiles
```## Why
Over time a large number of untracked files can accumulate,
either created manually or leftovers from uninstalled packages,
which can result in subtle bugs or misconfigurations.## Notes
Symlinks are not reported as lost as long as the link target exists and is tracked,
this is the same behavior as implemented in `equery b `.Some common paths are not reported (e.g.: `/etc/group`, `/etc/machine-id`, ...),
those are defined in `IGNORED_PATHS` and `PKG_PATHS` in `lostfiles.py`.## Usage
```bash
git clone https://github.com/gcarq/portage-lostfiles.git
cd portage-lostfiles
$ ./lostfiles.py
/etc/env.d/000opengl
/etc/env.d/99local
/etc/modprobe.d/blacklist.conf
/etc/X11/xorg.conf.d/20opengl.conf
/etc/sysctl.d/98-idea.conf
...
```## Examples
Ignore built-in whitelist and report all files
```bash
$ ./lostfiles.py --strict
/usr/share/info/dir
/usr/share/applications/mimeinfo.cache
/usr/share/binutils-data/x86_64-pc-linux-gnu/2.39/info/dir
/usr/share/mime/XMLnamespaces
/usr/share/mime/aliases
...
```Override default paths
```bash
$ ./lostfiles.py -p /lib -p /lib32 -p /lib64
```## Dependencies
* python >= 3.8
* portage >= 3, < 4