package_manager.py: correctly handle empty opkg-query-helper.py output

If the output from opkg-query-helper.py is empty, output.split('\n')
would result in a list containing one element which is an empty string
while iterating over each line in the output. An exception is then
thrown by the line:

    pkg, pkg_file, pkg_arch = line.split()

with the message:

    Exception: ValueError: need more than 0 values to unpack

To avoid this, we add a condition to only split the output if it isn't
empty.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sqlite3: Update to 3080301

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-hob: remove hob-toolchain since this is not needed anymore

A patch to replace the use of hob-toolchain with bitbake api
was sent to bitbake-devel list and it is needed for this one.

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_manager.py: create index files for all backends in PACKAGE_CLASSES

The previous implementation was checking IMAGE_PKGTYPE and created the
index files just for the backend used to create the image. Apparently,
'bitbake package-index' should attempt to create the index files for all
backends specified in PACKAGE_CLASSES.

[YOCTO #5827]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oeqa/targetcontrol: properly get the host ip

For the SimpleRemote target where we need the host ip and
it wasn't set in conf, we tried to determine it automatically.
However ip route output isn't the same for every network, we
need the last field from the first line.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sqlite: rename to match upstream versioning

Since we are re-doing the version from a big number down to a dot
based number we have to bump the Package Epoch (PE).

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
grub: exclude .pc from POTFILES.in (fix build on CentOS 5.8)

Exclude the .pc from po/POTFILES.in since quilt uses "patch --backup",
which will create the backup file under .pc, this may cause unexpected
errors, for example, on CentOS 5.x, if the backup file is null
(newfile), it's mode will be 000, then we will get errors when xgettext
try to read it.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
dpkg: fix a link problem for dpkg-native on CentOS 5.8

[ CQID: WIND00392830 ]

CentOS 5.8 provides the kernel support and headers for the
sync_file_range() syscall, but glibc 2.5 doesn't implement the
sync_file_range() syscall stub, so we can't link dpkg-native. Add a
patch that makes dpkg require a glibc version >= 2.6 in order to use
sync_file_range().

Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
Signed-off-by: Lei Liu <lei.liu2@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
dpkg-compiler.m4: remove -Wvla (fix build on CentOS 5.8)

Remove the -Wvla flag from the set of compiler warning flags, since gcc
on old host systems such as CentOS 5.8 doesn't support it, and it
causes a build error for dpkg-native.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
runqemu: Use readlink instead of realpath

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
security_flags: disable PIE flags for cups builds

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
security-flags: Deal with powerpc build issues

Building powerpc machines with the standard security flags generated numerous
build failures. Use a reduced set of flags for now to avoid linker issues
and other compile failures.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
security-flags: Avoid lttng-tools issue on arm

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
base: Remove pointless createCopy/update_data calls

I was asked why we had these copy and update_data calls. I can
offer no good explanation other than them perhaps once being needed
for reasons long since forgotten and superceeded.

With modern bitbake these should not be needed and shouldn't have been
for a long time. Lets therefore remove them and simplify the code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
initrdscripts: Add rootimage option

This allows for setting the ROOT_IMAGE name on the kernel command line

[YOCTO #5387]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
base-files: sed installed file instead of original

When we change the ROOT_HOME the sed regex does not match if we are running
the do_install() a second time, so sed the installed file and preserve the original
so that the sed regex is matched correctly in the original

[YOCTO #5765]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
base-passwd: sed installed file instead of original

When we change the ROOT_HOME the sed regex does not match if we are running
the do_install() a second time, so sed the installed file and preserve the original
so that the sed regex is matched correctly in the original

[YOCTO #5765]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
systemd: sed installed file instead of original

When we change the ROOT_HOME the sed regex does not match if we are running
the do_install() a second time, so copy the units files first to a pre_sed,
so that the next time, we can copy the the original so that the sed regex
is matched correctly in the original

[YOCTO #5765]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
core-image-minimal-initramfs: Use PACKAGE_INSTALL instead of IMAGE_INSTALL

PACKAGE_INSTALL is set from the IMAGE_INSTALL variable with some additional
items, since PACKAGE_INSTALL is intended to be more an internal variable, use
it instead of the IMAGE_INSTALL which is recommeded for installing additional
packages. This will allow the initramfs recipe to use a fixed set of packages
and not be affected by IMAGE_INSTALL.

[YOCTO #5791]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
adt_installer: fix issue with x86_64

When the default tune for x86_64 was changed to core2-64, the
environment setup script name did not contain x86 anymore. Hence, the
adt_installer failed for x86_64.

This commit contains a generic fix and is supposed to work with any kind
of machine/tune setting. It's actually extracting the environment script
name using 'opkg files meta-environment-MACHINE'. So, no need to do any
other sort of searches. We know exactly which is the environment setup
script for the specified machine.

[YOCTO #5806]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>