#126 optionally check if a package already exists in Fedora
Closed: Fixed 2 years ago by zbyszek. Opened 2 years ago by dcavalca.

When doing rust2rpm foo, check whether rust-foo already exists in dist-git. This should probably be behind an option flag as it may not be always desirable.


I'd say it should be the default… Just emit a warning, and then the warning can be ignored if someobody really wants to redo an existing package. Should be fairly easy to do: pagure has some api so retrieve json about packages.

If we did this, we'd need to extend the platform abstraction to allow distros to wire up checks for them.

This is not a good idea to have enabled by default.

Due to the nature of Rust packages (and lack of dynamically generated subpackages), you basically have to regenerate .spec files with rust2rpm for every version update to make sure the feature / optional-dependency <-> subpackage mapping is up-to-date. Breaking the "default" use case (introducing new packages happens far more rarely than updating existing ones) is bad bad bad.

I assume we can figure out if we're doing an update, or making a new package.

How though? Check if the file already exists, and if the Version tag matches, and if there are more than one existing changelog entries? ...

I'm fine making this not the default to begin with. We could also check if the current directory is a dist-git repo and skip the check in that case.

Metadata Update from @zbyszek:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata