Commit Graph

54 Commits

Author SHA1 Message Date
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
Richard Purdie 00a96a2099 package_deb: Fix a typo meaning the debian packaging was not running in the fakeroot evnironment
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 12:59:54 +01:00
Mark Hatle b2f2590e6c Add Summary/Description support to packaging
[BUGID #281]

Add the ability for the deb, ipk and rpm classes to use the new summary
and description fields.  The Description is wrapped around 75 characters
to ensure a reasonably nice, presentable description.

(Summary defaults to the description if Summary is not defined.)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-10-11 22:13:14 +01:00
Richard Purdie 2d93cb0a0d Revert "classes: Disable setscene tasks for initial testing"
This reverts commit 084ec86402.
2010-10-05 22:26:33 +01:00
Richard Purdie e6566322bd meta/classes: Fix whitespace mismatch and broken functions
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-31 12:02:24 +01:00
Richard Purdie 084ec86402 classes: Disable setscene tasks for initial testing
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19 22:36:26 +01:00
Richard Purdie 3c539be84c package_*.bbclass: Always run these tasks under fakeroot
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19 22:36:26 +01:00
Joshua Lock 0769e847cb package_(deb|rpm): Update to use packaged-staging2
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-08-19 20:06:25 +01:00
Richard Purdie b18f1216b0 package_deb.bbclass: Make sure the controldir is always cleaned out
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-22 18:26:54 +01:00
Joshua Lock 29d5edffb0 Use pseudo rather than fakeroot for fake root privileges
Make use of the ability to configure the fake root provider and use Wind
River's pseudo utility.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-16 15:40:32 +01:00
Richard Purdie 4d4b7922b1 package_*.bbclass: Only set pkg in overrides. These are the only values we're interested in expanding and this makes sure we obtain the expected data
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-07 12:53:46 +01:00
Richard Purdie 1497af07fa Revert "classes/package_ipk|_deb|_rpm.bbclass: Fix setting of OVERRIDES when packaging"
This reverts commit 3abe7a0624 which was incorrect
in some assumptions about OVERRIDE handling order.
2010-07-07 12:15:11 +01:00
Richard Purdie 968d00de15 package_deb.bbclass: Fix packaging functions to use versioned dependency package functions correctly
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 00:06:50 +01:00
Joshua Lock 3abe7a0624 classes/package_ipk|_deb|_rpm.bbclass: Fix setting of OVERRIDES when packaging
The OVERRIDES variable was being incorrectly set with the end result of the
runtime dependencies of the package not being encoded in it's package metadata.

This broke opkg-native in meta-toolchain.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-01 16:14:21 +01:00
Richard Purdie 99d883f81a classes/package_ipk|_deb.bbclass: Make sure versions correctly make it into output packages
The version information part of package dependency strings was not ending up
in the output packages correctly. This patch fixes this and ensures the version
information isn't lost.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-06-30 09:48:59 +01:00
Richard Purdie b772c8cde5 bitbake.conf/base.bbclass: Rename the staging directory to sysroots and the populate_staging task to populate_sysroot
This change makes the purpose of the staging directory more obvious and
the taskname more true to what it now actually does.

The layout version number is increased due to the change in layout
but code to convert existing directories and insert a symlink for
backwards compatibility is included.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:42 +00:00
Richard Purdie c54117458a classes: Remove and sanitise import statements
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:28 +00:00
Richard Purdie be10b46b73 base.bbclass: Use explode_deps from bb.utils and remove the obsolete base.bbclass version 2009-02-05 23:54:11 +00:00
Richard Purdie c87b3a87aa package_ipk/package_deb.bbclass: Make sure control files are properly removed fixing problems with files leaking into packages. Use core bitbake function for directory pruning
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5066 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-08-18 07:58:39 +00:00
Richard Purdie bfe8092d3b poky-image.bbclass: Correctly handle inserting package-managers into images by making it an image feature
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4517 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-05-20 14:58:34 +00:00
Marcin Juszkiewicz d862b5758c package_{ipk|deb|tar|rpm): append depend-tasks instead of overwriting
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3265 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-28 20:01:41 +00:00
Richard Purdie 1d01a5ef00 package_{ipk|deb}.bbclass: Remove hardcoded install path reference
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3224 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-24 23:05:05 +00:00
Richard Purdie c065977948 classes: Use internal bitbake functions and fix packaging unlocking on error paths
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3222 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-24 14:55:57 +00:00
Richard Purdie 19c7b21fbc package_deb.bbclass: Fix hardcoded apt.conf path, add depends on run-postinsts package for deb images
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3118 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-12 11:11:48 +00:00
Richard Purdie f2287f417a package_deb.bbclass: Create DPKG_ARCH to allow mapping between debian archs and Poky ones
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2817 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-27 20:26:26 +00:00
Richard Purdie 8af3726ad5 package_(ipk|deb).bbclass: Rename do_packages stamp to be clearer about what it does
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2814 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-27 11:48:36 +00:00
Richard Purdie 63b739f0fe classes: Sync various tweaks from OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2643 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-01 23:49:12 +00:00
Richard Purdie e93df891ad package_ipk/deb.bbclass: Add locking for package creation to stop conflicts
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2557 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-24 16:50:56 +00:00
Richard Purdie 9bb91785c9 package.bbclass: Add back package_write task in a new form
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2535 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-21 22:39:57 +00:00
Richard Purdie 48fd37f5f9 packaging: Split deb and ipk creation into separate tasks so changing the packaging type means the new type of packages are automatically generated.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2526 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-21 09:37:30 +00:00
Richard Purdie 4ab9c749a0 package_deb/rootfs_deb.bbclass: Add fix from OE, add copyright notice
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2377 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-07 14:34:33 +00:00
Richard Purdie c9dc5f07a7 classes/conf: Merge missing package epoch (PE) support (from OE), also make OE package field sane
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1839 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-05-31 22:51:19 +00:00
Richard Purdie 409335beae classes: Rework core dependencies to work properly at the task level
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1427 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-04-03 11:31:02 +00:00
Richard Purdie ee221cdbdd package_deb.bbclass: Make sure permissions on control directory are correct
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1417 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-03-31 14:04:49 +00:00
Richard Purdie b7880fab82 package_deb.bbclass: dpkg-deb needs to run under fakeroot to set ownership correcting in resulting packages
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@975 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-29 10:50:33 +00:00
Richard Purdie 4f249a8efb Fix STAGING_BINDIR for multimachine use by spliting into STAGING_BINDIR and STAGING_BINDIR_NATIVE and adding both to PATH
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@958 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-25 10:01:30 +00:00