manatools / dnfdaemon

DBus daemon for doing package action with the dnf package manager
GNU General Public License v2.0
12 stars 16 forks source link

Support for DNF 3.0 #22

Closed dmach closed 6 years ago

Conan-Kudo commented 6 years ago

I've never been so happy to see so much code deleted!

Conan-Kudo commented 6 years ago

Are there packages I can use for testing this? Or at least can you point me to specific commits of the stack I need to build to validate this?

dmach commented 6 years ago

I've never been so happy to see so much code deleted!

We haven't even started :) I saw a lot of bad code in the dnfdaemon, that (what a surprise) comes from yum/dnf. I hope we'll consolidate the dnf/libdnf API so we can remove most of the mappings and hacks in the code and replace it with a simple wrapper on libdnf. But that will probably take some time.

Are there packages I can use for testing this? Or at least can you point me to specific commits of the stack I need to build to validate this?

You can use dnf/master or the latest builds from rpmsoftwaremanagement/dnf-nightly COPR.

j-mracek commented 6 years ago

@Conan-Kudo We planned to release dnf-3.0 on June 26th. Do you think it will be possible to test and release dnfdeamon just after it happens? I tried to test it by myself, but I end up with:

Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.h4I0sI
+ umask 022
+ cd /home/jmracek/Projects/dnfdaemon/build/BUILD
+ cd dnfdaemon-0.3.19
+ /usr/bin/rm -rf /home/jmracek/Projects/dnfdaemon/build/BUILDROOT/dnfdaemon-0.3.19-0.1.git20180622.fc28.x86_64
+ exit 0
make[2]: Entering directory '/home/jmracek/Projects/dnfdaemon'
Cleanup the git release-test local branch
error: pathspec 'manatools-dev' did not match any file(s) known to git.
make[2]: *** [Makefile:157: test-cleanup] Error 1
make[2]: Leaving directory '/home/jmracek/Projects/dnfdaemon'
make[1]: *** [Makefile:179: test-release] Error 2
make[1]: Leaving directory '/home/jmracek/Projects/dnfdaemon'
make: *** [Makefile:111: test-inst] Error 2

Additionally we will add a conflict to dnfdeamon (https://github.com/rpm-software-management/dnf/pull/1118) to DNF to ensure absence of incompatible.

Conan-Kudo commented 6 years ago

@j-mracek I can definitely try to get it ready by that date.

As for the the makefile, just edit the references of manatools-dev to master, and that'll fix it.

Conan-Kudo commented 6 years ago

@j-mracek @dmach I fixed the manatools-dev thing in the Makefile in master. If you want to rebase to pull that change in, that should help. :)

Conan-Kudo commented 6 years ago

@dmach @j-mracek @m-blaha The current nightly install I did from the rpmsoftwaremanagement/dnf-nightly copr is broken:

[ngompa@fedora-28-lxqt-dnftst ~]$ sudo dnf install htop
Last metadata expiration check: 0:21:17 ago on Mon 25 Jun 2018 07:45:25 AM EDT.
Dependencies resolved.
=============================================================================================================================
 Package                   Arch                        Version                            Repository                    Size
=============================================================================================================================
Installing:
 htop                      x86_64                      2.2.0-1.fc28                       updates                      111 k

Transaction Summary
=============================================================================================================================
Install  1 Package

Total download size: 111 k
Installed size: 252 k
Is this ok [y/N]: y
Downloading Packages:
htop-2.2.0-1.fc28.x86_64.rpm                                                                 199 kB/s | 111 kB     00:00    
-----------------------------------------------------------------------------------------------------------------------------
Total                                                                                        139 kB/s | 111 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 123, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 154, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 234, in do_transaction
    super(BaseCli, self).do_transaction(display)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 904, in do_transaction
    self._run_transaction(cb=cb)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 974, in _run_transaction
    tid = self.history.beg(rpmdbv, using_pkgs, [], cmdline)
  File "/usr/lib/python3.6/site-packages/dnf/db/history.py", line 448, in beg
    int(misc.getloginuid())
  File "/usr/lib64/python3.6/site-packages/libdnf/transaction.py", line 739, in beginTransaction
    return _transaction.Swdb_beginTransaction(self, dtBegin, rpmdbVersionBegin, cmdline, userId)
RuntimeError: C++ std::exception: Step: FOREIGN KEY constraint failed in
INSERT INTO   rpm VALUES   (1867, 'htop', 0, '2.2.0', '1.fc28', 'x86_64')

dnfdragora seems to work, but some behavior is odd. dnfdaemon isn't reporting download progress anymore when installing packages. This definitely works pre-dnf-3, so I'm not sure what happened here.

DNF stack version:

[ngompa@fedora-28-lxqt-dnftst ~]$ rpm -q dnf
dnf-3.0.1-0.364g58197bd1.fc28.noarch
[ngompa@fedora-28-lxqt-dnftst ~]$ rpm -q libdnf
libdnf-0.15.0-0.472gb6569543.fc28.x86_64
dmach commented 6 years ago

The traceback

dnfdaemon not reporting download progress

Conan-Kudo commented 6 years ago

@dmach

I was able to reproduce this by doing exactly the following steps:

  1. Install Fedora 28 LXQt spin
  2. sudo dnf copr enable rpmsoftwaremanagement/dnf-nightly
  3. sudo dnf distro-sync --best --allowerasing
  4. Reboot
  5. sudo dnf install htop
Conan-Kudo commented 6 years ago

@dmach I've been given assurances by @j-mracek that a future fix will be coming from you guys to fix the librepo empty reporting to dnfdaemon, so I'm merging this now to release 0.3.19.