Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Build System (http://www.linux-archive.org/fedora-build-system/)
-   -   what about imported RPMs without a build ? (http://www.linux-archive.org/fedora-build-system/430129-what-about-imported-rpms-without-build.html)

Thomas Guthmann 09-22-2010 12:55 AM

what about imported RPMs without a build ?
 
Hey guys,

I've just discovered that mash does not include packages without a koji
build despite the fact that a RPM has been imported (koji import
--create-build [package]).

Indeed, we have some packages already build with hudson/maven and not
koji so we integrate them in koji to centralize RPMs. But then they
don't appear in the generated mash repositories (used for cobbler).

In mash/__init__.py:286, listTaggedRPMS does not include them. Is there
a workaround (like another koji python method to use or some SQL black
magic) ?

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

"Nathan Blackham" 09-22-2010 01:09 AM

what about imported RPMs without a build ?
 
Did you tag the build?
------Original Message------
From: Thomas Guthmann
Sender: buildsys-bounces@lists.fedoraproject.org
To: buildsys@lists.fedoraproject.org
ReplyTo: Discussion of Fedora build system
Subject: [MASH/KOJI] what about imported RPMs without a build ?
Sent: Sep 21, 2010 5:55 PM

Hey guys,

I've just discovered that mash does not include packages without a koji
build despite the fact that a RPM has been imported (koji import
--create-build [package]).

Indeed, we have some packages already build with hudson/maven and not
koji so we integrate them in koji to centralize RPMs. But then they
don't appear in the generated mash repositories (used for cobbler).

In mash/__init__.py:286, listTaggedRPMS does not include them. Is there
a workaround (like another koji python method to use or some SQL black
magic) ?

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


Sent from my Storm2
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Thomas Guthmann 09-22-2010 01:20 AM

what about imported RPMs without a build ?
 
On 09/22/2010 11:09 AM, Nathan Blackham wrote:
> Did you tag the build?

No, because when I do it, I have the following mash error :

# koji tag-pkg repoX package-17.00-00
# mash repoX
2010-09-22 11:14:40 mash: Getting package lists for repoX...
2010-09-22 11:14:40 mash: Sorting packages...
Traceback (most recent call last):
File "/usr/bin/mash", line 97, in ?
main()
File "/usr/bin/mash", line 77, in main
rc = themash.doCompose()
File "/usr/lib/python2.4/site-packages/mash/__init__.py", line 339,
in doCompose
srcpkg = src_hash[pkg['build_id']]
KeyError: 389
mash failed in /var/tmp/mash/visp

PS: I'm using mash 0.5.17 and koji 1.4.0

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

"Nathan Blackham" 09-22-2010 02:57 AM

what about imported RPMs without a build ?
 
It looks like maybe you didn't import a srpm. I am not at a computer to check but that seems like what is going on.

P.S. Sorry about the top posting.
Sent from my Storm2

-----Original Message-----
From: Thomas Guthmann <tguthmann@iseek.com.au>
Sender: buildsys-bounces@lists.fedoraproject.org
Date: Wed, 22 Sep 2010 11:20:03
To: <buildsys@lists.fedoraproject.org>
Reply-To: Discussion of Fedora build system <buildsys@lists.fedoraproject.org>
Subject: Re: [MASH/KOJI] what about imported RPMs without a build ?

On 09/22/2010 11:09 AM, Nathan Blackham wrote:
> Did you tag the build?

No, because when I do it, I have the following mash error :

# koji tag-pkg repoX package-17.00-00
# mash repoX
2010-09-22 11:14:40 mash: Getting package lists for repoX...
2010-09-22 11:14:40 mash: Sorting packages...
Traceback (most recent call last):
File "/usr/bin/mash", line 97, in ?
main()
File "/usr/bin/mash", line 77, in main
rc = themash.doCompose()
File "/usr/lib/python2.4/site-packages/mash/__init__.py", line 339,
in doCompose
srcpkg = src_hash[pkg['build_id']]
KeyError: 389
mash failed in /var/tmp/mash/visp

PS: I'm using mash 0.5.17 and koji 1.4.0

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

Thomas Guthmann 09-22-2010 03:00 AM

what about imported RPMs without a build ?
 
Hey,

> It looks like maybe you didn't import a srpm. I am not at a computer to check but that seems like what is going on.
I don't have a SRPM. That's the point :)

I imported a RPM already packaged by something else into koji. See
http://fedoraproject.org/wiki/Koji/KojiMisc#Importing_an_rpm_without_srpm

Thomas

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

Bill Nottingham 09-22-2010 03:39 PM

what about imported RPMs without a build ?
 
Jesse Keating (jkeating@redhat.com) said:
> On 09/21/2010 08:00 PM, Thomas Guthmann wrote:
> > I imported a RPM already packaged by something else into koji. See
> > http://fedoraproject.org/wiki/Koji/KojiMisc#Importing_an_rpm_without_srpm
>
> If you aren't importing srpms, then you need to tweak the mash config to
> not attempt to gather srpms (if that's even possible). It is always
> preferable to import the srpms along with the rpms.

There's already a config option for not doing source rpms... it perhaps
needs wired through some more. If you have issues with that option set,
please file a bug in bugzilla.

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

Jesse Keating 09-22-2010 04:52 PM

what about imported RPMs without a build ?
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/21/2010 08:00 PM, Thomas Guthmann wrote:
> I imported a RPM already packaged by something else into koji. See
> http://fedoraproject.org/wiki/Koji/KojiMisc#Importing_an_rpm_without_srpm

If you aren't importing srpms, then you need to tweak the mash config to
not attempt to gather srpms (if that's even possible). It is always
preferable to import the srpms along with the rpms.

- --
Jesse Keating
Fedora -- Freedomē is a feature!
identi.ca: http://identi.ca/jkeating
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkyaNFoACgkQ4v2HLvE71NXTsQCdGIOwgXAATO 2iGfqpIbmDN82g
Tv8AoJqT/wpcl1EZgf9BKtOQKvgUaczA
=lsKC
-----END PGP SIGNATURE-----
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Thomas Guthmann 09-22-2010 11:47 PM

what about imported RPMs without a build ?
 
Hi Bill,

> There's already a config option for not doing source rpms... it perhaps
> needs wired through some more. If you have issues with that option set,
> please file a bug in bugzilla.

sources=false doesn't help. It is not used in this portion of the code
(see snippet below). I've created a bug entry :
https://bugzilla.redhat.com/show_bug.cgi?id=636697

----
src_hash = dict([(x['build_id'],x) for x in source.packages()])
excludearch = dict([(x['build_id'],') for x in source.packages()])
exclusivearch = excludearch.copy()
# Get excludearch/exclusivearch lists for noarch packages
for pkg in noarch.packages():
srcpkg = src_hash[pkg['build_id']] <<<<< it dies here >>>>>
self.logger.debug("Checking %s for Exclude/ExclusiveArch" %
(nevra(pkg),))
fn = _get_reference(srcpkg, builds_hash)
# if build has no source rpm, check the binary
if fn == None:
fn = _get_reference(pkg, builds_hash)
try:
hdr = koji.get_rpm_header(fn)
except:
self.logger.error("Couldn't read header from %s (%s)" %
(nevra(pkg), fn))
if fn:
fn.close()
continue
excludearch[pkg['build_id']] = hdr['EXCLUDEARCH']
exclusivearch[pkg['build_id']] = hdr['EXCLUSIVEARCH']
fn.close()

-----

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

Thomas Guthmann 09-23-2010 12:21 AM

what about imported RPMs without a build ?
 
Re,


https://bugzilla.redhat.com/show_bug.cgi?id=636697
You will find in attachment a workaround to fix this issue. However I am
looking forward for a proper fix.


This patch only defaults the dictonnary with 0 if the key is not
present. Then I do a test to see if the value is 0 and use the RPM
instead to get the necessary info. Bug entry has been updated as well.


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


All times are GMT. The time now is 01:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.