-
Notifications
You must be signed in to change notification settings - Fork 11
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
Find files wil now replace system paths with rpm macros (fix #351) #352
base: master
Are you sure you want to change the base?
Conversation
Could you restart Travis? This error shown up:
|
The travis will be when new dnf-plugins-core package is in the repositories. (the bug is fixed in the upstream but no new version has been released) |
|
||
|
||
class FindFilePlugin(Plugin): | ||
|
||
PREFIXES = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be tuples (prefixes, macros)
63452c5
to
f91873a
Compare
("/usr/share", "%{_datadir}"), | ||
("/var/lib", "%{_sharedstatedir}"), | ||
("/var", "%{_localstatedir}"), | ||
("/etc", "%{_sysconfdir}"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lkardos, can you answer, please, if these tuples are accessible from rpm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use rpm.expandMacro() but there is no easy way how to get names of all defined macros. Probably you have to hardcode them. So you can use something like this:
MACROS = { rpm.expandMacro(x): x for x in ["%{_javadocdir}", "%{_javadocdir}", "%{_javadir}", ... ] }
One way how to avoid harcoded names of macros is to parse them from string returned by rpm.expandMacro("%dump") but I don't recommend that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I have done it with %dump ... there is a problem only with duplicities like this:
- ('%{_kde4_libdir}/libl.so', None, None),
? -----
+ ('%{_libdir}/libl.so', None, None),
where %{_kde4_libdir} == '/usr/lib64'
and %{_libdir} == '/usr/lib64'
should I just ignore it?
…l modules shown in documentation properly (fix rh-lab-q#332) (fix rh-lab-q#325)
Now this should be all OK and non-hardcoded |
9bf95dd
to
cc573ef
Compare
this error is issued #373 but everything else is OK. please restart travis |
…ken), conf - class vars to obj vars = causes some tests fail
depends on #358 heavily but all done - I hope tests will pass now |
It is failing because of missing macro definition see #374 |
No description provided.