| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Calling rmdir() on a symlink to a directory won't work so check whether
something is a symlink before adding to to the list of installed dirs.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
|
|
|
|
|
|
| |
This function should be pretty self explanatory
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
|
|
|
|
|
|
|
|
| |
If pkg->architecture is NULL, the message "no valid architecture" is correct.
However if pkg->architecture is not NULL but pkg->arch_priority is zero, then
the architecture is valid but is not compatible with the current system.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
|
|
|
|
|
|
|
| |
This function is tidied up and handling for force_reinstall is added so that the
correct message is printed.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The best way to handle force_reinstall is to make the reinstall look like an
upgrade - because we already have a good package upgrade path. With the new
per package force_reinstall flag this is now possible.
In opkg_prepare_url_for_install, we set the per-package force_reinstall flag for
the given package. As this function is only called for packages explicitly
specified as arguments to 'opkg install' or 'opkg_install_package', the flag
will only be applied to the indended packages.
If a package name is given which exists in a package feed then we need to cheat
a little. We lookup the package in the feed and get its local filename and then
act as if that path were given as a URL.
This function is the best place to handle the force_reinstall flag as it is
responsible for setting the package hash table up so that
pkg_hash_fetch_best_installation_candidate_by_name() returns the intended
pacakge.
The old logic in opkg_install_cmd which calls opkg_remove_cmd to remove the
previously installed package is no longer needed and is removed.
This solves issue #71 without causing a regression on issue #51.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
This flag allows two package object to share the same version information but be
distinguishable from each other. It is never stored on disk or reported to the
user but is used when comparing package versions.
A new function, pkg_compare_versions_no_reinstall(), is added to compare
versions without caring about this force_reinstall flag.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
git-svn-id: http://opkg.googlecode.com/svn/trunk@656 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
Thanks-to: Christian Hitz <christian.hitz@aizo.com>
git-svn-id: http://opkg.googlecode.com/svn/trunk@635 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Problem pointed out by akostopou@gmail.com. This needs revisiting.
git-svn-id: http://opkg.googlecode.com/svn/trunk@629 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
|
| |
Maintainer scripts cannot be run in a chroot unless the host system can
run target system binaries. Given this, the feature would be of limited use.
git-svn-id: http://opkg.googlecode.com/svn/trunk@628 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
|
| |
When installing into an offline root, packages should be marked "unpacked"
not "installed". Resolves Issue #82.
git-svn-id: http://opkg.googlecode.com/svn/trunk@627 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a problem that arises when conf->offline_root is
null. The resulting string was "(null)//etc/opkg/trusted.gpg" when it
should have been "/etc/opkg/trusted.gpg".
From Kyle Manna <kyle.manna@gmail.com>.
git-svn-id: http://opkg.googlecode.com/svn/trunk@626 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
|
|
| |
- The problematic case is described by tests/regress/issue79.py
Signed-off-by: Camille Moncelier <moncelier@devlife.org>
git-svn-id: http://opkg.googlecode.com/svn/trunk@625 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
|
|
|
|
| |
Directories are now owned by a particular package, which ensures their
deletion in the event that a package leaves an empty directory during package
removal.
From Roman Khimov <khimov@altell.ru>.
git-svn-id: http://opkg.googlecode.com/svn/trunk@624 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
| |
This decreases the likelihood of a corrupted database due to power loss.
git-svn-id: http://opkg.googlecode.com/svn/trunk@623 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
| |
This breaks compatibility with the previous API, so bump the lib version.
git-svn-id: http://opkg.googlecode.com/svn/trunk@622 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
| |
git-svn-id: http://opkg.googlecode.com/svn/trunk@621 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
| |
git-svn-id: http://opkg.googlecode.com/svn/trunk@620 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
| |
git-svn-id: http://opkg.googlecode.com/svn/trunk@619 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
| |
git-svn-id: http://opkg.googlecode.com/svn/trunk@618 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
|
|
|
|
| |
This avoids multiple downloads in the case where a repository is simply a
mirror of another. The old, uri mangled, filename is still checked to ensure
backwards compatibility with existing caches.
Patch from robert.melchers@gmail.com.
git-svn-id: http://opkg.googlecode.com/svn/trunk@617 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
| |
git-svn-id: http://opkg.googlecode.com/svn/trunk@616 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
| |
git-svn-id: http://opkg.googlecode.com/svn/trunk@615 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
| |
of 'dists' entries for apt-alike repositories
git-svn-id: http://opkg.googlecode.com/svn/trunk@614 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
| |
git-svn-id: http://opkg.googlecode.com/svn/trunk@613 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
| |
git-svn-id: http://opkg.googlecode.com/svn/trunk@612 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
| |
git-svn-id: http://opkg.googlecode.com/svn/trunk@611 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|
|
|
|
|
|
| |
download' message
git-svn-id: http://opkg.googlecode.com/svn/trunk@610 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
|