summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* .gitignore: Fix ignore of stamp-h1Paul Barker2013-12-201-3/+2
| | | | | | | stamp-h1 moved with config.h to the top source directory but the ignore was still for libopkg/stamp-h1 Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* NEWS: Updated for 0.2.1 releasePaul Barker2013-12-171-0/+10
| | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* CONTRIBUTING: New guidelines for contributorsPaul Barker2013-12-171-0/+155
| | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* README: Updated with link to git repositoryPaul Barker2013-12-171-0/+1
| | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* ChangeLog: Update for the move to gitPaul Barker2013-12-171-1/+1
| | | | | | We now reference `git log` not `svn log`. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* AUTHORS: Update and merge CONTRIBUTORS filePaul Barker2013-12-172-37/+47
| | | | | | | The AUTHORS file is converted to Markdown format so that it can be easily rendered into other formats like HTML as required. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* .gitignore: Update for movement of config.hPaul Barker2013-12-171-2/+4
| | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* libopkg: cleanup inside the public header filesCarsten Schoenert2013-12-1736-107/+96
| | | | | | | | | | | | No functional changes! Just a cleanup like whitespaces, blank lines, tabs and reformating lines longer 76 characters. Also adding the missed comments at the closing bracket from the #ifndef HEADER_FOO_H ... #endif loop. This helps to identify the associated preprocessor elements like theay already exits in some files. Signed-off-by: Carsten Schoenert <c.schoenert@gmail.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* libopkg: ensure symbol name mangling for C++Carsten Schoenert2013-12-1738-0/+299
| | | | | | | | | Users who use C++ code for theirs application have always to include external C functions with a 'extern "C" { }' assignment. We can take that need from the user by putting thees assignments into the public header files. Signed-off-by: Carsten Schoenert <c.schoenert@gmail.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* Revert "Makefile.am: Remove libopkg/config.h from distribution archive"Paul Barker2013-12-171-9/+0
| | | | | | | | This reverts commit 1626f26e15b0e52fde34348f36e114a954a66565. The 'opkg-dist' and 'opkg-distdir' targets are no longer needed. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* config.h: remove needless inclusion in the libopkg header filesCarsten Schoenert2013-12-173-5/+0
| | | | | | | | | | There is no usage of variables from config.h inside the libopkg header files. If so it's wrong because the header files from the libopkg directory are installed to the target system and there is no config.h inside the installed directory. Signed-off-by: Carsten Schoenert <c.schoenert@gmail.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* configure.ac: moving config.h to $(top_srcdir)Carsten Schoenert2013-12-171-1/+1
| | | | | | | | The generated config.h header doesn't belong to the libopkg directory so we can move it out there. Signed-off-by: Carsten Schoenert <c.schoenert@gmail.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* libopkg: Don't install opkg_pathfinder.hPaul Barker2013-12-171-1/+42
| | | | | | | | | | opkg_pathfinder.h is an internal header and shouldn't be used by applications which link against libopkg. It is much simpler to make this decision and allow the header to check flags defined in config.h than to make it independent of config.h. Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Cc: Carsten Schoenert <c.schoenert@gmail.com>
* libopkg: Drop config checks from structures in headersPaul Barker2013-12-173-9/+8
| | | | | | | | | Ensure that all structures are always the same size, regardless of configuration options so that applications which use libopkg don't need to be rebuilt if configuration options are changed. Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Cc: Carsten Schoenert <c.schoenert@gmail.com>
* opkg_download: Drop config check from headerPaul Barker2013-12-172-3/+10
| | | | | | | | | | The function 'opkg_curl_cleanup' is unconditionally defined in the header and is implemented as an empty stub in the source file if curl is not enabled. This allows us to present a consistent API regardless of the configure options used to build opkg. Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Cc: Carsten Schoenert <c.schoenert@gmail.com>
* configure.ac: Bump version to 0.2.1-SNAPSHOTPaul Barker2013-12-171-1/+1
| | | | | | | This ensures that git checkouts report a different version to the release tarball. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* NEWS: Added release notes for v0.2.0v0.2.0paul.betafive@gmail.com2013-09-131-0/+5
| | | | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/branches/opkg-0.2.x@704 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Bump version to 0.2.0paul.betafive@gmail.com2013-09-131-1/+1
| | | | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/branches/opkg-0.2.x@703 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* NEWS: Added release notes for v0.2.0-rc2v0.2.0-rc2paul.betafive@gmail.com2013-08-171-0/+6
| | | | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/branches/opkg-0.2.x@665 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Bump version to 0.2.0-rc2paul.betafive@gmail.com2013-08-171-1/+1
| | | | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/branches/opkg-0.2.x@664 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Makefile.am: Remove libopkg/config.h from distribution archivepaul.betafive@gmail.com2013-08-171-0/+9
| | | | | | | | | | | | A new target is added, opkg-dist, which creates a .tar.gz distribution archive without the file libopkg/config.h. This is a bit of a hack and is a temporary solution. The real solution will be to ensure config.h is not installed and not needed by public API headers. Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/branches/opkg-0.2.x@663 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Bump version to 0.2.0-rc1v0.2.0-rc1paul.betafive@gmail.com2013-08-151-1/+1
| | | | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/branches/opkg-0.2.x@658 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Branch for v0.2 release seriespaul.betafive@gmail.com2013-08-150-0/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/branches/opkg-0.2.x@657 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg_install.c: Fix typopaul.betafive@gmail.com2013-08-111-1/+1
| | | | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/trunk@656 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* NEWS: Added initial release notes for 0.2.0-rc1paul.betafive@gmail.com2013-08-101-0/+29
| | | | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/trunk@655 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Makefile.am: Add missing files to EXTRA_DISTpaul.betafive@gmail.com2013-08-101-1/+1
| | | | | | | | | Important files were missing in the distribution directory after 'make distdir', adding them to EXTRA_DIST fixes this. Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/trunk@654 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* configure.ac: Revert accidental change to config header pathpaul.betafive@gmail.com2013-08-051-1/+1
| | | | | | | | | The change to the AC_CONFIG_HEADERS line shouldn't have been part of the previous commit. Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/trunk@653 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* sha256: Switch to GPLv2+ codepaul.betafive@gmail.com2013-08-053-50/+39
| | | | | | | | | There's no need to use a GPLv3+ licensed sha256 implementation when a GPLv2+ licensed implementation exists in coreutils-6.9. Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/trunk@652 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Replace obsolete automake macropaul.betafive@gmail.com2013-08-021-1/+1
| | | | | | | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/trunk@651 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Apply patch by Paul Barker <paul@paulbarker.me.uk>florian.boor@gmail.com2013-06-281-1/+1
| | | | | | | | | | | | | Fix libopkg header installation. When opkg is built outside the source directory, libopkg headers aren't all installed as the search path for headers only includes the directory that make is being ran in, not the source directory. So we fix this by adding $(srcdir)/*.h to the list of header files to install. git-svn-id: http://opkg.googlecode.com/svn/trunk@650 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* update-alternatives: use 'ln -n'pixdamix@gmail.com2012-11-221-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the '-n' option (--no-dereference) is a better way to solve the do-not-link-into-directory issue. Using only 'ln -sf' can cause problems on SELinux enabled hosts when target is inaccessible; e.g. when preparing an offline rootsystem: | $ cd <offline root> | $ ln -sf /lib/systemd/systemd sbin/init # alternative #1 | $ ln -sf /bin/busybox sbin/init # alternative #2 | ln: accessing `sbin/init': Permission denied | | --> strace: | brk(0) = 0x102b000 | stat("sbin/init", 0x7fffaa91c900) = -1 EACCES (Permission denied) | ... | exit_group(1) = ? Now with '-n': | $ ln -snf /bin/busybox sbin/init | lstat("sbin/init", {st_mode=S_IFLNK|0777, st_size=20, ...}) = 0 | lstat("sbin/init", {st_mode=S_IFLNK|0777, st_size=20, ...}) = 0 | stat("/bin/busybox", 0x7fff8c1a3bd0) = -1 ENOENT (No such file or directory) | symlink("/bin/busybox", "sbin/init") = -1 EEXIST (File exists) | unlink("sbin/init") = 0 | symlink("/bin/busybox", "sbin/init") = 0 The '-n' flag is well supported (coreutils have it at least since 1999, busybox at least since 0.60.3 (2002)) and it obsoletes the explicit check whether target is a directory. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> git-svn-id: http://opkg.googlecode.com/svn/trunk@649 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Do not call sync wen installing into an offline rootpixdamix@gmail.com2012-11-221-1/+2
| | | | | | | | | When installing into an offline root, calling sync() is pointless and just hurts performance. Don't let's do that. Signed-off-by: Phil Blundell <philb@gnu.org> git-svn-id: http://opkg.googlecode.com/svn/trunk@648 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't print provides if nothing is providedpixdamix@gmail.com2012-11-221-1/+2
| | | | | | | | | | | | | Every package provides itself. While printing package information all fields are printed only if there is any relevant info for them. For example: a package with no "Replaces" won't get this printed at all. Packages which provide only themselves, were printing this field but with no values. This patch skips this field if the package provides only itself. Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> git-svn-id: http://opkg.googlecode.com/svn/trunk@647 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix: RRECOMMENDS and RDEPENDS being basically the samepixdamix@gmail.com2012-11-221-2/+1
| | | | | | | | | | | | | | | While removing a package with opkg, the process shouldn't be blocked if another package RECOMMENDS the package wanted to be removed. This is because, while generating the dependencies, opkg adds dependencies to depended_upon_by even if dependency's type is RECOMMEND. The fix is to skip dependencies of type RECOMMEND while constructing depended_upon_by. Bug info: https://bugzilla.yoctoproject.org/show_bug.cgi?id=2431 Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> git-svn-id: http://opkg.googlecode.com/svn/trunk@646 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* pkg_depends: fix version_constraints_satisfiedpixdamix@gmail.com2012-11-221-1/+2
| | | | | | | | | | | | | * with Package: a Version: 1 and Conflicts: a (<< 1) we have comparison == 0, but constraint EARLIER is not satisfied! Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@645 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* pkg_depends: fix version constraintspixdamix@gmail.com2012-11-223-51/+59
| | | | | | | | | | | | * factor parsing version constraint to str_to_constraint and use that from pkg (pkg_version_satisfied) and also pkg_depends (parseDepends) * fix constraint_to_str(), for EARLIER and LATER it was using '<' and '>' which is parsed later as EARLIER_EQUAL and LATER_EQUAL * show notice when deprecated '<' or '>' is used Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@644 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add the --prefer-arch-to-version optionpixdamix@gmail.com2012-11-223-3/+25
| | | | | | | | | | | If there were more than one candidate which had the same pkg name in the candidate list, for example, the same pkg with different versions, then it would use the last one which was the highest version one in the past, but it will use the higher arch priority when this option is specified. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@643 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* merge newpkg->provides even when oldpkg->provides existedpixdamix@gmail.com2012-11-221-4/+2
| | | | | | | | | | | | | | | | | | | | | * introduced in http://code.google.com/p/opkg/source/diff?spec=svn277&r=277&format=side&path=/trunk/libopkg/pkg.c * the problem happens when oldpkg provide 1 and newpkg provide 2 provides_count is merged to 2, but oldpkg->provides has only 1 entry causing SIGSEGV: pkg_formatted_field (fp=fp@entry=0x1444ce0, pkg=pkg@entry=0x120c620, field=<optimized out>, field@entry=0x7ffff7bd2abe "Provides") at pkg.c:739 739 fprintf(fp, "%s %s", i == 1 ? "" : ",", (gdb) bt #0 pkg_formatted_field (fp=fp@entry=0x1444ce0, pkg=pkg@entry=0x120c620, field=<optimized out>, field@entry=0x7ffff7bd2abe "Provides") at pkg.c:739 #1 0x00007ffff7bc32fc in pkg_print_status (pkg=0x120c620, file=0x1444ce0) at pkg.c:887 #2 0x00007ffff7bbff59 in opkg_conf_write_status_files () at opkg_conf.c:400 #3 0x00007ffff7bbad8a in write_status_files_if_changed () at opkg_cmd.c:65 #4 0x00007ffff7bbb73e in opkg_upgrade_cmd (argc=<optimized out>, argv=<optimized out>) at opkg_cmd.c:577 #5 0x00007ffff7bbbcc2 in opkg_cmd_exec (cmd=cmd@entry=0x7ffff7dda080, argc=argc@entry=1, argv=argv@entry=0x7fffffffe768) at opkg_cmd.c:1319 #6 0x000000000040165f in main (argc=3, argv=0x7fffffffe758) at opkg-cl.c:377 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@642 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* detect circular dependenciespixdamix@gmail.com2012-11-225-2/+13
| | | | | | | | | | | Add logic to detect circular dependencies. If we see any dependency from any given parent twice, ignore it the second time and print a notice message that we did so. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@641 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Do not read /etc/opkg/*.conf if -f is specifiedpixdamix@gmail.com2012-11-221-27/+28
| | | | | | | | | | | If a configuration file is specified on the command line, we should assume it contains all of the configuration and not try to read the configuration in /etc/opkg. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@640 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Failed postinst script is not fatal with conf->offline_rootpixdamix@gmail.com2012-11-223-4/+9
| | | | | | | | | | | | When we have an offline root and have specified force-postinstall, attempt to run the postinstall but if it fails, just leave it in the status file as needing to run. We can issue a NOTICE this is happened but supress errors. This means the OE class doesn't have to do any further post processing of the postinstalls itself. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@639 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix dependency issues for preinst scriptspixdamix@gmail.com2012-11-223-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a problem with dependency order when installing packages. The key problem revolves around the satisfy_dependencies_for() function which is called from opkg_install_pkg just before the installation (and preinst) happens. The satisfy_dependencies_for() function calls pkg_hash_fetch_unsatisfied_dependencies() which will only return packages which were previously not marked as *going* to be installed at some point. For the purposes of opkg_install_pkg() we really need to know which dependencies haven't been installed yet. This patch adds pkg_hash_fetch_satisfied_dependencies() which returns a list of package dependencies. We can then directly check the status of these and ensure any hard dependencies (not suggestions or recommendations) are installed before returning. Consider the situation (where -> means 'depends on'): X -> A,E A -> B,E E -> B B -> C Currently X would install A and E. When installing A the packages B, E and C would be marked as "to install". When the package B is considered the second time (as a dependency of E rather than A), it would install straight away even though C was not currently installed, just marked as needing to be installed. The patch changes the behaviour so B can't install until C really is installed. This change is required to run the postinst scripts in the correct order. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@638 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Ensure we use the uname/gname fields when extracting tarballspixdamix@gmail.com2012-11-221-2/+47
| | | | | | | | | | | | When updating packages on the target device we ideally want to match user and group numbers from the existing file system. This patch encourages opkg to lookup the uname/gname fields first and only use the hardcoded numerical values if that fails. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@637 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* add opkg_compare_versions functionpixdamix@gmail.com2012-11-222-0/+16
| | | | | | | | | * not used in opkg but can be usefull, e.g. instead of opkg-utils/opkg-compare-versions.c Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@636 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fixed opkg losing auto_installed flag on upgradingpixdamix@gmail.com2012-01-191-0/+3
| | | | | | Thanks-to: Christian Hitz <christian.hitz@aizo.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@635 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* testcase displaying the loss of the auto-installed flagpixdamix@gmail.com2012-01-194-1/+81
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@634 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add tests for issue 84 and issue 85.graham.gower@gmail.com2011-10-273-2/+75
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@633 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Use a default Version and Architecture in the event that none is specified.graham.gower@gmail.com2011-10-2311-25/+32
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@632 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix issue45.py to work after changes in r627.graham.gower@gmail.com2011-10-231-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@631 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix a possible double-free of pkg vectors in opkg_remove_dependent_pkgs(), ↵google@wwsnet.net2011-10-141-3/+1
| | | | | | remove the inner free as it another free occurs anyway immediately after leaving the loop git-svn-id: http://opkg.googlecode.com/svn/trunk@630 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358