RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1185106 - [RFE] high level API in libostree to support pull-local
Summary: [RFE] high level API in libostree to support pull-local
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ostree
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Colin Walters
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-22 22:45 UTC by Jeff Ortel
Modified: 2017-06-07 14:14 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-07 14:14:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jeff Ortel 2015-01-22 22:45:43 UTC
Requesting a high level API for performing pull-local using libostree.  The use case is: We want to create a repository and then do pull-local(s) of specific branch head commit hash(s) to quickly populate one repository using another but only with selected objects (and objects they reference).  It's my understanding from cwalters, that using ostree_repo_import_object_from() would not sufficiently insulate the caller from upcoming ostree features/changes such as "deltas".

Comment 1 Colin Walters 2015-02-05 21:26:52 UTC
I've been working on mirror/pull issues as part of the deltas branch:

https://github.com/cgwalters/ostree/commit/d224e1a8dcbcddbd686b1bab6ae979177c287983
https://github.com/cgwalters/ostree/commit/2ee6d0995fcb04b544b27059961744d7b012694c

Are both mirror-related fixes.  I think I could have this specific optimization (basically merging pull-local into pull) by next week end.

Comment 2 Colin Walters 2015-02-12 16:47:43 UTC
https://github.com/GNOME/ostree/pull/57

Is now merged in ostree master.  Can you give it a try?  Honestly it might be simplest still to call out to pull-local as a subprocess, but if you look at the new C implementation of pull-local you'll notice it's a very thin wrapper for ostree_repo_pull_with_options() now.

Comment 3 Jeff Ortel 2015-02-17 23:17:03 UTC
Thanks for getting this done!  I'm assuming that you're referring to: ostree_builtin_pull_local (int argc, char **argv, GCancellable *cancellable, GError **error).  Right?  I'm sure we've been over this but .. Is calling this better than just calling ostree_repo_pull_with_options() since it's just a thin wrapper?

Comment 4 Colin Walters 2015-02-17 23:31:02 UTC
ostree_builtin_pull_local() shouldn't even be an exported symbol in the library, the fact that it is is a bug.

So definitely, give ostree_repo_pull_with_options() a try.

Comment 5 Colin Walters 2015-02-17 23:31:48 UTC
(I just checked, ostree_builtin_pull_local is only compiled in to the /usr/bin/ostree binary, not the DSO)

Comment 6 Jeff Ortel 2015-02-18 16:27:32 UTC
Ah, I misunderstood. You meant to just use ostree_builtin_pull_local() as a reference for using ostree_repo_pull_with_options() to do pull-local.  

Got local pull working using ostree_repo_pull_with_options().

Comment 7 Mike McCune 2016-03-28 23:45:25 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 8 Colin Walters 2017-06-07 14:14:26 UTC
Sounds like things are working, please reopen if not.


Note You need to log in before you can comment on or make changes to this bug.