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@3c661d6fd7
[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.
The existing substitution didn't support barces which prevented use
in some cases. This change adds a second match in the regex to
handle braces and adds additional tests to verify that it is
working as expected.
Per https://bugzilla.redhat.com/show_bug.cgi?id=1278382 , if
sys.stdin is somehow None (which currently seems to be the case
when a dnf command is run in virt-builder) and a dnf command
leads to a y/n question, dnf will crash. This should fix it.
mock in Python 3.5 doesn't support assert_called(), which causes
this test to fail. Changing it to assert_called_with() fixes this
and appears to still work with Python 2 and earlier versions in
Python 3.3 and Python 3.4.
Features:
`--enablerepo`:
completes by disabled repos (`dnf repolist disabled`)
`--disablerepo`:
completes by enabled repos (`dnf repolist enabled`)
`install|update`:
completes by available pkgs and if local path used (e.g. `./`),
completes from local files which ends with `.rpm`
`help`:
complete only one command. I.e. `help help<TAB><TAB>` will complete
nothing
All options/args generates automatically
Used Elad Alfassa <elad@fedoraproject.org> code for completing
`install`, `remove|erase`, `update`, `info` commands.
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1070902