Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 42 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,49 @@ Requires `libdnf5` (system package, not from PyPI) and configured Fedora reposit

## Usage

### Check RPM files (recommended)

Check actual RPM files from a build before pushing to repositories:

```bash
fedora-revdep-check --rpms /path/to/build/*.rpm [options]
fedora-revdep-check --rpm-dir /path/to/build/RPMS/noarch/ [options]
```

This reads the actual provides from the RPM files, including their exact versions, which is more accurate than simulating version changes.

### Simulate version change (legacy mode)

Simulate updating a package to a new version:

```bash
fedora-revdep-check <srpm-name> <new-version> [options]
```

**Note**: This mode assumes all binary RPMs and their provides will have the same version, which may not always be accurate.

### Examples

```bash
# Check rawhide (default)
fedora-revdep-check jupyterlab 4.7.0
# Check RPM files from a build (recommended)
fedora-revdep-check --rpms ~/rpmbuild/RPMS/noarch/*.rpm
fedora-revdep-check --rpm-dir ~/koji-download/python-sphinx-9.1.0-1.fc45/

# Verbose output
# Legacy mode: simulate version change
fedora-revdep-check jupyterlab 4.7.0
fedora-revdep-check pytest 8.0.0 --verbose

# Use stable Fedora instead of rawhide
fedora-revdep-check numpy 2.0.0 --repo fedora --repo fedora-source
fedora-revdep-check --rpms *.rpm --repo fedora --repo fedora-source

# Check specific Fedora version
fedora-revdep-check python-requests 2.32.0 --repo fedora-40 --repo fedora-40-source
```

### Options

- `--rpms FILE [FILE ...]` - RPM file(s) to check
- `--rpm-dir DIR` - Directory containing RPM files to check
- `-v, --verbose` - Show detailed analysis
- `-r, --repo <repo-id>` - Repository to enable (can be specified multiple times, default: rawhide, rawhide-source, koji, and koji-source)

Expand Down Expand Up @@ -70,14 +91,25 @@ The tool distinguishes between:

## How It Works

1. Finds all binary packages built from the SRPM
2. Extracts their provides (excluding bundled)
### RPM File Mode (Recommended)

1. Reads RPM files and extracts their provides with actual versions
2. Determines the source package name from the RPM headers
3. Finds reverse dependencies for each provide in Fedora repositories
4. Checks if each requirement would be satisfied by the provides in the RPM files
5. Reports packages that would fail to build or install

### Legacy Mode (Version Simulation)

1. Finds all binary packages built from the SRPM in repositories
2. Extracts their provides and simulates them with the new version
3. Finds reverse dependencies for each provide
4. Filters to latest versions only (no duplicates)
5. Checks if the new version satisfies all requirements
6. Reports packages that would fail to build or install
4. Checks if the simulated new version satisfies all requirements
5. Reports packages that would fail to build or install

**Note**: Both modes automatically exclude packages from the same SRPM (they'll be updated together).

Packages from the same SRPM are automatically excluded (they'll be updated together).
**Note**: Both modes distinguish between new conflicts and already-broken packages to avoid false positives.

## Development

Expand Down
Loading