Skip to content

Commit

Permalink
[swdb]: integration squashed
Browse files Browse the repository at this point in the history
SWDB - Unified Software Database for DNF integration

history sqlite, yumdb and history persistor replaced by SWDB
yum/history classes rewritten into libdnf-swdb
see https://github.com/edynox/libdnf

Original commit tree was too long and caused problems when rebasing.
Find original tree here: https://github.com/edynox/dnf/tree/hif-swdb
I will try to keep both branches up to date for easier debugging until
PR will be merged.

[swdb]: rewritten transaction merging into libdnf

Transaction merging was done via obsoleted classes YumHistoryTransaction
and YumMergedHistoryTransaction which were significantly redundant with
SWDB Transaction implementation.

Transactions are now merged directly in SWDB using method merge.
i.e. T1.merge(T2),

[swdb]: trans with support + fixed history info

TRANS_WITH was missing from history info output.

Fixed package comparation and merged transaction IDs.

[swdb]: transaction comparison tests

Fixed tests for transaction comparison

Rewritten yumdb usage in base.py - introduced in upstream

[swdb]: change lib path for testing

[swdb]: refactor nvra to nevra in swdb calls

[swdb]: fix group_remove unit test and group reset

[swdb]: support for get erased reason

Introduced in rpm-software-management/dnf@3c661d6

[swdb]: cosmetic changes - package represenation

use str(pkg) instead of pkg.nevra

rename some variable names

[swdb]: refactor group is_installed to installed

For compatibility with original api + some cosmetic changes

[swdb]: port mark group feature to swdb

+ remove YumHistoryMergedTransaction from rollback command

[swdb]: reorganize database sources in DNF

Drop unused yum files and migrate SWDB sources out of the yum folder.

[swdb]: drop yum/packages.py

Replaced by DnfSwdbPkg method `match(pattern)`

[swdb]: API refactor - nevra -> DnfPackage

Hide internal swdb nevra binding from user

[swdb]: mark history.group as property

Load GroupPersistor lazily

[swdb]: API for asking if a group is installed (RhBug:1339623)

[swdb]: refactor reason - string -> enum

Use reason enumeration for simplier comparation and database access.

[swdb]: refactor package type to enum

Use enumeration for package type instead of string.

Fix ui_from_repo for transaction_with packages.

[swdb]: introduce dnf.db.types

Move Swdb specific types to separate file to avoid circular dependencies
between history and other source files.
  • Loading branch information
edcuba authored and j-mracek committed Oct 19, 2017
1 parent 564c446 commit 1972a5f
Show file tree
Hide file tree
Showing 57 changed files with 1,930 additions and 4,100 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ bin/dnf*-2
bin/dnf*-3
bin/yum-2
bin/yum-3
*.cmake
*CMakeCache*
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ DNF CONTRIBUTORS
Daniel Mach <[email protected]>
Dave Johansen <[email protected]>
Dylan Pindur <[email protected]>
Eduard Cuba <[email protected]>
Frank Dana <[email protected]>
George Machitidze <[email protected]>
Haïkel Guémar <[email protected]>
Expand Down
1 change: 0 additions & 1 deletion PACKAGE-LICENSING
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
All files in DNF are distributed as GPLv2+ with the exceptions below:

yum/sqlutils.py : GPLv2
rpm/transaction.py : GPL

Licensing conditions of the following files were disputed when DNF was forked
Expand Down
7 changes: 7 additions & 0 deletions dnf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ BuildRequires: python-librepo >= %{librepo_version}
BuildRequires: python-nose
BuildRequires: python2-gpg
Requires: python2-gpg
BuildRequires: python-gobject
BuildRequires: pyliblzma
Requires: pyliblzma
Requires: %{name}-conf = %{version}-%{release}
Expand All @@ -139,6 +140,7 @@ Requires: rpm-plugin-systemd-inhibit
%else
BuildRequires: python2-rpm >= %{rpm_version}
Requires: python2-rpm >= %{rpm_version}
Requires: python-gobject
Recommends: rpm-plugin-systemd-inhibit
%endif
# dnf-langpacks package is retired in F25
Expand All @@ -161,8 +163,10 @@ BuildRequires: python3-librepo >= %{librepo_version}
BuildRequires: python3-nose
BuildRequires: python3-gpg
Requires: python3-gpg
BuildRequires: python3-gobject
Requires: %{name}-conf = %{version}-%{release}
Requires: deltarpm
Requires: python3-gobject
Requires: python3-hawkey >= %{hawkey_version}
Requires: python3-iniparse
Requires: python3-libcomps >= %{libcomps_version}
Expand Down Expand Up @@ -253,6 +257,9 @@ ln -sr %{buildroot}%{_bindir}/dnf-2 %{buildroot}%{_bindir}/yum
rm -vf %{buildroot}%{_bindir}/dnf-automatic-*

%check
# for SWDB testing
export GI_TYPELIB_PATH=/usr/local/lib64/girepository-1.0
export LD_LIBRARY_PATH=/usr/local/lib64
pushd build
ctest -VV
popd
Expand Down
1 change: 1 addition & 0 deletions dnf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ ADD_SUBDIRECTORY (cli)
ADD_SUBDIRECTORY (conf)
ADD_SUBDIRECTORY (rpm)
ADD_SUBDIRECTORY (yum)
ADD_SUBDIRECTORY (db)
Loading

0 comments on commit 1972a5f

Please sign in to comment.