#162 Fix handling of rpmautospec detection
Merged 2 years ago by zbyszek. Opened 2 years ago by zbyszek.
fedora-rust/ zbyszek/rust2rpm fix-rpmautospec-detection  into  main

file modified
+3 -5
@@ -426,10 +426,8 @@ 

  

      kwargs["auto_changelog_entry"] = not args.no_auto_changelog_entry

  

-     if args.rpmautospec:

-         kwargs["rpmautospec"] = True

-     else:

-         kwargs["rpmautospec"] = detect_rpmautospec(default_target, spec_file)

+     rpmautospec = args.rpmautospec or detect_rpmautospec(default_target, spec_file)

+     kwargs["rpmautospec"] = rpmautospec

  

      if args.target in {"fedora", "mageia", "opensuse"}:

          kwargs["include_build_requires"] = True
@@ -449,7 +447,7 @@ 

          kwargs["spec_copyright_year"] = time.strftime("%Y")

          kwargs["pkg_release"] = "0"

          kwargs["rust_group"] = "Development/Libraries/Rust"

-     elif args.rpmautospec:

+     elif rpmautospec:

          kwargs["pkg_release"] = "%autorelease"

      else:

          kwargs["pkg_release"] = "1%{?dist}"

file modified
+1 -1
@@ -153,7 +153,7 @@ 

  %description {{ pkg }} %{_description}

  

  This package contains library source intended for building other packages which

- use {% if feature is not none %}the "{{ feature }}" feature of the {% endif %}"%{crate}" crate.

+ use {% if feature is not none %}the "{{ feature }}" feature of {% endif %}the "%{crate}" crate.

  

  %files       {{ pkg }}

      {% if feature is none %}

Fixup for 7e0afd5: the condition was
updated in one place, but not in the other we used the original
args.rpmautospec value.

1 new commit added

  • Fix insertion of "the"
2 years ago

Pull-Request has been merged by zbyszek

2 years ago