Commit Graph

89 Commits

Author SHA1 Message Date
Laurentiu Palcu cbc12aac86 package_deb, apt.conf: fix apt failure in do_rootfs()
The changes in this commit, dc5f6c3898,
moved apt config directory from native SYSROOT to WORKDIR.
Unfortunately, Dir::Etc in apt.conf was not changed accordingly and
sources.list file could not be found during do_rootfs().

This commit fixes this issue.

[YOCTO #5241]

(From OE-Core rev: 65a2a1e1d0b0e3dcc34d47f46185f24d753b53dd)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-24 17:24:14 +01:00
Richard Purdie 554c892ccf meta: Don't use deprecated bitbake API
These have been deprecated for a long time, convert the remaining
references to the correct modules and prepare for removal of the
compatibility support from bitbake.

(From OE-Core rev: 6a39835af2b2b3c7797fe05479341d71a3f3aaf6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-01 15:51:42 +01:00
Mark Hatle 388278818d package_deb: Add support for NO_RECOMMENDATIONS and PACKAGE_EXCLUDE
Add support for NO_RECOMMENDATIONS and PACKAGE_EXCLUDE.  Also add a
warning that ensures users know that BAD_RECOMMENDATIONS support is
not implemented in the debian package/rootfs classes.

(From OE-Core rev: 42b115b6d65c8205acb77b96db481f3e5172266b)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22 18:30:00 +01:00
Mark Hatle dc5f6c3898 package_deb.bbclass: Use the WORKDIR not SYSROOT for temp files
Previous debian APT configuration was using the sysroot directory.
This not only polluted the sysroot, but violates the expectation that
the sysroot is not modified by the rootfs installation.

(From OE-Core rev: 2db14eaa0fcc080bc20fa9da985ffc05c3b21e2a)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22 18:30:00 +01:00
Robert Yang 258b8a2cb4 package_deb.bbclass: make DESCRIPTION support newline
The recipe's DESCRIPTION is wrapped automatically by textwrap, make it
support newline ("\n") to let the user can wrap it manually, e.g.:

DESCRIPTION = "Foo1\nFoo2"

In the past, it would be:
Foo1\nFoo2

Now:
Foo1
Foo2

[YOCTO #4348]

(From OE-Core rev: 568e303ef4447a9ddb7fb6370166d012a4375dab)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:42:03 +01:00
Richard Purdie 950b505ca1 package_*.bbclass: Drop fakeroot from setscene calls
Back in 2010, I added these in commit: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=36f1ae42fe13dae174b7fb5eb85dc49d7d7b516b
however the package_write tasks sstate only consists of package files and no
fakeroot privileges are needed to write these out, only originally create them.

We can therefore drop these for some small performance gains and a less
convoluted depenency chain.

(From OE-Core rev: 3c760ce4dc15d85be07aafbfea896e7276e0c2c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:31 +01:00
Richard Purdie 566628d8cd class/lib: Fix up various file access methods
There are various bits of cruft that have built up around our file accesses. This patch
cleans some of them up, specifically:

 * Remove pointless "from __builtin__ import file"
 * Use open(), not file()
 * Wrap file usage in a with container to ensure files are closed
 * Add missing .close() calls in some cases

(From OE-Core rev: a43e0a8ecd0441131e929daf998c3cd454d9c8f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Bogdan Marinescu 8866aeefb7 package_deb.bbclass: fix 'armel' override
The 'armel' override for DKPG_ARCH was causing the meta-toolchain
build to fail. The assignment was moved to an anonymous fragment
of Python code, so it doesn't affect the assignments in
cross-canadian.bbclass anymore, thus fixing the issue.

[YOCTO #4080]

(From OE-Core rev: 6f86fe5d66e401377bccd9f635270033b99a9f4b)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03 17:01:13 +01:00
Richard Purdie 554e3d2540 package/populate_sdk: Move functions from package_* to populate_sdk_*
This fixes build failures introduced with "classes/buildhistory: implement history
collection for SDK" by moving the functions to files where only the specific image
type which is enabled is inherited. The failures occured when multiple PACKAGE_CLASSES
were enabled.

(From OE-Core rev: 9a414a57ad69a426a8d8a2970c42ca7427240615)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 17:40:27 +00:00
Paul Eggleton 59e4815387 classes/buildhistory: implement history collection for SDKs
SDKs are constructed in a similar manner to images, and the contents can
be influenced by a number of different factors, thus tracking the
contents of produced SDKs when buildhistory is enabled can help detect
the same kinds of issues as with images.

This required adding POPULATE_SDK_POST_HOST_COMMAND and
SDK_POSTPROCESS_COMMAND variables so that data collection functions can
be injected at the appropriate points in the SDK construction process,
as well as moving the list_installed_packages and
rootfs_list_installed_depends functions from the rootfs_{rpm,ipk,deb} to
the package_{rpm,ipk,deb} classes so they can also be called during
do_populate_sdk as well as do_rootfs.

Implements [YOCTO #3964].

(From OE-Core rev: c3736064483d4840e38cb1b8c13d2dd3a26b36aa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 11:41:13 +00:00
Christopher Larson b10f2a74e4 package_{ipk, deb, rpm}: drop the TARGET_OS conditional
The tclibc file for uclibc already empties IMAGE_LINGUAS, so there's no point
to this conditional as far as I can tell, and it can cause issues for certain
values of TARGET_OS.

(From OE-Core rev: 0fdda5840452c7715ed775d5d18d9f850396f483)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00
Christopher Larson 331c1f1fe5 package_deb: don't install glibc-localedata-i18n separately
This was removed from package_rpm and package_ipk years ago, and shouldn't be
needed, installing the packages from package_linguas should be sufficient.

(From OE-Core rev: e9485c7077e5a9508371bbbbebdaaf1e9685da61)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00
Constantin Musca 9d076dcba1 package_deb.bbclass: set DPKG_ARCH_arm to "armel"
- the system should be using "armel" by default, not "arm"

[YOCTO #3741]

(From OE-Core rev: 74c671a609172a3801e53fe93e2853c4f0eb93b1)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-10 04:36:51 +00:00
Hongxu Jia 22b1f63223 package_deb.bbclass:fix meta-toolchain-sdk fail on do_populate_sdk
When build meta-toolchain-sdk in a newly created environment, there is
an error:
...
packagegroup-core-standalone-gmae-sdk-target set to manually installed.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
avahi-dev: Depends: avahi (= 0.6.31-r6.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a
solution).
...
In this case, avahi was installed and then removed by dpkg (the reason is
unknown, only with log `Noting disappearance of avahi, which has been
completely replaced'), the uninstall was done by dpkg rather than apt,
and apt detected the package dependency was broken, so apt-get install failed.

Use `apt-get install -f' to correct the upper broken dependencies in place.
The removed avahi will be reinstalled.

[YOCTO #3720]

(From OE-Core rev: a66ed54490305380c549838f9a580528d5b49275)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-02 12:59:51 +00:00
Hongxu Jia 8e73fb597a package_deb.bbclass:fix the arch (replace "_" with "-") in deb package control
when build deb image, such as building meta-toolchain-sdk in x86_64 host,
there is warning like that:
...
'x86_64' is not a valid architecture name: character `_' not allowed
(only letters, digits and characters `-')
...

The params in deb package control file don't allow character `_', only
letters, digits and characters `-' allowed. Change the arch's "_" to "-"
in the deb package's control file at the control file creation time. Such
as `x86_64'-->`x86-64'

[YOCTO #3721]

(From OE-Core rev: 8487b352cabd8c8ae8a7d9e7e66489e4e964bd50)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-02 12:59:51 +00:00
Ross Burton f017eb38bb package_deb: check CONFFILES exist before adding them to metadata
dpkg-deb verifies that conffiles exist, so verify that the specified files
actually exist before writing them to conffiles.

This mirrors the behaviour of FILES and package_rpm's CONFFILES handling.

(From OE-Core rev: 767a3d1c45f97add720174a7034df750bfb09a8e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-22 06:09:22 -08:00
Richard Purdie ba110d3b69 package_rpm/dev/ipk/tar: Drop unused functions
The package_xxx_install functions date from a different era and are not used by
anything. In the rpm case, they're simply unimplemented, in the tar case they're
using broken whitespace and deprecated functions. We might as well clean
out the old broken unused code.

(From OE-Core rev: 3684036213c9b1c27389260b7a1e3441c6bd659d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:03 +00:00
Richard Purdie 74938e387c package_rpm/deb/ipk: Error if we don't find packages when creating the package index
If for whatever reason the package directory is empty of packages, it
makes sense to error early rather than later in what become much
more obtuse errors. This adds in a sanity check to each of the packaging
backends. It also removes the duplicate createrepo call since the
core index creation function now uses this directly after the switch
to smart.

(From OE-Core rev: 721ef058b37604e100021ec7a90ad2f745d83916)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:03 +00:00
Richard Purdie c9ea3c27e1 package_ipk/deb/rpm: Ensure deploy staging directory is empty before rerunning task
If we don't do this, stale files can build up, particularly with the PR
server.

(From OE-Core rev: c30ae39229b35d72e2205040d76754b5120fa878)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-30 14:09:09 +00:00
Richard Purdie 3247292683 Split do_packagedata task from do_package
Currently, do_rootfs has a dependency on all the do_package output being present
due to its usage of the pkgdata directories. This means that if you run:

bitbake xxxx-image -c rootfs

you end up having to fetch and unpack all the do_package data which is usually
large and inefficient. It also means rm_work has to leave all the do_package
data lying around so rootfs works.

This patch splits the actual creation of the pkgdata directory off into a separate
task, "packagedata" which happens immediately after do_package. We can then remap
the dependencies so this task is depended upon, not do_package. Sstate can then be
programmed not to require do_package at the appropriate times.

Whilst this patch doesn't do so, it opens the possibility of rm_work wiping
out the do_package output from WORKDIR as long as it also removed the do_package
stamp (both normal and setscene variants) and allowing more space savings
with rm_work which has been regularly requested.

(From OE-Core rev: 6107ee294afde395e39d084c33e8e94013c625a9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:47 +00:00
Mark Hatle ca36d34c2e package_deb: Dependencies with a ( or ) in them are invalid in debs
Replace ( or ) with __.  This allows RPM style dependencies to be satisfied
in deb style packages.

(From OE-Core rev: 12acb6bb00ba665571fcfbdb0ef4668ca0a98d5b)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:07 +00:00
Richard Purdie 5fdbda6922 classes: Update to use corrected bb.utils.explode_dep_versions2 API
The bb.utils.explode_dep_versions function has issues where dependency information
can be lost. The API doesn't support maintaining the correct information so this
changes to use a new function which correctly handles the data.

This patch also fixes various points in the code to ensure that we do not have any
duplicates in things that use explode_dep_versions.

A new sanity test to test the contents of the R* variables is also added.

[Some changes from Mark Hatle <mark.hatle@windriver.com>]

(From OE-Core rev: 16a892431d0c0d03f8b561b92909cf2f11af4918)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:53 +01:00
Mark Hatle 31fcfefbfd package_deb/ipk: Remap < and > to << and >>
In deb and ipk, < means <=, while > means >=... there is a different
operator << and >> that means < and >, so we map them when constructing
the packages.

(From OE-Core rev: bbcc78d8ff03725ce5b3b65ce24025c3da45f2ab)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:51 +01:00
Andrei Gherzan 42d91a7db4 Replace "echo -e" with "printf" to have the same behavior in dash or bash
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define
any options and furthermore allows 'echo -e' to be the default behavior.
This means that in dash 'echo -e' will actually print '-e' and interpret
backslashes by default. We use instead 'printf' builtin command with or
without '\n' to simulate 'echo -e' or 'echo -n'.
'printf' needs format while 'echo' can be used without any arguments. So
'echo >' was replaced by 'printf "" >'.
'echo' without '-n' flag adds a new line by default so to keep the same
behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is
used.

[YOCTO #3138]

(From OE-Core rev: a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 13:33:50 +01:00
Paul Eggleton d9a0e081e6 classes/package_deb: add PackageArch field
If we want to query the PACKAGE_ARCH from the installed package (as we
do in order to be able to do a pkgdata lookup for example) then we need
to have this stored in its own field as this is not always the same as
the Architecture field for deb packages.

(From OE-Core rev: 3f4f6726646e18ae21919e2f361b669332796aef)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:40:47 +01:00
Richard Purdie bfd279de32 Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Mark Hatle 9870fbc9f8 Fix manual log file paths
When a recent change, the path to log files may be contained within an
arbitrary directory.  To generate the manual log files in the correct path
we should be using the ${BB_LOGFILE}'s path instead of always assuming the
logs go into ${WORKDIR}/temp.

(From OE-Core rev: 779db325d407f0bade84572ef99fdad4d0c88011)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:54:57 +01:00
Richard Purdie 91a077282f package_deb: When searching for E:, anchor expression
If we don't do this it will match on expressions like "NOTE:" which
are not fatal errors.

(From OE-Core rev: 8f4e160ce0b0c755545d62b06db14decd45b9f1e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-02 16:47:45 +01:00
Robert Yang e40995e569 meta: replace os.system with subprocess.call
Replace os.system with subprocess.call since the older function would
fail (more or less) silently if the executed program cannot be found

More info:
http://docs.python.org/library/subprocess.html#subprocess-replacements

[YOCTO #2454]

(From OE-Core rev: a07d03cc6f67c88feb9813ae7deb6e4a93552dfe)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:45 +01:00
Richard Purdie a246af9bf7 package.bbclass: Drop EXPORT_FUNCTIONS use against mapping_rename_hook
The usage of this function renaming and it being called using
bb.build.exec_func() causes needless indirection loops, confusing log
files and seems generally pointless.

This simplification makes the process much simpler and faster. I can't
come up with a good reason why the export_functions functionality is
needed for this function.

(From OE-Core rev: 74daad03ca29a03b0005f7d2b90a0347d5b583a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 18:03:31 +01:00
Paul Eggleton 91a77020eb classes/package_deb: create .gz index instead of .bz2
apt is looking for Packages.gz files instead of the .bz2 files we are
currently creating and failing when they cannot be found. It is not
immediately obvious how to make the current version use the .bz2
indexes; thus create .gz indexes for now which allows us to
successfully create images.

Tested on both a Fedora 14 and an Ubuntu 11.10 host machine.

Fixes [YOCTO #1858].

(From OE-Core rev: 518f4af617f91b209086acb51454393147aa92dd)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 12:08:14 +01:00
Andreas Oberritter 8b797c6b6e package_{deb,ipk,rpm}: apply umask to files generated in do_package_write_{deb,ipk,rpm}
* Explicitly set umask to 022. Otherwise the build system's
  umask may leak into the image.

(From OE-Core rev: d2a54427481856238bdfec9723cf575088320512)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-04 17:17:51 +01:00
Richard Purdie b1aeaa8b0d meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)
sed \
 -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
 -i `grep -ril bb.data.expand *`

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:23:53 -08:00
Richard Purdie d01dadfb87 meta/classes: Convert to use appendVar and appendVarFlags
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:22:36 -08:00
Richard Purdie 0a434ac101 getVar/setVar cleanups
Complete the bb.data.getVar/setVar replacements with accesses
directly to the data store object.

(From OE-Core rev: 2864ff6a4b3c3f9b3bbb6d2597243cc5d3715939)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-27 10:25:34 +00:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Dexuan Cui 23773a899b deb packages support: switch from /var/dpkg to /var/lib/dpkg
[YOCTO #1086]

The pach was backported from OE:
http://git.openembedded.net/cgit.cgi/openembedded/commit/?id=41e0fbf792037f249d1b8d283b3de81718887c9f

(From OE-Core rev: d1e6f49a6473df3c626100ba01b27485f735c33b)

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-21 13:42:49 +01:00
Dexuan Cui c2bbc59b21 package_deb.bbclass, populate_sdk_deb.bbclass: fix meta-toolchain-gmae build
[YOCTO #1070]

Currently with deb packaging, we have 2 issues when running
"bitbake meta-toolchain-gmae".

1) when MACHINE="qemux86", SDKMACHINE="i686", INSTALL_BASEARCH_DEB is "i686",
too. This causes the following ERROR:
| E: Couldn't find package task-sdk-host-nativesdk
NOTE: package meta-toolchain-gmae-1.0-r6: task do_populate_sdk: Failed

This is becasue: due to the DPKG_ARCH mapping, we create such a deb package
tmp/deploy/deb/i686-nativesdk/task-sdk-host-nativesdk_1.0-r10_i386.deb; dpkg
can't recoginze the package. We need to map INSTALL_BASEARCH_DEB in the same
way.

2) when MACHINE="qemux86", SDKMACHINE="x86_64", INSTALL_BASEARCH_DEB is
"x86_64", too.
We get such an ERROR:
| E: Couldn't find package task-cross-canadian-i586
NOTE: package meta-toolchain-gmae-1.0-r6: task do_populate_sdk: Failed

This is because: dpkg can't recognize the generated package
tmp/deploy/deb/x86_64-nativesdk/task-cross-canadian-i586_1.0-r0_i386.deb
Here the "i386" suffix is incorrect and should be "x86_64" -- the i386
comes from the line
DPKG_ARCH_i586 ?= "i386" in package_deb.bbclass.
However, for canadian package, actually here the overriding of DPKG (from
"x86-64" to "i386") should not happen -- it accidently happens just because
TARGET_ARCH exists in OVERRIDES. We can move the overriding logic to the
anonymous python function to work this around.

(From OE-Core rev: 63010b9ee89643c8e83656783231f0a7848d9e45)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-15 11:23:56 +01:00
Dexuan Cui f6bebe501b package_deb.bbclass: put the stderr into log.do_xxx-attemptonly.xxx
Currently the stderr msgs go into log.do_rootfs and can cause a fatal failure
in "log_check rootfs".

However, the err msg could be spurious since we *only attempt* to install the
the packages, which may not exist actually. E.g., without this patch, we can
get a fatal ERROR due to
E: Couldn't find package task-core-tools-dev.

(From OE-Core rev: 5f00bda874ccaebdb00714b5cb5227462d43f8fb)

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-07 22:54:15 +01:00
Mark Hatle f9da3c269f bitbake.conf: Add SDK_PACKAGE_ARCHS
Add SDK_PACKAGE_ARCHS to avoid the sed operations we were previously doing
inside of the variouns populate_sdk functions and related items.

Also add documentation to populate_sdk to explain when the various functions
are expected to be doing.

Finally fix a bug in populate_sdk_rpm where the wrong value was being set,
noticed while working on this change.

(From OE-Core rev: 587c1d5bac71fa6faa65ee3a271391cbf931e8f7)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-02 14:32:11 +01:00
Koen Kooi 6243fb5004 package_{deb, rpm, ipk}.bbclass: fix 'lingusa' typo
(From OE-Core rev: 5e22d7d1fea7dfb14380de5692e4b2940781b518)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-01 14:16:56 +01:00
Lianhao Lu 16f06f7135 classes/package_xxx.class: Use PKGE/PKGV/PKGR.
Use PKGE/PKGV/PKGR to build various package feed in tasks of pacakge_write_xxx.

(From OE-Core rev: c2872315905fcdf6e4bf11fe96e5ca62af3475f8)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:49 +01:00
Dexuan Cui 9fbd9b93ae package-index.bb: add support for deb and rpm.
[YOCTO #1024]
Currently package-index.bb only supports ipk. This commit adds the support
for rpm and deb, too.

------------------------------
How to generate and use repos:

1) run "bitbake package-index" after building some target,
e.g., core-image-sato-sdk;

2) export ${DEPLOY_DIR_RPM}, ${DEPLOY_DIR_IPK} and ${DEPLOY_DIR_DEB} by a
webserver on the host, assuming the host IP is 192.168.7.1, at
http://192.168.7.1/rpm
http://192.168.7.1/ipk
http://192.168.7.1/deb

3) inside the target, according to the packaging system (rpm, ipk or deb) used
when we generate the target image, we can use different ways to manage
packages:

3.1) RPM
    run "zypper addrepo http://192.168.7.1/rpm main; zypper refresh"
    to retrieve info about the repo; next, we can use "zypper install/remove"
    to manage packages.

3.2) IPK
    add the repo info into opkg config file, i.e., in
    /etc/opkg/arch.conf, we can add something like
    "src i586 http://192.168.7.1/ipk/i586", and next, we run "opkg update" to
    make opkg update the list of available packages. And later, we can use
    "opkg install/remove" to manage packages.

3.3) DEB
    Currently in target, some important config files, like
/var/lib/dpkg/status and /etc/apt/sources.list, for deb/apt are missing. So
we can't install/remove package in target at present.

(From OE-Core rev: 01e34bdb43e0cc27c1cfffd6730c384f40c404c1)

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20 12:40:44 +01:00
Richard Purdie 9a28ad6b02 package_deb.bbclass: Place the whole task under fakeroot context to fix build failures
If we don't do this, the ipk/rpm backends can create temporary files and then
when the deb package creates new files, those inodes can be reused and permission
confusion results.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-22 10:53:25 +00:00
Lianhao Lu f23e67f172 rootfs_deb/package_deb.bbclass: move func from rootfs_deb to package_deb
package_deb.bbclass:
1. Added new function package_update_index_deb() to generate package
index files.

2. Added new function package_install_internal_deb() to install a list
deb packages to a specified root directory, with the specified package
architecutre information.

rootfs_deb.bbclass:
Used the above new functions to install the rootfs.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-02-01 23:59:37 +00:00
Lianhao Lu 5b7e96d852 image/package_xx/rootfs_xx.bbclass: move rootfs_xx_log_check().
Move function rootfs_xx_log_check() from rootfs_xx.bbclass to relevant
package_xx.bbclass. (Where xx is rpm/ipk/deb).

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-01-31 16:58:15 +00:00
Richard Purdie 070b7ee367 package_deb: Remove access to the D directory which isn't used and might not exist (same problem as the previous patch to package_ipk fixes)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-21 16:47:01 +00:00
Richard Purdie ab718b337c package_deb: The packaging command itself is run under fakeroot so these lines are totally unneeded
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 23:05:45 +01:00
Richard Purdie 48b42dae51 classes: Only enable fakeroot on setscene tasks with packaging
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 16:34:06 +01:00
Richard Purdie 36f1ae42fe pseudo/fakeroot: Move the pseudo directory creation into bitbake
If sstate was used to accelerate a build, the pseudo directory might not have
been created leading to subsequent task failures.

Also, sstate packages were not being installed under pseudo context meaning
file permissions could have been lost.

Fix these problems by creating a FAKEROOTDIRS variable which bitbake ensures
exists before running tasks and running the appropriate setscene tasks under
fakeroot context.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 13:00:40 +01:00