aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/package_ipk.bbclass
AgeCommit message (Collapse)Author
2015-02-19packaging: allow globs in CONFFILESChen Qi
Allow globs in CONFFILES. This patch changes the way of CONFFILES handling. After this change, the CONFFILES can take the same form as FILES. That means, we don't have to list a bunch of files for CONFFILES. It will just be expanded like the FILES variable. We don't assume default value for CONFFILES in OE. But distro vendors could provide a default value for CONFFILES in their distro configuration file like below. CONFFILES = "${sysconfdir}" In this way, files under /etc are treated as configuration files by default. Of course, setting CONFFILES in recipes take precedence over the CONFFILES. For example, if the recipe author decides that package A should only treat files under ${sysconfdir}/default/ as config files, he/she can write like this. CONFFILES_A = "${sysconfdir}/default" [YOCTO #5200] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06package_ipk.bbclass: Fix SRC_URI whitespace handlingMark Hatle
The SRC_URI may contain whitespace, but be otherwise empty. This can happen in the case: MYSRC = "" MYSRC_arm = "file://myarm.patch" SRC_URI += "${MYSRC}" Unless we strip blank spaces, to determine if it is empty, we can end up generating a "Source: " line which in invalid. This leads to the error: invalid Source: field is speified in the generated CONTROL file Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-17package_ipk.bbclass: Support hierarchical feedPaul Barker
This patch allows for an optional new layout for ipk feed directories which I've called a 'hierarchical feed' and is based on how Debian pools package files. It is disabled by default and is enabled by setting IPK_HIERARCHICAL_FEED to "1". In the traditional feed layout, package files are placed in <outdir>/<arch>/. This can lead to several thousand files existing in a single directory which is often a problem if developers want to upload a package feed to a shared web hosting provider. For example, in my case, listing files via FTP only shows the first 2000 files, breaking my scripts which attempt to upload only new and changed files via FTP. In the hierarchical feed, package files are written to <outdir>/<arch>/<pkg_prefix>/<pkg_subdir>, where pkg_prefix is the first letter of the package file name for non-lib packages or "lib" plus the 4th letter of the package file name for lib packages (eg, 'l' for less, 'libc' for libc6). pkg_subdir is the root of the package file name, discarding the version and architecture parts and the common suffixes '-dbg', '-dev', '-doc', '-staticdev', '-locale' and '-locale-*' which are listed in meta/conf/bitbake.conf. This change relies on recent patches to opkg-utils which support hierarchical package feeds. Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28package_*.bbclass: Simplify addtaskRichard Purdie
The package_write task was previously removed. Remove a remaining superfluous reference to it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-24package: Drop do_package_write taskRichard Purdie
The reasons this task was introduced are lost in the mists of time. It allowed for the a single "package_write" task instead of spelling out the explicit package backends, however in all but one case we do that anyway. As such as might as well give in and delete the task, converting that single reference into explicit dependencies. This gives bitbake a bit less work to to when processing the runqueue since there are less tasks (but more dependencies in some cases). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14package_*.bbclass: remove references to the old bash indexing routinesLaurentiu Palcu
Package indexing is done in python and package-index.bb uses the new routines. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11conf/bitbake.conf: default HOMEPAGE to blank instead of unknownPaul Eggleton
The default value for HOMEPAGE of "unknown" has been in place since the early OE-Classic days, but it doesn't really make sense - "unknown" is not a valid URL and it just means we have to explicitly check for this hardcoded string if we're displaying the value in some form of UI, such as Toaster. This has required some changes to the packaging classes as they previously did not expect the value to be blank. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11Cleanup image,rootfs_ipk,package_ipk bbclass filesLaurentiu Palcu
This commit cleans up the functions that were ported to python. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-02-11package_(deb|ipk).bbclass: remove the stamp when creating package from cacheLaurentiu Palcu
If the packages are created from cache, we need to remove the stamp so that we re-generate the index files at do_rootfs time. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-01-28package_{ipk, deb, rpm}.bbclass: support additional user-defined metadataLeonid Borisenko
Additional metadata from user-defined variable is written into control/spec file of binary package. Three variables are searched for adiitional package metadata: * PACKAGE_ADD_METADATA_<PKGTYPE>_<PN> * PACKAGE_ADD_METADATA_<PKGTYPE> * PACKAGE_ADD_METADATA First found variable with defined value wins. <PN> is a package name. <PKGTYPE> is a distinct name of specific package type: * IPK for .ipk packages * DEB for .deb packages * RPM for .rpm packages Variable can contain multiple [one-line] metadata fields separated by literal sequence '\n'. Separator can be redefined through variable flag 'separator'. In package control/spec file separator is replaced by newline character. Signed-off-by: Leonid Borisenko <ive.found@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-18sstate: Get rid of crazy name mappingRichard Purdie
When originally developed, it was thought a task may have more than one associated sstate archive. The way the code has grown that idea is now not possible or needed. We can therefore assume one sstate archive per task and drop the crazy name mapping code. Simpler is better in this case. The downside is that various sstate archives will change name so this forces a cache rebuild. Given the other sstate changes going in at this time, this isn't really a bad thing as things would rebuild anyway. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-06package_deb/package_ipk: Cleanup control file handling/racesRichard Purdie
If you Ctrl+C ppackage_write_{deb/ipk} control files can get left lying around and make it into another packaging format. This ensures we cleanup all known control files before starting packaging. We can simplify some of the globbing as a result. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-01meta: Don't use deprecated bitbake APIRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22package_ipk: Add support for PACKAGE_EXCLUDEMark Hatle
This uses the new --add-exclude arguments in opkg-cl, to list the excluded packages. If an excluded package is needed for the install to resolve, an error will be generated. Recommended packages will not generate an error. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-22package_ipk: Add support for NO_RECOMMENDATIONSMark Hatle
Uses the opkg --no-install-recommends option. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09package_ipk.bbclass: make DESCRIPTION support newlineRobert Yang
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-07package_*.bbclass: Drop fakeroot from setscene callsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09class/lib: Fix up various file access methodsRichard Purdie
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 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18package_ipk: Ensure the status file existsRichard Purdie
The postinstall for the opkg run-postinst hook checks for the existence of this file. We therefore ensure it always exists during image generation. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23package/populate_sdk: Move functions from package_* to populate_sdk_*Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23classes/buildhistory: implement history collection for SDKsPaul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22package_{ipk, deb, rpm}: drop the TARGET_OS conditionalChristopher Larson
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. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17package_rpm/dev/ipk/tar: Drop unused functionsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17package_rpm/deb/ipk: Error if we don't find packages when creating the ↵Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15package_ipk: check CONFFILES exist before adding them to metadataRoss Burton
opkg-build 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. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-06package_ipk, rootfs_ipk: remove the "set -x"Laurentiu Palcu
Comment the "set -x" lines since these will add a lot of extra, not always necessary, debug messages in the log.do_rootfs. [YOCTO #2599] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-06ipk: use OPKGLIBDIR in all placesMartin Jansa
* it's not recommended to change this value, because it breaks upgrade path on target (all old u-a alternatives are forgot in old OPKGLIBDIR value * but make it consistent, so if someone really want to change that, then setting OPKGLIBDIR_distro in distro.conf would be enough * without this there were at least 4 places to change: rootfs_ipk: opkglibdir variable (notice that I've removed /opkg from it to correspond with EXTRA_OECONF option used in opkg recipes package_ipk: ${target_rootfs}${localstatedir}/lib/opkg/ hardcoded in package_install_internal_ipk opkg-collateral: value in lists file opkg: EXTRA_OECONF for all 3 classes, FILES_libopkg, do_install * validated with buildhistory that without OPKGLIBDIR explicitly set the output is the same and that after setting OPKGLIBDIR_forcevariable := "${libdir}" everything including empty directory from package_ipk is moved to libdir Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2013-01-30package_ipk/deb/rpm: Ensure deploy staging directory is empty before ↵Richard Purdie
rerunning task If we don't do this, stale files can build up, particularly with the PR server. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25Split do_packagedata task from do_packageRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07rootfs_ipk/package_ipk: Simplify opkg commandline option variablesRichard Purdie
The current maze of IPKG_ARGS variables is hard to understand and worse, not even used in some places. This simplifies the code and specifies the options in one place. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03rootfs_ipk, package_ipk: drop --force-overwriteMartin Jansa
* it was introduced in 2010 by 8c3a7ebac8bed700bcc37f778d5a883cfeee8de8 but doesn't seem needed anymore * also such do_rootfs failure is good indication that runtime packages installed are not sane, ignoring this error in do_rootfs just transfers the issue to end user when he does "opkg upgrade" later on device * tested on SHR images with whole feed included and only issue was gstreamer/gst-plugins-* locale packages (and there is patch for this on oe-core ML) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02opkg: Convert select-higher-version option to prefer-arch-to-versionRichard Purdie
This converts the option to maintain the existing behaviour unless the option is specified. We do specify the option during the builds themselves to ensure what the users expects is built. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02classes: Update to use corrected bb.utils.explode_dep_versions2 APIRichard Purdie
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>] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02package_deb/ipk: Remap < and > to << and >>Mark Hatle
In deb and ipk, < means <=, while > means >=... there is a different operator << and >> that means < and >, so we map them when constructing the packages. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26package_ipk: Remove spurious '-i' in grep command for log_checkPhil Blundell
ipk_log_check uses a case-sensitive grep (which is correct) when deciding whether there were any errors or not. But if it decides that there were, it then uses a case-insensitive grep to display them. This results in a large amount of irrelevant and confusing output which makes it hard to see the real errors amongst the noise. Suppress this by removing the unwanted -i. Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20Replace "echo -e" with "printf" to have the same behavior in dash or bashAndrei Gherzan
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] Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-21meta/classes: Various python whitespace fixesRichard Purdie
It was pointed out we have a number of weird indentations in the python functions. This patch cleans up 3, 7 and other weird indentations for the core bbclass files. It also fixes some wierd (odd) shell function indentation which my searches picked up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19package_ipk.bbclass: Fix python whitespaceRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03Fix manual log file pathsMark Hatle
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-05-30meta: replace os.system with subprocess.callRobert Yang
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11package.bbclass: Drop EXPORT_FUNCTIONS use against mapping_rename_hookRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-06package_ipk.bbclass: fixing muttilib prefix extracting.Lianhao Lu
Fixed an error in multilib prefix extracting. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2012-04-06package_ipk: don't generate Packages.filelistMartin Jansa
* it works only with 'new' packages and with fixed opkg-utils it will unpack *all* packages, because filelist doesn't support 'cache' like Packages does Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-04-04package_{deb,ipk,rpm}: apply umask to files generated in ↵Andreas Oberritter
do_package_write_{deb,ipk,rpm} * Explicitly set umask to 022. Otherwise the build system's umask may leak into the image. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
2012-03-08package_ipk.bbclass: Ensure Source is set to something else packaging can failRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta/classes: Convert to use appendVar and appendVarFlagsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-05image-mklibs/package_ipk: Remove bashismsRichard Purdie
We now support using dash but these bashisms triggered build failures for me when using it. This replaces the code with something which works on dash. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-16opkg: Update svn 625 -> 633 and fix preinst issuesRichard Purdie
There is a major issue with opkg images at the moment as preinst functions are not being executed before their dependencies are installed and this is leading to corruption of images containing avahi/dbus in particular. There are various changes in upstream opkg in the last 8 revisions which make changes in this area but sadly these aren't enough to get things working for us. I've updated to the latest svn revision with this patch since it makes sense to pull in those changes first and then supplement them with the attached patches. There is a full description of the patches in the patch headers but in summary they: a) Ensure preinst functions execute with their dependencies installed. This is a pretty invasive change as it changes the package install ordering in general. b) Ensure opkg sets $D, not $PKG_ROOT which we don't use c) Change opkg to allow execution of postinstall functions which fail resulting in execution on the target device as rootfs_ipk.bbclass currently does manually. The remaining changes interface this with the rest of the OE build infrastructure, adding in the option to tell opkg to run the preinst and postinst functions, ensure the correct environment is present for the postinst scripts and removing the now unneeded rootfs_ipk class code which opkg now does itself. [YOCTO #1711] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-26getVar/setVar cleanupsRichard Purdie
Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>