#2184 kojid: update shebang of mergerepos to python3
Closed 3 years ago by julian8628. Opened 3 years ago by julian8628.
julian8628/koji py3-builder  into  master

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

  	@echo "nothing to make.  try make install"

  

  clean:

- 	rm -f *.o *.so *.pyc *~ kojidc

+ 	rm -f *.o *.so *.pyc *~ kojidc mergereposc

  	rm -rf __pycache__

  

  

file modified
+2 -2
@@ -469,8 +469,8 @@ 

  %if 0%{py3_support} > 1

  make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install

  # alter python interpreter in koji CLI

- scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow

-          %{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db'

+ scripts='%{_bindir}/koji %{_sbindir}/kojid %{_libexecdir}/kojid/mergerepos %{_sbindir}/kojira

+          %{_sbindir}/koji-shadow %{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db'

  for fn in $scripts ; do

      sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn

  done

:thumbsdown: there is no point in doing this since it won't work... it depends on yum and it is py2-only.

We should delete this code and just hard-depend on mergerepo_c.

Oh, apologize for that I didn't check the python3 compatibility of this script

The simple merge mode is not supported by mergerepo_c I think.

So do we really want to remove this functionality?

Is it worthy to change this script with the replacement from yum, rpmUtil to dnf, libdnf, hawkey, etc ?

All merge modes are supported by mergerepo_c. The Koji "simple" merge mode is activated via the --koji switch.

No, it is not the same AFAIK
simple: mergererepos --simple - we can't do that with mergerepos_c yet.
koji: mergerepos_c --koji
bare: mergerepos_c --pkgorigins --all (or mergerepos --koji)

The question is, if bare mode is not usable in place of simple. The difference is that bare ignores blocklist. @mikem is there any other significant difference now?

there's mergerepo_c --koji --simple since createrepo_c-0.15.1

https://github.com/rpm-software-management/createrepo_c/blob/master/doc/mergerepo_c.8#L113

Not quite sure if it is usable right now

It could be, we need to check version of mergerepos_c if it contains support for that.

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

3 years ago

Metadata Update from @tkopecek:
- Pull-request untagged with: testing-ready

3 years ago

Pull-Request has been closed by julian8628

3 years ago