#536 Better hint when running 'prep' on detached branch
Merged by onosek. Opened by onosek.
onosek/rpkg detached_prep  into  master

Download 536.patch

JIRA: RHELCMP-3682
Resolves: rhbz#1907964

Signed-off-by: Ondrej Nosek onosek@redhat.com

Requestor in rhbz#1907964 comments "branch name is needed". I am not sure about that. For the example shown in Bugzilla, it is probably valid. But '%prep' section in *.spec could contain macros that are defined during 'prep' command and that originates in the branch name. Maybe it is rare, I don't know.
I think the safer approach is to show a better message (instead of "inconsistent state") to the user and recommend him to use --release argument. When there are no macros, any valid branch name can be used, I suppose.

The second variant would be not running self.rpmdefines() in 'prep' at all and using default paths for --define (copy them from 'rpmdefines' method).

Looks reasonable to me. An error with some action suggestion seems better to me.

Pull-Request has been merged by onosek

Metadata