All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: jani.uusi-rantala@nokia.com
Cc: yocto@yoctoproject.org
Subject: Re: Magic/File problems
Date: Thu, 11 Aug 2011 08:29:40 -0700	[thread overview]
Message-ID: <4E43F564.8090305@linux.intel.com> (raw)
In-Reply-To: <B497E783C723AE4386DDEA96AF1D2B989EB3D4@008-AM1MPN1-011.mgdnok.nokia.com>


Jani,

This patch looks good, can you please do a proper git patch with a 
Signed-off-by: line.

For details please refer to

http://wiki.openembedded.org/index.php/Commit_Patch_Message_Guidelines

The patch should be sent to: openembedded-core@lists.openembedded.org

Thanks for this fix, it will fix a Yocto bug

http://bugzilla.pokylinux.org/show_bug.cgi?id=1358

So please include [YOCTO #1358] in your git commit message.

Thanks again

	Sau!


On 08/09/2011 08:57 AM, jani.uusi-rantala@nokia.com wrote:
> I was experiencing same issue today with latest Yocto master
> ca394457c5d7b2cb4544de7ce2d29008ec6173ae (in Fedora R15):
>
> | error: magic_load(ms, /usr/share/misc/magic) failed: File 5.4 supports
> only version 7 magic files. `/usr/share/misc/magic.mgc' is version 8
> | rpmbuild.real: rpmfc.c:1154: rpmfcClassify: Assertion `mg != ((void
> *)0)' failed.
>
>
> This seems to be a problem with rpmbuild using the wrong magic file from
> rpmfcClassify. This kind of simple fix in package_rpm.class appears to work:
>
> Defines _rpmfc_magic_path variable:
>
> diff --git a/meta/classes/package_rpm.bbclass
> b/meta/classes/package_rpm.bbclass
> index ddbfc09..3f00857 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -822,6 +822,8 @@ python do_package_rpm () {
> targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
> pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
> pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
> + magicfile =
> bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d)
> +
> bb.mkdirhier(pkgwritedir)
> os.chmod(pkgwritedir, 0755)
>
> @@ -834,7 +836,7 @@ python do_package_rpm () {
> cmd = cmd + " --define '__find_provides " + outprovides + "'"
> cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
> cmd = cmd + " --define 'debug_package %{nil}'"
> + cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
> cmd = cmd + " -bb " + outspecfile
>
>
> - Jani
>
>
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


  reply	other threads:[~2011-08-11 15:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09 15:57 Magic/File problems jani.uusi-rantala
2011-08-11 15:29 ` Saul Wold [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-08-01 17:55 Jeff Mitchell
2011-08-01 22:18 ` Saul Wold
2011-08-02 14:31   ` Jeff Mitchell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E43F564.8090305@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=jani.uusi-rantala@nokia.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.