FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Build System

 
 
LinkBack Thread Tools
 
Old 09-03-2010, 08:58 PM
Jesse Keating
 
Default Fwd: dist-git tag question

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think this should go here for review.

- -------- Original Message --------
Subject: Re: dist-git tag question
Date: Fri, 06 Aug 2010 02:06:07 +0200
From: Karsten Hopp <karsten@redhat.com>
To: Development discussions related to Fedora
<devel@lists.fedoraproject.org>
CC: Peter Hutterer <peter.hutterer@who-t.net>, Jesse Keating
<jkeating@redhat.com>


On 04.08.2010 07:05, Peter Hutterer wrote:
>
> I don't think git hashes are an equivalent to the nvr tags though. I may
> have multiple commits for each nvr, a tag that explicitly specifies which
> version ended up as an rpm in koji would be quite helpful. I have
troubles
> remembering hashes long-term, nvr is marginally easier. it also
simplifies
> things like "git diff foo-1.2-1..foo-1.2-2" or the automation of that
> process.
>
> Cheers,
> Peter


I had similar problems identifying the correct git hash for my secondary
arch rebuilds and
complained about in in my blog on http://karstenhopp.livejournal.com/.
The attached patch adds a --commitinfo parameter to koji's buildinfo and
latest-pkg commands.
P.e. koji buildinfo --commitinfo hwdata-0.227-1.fc14 returns
git://pkgs.fedoraproject.org/hwdata?#21d5786ad6701422e71b3952ea3c8103c5ee72e2

The patch is for koji-1.4.0-2.fc13.noarch, but should be easy to adapt
to latest


Karsten

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkyBYWYACgkQ4v2HLvE71NVl/QCdGjHMG5q6ILMPEQ0p/lQNJ4UC
VVcAmwZr22Jeb+DeYtJHOvNGo0q32Kkl
=RMPS
-----END PGP SIGNATURE-----
--- /usr/bin/koji 2010-07-09 04:04:26.000000000 +0200
+++ /home/devel/karsten/tmp/koji 2010-08-06 01:51:44.000000000 +0200
@@ -2058,6 +2058,7 @@
parser.add_option("--all", action="store_true", help=_("List all of the latest packages for this tag"))
parser.add_option("--quiet", action="store_true", help=_("Do not print the header information"), default=options.quiet)
parser.add_option("--paths", action="store_true", help=_("Show the file paths"))
+ parser.add_option("--commitinfo", action="store_true", help=_("Show git commit information used for this build"))
parser.add_option("--type", help=_("Show builds of the given type only. Currently supported types: maven"))
(options, args) = parser.parse_args(args)
if len(args) == 0:
@@ -2105,6 +2106,12 @@
for x in data:
x['path'] = pathinfo.build(x)
fmt = "%(path)-40s %(tag_name)-20s %(owner_name)s"
+ if options.commitinfo:
+ for x in data:
+ x['request'] = session.getTaskInfo(session.getBuild(x['build_id'])['task_id'], request=True)['request'][0]
+ fmt = "%(request)-80s"
+ options.quiet = True
+ # label = koji.taskLabel(self.info)
else:
if options.type == 'maven':
fmt = "%(nvr)-40s %(tag_name)-20s %(maven_group_id)-20s %(maven_artifact_id)-20s %(owner_name)s"
@@ -2680,6 +2687,7 @@
usage += _("
(Specify the --help global option for a list of other help options)")
parser = OptionParser(usage=usage)
parser.add_option("--changelog", action="store_true", help=_("Show the changelog for the build"))
+ parser.add_option("--commitinfo", action="store_true", help=_("Show commit information used to build this package n-v-r"))
(options, args) = parser.parse_args(args)
if len(args) < 1:
parser.error(_("Please specify a build"))
@@ -2692,26 +2700,29 @@
if info is None:
print "No such build: %s
" % build
continue
- taglist = []
- for tag in session.listTags(build):
- taglist.append(tag['name'])
- if info['epoch'] is None:
- info['epoch'] = ""
+ if options.commitinfo:
+ print "%s" % session.getTaskInfo(info['task_id'], request=True)['request'][0]
else:
- info['epoch'] = str(info['epoch']) + ":"
- info['name'] = info['package_name']
- info['arch'] = 'src'
- info['state'] = koji.BUILD_STATES[info['state']]
- rpms = session.listRPMs(buildID=info['id'])
- print "BUILD: %(name)s-%(version)s-%(release)s [%(id)d]" % info
- print "State: %(state)s" % info
- print "Built by: %(owner_name)s" % info
- print "Task: %(task_id)s" % info
- print "Finished: %s" % koji.formatTimeLong(info['completion_time'])
- print "Tags: %s" % ' '.join(taglist)
- print "RPMs:"
- for rpm in rpms:
- print os.path.join(koji.pathinfo.build(info), koji.pathinfo.rpm(rpm))
+ taglist = []
+ for tag in session.listTags(build):
+ taglist.append(tag['name'])
+ if info['epoch'] is None:
+ info['epoch'] = ""
+ else:
+ info['epoch'] = str(info['epoch']) + ":"
+ info['name'] = info['package_name']
+ info['arch'] = 'src'
+ info['state'] = koji.BUILD_STATES[info['state']]
+ rpms = session.listRPMs(buildID=info['id'])
+ print "BUILD: %(name)s-%(version)s-%(release)s [%(id)d]" % info
+ print "State: %(state)s" % info
+ print "Built by: %(owner_name)s" % info
+ print "Task: %(task_id)s" % info
+ print "Finished: %s" % koji.formatTimeLong(info['completion_time'])
+ print "Tags: %s" % ' '.join(taglist)
+ print "RPMs:"
+ for rpm in rpms:
+ print os.path.join(koji.pathinfo.build(info), koji.pathinfo.rpm(rpm))
if options.changelog:
changelog = session.getChangelogEntries(info['id'])
if changelog:

--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 

Thread Tools




All times are GMT. The time now is 12:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org