This is a patch to run createrepo on the contents of the resultdir after a
successful mock run. In theory this lets us suck those contents over for
koji to have available.
+ config_opts['createrepo_on_rpms'] = True
# (global) plugins and plugin configs.
# ordering constraings: tmpfs must be first.
# root_cache next.
@@ -378,6 +379,12 @@ def do_rebuild(config_opts, chroot, srpms):
if config_opts["cleanup_on_success"]:
log.info("Cleaning up build root ('clean_on_success=True')")
chroot.clean()
+
+ if config_opts["createrepo_on_rpms"]:
+ log.info("Running createrepo on binary rpms in resultdir")
+ cmd = ['/usr/bin/createrepo', '-d', '-q', '-x', '*.src.rpm', chroot.resultdir]
+ mock.util.do(cmd)
+
except (Exception, KeyboardInterrupt):
elapsed = time.time() - start
log.error("Exception(%s) Config(%s) %d minutes %d seconds"
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
02-10-2010, 12:57 AM
Roland McGrath
createrepo run after mock
> This is a patch to run createrepo on the contents of the resultdir after a
> successful mock run. In theory this lets us suck those contents over for
> koji to have available.
Awesome. I've wanted for ages to have koji scratch/user/task_12345 dirs
contain repodata.
Thanks,
Roland
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
02-10-2010, 03:18 AM
Seth Vidal
createrepo run after mock
On Tue, 9 Feb 2010, Roland McGrath wrote:
>> This is a patch to run createrepo on the contents of the resultdir after a
>> successful mock run. In theory this lets us suck those contents over for
>> koji to have available.
>
> Awesome. I've wanted for ages to have koji scratch/user/task_12345 dirs
> contain repodata.
>
exactly what we are driving at.
-sv
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
02-10-2010, 07:24 PM
Mike McLean
createrepo run after mock
On 02/09/2010 08:56 PM, Seth Vidal wrote:
> This is a patch to run createrepo on the contents of the resultdir after
> a successful mock run. In theory this lets us suck those contents over
> for koji to have available.
If the target is koji, then mock is the wrong place for this code.
...unless folks that use plain mock need this?
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
02-10-2010, 07:28 PM
Seth Vidal
createrepo run after mock
On Wed, 10 Feb 2010, Mike McLean wrote:
> On 02/09/2010 08:56 PM, Seth Vidal wrote:
>> This is a patch to run createrepo on the contents of the resultdir after
>> a successful mock run. In theory this lets us suck those contents over
>> for koji to have available.
>
> If the target is koji, then mock is the wrong place for this code.
why? You make the repo at end time then with ticket 167 (that I just
filed for koji) it sucks up the repodata, too.
I talked to mbonnet about this on irc - he seemed fine w/it.
> ...unless folks that use plain mock need this?
sure. why not?
-sv
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
02-10-2010, 07:41 PM
Roland McGrath
createrepo run after mock
> On 02/09/2010 08:56 PM, Seth Vidal wrote:
> > This is a patch to run createrepo on the contents of the resultdir after
> > a successful mock run. In theory this lets us suck those contents over
> > for koji to have available.
>
> If the target is koji, then mock is the wrong place for this code.
>
> ...unless folks that use plain mock need this?
I'd certainly like it to be de rigeur for all the canonical forms of
producing a passel of rpms. A directory full of fresh built rpms that is
not directly usable as a repo is just silly!
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
02-10-2010, 07:59 PM
Mike McLean
createrepo run after mock
On 02/10/2010 03:28 PM, Seth Vidal wrote:
>> If the target is koji, then mock is the wrong place for this code.
>
> why? You make the repo at end time then with ticket 167 (that I just
> filed for koji) it sucks up the repodata, too.
It's just as easy to run the createrepo from koji instead. Then,
- no need to add the dep to mock
- works in koji regardless of mock version
Furthermore, the repodata generated here will not mesh with the
resulting layout on the hub.
- for scratch builds all the rpms are placed in a single dir
- for non-scratch builds the src rpms get split off and any noarch
rpms generated from a non-noarch build will land in the noarch dir
>> ...unless folks that use plain mock need this?
>
> sure. why not?
I guess I've never understood how this is helpful. In order to use it,
you'd first need to configure the repo, which means creating/editing a
config file. And you go to that effort so that yum can resolve a handful
of inter-subpackage deps for you?
I've just never had any trouble running yum localinstall against the
resulting rpms.
All that being said, I'm not opposed to doing something -- I just want
to do it right. In particular, I'd like to get a solid handle on the
range of use cases that are behind this request.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
02-10-2010, 08:06 PM
Mike McLean
createrepo run after mock
On 02/10/2010 03:41 PM, Roland McGrath wrote:
> I'd certainly like it to be de rigeur for all the canonical forms of
> producing a passel of rpms. A directory full of fresh built rpms that is
> not directly usable as a repo is just silly!
Not every set of rpms makes sense as a repo.
If you really feel this way, perhaps you should request that yum support
a dir of rpms as a repo.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
02-10-2010, 08:08 PM
Seth Vidal
createrepo run after mock
On Wed, 10 Feb 2010, Mike McLean wrote:
> Furthermore, the repodata generated here will not mesh with the
> resulting layout on the hub.
> - for scratch builds all the rpms are placed in a single dir
> - for non-scratch builds the src rpms get split off and any noarch
> rpms generated from a non-noarch build will land in the noarch dir
>
>>> ...unless folks that use plain mock need this?
>>
>> sure. why not?
>
> I guess I've never understood how this is helpful. In order to use it,
> you'd first need to configure the repo, which means creating/editing a
> config file. And you go to that effort so that yum can resolve a handful
> of inter-subpackage deps for you?
look at the yum tmprepo plugin - it handles the above w/o config edits.
use cases:
1. have repodata immediately available for all koji scratch builds for
easier testing
2. possibly speed up assembling repos from multiple koji builds
3. it's a pretty light-weight hit to go ahead and generate this data
4. it means if you know the taskid then you can find another good index to
slurp down all the files related to it.
those are ones I can think of off the top of my head.
I don't have a strong preference toward this being in mock - when we were
talking about it on irc yesterday it seemed the easiest place to put it.
-sv
-sv
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
02-10-2010, 08:09 PM
Seth Vidal
createrepo run after mock
On Wed, 10 Feb 2010, Mike McLean wrote:
> On 02/10/2010 03:41 PM, Roland McGrath wrote:
>> I'd certainly like it to be de rigeur for all the canonical forms of
>> producing a passel of rpms. A directory full of fresh built rpms that is
>> not directly usable as a repo is just silly!
>
> Not every set of rpms makes sense as a repo.
>
> If you really feel this way, perhaps you should request that yum support
> a dir of rpms as a repo.
repoquery --repofrompath and the yum tmprepo plugin.
-sv
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys