Re: [yocto] dnf error

2018-02-08 Thread Alexander Kanavin

On 02/09/2018 02:25 AM, Russell Peterson wrote:

The package I was adding had python scripts in it.  The make process
for the package used the python distutils.core setup function.  I
didn’t write the code… I’m just creating a recipe for it.  This in
turn copies the scripts to various locations but in the process of
doing that modifies the #! at the start of the script to use the
hosttools path to python.  Not very cross-build friendly.  I simply
patched the makefile to use the —executable=/usr/bin/python argument.
All this does is prevent the #! modification.  Builds fine now.  Bit
of a hack but I will speak with the developers to create a bit more
cross build friendly options.




This is actually a common issue, and we routinely patch python scripts 
after-the-fact to replace upstream's idea of where python is with 
something sane. I'd say you can almost always just hardcode


#!/usr/bin/en python3

in there.

Alex
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] dnf error

2018-02-08 Thread Russell Peterson
Thanks, Alex.  That was indeed the problem.

For those searching for answers to similar issues I will add what my particular 
issue was.

The package I was adding had python scripts in it.  The make process for the 
package used the python distutils.core setup function.  I didn’t write the 
code… I’m just creating a recipe for it.  This in turn copies the scripts to 
various locations but in the process of doing that modifies the #! at the start 
of the script to use the hosttools path to python.  Not very cross-build 
friendly.  I simply patched the makefile to use the —executable=/usr/bin/python 
argument.  All this does is prevent the #! modification.  Builds fine now.  Bit 
of a hack but I will speak with the developers to create a bit more cross build 
friendly options.

Appreciate the help, Alex.

Regards,

Russell


> On Feb 8, 2018, at 1:26 AM, Alexander Kanavin 
>  wrote:
> 
> On 02/08/2018 03:17 AM, Russell Peterson wrote:
>> core-image-initramfs-1.0-r0 do_rootfs: Could not invoke dnf
>> Last metadata expiration check: 0:00:00 ago on Thu 08 Feb 2018 12:07:06 AM 
>> UTC.
>> Error:
>>  Problem: conflicting requests
>>   - nothing provides /hosttools/python needed by 
>> ofa-kernel-4.2-r0.mymachine
>> ERROR: core-image-initramfs-1.0-r0 do_rootfs: Function failed: do_rootfs
> 
> 
> Something in ofa-kernel rpm package is erroneously referring to 
> .../hosttools/python. Rpm takes that as a dependency that must be satisfied.
> 
> Find out what it is and how it happens.
> 
> Alex

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] dnf error

2018-02-07 Thread Alexander Kanavin

On 02/08/2018 03:17 AM, Russell Peterson wrote:

core-image-initramfs-1.0-r0 do_rootfs: Could not invoke dnf
Last metadata expiration check: 0:00:00 ago on Thu 08 Feb 2018 12:07:06 
AM UTC.

Error:
  Problem: conflicting requests
   - nothing provides /hosttools/python needed by 
ofa-kernel-4.2-r0.mymachine

ERROR: core-image-initramfs-1.0-r0 do_rootfs: Function failed: do_rootfs




Something in ofa-kernel rpm package is erroneously referring to 
.../hosttools/python. Rpm takes that as a dependency that must be satisfied.


Find out what it is and how it happens.

Alex
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto