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

osclib/stagingapi: detect baselibs.conf in adi package and ensure archs enabled. #1320

Merged
merged 3 commits into from Jan 4, 2018

Conversation

@jberry-suse
Copy link
Contributor

jberry-suse commented Jan 4, 2018

Fixes #1304.

I have a test prototype, but too much local hax to run it pending #1221.

Tested again by running:

osc staging adi --move wine

Which moved request 561156 and enabled i586 in the new staging where it was not enabled in previous and had repo-checker comment.

@jberry-suse

This comment has been minimized.

Copy link
Contributor Author

jberry-suse commented Jan 4, 2018

Staged request 561505 and noted that i586 was not added as expected.

@jberry-suse jberry-suse requested a review from DimStar77 Jan 4, 2018
@DimStar77

This comment has been minimized.

Copy link
Contributor

DimStar77 commented Jan 4, 2018

Do we really need to parse the .spec files? IIRC we already have an API call to just list the files, which should be cheaper (it allows to filter filenames serverside) - and in case of multiple spec files would not require multiple api requests

@jberry-suse

This comment has been minimized.

Copy link
Contributor Author

jberry-suse commented Jan 4, 2018

Some baselibs.conf are dynamically generated in .spec so this was the only reliable way of which I am aware.

@DimStar77

This comment has been minimized.

Copy link
Contributor

DimStar77 commented Jan 4, 2018

You are right - as usual :)

Then, LGTM

@jberry-suse

This comment has been minimized.

Copy link
Contributor Author

jberry-suse commented Jan 4, 2018

This discussion is probably a good reason to add a comment to indicate as much which I will do.

@jberry-suse

This comment has been minimized.

Copy link
Contributor Author

jberry-suse commented Jan 4, 2018

diff --git a/osclib/stagingapi.py b/osclib/stagingapi.py
index 90983fc..eac803b 100644
--- a/osclib/stagingapi.py
+++ b/osclib/stagingapi.py
@@ -1257,7 +1257,8 @@ class StagingAPI(object):
         url = self.makeurl(['source', project, tar_pkg, '_link'])
         http_PUT(url, data=ET.tostring(root))
 
-        # Check for baselibs.conf in specs if adi project.
+        # If adi project, check for baselibs.conf in all specs to catch both
+        # dynamically generated and static baselibs.conf.
         baselibs = False if self.is_adi_project(project) else None
         if baselibs is False and 'baselibs.conf' in str(self.load_file_content(
             src_prj, src_pkg, '{}.spec'.format(src_pkg), src_rev)):
…hs enabled.

Otherwise, the baselibs are not built and repo-checker cannot verify the
setup.
@jberry-suse jberry-suse force-pushed the jberry-suse:adi-baselibs-detect branch from 5744991 to fa99155 Jan 4, 2018
@openSUSE openSUSE deleted a comment from coveralls Jan 4, 2018
@coveralls

This comment has been minimized.

Copy link

coveralls commented Jan 4, 2018

Coverage Status

Coverage decreased (-0.006%) to 29.412% when pulling fa99155 on jberry-suse:adi-baselibs-detect into 98a659c on openSUSE:master.

Copy link
Contributor

DimStar77 left a comment

LGTM

@nilxam

This comment has been minimized.

Copy link
Contributor

nilxam commented Jan 4, 2018

LGTM

@DimStar77 DimStar77 merged commit e1b5d75 into openSUSE:master Jan 4, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jberry-suse jberry-suse deleted the jberry-suse:adi-baselibs-detect branch Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.