M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
Upstream-Status: Inappropriate [other]
Index: trunk/libopkg/opkg.c
===================================================================
--- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
+++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
@@ -876,3 +876,18 @@
return ret;
}
+
+int
+opkg_compare_versions (const char *ver1, const char *ver2)
+{
+ pkg_t *pkg1, *pkg2;
+
+ pkg1 = pkg_new();
+ pkg2 = pkg_new();
+
+ parse_version(pkg1, ver1);
+ parse_version(pkg2, ver2);
+
+ return pkg_compare_versions(pkg1, pkg2);
+}
+
Index: trunk/libopkg/opkg.h
===================================================================
--- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
+++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
@@ -58,4 +58,6 @@
int opkg_repository_accessibility_check(void);
+int opkg_compare_versions (const char *ver1, const char *ver2);
+
#endif /* OPKG_H */

View File

@@ -0,0 +1,19 @@
Without this, the FILE reference in this header can cause compile issues.
RP - 29/1/10
Upstream-Status: Accepted
Index: trunk/libopkg/pkg_dest.h
===================================================================
--- trunk.orig/libopkg/pkg_dest.h 2010-01-29 09:37:22.000000000 +0000
+++ trunk/libopkg/pkg_dest.h 2010-01-29 09:37:33.000000000 +0000
@@ -18,6 +18,8 @@
#ifndef PKG_DEST_H
#define PKG_DEST_H
+#include <stdio.h>
+
typedef struct pkg_dest pkg_dest_t;
struct pkg_dest
{

View File

@@ -0,0 +1,22 @@
DESCRIPTION = "opkg configuration files"
SECTION = "base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://opkg.conf.comments \
file://lists \
file://dest \
file://src "
do_compile () {
cat ${WORKDIR}/opkg.conf.comments >${WORKDIR}/opkg.conf
cat ${WORKDIR}/src >>${WORKDIR}/opkg.conf
cat ${WORKDIR}/dest >>${WORKDIR}/opkg.conf
cat ${WORKDIR}/lists >>${WORKDIR}/opkg.conf
}
do_install () {
install -d ${D}${sysconfdir}/
install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg.conf
}
CONFFILES_${PN} = "${sysconfdir}/opkg.conf"

View File

@@ -0,0 +1 @@
dest root /

View File

@@ -0,0 +1,2 @@
lists_dir ext /var/lib/ipkg

View File

@@ -0,0 +1,23 @@
# Must have one or more source entries of the form:
#
# src <src-name> <source-url>
#
# and one or more destination entries of the form:
#
# dest <dest-name> <target-path>
#
# where <src-name> and <dest-names> are identifiers that
# should match [a-zA-Z0-9._-]+, <source-url> should be a
# URL that points to a directory containing a Familiar
# Packages file, and <target-path> should be a directory
# that exists on the target system.
# Proxy Support
#option http_proxy http://proxy.tld:3128
#option ftp_proxy http://proxy.tld:3128
#option proxy_username <username>
#option proxy_password <password>
# Offline mode (for use in constructing flash images offline)
#option offline_root target

View File

@@ -0,0 +1,29 @@
DESCRIPTION = "Base configuration files for opkg"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
PACKAGE_ARCH = "${MACHINE_ARCH}"
do_compile() {
mkdir -p ${S}/${sysconfdir}/opkg/
archconf=${S}/${sysconfdir}/opkg/arch.conf
rm -f $archconf
ipkgarchs="${PACKAGE_ARCHS}"
priority=1
for arch in $ipkgarchs; do
echo "arch $arch $priority" >> $archconf
priority=$(expr $priority + 5)
done
}
do_install () {
install -d ${D}${sysconfdir}/opkg
install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
}
FILES_${PN} = "${sysconfdir}/opkg/ "
CONFFILES_${PN} += "${sysconfdir}/opkg/arch.conf"

View File

@@ -0,0 +1,8 @@
require opkg_${PV}.bb
DEPENDS = "curl"
PROVIDES += "opkg"
EXTRA_OECONF += "--disable-gpg"
DEFAULT_PREFERENCE = "-1"

View File

@@ -0,0 +1,10 @@
require opkg_svn.bb
DEPENDS = "curl"
PROVIDES += "opkg"
SRCREV = "596"
EXTRA_OECONF += "--disable-gpg"
DEFAULT_PREFERENCE = "-1"

View File

@@ -0,0 +1,84 @@
DESCRIPTION = "Open Package Manager"
DESCRIPTION_libopkg = "Open Package Manager Library"
DESCRIPTION_update-alternatives-cworth = "Update alternatives"
SECTION = "base"
HOMEPAGE = "http://code.google.com/p/opkg/"
BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://src/opkg-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba"
DEPENDS_virtclass-native = "curl-native"
DEPENDS_virtclass-nativesdk = "curl-nativesdk"
PE = "1"
INC_PR = "r7"
FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/opkg"
# Werror gives all kinds bounds issuses with gcc 4.3.3
do_configure_prepend() {
sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
}
inherit autotools pkgconfig
EXTRA_OECONF += " --disable-gpg \
--disable-openssl \
--disable-ssl-curl \
--disable-curl \
--disable-sha256"
target_localstatedir := "${localstatedir}"
EXTRA_OECONF += "--with-opkglibdir=${localstatedir}/lib"
EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_localstatedir}/lib --disable-gpg --disable-curl --disable-openssl"
EXTRA_OECONF_virtclass-nativesdk = "--with-opkglibdir=${target_localstatedir}/lib --disable-gpg --disable-curl --disable-openssl"
PROVIDES += "virtual/update-alternatives"
RPROVIDES_update-alternatives-cworth += "update-alternatives"
RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg"
RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base"
RDEPENDS_${PN}_virtclass-native = ""
RDEPENDS_${PN}_virtclass-nativesdk = ""
PACKAGE_ARCH_update-alternatives-cworth = "all"
RREPLACES_${PN} = "opkg-nogpg"
PACKAGES =+ "libopkg${PKGSUFFIX}-dev libopkg${PKGSUFFIX}-staticdev libopkg${PKGSUFFIX} update-alternatives-cworth${PKGSUFFIX}"
FILES_update-alternatives-cworth${PKGSUFFIX} = "${bindir}/update-alternatives"
FILES_libopkg${PKGSUFFIX}-dev = "${libdir}/*.la ${libdir}/*.so"
FILES_libopkg${PKGSUFFIX}-staticdev = "${libdir}/*.a"
FILES_libopkg${PKGSUFFIX} = "${libdir}/*.so.* ${localstatedir}/lib/opkg/"
# We need to create the lock directory
do_install_append() {
install -d ${D}${localstatedir}/lib/opkg
}
pkg_postinst_${PN} () {
#!/bin/sh
if [ "x$D" != "x" ]; then
install -d $D${sysconfdir}/rcS.d
# this happens at S98 where our good 'ole packages script used to run
echo "#!/bin/sh
opkg-cl configure
rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
" > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
fi
update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
}
pkg_postrm_${PN} () {
#!/bin/sh
update-alternatives --remove opkg ${bindir}/opkg-cl
}
BBCLASSEXTEND = "native nativesdk"
PKGSUFFIX = ""
PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
# Define a variable to allow distros to run configure earlier.
# (for example, to enable loading of ethernet kernel modules before networking starts)
POSTINSTALL_INITPOSITION ?= "98"

View File

@@ -0,0 +1,88 @@
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.
Upstream-Status: Pending
RP 11/11/11
Index: trunk/libbb/unarchive.c
===================================================================
--- trunk.orig/libbb/unarchive.c 2011-11-11 15:52:59.761674091 +0000
+++ trunk/libbb/unarchive.c 2011-11-11 17:04:56.501574419 +0000
@@ -22,10 +22,13 @@
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <utime.h>
#include <libgen.h>
+#include <grp.h>
+#include <pwd.h>
#include "libbb.h"
@@ -436,6 +439,42 @@
free(ar_entry);
}
+static char uname_cache[32] = "";
+static uid_t uid_cache;
+
+static bool update_unamecache(char *uname) {
+ struct passwd *passwd;
+ if (!uname)
+ return FALSE;
+ if (!uname_cache[0] && strcmp(uname_cache, uname) == 0)
+ return TRUE;
+ passwd = getpwnam(uname);
+ if (passwd) {
+ uid_cache = passwd->pw_uid;
+ strncpy(uname, uname_cache, 32);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static char gname_cache[32] = "";
+static gid_t gid_cache;
+
+static bool update_gnamecache(char *gname) {
+ struct group *group;
+ if (!gname)
+ return FALSE;
+ if (!gname_cache[0] && strcmp(gname_cache, gname) == 0)
+ return TRUE;
+ group = getgrnam(gname);
+ if (group) {
+ gid_cache = group->gr_gid;
+ strncpy(gname, gname_cache, 32);
+ return TRUE;
+ }
+ return FALSE;
+}
+
static file_header_t *
get_header_tar(FILE *tar_stream)
@@ -515,8 +554,14 @@
*/
tar_entry->mode = 07777 & strtol(tar.formated.mode, NULL, 8);
- tar_entry->uid = strtol(tar.formated.uid, NULL, 8);
- tar_entry->gid = strtol(tar.formated.gid, NULL, 8);
+ if (update_unamecache(tar.formated.uname))
+ tar_entry->uid = uid_cache;
+ else
+ tar_entry->uid = strtol(tar.formated.uid, NULL, 8);
+ if (update_gnamecache(tar.formated.gname))
+ tar_entry->gid = gid_cache;
+ else
+ tar_entry->gid = strtol(tar.formated.gid, NULL, 8);
tar_entry->size = strtol(tar.formated.size, NULL, 8);
tar_entry->mtime = strtol(tar.formated.mtime, NULL, 8);

View File

@@ -0,0 +1,36 @@
Upstream-Status: Inappropriate [function not used]
Index: trunk/libopkg/opkg.c
===================================================================
--- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
+++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
@@ -876,3 +876,18 @@
return ret;
}
+
+int
+opkg_compare_versions (const char *ver1, const char *ver2)
+{
+ pkg_t *pkg1, *pkg2;
+
+ pkg1 = pkg_new();
+ pkg2 = pkg_new();
+
+ parse_version(pkg1, ver1);
+ parse_version(pkg2, ver2);
+
+ return pkg_compare_versions(pkg1, pkg2);
+}
+
Index: trunk/libopkg/opkg.h
===================================================================
--- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
+++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
@@ -58,4 +58,6 @@
int opkg_repository_accessibility_check(void);
+int opkg_compare_versions (const char *ver1, const char *ver2);
+
#endif /* OPKG_H */

View File

@@ -0,0 +1,174 @@
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.
Upstream-Status: Pending
RP 2011/12/15
Index: trunk/libopkg/opkg_install.c
===================================================================
--- trunk.orig/libopkg/opkg_install.c 2011-12-15 15:58:39.000000000 +0000
+++ trunk/libopkg/opkg_install.c 2011-12-15 15:58:41.838334788 +0000
@@ -76,6 +77,27 @@
}
if (ndepends <= 0) {
+ pkg_vec_free(depends);
+ depends = pkg_hash_fetch_satisfied_dependencies(pkg);
+
+ for (i = 0; i < depends->len; i++) {
+ dep = depends->pkgs[i];
+ /* The package was uninstalled when we started, but another
+ dep earlier in this loop may have depended on it and pulled
+ it in, so check first. */
+ if ((dep->state_status != SS_INSTALLED) && (dep->state_status != SS_UNPACKED)) {
+ opkg_msg(DEBUG2,"Calling opkg_install_pkg.\n");
+ err = opkg_install_pkg(dep, 0);
+ /* mark this package as having been automatically installed to
+ * satisfy a dependancy */
+ dep->auto_installed = 1;
+ if (err) {
+ pkg_vec_free(depends);
+ return err;
+ }
+ }
+ }
+
pkg_vec_free(depends);
return 0;
}
Index: trunk/libopkg/pkg_depends.c
===================================================================
--- trunk.orig/libopkg/pkg_depends.c 2010-12-22 16:04:43.000000000 +0000
+++ trunk/libopkg/pkg_depends.c 2011-12-15 15:58:41.838334788 +0000
@@ -259,6 +259,88 @@
return unsatisfied->len;
}
+
+pkg_vec_t *
+pkg_hash_fetch_satisfied_dependencies(pkg_t * pkg)
+{
+ pkg_vec_t *satisfiers;
+ int i, j, k;
+ int count;
+ abstract_pkg_t * ab_pkg;
+
+ satisfiers = pkg_vec_alloc();
+
+ /*
+ * this is a setup to check for redundant/cyclic dependency checks,
+ * which are marked at the abstract_pkg level
+ */
+ if (!(ab_pkg = pkg->parent)) {
+ opkg_msg(ERROR, "Internal error, with pkg %s.\n", pkg->name);
+ return satisfiers;
+ }
+
+ count = pkg->pre_depends_count + pkg->depends_count + pkg->recommends_count + pkg->suggests_count;
+ if (!count)
+ return satisfiers;
+
+ /* foreach dependency */
+ for (i = 0; i < count; i++) {
+ compound_depend_t * compound_depend = &pkg->depends[i];
+ depend_t ** possible_satisfiers = compound_depend->possibilities;;
+
+ if (compound_depend->type == RECOMMEND || compound_depend->type == SUGGEST)
+ continue;
+
+ if (compound_depend->type == GREEDY_DEPEND) {
+ /* foreach possible satisfier */
+ for (j = 0; j < compound_depend->possibility_count; j++) {
+ /* foreach provided_by, which includes the abstract_pkg itself */
+ abstract_pkg_t *abpkg = possible_satisfiers[j]->pkg;
+ abstract_pkg_vec_t *ab_provider_vec = abpkg->provided_by;
+ int nposs = ab_provider_vec->len;
+ abstract_pkg_t **ab_providers = ab_provider_vec->pkgs;
+ int l;
+ for (l = 0; l < nposs; l++) {
+ pkg_vec_t *test_vec = ab_providers[l]->pkgs;
+ /* if no depends on this one, try the first package that Provides this one */
+ if (!test_vec){ /* no pkg_vec hooked up to the abstract_pkg! (need another feed?) */
+ continue;
+ }
+
+ /* cruise this possiblity's pkg_vec looking for an installed version */
+ for (k = 0; k < test_vec->len; k++) {
+ pkg_t *pkg_scout = test_vec->pkgs[k];
+ /* not installed, and not already known about? */
+ if (pkg_scout->state_want == SW_INSTALL && pkg_scout != pkg)
+ pkg_vec_insert(satisfiers, pkg_scout);
+ }
+ }
+ }
+
+ continue;
+ }
+
+ /* foreach possible satisfier, look for installed package */
+ for (j = 0; j < compound_depend->possibility_count; j++) {
+ /* foreach provided_by, which includes the abstract_pkg itself */
+ depend_t *dependence_to_satisfy = possible_satisfiers[j];
+ abstract_pkg_t *satisfying_apkg = possible_satisfiers[j]->pkg;
+ pkg_t *satisfying_pkg =
+ pkg_hash_fetch_best_installation_candidate(satisfying_apkg,
+ pkg_installed_and_constraint_satisfied,
+ dependence_to_satisfy, 0);
+ /* Being that I can't test constraing in pkg_hash, I will test it here */
+ if (satisfying_pkg != NULL && satisfying_pkg != pkg) {
+ if (pkg_constraint_satisfied(satisfying_pkg, dependence_to_satisfy) && satisfying_pkg->state_want == SW_INSTALL)
+ pkg_vec_insert(satisfiers, satisfying_pkg);
+ }
+
+ }
+ }
+ return satisfiers;
+}
+
+
/*checking for conflicts !in replaces
If a packages conflicts with another but is also replacing it, I should not consider it a
really conflicts
Index: trunk/libopkg/pkg_depends.h
===================================================================
--- trunk.orig/libopkg/pkg_depends.h 2010-12-22 16:04:43.000000000 +0000
+++ trunk/libopkg/pkg_depends.h 2011-12-15 15:58:41.838334788 +0000
@@ -82,6 +82,7 @@
void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg);
int version_constraints_satisfied(depend_t * depends, pkg_t * pkg);
int pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *depends, char *** unresolved);
+pkg_vec_t * pkg_hash_fetch_satisfied_dependencies(pkg_t * pkg);
pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg);
int pkg_dependence_satisfiable(depend_t *depend);
int pkg_dependence_satisfied(depend_t *depend);

View File

@@ -0,0 +1,57 @@
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 neeing 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.
Upstream-Status: Pending
RP 2011/12/15
Index: trunk/libopkg/pkg.c
===================================================================
--- trunk.orig/libopkg/pkg.c 2011-12-15 15:58:39.000000000 +0000
+++ trunk/libopkg/pkg.c 2011-12-15 20:04:50.109992736 +0000
@@ -1297,8 +1297,9 @@
free(cmd);
if (err) {
- opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
- pkg->name, script, err);
+ if (!conf->offline_root)
+ opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
+ pkg->name, script, err);
return err;
}
Index: trunk/libopkg/opkg_cmd.c
===================================================================
--- trunk.orig/libopkg/opkg_cmd.c 2011-12-15 19:49:25.826014150 +0000
+++ trunk/libopkg/opkg_cmd.c 2011-12-15 19:50:52.346012148 +0000
@@ -453,7 +453,8 @@
pkg->state_flag &= ~SF_PREFER;
opkg_state_changed++;
} else {
- err = -1;
+ if (!conf->offline_root)
+ err = -1;
}
}
}
Index: trunk/libopkg/opkg_configure.c
===================================================================
--- trunk.orig/libopkg/opkg_configure.c 2011-12-15 19:50:11.586013081 +0000
+++ trunk/libopkg/opkg_configure.c 2011-12-15 19:52:15.082010347 +0000
@@ -35,7 +35,10 @@
err = pkg_run_script(pkg, "postinst", "configure");
if (err) {
- opkg_msg(ERROR, "%s.postinst returned %d.\n", pkg->name, err);
+ if (!conf->offline_root)
+ opkg_msg(ERROR, "%s.postinst returned %d.\n", pkg->name, err);
+ else
+ opkg_msg(NOTICE, "%s.postinst returned %d, marking as unpacked only, configuration required on target.\n", pkg->name, err);
return err;
}

View File

@@ -0,0 +1,99 @@
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.
Upstream-Status: Pending
RP 2011/12/18
Index: trunk/libopkg/opkg_install.c
===================================================================
--- trunk.orig/libopkg/opkg_install.c 2011-12-18 11:15:17.320725365 +0000
+++ trunk/libopkg/opkg_install.c 2011-12-18 12:38:54.980609225 +0000
@@ -84,8 +84,14 @@
/* The package was uninstalled when we started, but another
dep earlier in this loop may have depended on it and pulled
it in, so check first. */
+ if (is_pkg_in_pkg_vec(dep->wanted_by, pkg)) {
+ opkg_msg(NOTICE,"Breaking cicular dependency on %s for %s.\n", pkg->name, dep->name);
+ continue;
+ }
if ((dep->state_status != SS_INSTALLED) && (dep->state_status != SS_UNPACKED)) {
opkg_msg(DEBUG2,"Calling opkg_install_pkg.\n");
+ if (!is_pkg_in_pkg_vec(dep->wanted_by, pkg))
+ pkg_vec_insert(dep->wanted_by, pkg);
err = opkg_install_pkg(dep, 0);
/* mark this package as having been automatically installed to
* satisfy a dependancy */
@@ -115,6 +121,8 @@
/* The package was uninstalled when we started, but another
dep earlier in this loop may have depended on it and pulled
it in, so check first. */
+ if (!is_pkg_in_pkg_vec(dep->wanted_by, pkg))
+ pkg_vec_insert(dep->wanted_by, pkg);
if ((dep->state_status != SS_INSTALLED)
&& (dep->state_status != SS_UNPACKED)) {
opkg_msg(DEBUG2,"Calling opkg_install_pkg.\n");
Index: trunk/libopkg/pkg.c
===================================================================
--- trunk.orig/libopkg/pkg.c 2011-12-18 11:12:39.976729002 +0000
+++ trunk/libopkg/pkg.c 2011-12-18 11:22:34.528715535 +0000
@@ -86,6 +86,7 @@
pkg->section = NULL;
pkg->description = NULL;
pkg->state_want = SW_UNKNOWN;
+ pkg->wanted_by = pkg_vec_alloc();
pkg->state_flag = SF_OK;
pkg->state_status = SS_NOT_INSTALLED;
pkg->depends_str = NULL;
@@ -191,6 +192,7 @@
pkg->description = NULL;
pkg->state_want = SW_UNKNOWN;
+ pkg_vec_free(pkg->wanted_by);
pkg->state_flag = SF_OK;
pkg->state_status = SS_NOT_INSTALLED;
Index: trunk/libopkg/pkg.h
===================================================================
--- trunk.orig/libopkg/pkg.h 2011-12-18 11:12:37.120728742 +0000
+++ trunk/libopkg/pkg.h 2011-12-18 11:15:39.080725150 +0000
@@ -129,6 +129,7 @@
char *description;
char *tags;
pkg_state_want_t state_want;
+ pkg_vec_t *wanted_by;
pkg_state_flag_t state_flag;
pkg_state_status_t state_status;
char **depends_str;
Index: trunk/libopkg/pkg_depends.c
===================================================================
--- trunk.orig/libopkg/pkg_depends.c 2011-12-18 11:14:24.464726569 +0000
+++ trunk/libopkg/pkg_depends.c 2011-12-18 11:30:32.516704127 +0000
@@ -30,7 +30,6 @@
static depend_t * depend_init(void);
static char ** add_unresolved_dep(pkg_t * pkg, char ** the_lost, int ref_ndx);
static char ** merge_unresolved(char ** oldstuff, char ** newstuff);
-static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg);
static int pkg_installed_and_constraint_satisfied(pkg_t *pkg, void *cdata)
{
@@ -531,7 +530,7 @@
return 0;
}
-static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg)
+int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg)
{
int i;
pkg_t ** pkgs = vec->pkgs;
Index: trunk/libopkg/pkg_depends.h
===================================================================
--- trunk.orig/libopkg/pkg_depends.h 2011-12-18 11:28:51.960706484 +0000
+++ trunk/libopkg/pkg_depends.h 2011-12-18 11:29:19.400705862 +0000
@@ -87,5 +87,6 @@
int pkg_dependence_satisfiable(depend_t *depend);
int pkg_dependence_satisfied(depend_t *depend);
const char* constraint_to_str(enum version_constraint c);
+int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg);
#endif

View File

@@ -0,0 +1,8 @@
require opkg.inc
SRC_URI = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \
file://add_vercmp.patch \
file://headerfix.patch \
"
PR = "${INC_PR}.0"

View File

@@ -0,0 +1,16 @@
require opkg.inc
SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
file://add_vercmp.patch \
file://add_uname_support.patch \
file://fix_installorder.patch \
file://offline_postinstall.patch\
file://track_parents.patch \
"
S = "${WORKDIR}/trunk"
SRCREV = "633"
PV = "0.1.8+svnr${SRCPV}"
PR = "${INC_PR}.0"