Compare commits

...

18 Commits
master ... f22

Author SHA1 Message Date
Michal Luscon 2b7c649ecd Bugfix update 1.1.7-2 2016-03-09 17:43:08 +01:00
Michal Luscon 96ba7651f4 Update dnf to 1.1.7-1 2016-02-25 14:31:54 +01:00
Michal Luscon 4762d7bf99 bugfix update 1.1.6-2 2016-02-03 11:05:09 +01:00
Michal Luscon df76fb9528 Update dnf to 1.1.6-1 2016-01-26 10:25:49 +01:00
Michal Luscon 4ef179135d Update dnf to 1.1.5-1 2015-12-18 18:23:02 +01:00
Michal Luscon 6d1e0750a3 Update dnf to 1.1.4-2 2015-11-27 11:19:45 +01:00
Michal Luscon 270d89969a Update dnf to 1.1.4-1 2015-11-18 16:28:09 +01:00
Michal Luscon be992fb1f6 Update dnf to 1.1.3-1 2015-10-14 18:48:30 +02:00
Michal Luscon 6fb06fafb9 Update dnf to 1.1.2-4 2015-09-30 15:49:55 +02:00
Michal Luscon 6dc8017bc8 Prevent upgrade conflict 2015-09-24 16:24:42 +02:00
Michal Luscon 7fac8689af Update dnf to 1.1.2-3 2015-09-24 11:56:56 +02:00
Michal Luscon 82b7f06964 Update dnf to 1.1.2-2 2015-09-22 16:19:16 +02:00
Michal Luscon 459484201e Update dnf to 1.1.2-1 2015-09-22 16:18:39 +02:00
Michal Luscon 3a6a345d8f Update dnf to 1.1.1-2 2015-09-08 14:14:41 +02:00
Michal Luscon 9d559a3821 Update dnf to 1.1.1-1 2015-08-31 17:41:43 +02:00
mluscon 70f3127615 Update dnf to 1.1.0-2 2015-08-12 18:51:45 +02:00
Michal Luscon 6ae381adc3 Update dnf to 1.1.0-1 2015-08-10 11:51:24 +02:00
Michal Luscon 5bfc28e537 Update dnf to 1.0.2-3 2015-07-31 14:46:02 +02:00
5 changed files with 389 additions and 19 deletions

8
.gitignore vendored
View File

@ -77,3 +77,11 @@
/dnf-1.0.0.tar.gz
/dnf-1.0.1.tar.gz
/dnf-1.0.2.tar.gz
/dnf-1.1.0.tar.gz
/dnf-1.1.1.tar.gz
/dnf-1.1.2.tar.gz
/dnf-1.1.3.tar.gz
/dnf-1.1.4.tar.gz
/dnf-1.1.5.tar.gz
/dnf-1.1.6.tar.gz
/dnf-1.1.7.tar.gz

290
dnf.spec
View File

@ -1,4 +1,4 @@
%global hawkey_version 0.5.9
%global hawkey_version 0.6.1
%global librepo_version 1.7.16
%global libcomps_version 0.1.6
%global rpm_version 4.12.0
@ -10,24 +10,22 @@
%global py3pluginpath %{python3_sitelib}/dnf-plugins
Name: dnf
Version: 1.0.2
Version: 1.1.7
Release: 2%{?snapshot}%{?dist}
Summary: Package manager forked from Yum, using libsolv as a dependency resolver
# For a breakdown of the licensing, see PACKAGE-LICENSING
License: GPLv2+ and GPLv2 and GPL
URL: https://github.com/rpm-software-management/dnf
# The Source0 tarball can be generated using following commands:
# git clone http://github.com/rpm-software-management/dnf.git
# cd dnf/package
# ./archive
# tarball will be generated in $HOME/rpmbuild/sources/
Source0: http://rpm-software-management.fedorapeople.org/dnf-%{version}.tar.gz
Source0: https://github.com/rpm-software-management/dnf/archive/%{name}-%{version}.tar.gz
Patch0: restore-basearch-needed-by-koji.patch
Patch1: fix-empty-history-cmd.patch
BuildArch: noarch
BuildRequires: cmake
BuildRequires: gettext
BuildRequires: python-bugzilla
BuildRequires: python-sphinx
BuildRequires: systemd
BuildRequires: pkgconfig(bash-completion)
%if 0%{?fedora} >= 23
Requires: python3-dnf = %{version}-%{release}
%else
@ -36,6 +34,27 @@ Requires: python-dnf = %{version}-%{release}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Provides: dnf-command(autoremove)
Provides: dnf-command(check-update)
Provides: dnf-command(clean)
Provides: dnf-command(distro-sync)
Provides: dnf-command(downgrade)
Provides: dnf-command(group)
Provides: dnf-command(history)
Provides: dnf-command(info)
Provides: dnf-command(install)
Provides: dnf-command(list)
Provides: dnf-command(makecache)
Provides: dnf-command(mark)
Provides: dnf-command(provides)
Provides: dnf-command(reinstall)
Provides: dnf-command(remove)
Provides: dnf-command(repolist)
Provides: dnf-command(repository-packages)
Provides: dnf-command(search)
Provides: dnf-command(updateinfo)
Provides: dnf-command(upgrade)
Provides: dnf-command(upgrade-to)
%description
Package manager forked from Yum, using libsolv as a dependency resolver.
@ -119,6 +138,8 @@ Alternative CLI to "dnf upgrade" suitable for automatic, regular execution.
%prep
%setup -q -n dnf-%{version}
%patch0 -p1
%patch1 -p1
rm -rf py3
mkdir ../py3
cp -a . ../py3/
@ -156,6 +177,9 @@ mv $RPM_BUILD_ROOT%{_bindir}/dnf-automatic-2 $RPM_BUILD_ROOT%{_bindir}/dnf-autom
rm $RPM_BUILD_ROOT%{_bindir}/dnf-automatic-3
%endif
# This will eventually be the new default location for repo files
mkdir $RPM_BUILD_ROOT%{_sysconfdir}/distro.repos.d
%check
make ARGS="-V" test
pushd py3
@ -163,47 +187,59 @@ make ARGS="-V" test
popd
%files -f %{name}.lang
%doc AUTHORS README.rst COPYING PACKAGE-LICENSING
%{!?_licensedir:%global license %doc}
%license COPYING PACKAGE-LICENSING
%doc AUTHORS README.rst
%{_bindir}/dnf
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/dnf
%{_mandir}/man8/dnf.8.gz
%{_mandir}/man8/yum2dnf.8.gz
%{_unitdir}/dnf-makecache.service
%{_unitdir}/dnf-makecache.timer
%{_var}/cache/dnf
%ghost %{_sysconfdir}/distro.repos.d
%files conf
%doc AUTHORS README.rst COPYING PACKAGE-LICENSING
%license COPYING PACKAGE-LICENSING
%doc AUTHORS README.rst
%dir %{confdir}
%dir %{pluginconfpath}
%dir %{confdir}/protected.d
%config(noreplace) %{confdir}/dnf.conf
%config(noreplace) %{confdir}/protected.d/dnf.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%ghost %{_localstatedir}/%{_lib}/dnf
%ghost %{_localstatedir}/log/hawkey.log
%ghost %{_localstatedir}/log/%{name}.log
%ghost %{_localstatedir}/log/%{name}.librepo.log
%ghost %{_localstatedir}/log/%{name}.rpm.log
%ghost %{_localstatedir}/log/%{name}.plugin.log
%config %{_sysconfdir}/bash_completion.d/dnf-completion.bash
%ghost %{_sharedstatedir}/dnf
%ghost %{_sharedstatedir}/dnf/groups.json
%ghost %{_sharedstatedir}/dnf/yumdb
%ghost %{_sharedstatedir}/dnf/history
%{_mandir}/man5/dnf.conf.5.gz
%{_tmpfilesdir}/dnf.conf
%{_sysconfdir}/libreport/events.d/collect_dnf.conf
%files -n dnf-yum
%doc AUTHORS README.rst COPYING PACKAGE-LICENSING
%license COPYING PACKAGE-LICENSING
%doc AUTHORS README.rst
%{_bindir}/yum
%{_mandir}/man8/yum.8.gz
%files -n python-dnf
%license COPYING PACKAGE-LICENSING
%doc AUTHORS README.rst
%{_bindir}/dnf-2
%doc AUTHORS README.rst COPYING PACKAGE-LICENSING
%exclude %{python_sitelib}/dnf/automatic
%{python_sitelib}/dnf/
%dir %{py2pluginpath}
%files -n python3-dnf
%doc AUTHORS README.rst COPYING PACKAGE-LICENSING
%license COPYING PACKAGE-LICENSING
%doc AUTHORS README.rst
%{_bindir}/dnf-3
%exclude %{python3_sitelib}/dnf/automatic
%{python3_sitelib}/dnf/
@ -211,7 +247,8 @@ popd
%dir %{py3pluginpath}/__pycache__
%files automatic
%doc AUTHORS COPYING PACKAGE-LICENSING
%license COPYING PACKAGE-LICENSING
%doc AUTHORS
%{_bindir}/dnf-automatic
%config(noreplace) %{confdir}/automatic.conf
%{_mandir}/man8/dnf.automatic.8.gz
@ -250,13 +287,230 @@ exit 0
%systemd_postun_with_restart dnf-automatic.timer
%changelog
* Thu Mar 03 2016 Michal Luscon <mluscon@redhat.com> 1.1.7-2
- restore basearch() needed by koji
- fix empty history cmd
* Thu Feb 25 2016 Michal Luscon <mluscon@redhat.com> 1.1.7-1
- Add `/etc/distro.repos.d` as a path owned by the dnf package (Neal Gompa
(ニール・ゴンパ))
- Change order of search and add new default repodirs (RhBug:1286477) (Neal
Gompa (ニール・ゴンパ))
- group: don't mark available packages as installed (RhBug:1305356) (Jan
Silhan)
- history: adjust demands for particular subcommands (RhBug:1258503) (Michal
Luscon)
- Added extension command for group list (RhBug:1283432) (Abhijeet Kasurde)
- perf: dnf repository-packages <repo> upgrade (RhBug:1306304) (Jan Silhan)
- sack: Pass base.conf.substitutions["arch"] to sack in build_sack() function.
(Daniel Mach)
- build: make python2/3 binaries at build time (Michal Domonkos)
- fix dnf history traceback (RhBug:1303149) (Jan Silhan)
- cli: truncate expiration msg (RhBug:1302217) (Michal Luscon)
* Mon Jan 25 2016 Michal Luscon <mluscon@redhat.com> 1.1.6-1
- history: don't fail if there is no history (RhBug:1291895) (Michal Luscon)
- Allow dnf to use a socks5 proxy, since curl support it (RhBug:1256587)
(Michael Scherer)
- output: do not log rpm info twice (RhBug:1287221) (Michal Luscon)
- dnf owns /var/lib/dnf dir (RhBug:1294241) (Jan Silhan)
- Fix handling of repo that never expire (RhBug:1289166) (Jaroslav Mracek)
- Filter out .src packages when multilib_proto=all (Jeff Smith)
- Enable string for translation (RhBug:1294355) (Parag Nemade)
- Let logging format messages on demand (Ville Skyttä)
- clean: include metadata of local repos (RhBug:1226322) (Michal Domonkos)
- completion: Install to where bash-completion.pc says (Ville Skyttä)
- spec: bash completion is not a %%config file (Ville Skyttä)
- Change assertion handling for rpmsack.py (RhBug:1275878) (Jaroslav Mracek)
- cli: fix storing arguments in history (RhBug:1239274) (Ting-Wei Lan)
* Thu Dec 17 2015 Michal Luscon <mluscon@redhat.com> 1.1.5-1
- base: save group persistor only after successful transaction (RhBug:1229046)
(Michal Luscon)
- base: do not clean tempfiles after remove transaction (RhBug:1282250) (Michal
Luscon)
- base: clean packages that do not belong to any trans (Michal Luscon)
- upgrade: allow group upgrade via @ syntax (RhBug:1265391) (Michal Luscon)
- spec: Mark license files as %%license where available (Ville Skyttä)
- Remove unused imports (Ville Skyttä)
- Spelling fixes (Ville Skyttä)
- Fix typos in documentation (Rob Cutmore)
- parser: add support for braces in substitution (RhBug:1283017) (Dave
Johansen)
- completion_helper: Don't omit "packages" from clean completions (Ville
Skyttä)
- bash-completion: Avoid unnecessary python invocation per _dnf_helper (Ville
Skyttä)
- repo: Download drpms early (RhBug:1260421) (Ville Skyttä)
- clean: Don't hardcode list of args in two places (Ville Skyttä)
- cli: don't crash if y/n and sys.stdin is None (RhBug:1278382) (Adam
Williamson)
- sp err "environement" -> "environment" (Michael Goodwin)
- Remove -OO from #!/usr/bin/python (RhBug:1230820) (Jaroslav Mracek)
- cli: warn if plugins are disabled (RhBug:1280240) (Michal Luscon)
* Mon Nov 16 2015 Michal Luscon <mluscon@redhat.com> 1.1.4-1
- AUTHORS: updated (Jan Silhan)
- query: add compatibility methods (Michal Luscon)
- query: add recent, extras and autoremove methods to Query (Michal Luscon)
- query: add duplicated and latest-limit queries into api (Michal Luscon)
- format the email message with its as_string method (Olivier Andrieu)
- added dnf.i18n.ucd* functions as deprecated API (Jan Silhan)
- i18n: unicode resulting translations (RhBug:1278031) (Jan Silhan)
- po: get rid of new lines in translation (Jan Silhan)
- output: add skip count to summary (RhBug:1264032) (Michal Domonkos)
- groups: fix environment upgrade (Michal Luscon)
- Fix plural strings extraction (RhBug:1209056) (Baurzhan Muftakhidinov)
- po: fixed malformed beginning / ending (Jan Silhan)
- zanata update (Jan Silhan)
- cli: prevent tracebacks after C^ (RhBug:1274946) (Michal Luscon)
* Wed Oct 14 2015 Michal Luscon <mluscon@redhat.com> 1.1.3-1
- Update command_ref.rst (Jaroslav Mracek)
- Change in automatic.conf email settings to prevent email error with default
sender name (Jaroslav Mracek)
- Replace assert_called() with assert_called_with() for Py35 support (Neal
Gompa (ニール・ゴンパ))
- doc: improve documentation (Jaroslav Mracek)
- doc: update the instructions related to nightly builds (Radek Holy)
- Revert "Add the continuous integration script" (Radek Holy)
- Revert "cosmetic: ci: fix the Copr name in the README" (Radek Holy)
- Fix typo in Command.canonical's doctring (Timo Wilken)
- base: group_install is able to exclude mandatory packages
(Related:RhBug:1199868) (Jan Silhan)
* Wed Sep 30 2015 Michal Luscon <mluscon@redhat.com> 1.1.2-4
- don't import readline as it causes crashes in Anaconda
(related:RhBug:1258364)
* Tue Sep 22 2015 Michal Luscon <mluscon@redhat.com> 1.1.2-3
- Revert "completion_helper: don't get IndexError (RhBug:1250038)"
- Revert "spec: packaging python(3)-dnf according to new Fedora guidelines
(RhBug:1260198) (Jaroslav Mracek)"
* Tue Sep 22 2015 Michal Luscon <mluscon@redhat.com> 1.1.2-2
- add hawkey version requirement
- revert commit #70956
* Tue Sep 22 2015 Michal Luscon <mluscon@redhat.com> 1.1.2-1
- doc: release notes 1.1.2 (Michal Luscon)
- sanitize non Unicode command attributes (RhBug:1262082) (Jan Silhan)
- don't redirect confirmation to stderr RhBug(1258364) (Vladan Kudlac)
- clean: add rpmdb to usage (Vladan Kudlac)
- completion_helper: don't get IndexError (RhBug:1250038) (Vladan Kudlac)
- add --downloadonly switch (RhBug:1048433) (Adam Salih)
- Add globbing support to base.by_provides() (RhBug:11259650) (Valentina
Mukhamedzhanova)
- spec: packaging python(3)-dnf according to new Fedora guidelines
(RhBug:1260198) (Jaroslav Mracek)
- Bug in Source0: URL in dnf.spec fixed (RhBug:126255) (Jaroslav Mracek)
- To dnf.spec added provides dnf-command(command name) for 21 dnf commands
(RhBug:1259657) (jmracek)
- Expire repo cache on failed package download (Valentina Mukhamedzhanova)
- cosmetic: ci: fix the Copr name in the README (Radek Holy)
- Add the continuous integration script (Radek Holy)
- Set proper charset on email in dnf-automatic (RhBug:1254982) (Valentina
Mukhamedzhanova)
- doc: improve configuration description (RhBug:1261766) (Michal Luscon)
- remove: show from which repo a package is (Vladan Kudlac)
- list: show from which repo a package is (RhBug:1234491) (Vladan Kudlac)
- Spelling/grammar fixes (Ville Skyttä)
- install: fix crash when terminal window is small (RhBug:1256531) (Vladan
Kudlac)
- install: mark unification of the progress bar (Vladan Kudlac)
- fix translations in python3 (RhBug:1254687) (Michal Luscon)
- group: CompsQuery now returns group ids (RhBug:1261656) (Michal Luscon)
* Tue Sep 08 2015 Michal Luscon <mluscon@redhat.com> 1.1.1-2
- fix access to demands (RhBug:1259194) (Jan Silhan)
- make clean_requiremets_on_remove=True (RhBug:1260280) (Jan Silhan)
* Mon Aug 31 2015 Michal Luscon <mluscon@redhat.com> 1.1.1-1
- Fixed typo (RhBug:1249319) (Adam Salih)
- fixed downgrade with wildcard (RhBug:1234763) (Adam Salih)
- reorganize logic of get_best_selector(s) and query (RhBug:1242946) (Adam
Salih)
- completion_helper: don't crash if exception occurred (RhBug:1225225) (Igor
Gnatenko)
- base: expire cache if repo is not available (Michal Luscon)
- Don't suggest --allowerasing if it is enabled (Christian Stadelmann)
- translation works in python3 (RhBug:1254687) (Jan Silhan)
- logrotate less often (RhBug:1247766) (Jan Silhan)
- implement dnf mark command (RhBug:1125925) (Michal Luscon)
- groups: use comps data to migrate persistor (Michal Luscon)
- groups: preserve api compatibility (Michal Luscon)
- groups: use persistor data for removing env/group (Michal Luscon)
- persistor: add migration and bump version (Michal Luscon)
- persistor: store name and ui_name of group (Michal Luscon)
- show real metadata timestamp on the server in verbose mode (Jan Silhan)
- lock: make rpmdb lock blocking (RhBug:1210289) (Michal Luscon)
* Wed Aug 12 2015 Michal Luscon <mluscon@redhat.com> 1.1.0-2
- update: installonly pkgs are not shown in both install and skipped section
(RhBug:1252415) (Jan Silhan)
- output: sort skipped packages (Jan Silhan)
- output: skipped conflicts are set (RhBug:1252032) (Jan Silhan)
- keep the dwongrading package installed if transaction fails (RhBug:1249379)
(Jan Silhan)
- don't store empty attributes (RhBug:1246928) (Michael Mraka)
- doc: correct dnf.conf man section (RhBug:1245349) (Michal Luscon)
* Mon Aug 10 2015 Michal Luscon <mluscon@redhat.com> 1.1.0-1
- print skipped pkg with broken deps too (Related:RhBug:1210445) (Jan Silhan)
- history: set commands output as default (RhBug:1218401) (Michal Luscon)
- Update es.po. save:guardar -> save:ahorrar (Máximo Castañeda)
- cosmetic: option arg in Base.*install is replaced with strict (Jan Silhan)
- group: don't fail on first non-existing group (Jan Silhan)
- install: skips local pkgs of lower version when strict=0
(Related:RhBug:1227952) (Jan Silhan)
- install: skip broken/conflicting packages in groups when strict=0 (Jan
Silhan)
- install: skip broken/conflicting packages when strict=0 (Jan Silhan)
- implemented `strict` config option working in install cmd (RhBug:1197456)
(Jan Silhan)
- fixed 'dnf --quiet repolist' lack of output (RhBug:1236310) (Nick Coghlan)
- Add support for MIPS architecture (Michal Toman)
- package: respect baseurl attribute in localPkg() (RhBug:1219638) (Michal
Luscon)
- Download error message is not written on the same line as progress bar
anymore (RhBug: 1224248) (Adam Salih)
- dnf downgrade does not try to downgrade not installed packages (RhBug:
1243501) (max9631)
- pkgs not installed due to rpm error are reported (RhBug:1207981) (Adam Salih)
- dnf install checks availability of all given packages (RhBug:1208918) (Adam
Salih)
- implemented install_weak_deps config option (RhBug:1221635) (Jan Silhan)
- ignore SIGPIPE (RhBug:1236306) (Michael Mraka)
- always add LoggingTransactionDisplay to the list of transaction displays
(RhBug:1234639) (Radek Holy)
- Add missing FILES section (RhBug: 1225237) (Adam Salih)
- doc: Add yum vs dnf hook information (RhBug:1244486) (Parag Nemade)
- doc: clarify the expected type of the do_transactions's display parameter
(Radek Holy)
- apichange: add dnf.cli.demand.DemandSheet.transaction_display (Radek Holy)
- apichange: add dnf.callback.TransactionProgress (Radek Holy)
- move the error output from TransactionDisplay into a separate class (Radek
Holy)
- rename TransactionDisplay.errorlog to TransactionDisplay.error (Radek Holy)
- report package verification as a regular RPM transaction event (Radek Holy)
- rename TransactionDisplay.event to TransactionDisplay.progress (Radek Holy)
- apichange: deprecate dnf.callback.LoggingTransactionDisplay (Radek Holy)
- use both CliTransactionDisplay and demands.transaction_display (Radek Holy)
- apichange: accept multiple displays in do_transaction (Radek Holy)
- support multiple displays in RPMTransaction (Radek Holy)
* Fri Jul 31 2015 Michal Luscon <mluscon@redhat.com> 1.0.2-3
- Fix regression in group list command introduced by 02c3cc3 (Adam Salih)
- AUTHORS: updated (Jan Silhan)
- stop saying "experimental" (Matthew Miller)
* Tue Jul 21 2015 Jan Silhan <jsilhan@redhat.com> 1.0.2-2
- fixed python3 syntax error from f427aa2 (Jan Silhan)
* Fri Jul 17 2015 Michal Luscon <mluscon@redhat.com> 1.0.2-1
- give --allowerasing hint when error occurs during resolution (RhBug:1148630)
(Jan Silhan)
- show --best hint with skipped packages everytime (RhBug:1176351) (Jan Silhan)
- show --best hint with skipped packages every time (RhBug:1176351) (Jan Silhan)
- notify about skipped packages when upgrade (RhBug:1210445) (Jan Silhan)
- dnf-automatic: Document apply_updates=no behavior wrt keepcache (Ville
Skyttä)
@ -718,7 +972,7 @@ exit 0
- cli: sort packages in the transaction summary. (Ales Kozumplik)
- refactor: cli: massively simplify how errors are propagated from do_transaction(). (Ales Kozumplik)
- groups: rearrange things in CLI so user has to confirm the group changes. (Ales Kozumplik)
- groups: commiting the persistor data should only happen at one place. (Ales Kozumplik)
- groups: committing the persistor data should only happen at one place. (Ales Kozumplik)
- groups: visualizing the groups transactions. (Ales Kozumplik)
- Add dnf.util.get_in() to navigate nested dicts with sequences of keys. (Ales Kozumplik)
- group persistor: generate diffs between old and new DBs. (Ales Kozumplik)

View File

@ -0,0 +1,25 @@
From 84557105cc1253d49bdacf99226b89bcef4096ab Mon Sep 17 00:00:00 2001
From: Michal Luscon <mluscon@redhat.com>
Date: Mon, 7 Mar 2016 15:33:00 +0100
Subject: [PATCH] history: fix empty history cmd (RhBug:1313215)
---
dnf/cli/commands/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dnf/cli/commands/__init__.py b/dnf/cli/commands/__init__.py
index e85f65f..d274e0c 100644
--- a/dnf/cli/commands/__init__.py
+++ b/dnf/cli/commands/__init__.py
@@ -1049,7 +1049,7 @@ class HistoryCommand(Command):
def configure(self, args):
demands = self.cli.demands
- if args[0] in ['redo', 'undo', 'rollback']:
+ if args and args[0] in ['redo', 'undo', 'rollback']:
demands.available_repos = True
else:
demands.fresh_metadata = False
--
2.7.0

View File

@ -0,0 +1,83 @@
From c8c98c8b70577674b606e7b05430ac3c6cb4d15c Mon Sep 17 00:00:00 2001
From: Michal Luscon <mluscon@redhat.com>
Date: Thu, 3 Mar 2016 12:10:50 +0100
Subject: [PATCH] arch: restore basearch needed by koji
---
dnf/arch.py | 33 +++++++++++++++++++++++++++++++++
dnf/exceptions.py | 4 ++++
dnf/logging.py | 3 +++
3 files changed, 40 insertions(+)
create mode 100644 dnf/arch.py
diff --git a/dnf/arch.py b/dnf/arch.py
new file mode 100644
index 0000000..5df4753
--- /dev/null
+++ b/dnf/arch.py
@@ -0,0 +1,33 @@
+# arch.py
+# Manipulating the machine architecture string.
+#
+# Copyright (C) 2016 Red Hat, Inc.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions of
+# the GNU General Public License v.2, or (at your option) any later version.
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY expressed or implied, including the implied warranties of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details. You should have received a copy of the
+# GNU General Public License along with this program; if not, write to the
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the
+# source code or documentation are not subject to the GNU General Public
+# License and may only be used or replicated with the express permission of
+# Red Hat, Inc.
+#
+
+import dnf
+import sys
+
+def basearch(arch):
+ msg = 'The dnf.arch.basearch function is not a part of DNF API ' \
+ 'and will be removed in the upcoming DNF release. ' \
+ 'Please use dnf.rpm.basearch instead. ' \
+ 'DNF API documentation is available at ' \
+ 'https://dnf.readthedocs.org/en/latest/api.html.\n'
+ dnf.logging.nonapi(msg)
+ sys.stdout.write(msg)
+ sys.stderr.write(msg)
+ return dnf.rpm.basearch(arch)
diff --git a/dnf/exceptions.py b/dnf/exceptions.py
index aafb898..60b07a6 100644
--- a/dnf/exceptions.py
+++ b/dnf/exceptions.py
@@ -26,6 +26,10 @@ class DeprecationWarning(DeprecationWarning):
pass
+class NonApiWarning(DeprecationWarning):
+ pass
+
+
class Error(Exception):
"""Base Error. All other Errors thrown by DNF should inherit from this.
diff --git a/dnf/logging.py b/dnf/logging.py
index 362ece4..e3ace6a 100644
--- a/dnf/logging.py
+++ b/dnf/logging.py
@@ -103,6 +103,9 @@ def _paint_mark(logger):
def depr(msg):
warnings.warn(msg, dnf.exceptions.DeprecationWarning, 2)
+def nonapi(msg):
+ warnings.warn(msg, dnf.exceptions.NonApiWarning, 2)
+
class Logging(object):
def __init__(self):
--
2.7.0

View File

@ -1 +1 @@
ac4e919f599b01e70a55b41d7ad9bc12 dnf-1.0.2.tar.gz
babbd9136639ecbee90d060152a716a6 dnf-1.1.7.tar.gz