diff options
author | hschang <chang@dev3> | 2013-02-03 12:40:52 (GMT) |
---|---|---|
committer | hschang <chang@dev3> | 2013-02-05 02:02:19 (GMT) |
commit | fe6d3ab407db9c62631234ff798d565196e4b30e (patch) | |
tree | 02d9df3917a586efaa04e21893a5d95f04061a21 | |
parent | b0f208d341612674512e430a0a590938ca0163a7 (diff) |
opkg_svn: fixed broken uname gname cache (this significantly speeds up)
-rw-r--r-- | meta-openvuplus/recipes-devtools/opkg/opkg/unarchive-fixed-uname-gname-cache.patch | 33 | ||||
-rw-r--r-- | meta-openvuplus/recipes-devtools/opkg/opkg_svn.bbappend | 5 |
2 files changed, 36 insertions, 2 deletions
diff --git a/meta-openvuplus/recipes-devtools/opkg/opkg/unarchive-fixed-uname-gname-cache.patch b/meta-openvuplus/recipes-devtools/opkg/opkg/unarchive-fixed-uname-gname-cache.patch new file mode 100644 index 0000000..3a13a5b --- /dev/null +++ b/meta-openvuplus/recipes-devtools/opkg/opkg/unarchive-fixed-uname-gname-cache.patch @@ -0,0 +1,33 @@ +diff -Naur trunk.org/libbb/unarchive.c trunk/libbb/unarchive.c +--- trunk.org/libbb/unarchive.c 2012-08-30 13:45:44.000000000 +0200 ++++ trunk/libbb/unarchive.c 2012-09-13 11:50:57.822754393 +0200 +@@ -446,12 +446,12 @@ + struct passwd *passwd; + if (!uname) + return FALSE; +- if (!uname_cache[0] && strcmp(uname_cache, uname) == 0) ++ if (!strcmp(uname_cache, uname)) + return TRUE; + passwd = getpwnam(uname); + if (passwd) { + uid_cache = passwd->pw_uid; +- strncpy(uname, uname_cache, 32); ++ strncpy(uname_cache, uname, 32); + return TRUE; + } + return FALSE; +@@ -464,12 +464,12 @@ + struct group *group; + if (!gname) + return FALSE; +- if (!gname_cache[0] && strcmp(gname_cache, gname) == 0) ++ if (!strcmp(gname_cache, gname)) + return TRUE; + group = getgrnam(gname); + if (group) { + gid_cache = group->gr_gid; +- strncpy(gname, gname_cache, 32); ++ strncpy(gname_cache, gname, 32); + return TRUE; + } + return FALSE; diff --git a/meta-openvuplus/recipes-devtools/opkg/opkg_svn.bbappend b/meta-openvuplus/recipes-devtools/opkg/opkg_svn.bbappend index e5a54e4..76d0408 100644 --- a/meta-openvuplus/recipes-devtools/opkg/opkg_svn.bbappend +++ b/meta-openvuplus/recipes-devtools/opkg/opkg_svn.bbappend @@ -1,4 +1,4 @@ -PR .= "-vuplus0" +PR .= "-vuplus1" SRC_URI += "file://0001-Fixed-opkg-losing-auto_installed-flag-on-upgrading.patch \ file://0002-Don-t-mark-Conflicts-as-Depends.patch \ @@ -9,6 +9,7 @@ SRC_URI += "file://0001-Fixed-opkg-losing-auto_installed-flag-on-upgrading.patch file://0007-pkg_hash_fetch_conflicts-move-iteration-over-conflic.patch \ file://0008-pkg_hash_fetch_conflicts-take-into-account-conflicts.patch \ file://0009-Revert-Add-Recommended-packages-to-the-depended_upon.patch \ - file://0010-opkg_remove-auto-delete-.pyo-files.patch" + file://0010-opkg_remove-auto-delete-.pyo-files.patch \ + file://unarchive-fixed-uname-gname-cache.patch" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |