Bug 3881 - When smart is installed on the host system, failures can occur when using smart-native to construct filesystems
Summary: When smart is installed on the host system, failures can occur when using sma...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4
Assignee: Bogdan Marinescu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-02-12 19:04 UTC by Mark Hatle
Modified: 2013-04-10 11:15 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hatle 2013-02-12 19:04:27 UTC
When smart is installed on a Fedora host system, it inherits the configuration of the yum repositories.  When we use the native version of smart to construct a filesystem, it will pick up this host configuration and cause installation failures similar to:


DEBUG: Executing shell function do_rootfs
Previous repo file missing: /home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/deploy/rpm/all/repodata/primary.xml.gz
Previous repo file missing: /home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/deploy/rpm/qemux86_64/repodata/primary.xml.gz
Previous repo file missing: /home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/deploy/rpm/x86_64/repodata/primary.xml.gz
Previous repo file missing: /home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/deploy/rpm/x86_64_nativesdk/repodata/primary.xml.gz
Note: configuring RPM platform settings
Note: configuring RPM system provides
Note: configuring RPM DB settings
Note: configuring Smart settings
New channel 'RPM Fusion for Fedora 17 - Free - Test Updates - Debug (rpmfusion-free-updates-testing-debuginfo)' detected.
Include it? (Y/n): 
Traceback (most recent call last):
  File "/home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/smart.real", line 200, in <module>
    main(sys.argv[1:])
  File "/home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/smart.real", line 170, in main
    initPlugins()
  File "/home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/smart/__init__.py", line 188, in initPlugins
    __import__("smart.plugins."+entry[:-3])
  File "/home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/smart/plugins/channelsync.py", line 200, in <module>
    syncChannels(sysconf.get("channel-sync-dir", CHANNELSDIR))
  File "/home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/smart/plugins/channelsync.py", line 84, in syncChannels
    "Include it?") % name, True)):
  File "/home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/smart/interfaces/text/interface.py", line 65, in askYesNo
    res = raw_input(mask % question).strip().lower()
  File "/home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/smart/__init__.py", line 69, in raw_input
    prompt = sys.stdout.encode(prompt)[0]
AttributeError: 'file' object has no attribute 'encode'
ERROR: Function failed: do_rootfs (see /home/rwoolley/wrlinux-git/qemux86_64-merlin/bitbake_build/tmp/work/qemux86_64-wrs-linux/wrlinux-image-merlin-1.0-r0/temp/do_rootfs/log.do_rootfs.3435 for further information)
Comment 1 Bogdan Marinescu 2013-04-05 14:39:36 UTC
I tried to reproduce this on a Fedora host by building core-image-minimal with a RPM backend and it worked without problems. Do I need to do something more?
Comment 2 Paul Eggleton 2013-04-05 14:58:26 UTC
You need to actually have smart on the host, did you have that in your test?
Comment 3 Bogdan Marinescu 2013-04-08 08:25:46 UTC
Indeed, it is reproducible when 'smart' is installed on the host. Sorry, for some reason I thought that 'smart' was already installed on the Fedora host.
Comment 4 Bogdan Marinescu 2013-04-08 15:02:14 UTC
Patch sent to oe-core (smart: disable CHANNELSDIR).
Comment 5 Bogdan Marinescu 2013-04-10 11:15:28 UTC
Patch merged.