Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[merged] report all problem rules to user (RhBug:1148627) #191

Conversation

MichaelMraka
Copy link
Contributor

@MichaelMraka MichaelMraka commented Sep 20, 2016

get more info from libsolv about failed transactions; e.g.

./bin/dnf-2 install libreoffice gimp -x xml-commons-apis,xdg-utils
Last metadata expiration check: 0:56:40 ago on Tue Sep 20 14:31:28 2016 CEST.
Error: 
 Problem 0: conflicting requests
  - nothing provides xdg-utils needed by gimp-2:2.8.16-1.fc24.1.x86_64
  - nothing provides xdg-utils needed by gimp-2:2.8.18-1.fc24.x86_64
 Problem 1: conflicting requests
  - package libreoffice-1:5.1.3.2-6.fc24.x86_64 requires libreoffice-base(x86-64) = 1:5.1.3.2-6.fc24, but none of the providers can be installed
  - package libreoffice-1:5.1.5.2-6.fc24.x86_64 requires libreoffice-base(x86-64) = 1:5.1.5.2-6.fc24, but none of the providers can be installed
  - package libreoffice-base-1:5.1.3.2-6.fc24.x86_64 requires pentaho-reporting-flow-engine, but none of the providers can be installed
  - package libreoffice-base-1:5.1.5.2-6.fc24.x86_64 requires pentaho-reporting-flow-engine, but none of the providers can be installed
  - package pentaho-reporting-flow-engine-1:0.9.4-12.fc24.noarch requires liblayout >= 0.2.10, but none of the providers can be installed
  - nothing provides xml-commons-apis needed by liblayout-0.2.10-12.fc24.noarch
(try to add '--allowerasing' to command line to replace conflicting packages)

return NULL;
}
const char **plist = hy_goal_describe_problem_rules(self->goal,
PyLong_AsLong(index_obj));
Copy link
Contributor

@ignatenkobrain ignatenkobrain Sep 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indent

}

list = strlist_to_pylist(plist);
g_free(plist);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

free(plist)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's g_free() to make it consistent with efcc178.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

luckily gchar is just alias for char, otherwise it could cause problems. I think in CPython we should use free when we use char *. Or change char * to gchar * some lines above and change type of function in hawkey.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but nvm for now, we can fix it later

@@ -46,6 +46,7 @@
#include "hy-selector-private.h"
#include "hy-util.h"

#define BLOCK_SIZE 15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the the BLOCK_SIZE set to 15? Please explain this in a comment in the sources.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be optimal value for the purpose. Similarly to
libdnf/dnf-sack.c: const int BLOCK_SIZE = 31;
libdnf/hy-package.c:#define BLOCK_SIZE 31
libdnf/hy-query.c:#define BLOCK_SIZE 15
libdnf/hy-subject.c: const int BLOCK_SIZE = 6;
python/hawkey/subject-py.c: const int BLOCK_SIZE = 6;

{
g_autoptr(GError) error = NULL;
DnfSack *sack = test_globals.sack;
DnfPackage *pkg = get_latest_pkg(sack, "hello");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope we can use g_autoptr() here as well and remove unref somewhere below.

@ignatenkobrain
Copy link
Contributor

@dnf-bot r+

@ignatenkobrain
Copy link
Contributor

@rh-atomic-bot r+

@rh-atomic-bot
Copy link

📌 Commit 280c726 has been approved by ignatenkobrain

rh-atomic-bot pushed a commit that referenced this pull request Sep 21, 2016
Closes: #191
Approved by: ignatenkobrain
rh-atomic-bot pushed a commit that referenced this pull request Sep 21, 2016
Closes: #191
Approved by: ignatenkobrain
@rh-atomic-bot
Copy link

⌛ Testing commit 280c726 with merge 7fa6300...

@rh-atomic-bot
Copy link

☀️ Test successful - status-rpmecosystemjenkins
Approved by: ignatenkobrain
Pushing 7fa6300 to master...

@rh-atomic-bot rh-atomic-bot changed the title report all problem rules to user (RhBug:1148627) [merged] report all problem rules to user (RhBug:1148627) Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants