Skip to contentSkip to conversation

Let opkg-build allow uppercase letters

PATCH Applied Khem Raj 6 participants 14 messages May 19, 2011 – May 21, 2011

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

cover Let opkg-build allow uppercase letters

Majority of the changes are backported from OE one additional patch is to opkg-utils/opkg-build to allow uppercase letters.

Pull URL: git://git.openembedded.org/openembedded-core-contrib
Branch: kraj/opkg
Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/opkg

Thanks,
Khem Raj <[email protected]>
---

Khem Raj (2):
opkg: Synchronise with OE
opkg-utils: Allow uppercase lettlers in package names

 .../opkg-utils/opkg-utils/mtime-int.patch          |   29 +++++++++++++
 .../opkg-utils/opkg-utils/uppercase-letters.patch  |   44 ++++++++++++++++++++
 meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    8 +++-
 meta/recipes-devtools/opkg/opkg.inc                |    7 ++-
 meta/recipes-devtools/opkg/opkg/add_vercmp.patch   |   36 ----------------
 meta/recipes-devtools/opkg/opkg/configure          |   25 +++++++++++
 meta/recipes-devtools/opkg/opkg/headerfix.patch    |   19 --------
 meta/recipes-devtools/opkg/opkg_svn.bb             |   23 ++--------
 8 files changed, 113 insertions(+), 78 deletions(-)
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/uppercase-letters.patch
 delete mode 100644 meta/recipes-devtools/opkg/opkg/add_vercmp.patch
 create mode 100644 meta/recipes-devtools/opkg/opkg/configure
 delete mode 100644 meta/recipes-devtools/opkg/opkg/headerfix.patch
Signature · 1 line
1.7.4.1
author
#1 lore raw

PATCH 1/2 opkg: Synchronise with OE

Remove use of IMAGE_ROOTFS which was making sstage to install ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d into the dir where it was built first time. So if you moved the tmpdir it would still create this directory in old tmpdir and anyway its not needed

All the patches that it was applying are not needed anymore so we delete them

Install opkg configure script

---
 meta/recipes-devtools/opkg/opkg.inc              |    7 ++--
 meta/recipes-devtools/opkg/opkg/add_vercmp.patch |   36 ----------------------
 meta/recipes-devtools/opkg/opkg/configure        |   25 +++++++++++++++
 meta/recipes-devtools/opkg/opkg/headerfix.patch  |   19 -----------
 meta/recipes-devtools/opkg/opkg_svn.bb           |   23 +++-----------
 5 files changed, 34 insertions(+), 76 deletions(-)
 delete mode 100644 meta/recipes-devtools/opkg/opkg/add_vercmp.patch
 create mode 100644 meta/recipes-devtools/opkg/opkg/configure
 delete mode 100644 meta/recipes-devtools/opkg/opkg/headerfix.patch
meta/recipes-devtools/opkg/opkg.inc +4 -3
index a649213..49a083a 100644
@@ -39,6 +39,7 @@ 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"
+do_install_prepend() {
+  install -d ${D}${sysconfdir}/rcS.d
+  install -m 0755 ${WORKDIR}/configure ${D}${sysconfdir}/rcS.d/S40configure
+}
meta/recipes-devtools/opkg/opkg/add_vercmp.patch deleted +0 -36
deleted file mode 100644
index 1203c54..0000000
@@ -1,36 +0,0 @@
-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 */
meta/recipes-devtools/opkg/opkg/configure new file +25 -0
new file mode 100644
index 0000000..633d8d3
@@ -0,0 +1,25 @@
+#!/bin/sh
+# get splash funcs
+if [ -f /etc/default/splashfuncs ]; then
+  . /etc/default/splashfuncs
+## tell boot status to "pulsate" really long busy cycle here
+status_pulse || true
+fi
+
+# run configure in bg
+if [  -f /etc/default/splashfuncs ]; then
+  opkg-cl configure &
+  PID=$!
+  
+  # while configure still running loop
+  while test -d /proc/$PID; do
+  # tick to splash so it doesn't time out
+    status_tick || true
+    sleep 1
+  done
+else
+  opkg-cl configure
+fi
+
+# delete myself
+rm -f /etc/rcS.d/S40configure
meta/recipes-devtools/opkg/opkg/headerfix.patch deleted +0 -19
deleted file mode 100644
index b3515a0..0000000
@@ -1,19 +0,0 @@
-Without this, the FILE reference in this header can cause compile issues.
-
-RP - 29/1/10
-
-Upstream-Status: Pending
-
-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
- {
meta/recipes-devtools/opkg/opkg_svn.bb +5 -18
index 5964a47..879af3b 100644
@@ -10,15 +10,14 @@ PACKAGE_ARCH_update-alternatives-cworth = "all"
 RREPLACES_${PN} = "opkg-nogpg"
 
 SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
-           file://add_vercmp.patch \
-           file://headerfix.patch \
-"
+           file://configure \
+          "
 
 S = "${WORKDIR}/trunk"
 
 SRCREV = "609"
 PV = "0.1.8+svnr${SRCPV}"
-PR = "r2"
+PR = "r3"
 
 PACKAGES =+ "libopkg${PKGSUFFIX}-dev libopkg${PKGSUFFIX} update-alternatives-cworth${PKGSUFFIX}"
 
@@ -32,22 +31,10 @@ do_install_append() {
 }
 
 pkg_postinst_${PN} () {
-#!/bin/sh
-if [ "x$D" != "x" ]; then
-	install -d ${IMAGE_ROOTFS}/${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
+	update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
 }
 
 pkg_postrm_${PN} () {
-#!/bin/sh
-update-alternatives --remove opkg ${bindir}/opkg-cl
+	update-alternatives --remove opkg ${bindir}/opkg-cl
 }
 
Signature · 1 line
1.7.4.1
#2 lore raw

Re: [PATCH 1/2] opkg: Synchronise with OE

Quoted 7 lines · Khem Raj

Remove use of IMAGE_ROOTFS which was making sstage to install ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d into the dir where it was built first time. So if you moved the tmpdir it would still create this directory in old tmpdir and anyway its not needed

All the patches that it was applying are not needed anymore so we delete them

packagekit's opkg support required the add_vercmp patch?

Why not just s/${IMAGE_ROOTFS}/$D/ rather than remove a load of functionality which people use?

This patch is at best very confusing and misleading as you do more than you say in the above commit message...

Cheers,

Richard

Quoted 176 lines

Install opkg configure script

---
 meta/recipes-devtools/opkg/opkg.inc              |    7 ++--
 meta/recipes-devtools/opkg/opkg/add_vercmp.patch |   36 ----------------------
 meta/recipes-devtools/opkg/opkg/configure        |   25 +++++++++++++++
 meta/recipes-devtools/opkg/opkg/headerfix.patch  |   19 -----------
 meta/recipes-devtools/opkg/opkg_svn.bb           |   23 +++-----------
 5 files changed, 34 insertions(+), 76 deletions(-)
 delete mode 100644 meta/recipes-devtools/opkg/opkg/add_vercmp.patch
 create mode 100644 meta/recipes-devtools/opkg/opkg/configure
 delete mode 100644 meta/recipes-devtools/opkg/opkg/headerfix.patch
meta/recipes-devtools/opkg/opkg.inc +4 -3
index a649213..49a083a 100644
@@ -39,6 +39,7 @@ 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"
+do_install_prepend() {
+  install -d ${D}${sysconfdir}/rcS.d
+  install -m 0755 ${WORKDIR}/configure ${D}${sysconfdir}/rcS.d/S40configure
+}
meta/recipes-devtools/opkg/opkg/add_vercmp.patch deleted +0 -36
deleted file mode 100644
index 1203c54..0000000
@@ -1,36 +0,0 @@
-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 */
meta/recipes-devtools/opkg/opkg/configure new file +25 -0
new file mode 100644
index 0000000..633d8d3
@@ -0,0 +1,25 @@
+#!/bin/sh
+# get splash funcs
+if [ -f /etc/default/splashfuncs ]; then
+  . /etc/default/splashfuncs
+## tell boot status to "pulsate" really long busy cycle here
+status_pulse || true
+fi
+
+# run configure in bg
+if [  -f /etc/default/splashfuncs ]; then
+  opkg-cl configure &
+  PID=$!
+  
+  # while configure still running loop
+  while test -d /proc/$PID; do
+  # tick to splash so it doesn't time out
+    status_tick || true
+    sleep 1
+  done
+else
+  opkg-cl configure
+fi
+
+# delete myself
+rm -f /etc/rcS.d/S40configure
meta/recipes-devtools/opkg/opkg/headerfix.patch deleted +0 -19
deleted file mode 100644
index b3515a0..0000000
@@ -1,19 +0,0 @@
-Without this, the FILE reference in this header can cause compile issues.
-
-RP - 29/1/10
-
-Upstream-Status: Pending
-
-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
- {
meta/recipes-devtools/opkg/opkg_svn.bb +5 -18
index 5964a47..879af3b 100644
@@ -10,15 +10,14 @@ PACKAGE_ARCH_update-alternatives-cworth = "all"
 RREPLACES_${PN} = "opkg-nogpg"
 
 SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
-           file://add_vercmp.patch \
-           file://headerfix.patch \
-"
+           file://configure \
+          "
 
 S = "${WORKDIR}/trunk"
 
 SRCREV = "609"
 PV = "0.1.8+svnr${SRCPV}"
-PR = "r2"
+PR = "r3"
 
 PACKAGES =+ "libopkg${PKGSUFFIX}-dev libopkg${PKGSUFFIX} update-alternatives-cworth${PKGSUFFIX}"
 
@@ -32,22 +31,10 @@ do_install_append() {
 }
 
 pkg_postinst_${PN} () {
-#!/bin/sh
-if [ "x$D" != "x" ]; then
-	install -d ${IMAGE_ROOTFS}/${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
+	update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
 }
 
 pkg_postrm_${PN} () {
-#!/bin/sh
-update-alternatives --remove opkg ${bindir}/opkg-cl
+	update-alternatives --remove opkg ${bindir}/opkg-cl
 }
 
author
#3 lore raw

PATCH 2/2 opkg-utils: Allow uppercase lettlers in package names

In reply to Khem Raj

Some packages have uppercase letters in their names e.g. efikamx kernel. We allow uppercase character with uppercase-letters.patch

Import mtime-int.patch from OE commit
c81990aecae3bdf70a7c924699776b248ab7a006

---
 .../opkg-utils/opkg-utils/mtime-int.patch          |   29 +++++++++++++
 .../opkg-utils/opkg-utils/uppercase-letters.patch  |   44 ++++++++++++++++++++
 meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    8 +++-
 3 files changed, 79 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/uppercase-letters.patch
meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch new file +29 -0
new file mode 100644
index 0000000..fdbce21
@@ -0,0 +1,29 @@
+Convert mtime to int before comparing it
+
+The st_mtime attribute (which is a float) is compared against a value
+from the timestamp database, which was stored as an integer there.
+
+When working on a filesystem with precise timestamps the comparision
+will fail nearly everytime hence.
+
+Although it might be possible to enhance the database to store the
+fractional part too, this will complicate things more than we would
+gain by this change.
+
+Signed-off-by: Enrico Scholz <[email protected]>
+
+Upstream-Status: Pending
+
+Index: opkg-utils/opkg-make-index
+===================================================================
+--- opkg-utils.orig/opkg-make-index
++++ opkg-utils/opkg-make-index
+@@ -100,7 +100,7 @@ for filename in files:
+      pkg = None
+      fnameStat = os.stat(filename)
+      if old_pkg_hash.has_key(basename):
+-          if pkgsStamps.has_key(basename) and fnameStat.st_mtime == pkgsStamps[basename]:
++          if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) == pkgsStamps[basename]:
+             if (verbose):
+                sys.stderr.write("Found %s in Packages\n" % (filename,))
+             pkg = old_pkg_hash[basename]
meta/recipes-devtools/opkg-utils/opkg-utils/uppercase-letters.patch new file +44 -0

44 lines not on this page · raw message

meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb +6 -2
index 0db6f80..7e4c6e4 100644
@@ -9,10 +9,13 @@ RDEPENDS_${PN} = "python"
 RDEPENDS_${PN}_virtclass-native = ""
 SRCREV = "4747"
 PV = "0.1.8+svnr${SRCPV}"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=opkg-utils;proto=http \
-           file://index-ignore-filenotfound.patch"
+           file://index-ignore-filenotfound.patch \
+           file://mtime-int.patch \
+           file://uppercase-letters.patch \
+           "
 
 S = "${WORKDIR}/opkg-utils"
 
@@ -24,3 +27,4 @@ do_install() {
 }
 
 BBCLASSEXTEND = "native"
+TARGET_CC_ARCH += "${LDFLAGS}"
Signature · 1 line
1.7.4.1
#4 lore raw

Re: [PATCH 2/2] opkg-utils: Allow uppercase lettlers in package names

2011/5/19 Khem Raj <[email protected]>

Quoted 28 lines

Some packages have uppercase letters in their names e.g. efikamx kernel. We allow uppercase character with uppercase-letters.patch

Import mtime-int.patch from OE commit
c81990aecae3bdf70a7c924699776b248ab7a006

---
 .../opkg-utils/opkg-utils/mtime-int.patch          |   29 +++++++++++++
 .../opkg-utils/opkg-utils/uppercase-letters.patch  |   44
++++++++++++++++++++
 meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    8 +++-
 3 files changed, 79 insertions(+), 2 deletions(-)
 create mode 100644
meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch
 create mode 100644

meta/recipes-devtools/opkg-utils/opkg-utils/uppercase-letters.patch

meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch new file +1 -0
new file mode 100644
index 0000000..fdbce21
@@ -0,0 +1,29 @@
+Convert mtime to int before comparing it

meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch line 11

Quoted 10 lines
meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch new file +10 -0
+
+The st_mtime attribute (which is a float) is compared against a value
+from the timestamp database, which was stored as an integer there.
+
+When working on a filesystem with precise timestamps the comparision
+will fail nearly everytime hence.
+
+Although it might be possible to enhance the database to store the
+fractional part too, this will complicate things more than we would
+gain by this change.

This part is not covered by the commit message. Was it intended to be in here.?
Rest of the patch looks fine to me.

Frans

Quoted 114 lines
meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch new file +14 -0
+
+Signed-off-by: Enrico Scholz <[email protected]>
+
+Upstream-Status: Pending
+
+Index: opkg-utils/opkg-make-index
+===================================================================
+--- opkg-utils.orig/opkg-make-index
++++ opkg-utils/opkg-make-index
+@@ -100,7 +100,7 @@ for filename in files:
+      pkg = None
+      fnameStat = os.stat(filename)
+      if old_pkg_hash.has_key(basename):
+-          if pkgsStamps.has_key(basename) and fnameStat.st_mtime ==

pkgsStamps[basename]:
++ if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) ==
pkgsStamps[basename]:

meta/recipes-devtools/opkg-utils/opkg-utils/mtime-int.patch new file +3 -0
+             if (verbose):
+                sys.stderr.write("Found %s in Packages\n" % (filename,))
+             pkg = old_pkg_hash[basename]

diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/uppercase-letters.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/uppercase-letters.patch new file mode 100644
index 0000000..689d780

meta/recipes-devtools/opkg-utils/opkg-utils/uppercase-letters.patch new file +5 -0
@@ -0,0 +1,44 @@
+when building packages, accept uppercase letters in the package name
+Fixes issues like
+
+
+| Packaged contents of kernel into

/home/kraj/work/angstrom/build/tmp-angstrom_2010_x-eglibc/work/efikamx-angstrom-linux-gnueabi/linux-efikamx-2.6.31-r0/deploy-ipks/efikamx/kernel_2.6.31-r0_efikamx.ipk +| kernel-2.6.31.12-ER1
+| *** Error: Package name contains illegal characters, (other than
[a-z0-9.+-])

+|
+| opkg-build: Please fix the above errors and try again.
+| ERROR: Function 'opkg-build execution failed' failed
meta/recipes-devtools/opkg-utils/opkg-utils/uppercase-letters.patch new file +14 -0
+
+Signed-off-by: Khem Raj <[email protected]>
+
+Upstream-Status: Pending
+Index: opkg-utils/opkg-buildpackage
+===================================================================
+--- opkg-utils.orig/opkg-buildpackage
++++ opkg-utils/opkg-buildpackage
+@@ -65,8 +65,8 @@ pkg_appears_sane_control() {
+       required_field Maintainer >/dev/null
+       required_field Description >/dev/null
+
+-      if echo $pkg | grep '[^a-z0-9.+-]'; then
+-              echo "opkg-build: Error: Package name $name contains

illegal characters, (other than [a-z0-9.+-])"
++ if echo $pkg | grep '[^a-zA-Z0-9.+-]'; then
++ echo "opkg-build: Error: Package name $name contains
illegal characters, (other than [a-zA-Z0-9.+-])"

meta/recipes-devtools/opkg-utils/opkg-utils/uppercase-letters.patch new file +13 -0
+               PKG_ERROR=1;
+       fi
+
+Index: opkg-utils/opkg-build
+===================================================================
+--- opkg-utils.orig/opkg-build
++++ opkg-utils/opkg-build
+@@ -118,8 +118,8 @@ You probably want to chown these to a sy
+       disallowed_filename=`disallowed_field Filename`
+       [ "$?" -ne 0 ] && PKG_ERROR=1
+
+-      if echo $pkg | grep '[^a-z0-9.+-]'; then
+-              echo "*** Error: Package name $name contains illegal

characters, (other than [a-z0-9.+-])" >&2
++ if echo $pkg | grep '[^a-zA-Z0-9.+-]'; then
++ echo "*** Error: Package name $name contains illegal
characters, (other than [a-zA-Z0-9.+-])" >&2

meta/recipes-devtools/opkg-utils/opkg-utils/uppercase-letters.patch new file +3 -0
+               PKG_ERROR=1;
+       fi
+
(quoted diff) +0 -0

opkg-utils_svn.bb
index 0db6f80..7e4c6e4 100644

meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb +6 -3
@@ -9,10 +9,13 @@ RDEPENDS_${PN} = "python"
 RDEPENDS_${PN}_virtclass-native = ""
 SRCREV = "4747"
 PV = "0.1.8+svnr${SRCPV}"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "svn://
 svn.openmoko.org/trunk/src/host/;module=opkg-utils;proto=http \
-           file://index-ignore-filenotfound.patch"
+           file://index-ignore-filenotfound.patch \
+           file://mtime-int.patch \
+           file://uppercase-letters.patch \
+           "
 
 S = "${WORKDIR}/opkg-utils"
@@ -24,3 +27,4 @@ do_install() {
 }
 
 BBCLASSEXTEND = "native"
+TARGET_CC_ARCH += "${LDFLAGS}"
--

1.7.4.1

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#5 lore raw

Re: [PATCH 2/2] opkg-utils: Allow uppercase lettlers in package names

In reply to Khem Raj
Quoted 3 lines · Khem Raj

Some packages have uppercase letters in their names e.g. efikamx kernel. We allow uppercase character with uppercase-letters.patch

This is not a good idea. Uppercase characters have never been permitted in .deb/.ipk.

Isn't legitimize_package_name() crunching them to lower case for you? If not then I think it should be made to do that.

p.

#6 lore raw

Re: [PATCH 2/2] opkg-utils: Allow uppercase lettlers in package names

Quoted 10 lines · Phil Blundell
Quoted 3 lines · Khem Raj

Some packages have uppercase letters in their names e.g. efikamx kernel. We allow uppercase character with uppercase-letters.patch

This is not a good idea. Uppercase characters have never been permitted in .deb/.ipk.

Isn't legitimize_package_name() crunching them to lower case for you? If not then I think it should be made to do that.

I just checked the code and it certainly looks like it should be doing that:

	# Remaining package name validity fixes
	return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')

So if that isn't working for you then I think it needs a bit of debugging.

p.

#7 lore raw

Re: [PATCH 2/2] opkg-utils: Allow uppercase lettlers in package names

Op 20 mei 2011, om 17:01 heeft Phil Blundell het volgende geschreven:

Quoted 12 lines · Phil Blundell
Quoted 10 lines · Khem Raj
Quoted 3 lines

Some packages have uppercase letters in their names e.g. efikamx kernel. We allow uppercase character with uppercase-letters.patch

This is not a good idea. Uppercase characters have never been permitted in .deb/.ipk.

Isn't legitimize_package_name() crunching them to lower case for you? If not then I think it should be made to do that.

Quoted 8 lines

I just checked the code and it certainly looks like it should be doing that:

	# Remaining package name validity fixes
	return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')

So if that isn't working for you then I think it needs a bit of debugging.

Does that run on PV or PN? I think Khem has weird things in PV

#8 lore raw

Re: [PATCH 2/2] opkg-utils: Allow uppercase lettlers in package names

In reply to Phil Blundell
Quoted 12 lines · Phil Blundell
Quoted 10 lines · Phil Blundell
Quoted 3 lines · Khem Raj

Some packages have uppercase letters in their names e.g. efikamx kernel. We allow uppercase character with uppercase-letters.patch

This is not a good idea. Uppercase characters have never been permitted in .deb/.ipk.

Isn't legitimize_package_name() crunching them to lower case for you? If not then I think it should be made to do that.

Quoted 8 lines

I just checked the code and it certainly looks like it should be doing that:

	# Remaining package name validity fixes
	return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')

So if that isn't working for you then I think it needs a bit of debugging.

http://patches.openembedded.org/patch/2255/ should solve the problem. I was waiting for a second ack.

Khem, if this fixes the problem for you, please send an ack or push this patch.

Regards,
Andreas

#9 lore raw

Re: [PATCH 2/2] opkg-utils: Allow uppercase lettlers in package names

Quoted 19 lines · Andreas Oberritter
Quoted 18 lines · Phil Blundell
Quoted 10 lines · Phil Blundell
Quoted 3 lines · Khem Raj

Some packages have uppercase letters in their names e.g. efikamx kernel. We allow uppercase character with uppercase-letters.patch

This is not a good idea. Uppercase characters have never been permitted in .deb/.ipk.

Isn't legitimize_package_name() crunching them to lower case for you? If not then I think it should be made to do that.

I just checked the code and it certainly looks like it should be doing that:

	# Remaining package name validity fixes
	return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')
Quoted 8 lines
Quoted 2 lines

So if that isn't working for you then I think it needs a bit of debugging.

http://patches.openembedded.org/patch/2255/ should solve the problem. I was waiting for a second ack.

Khem, if this fixes the problem for you, please send an ack or push this patch.

I merged this to OE-Core since I happened to look at it :)

Cheers,

Richard

author
#10 lore raw

Re: [PATCH 2/2] opkg-utils: Allow uppercase lettlers in package names

In reply to Andreas Oberritter
Quoted 6 lines · Andreas Oberritter

http://patches.openembedded.org/patch/2255/ should solve the problem. I was waiting for a second ack.

Khem, if this fixes the problem for you, please send an ack or push this patch.

yes it does thanks. I meant to look for this before I butchered opkg-utils but my memory did not serve me well.

#11 lore raw

Re: [PATCH 2/2] opkg-utils: Allow uppercase lettlers in package names

Op 20 mei 2011, om 20:35 heeft Khem Raj het volgende geschreven:

Quoted 11 lines
Quoted 6 lines · Andreas Oberritter

http://patches.openembedded.org/patch/2255/ should solve the problem. I was waiting for a second ack.

Khem, if this fixes the problem for you, please send an ack or push this patch.

yes it does thanks. I meant to look for this before I butchered opkg-utils but my memory did not serve me well.

With a build from scratch I get:

|  * satisfy_dependencies_for: Cannot satisfy the following dependencies for task-base:
|  *    kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *   kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *
|  * opkg_install_cmd: Cannot install package task-base.
|  * satisfy_dependencies_for: Cannot satisfy the following dependencies for task-base-extended:
|  *    kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *  kernel-2.6.31.12-ER1 *
|  * opkg_install_cmd: Cannot install package task-base-extended.
#12 lore raw
In reply to Khem Raj
Quoted 3 lines · Khem Raj

Majority of the changes are backported from OE one additional patch is to opkg-utils/opkg-build to allow uppercase letters.

Upperspace package names are a violation of debian packaging guidelines (which OE has aimed to roughly follow) and will break the debian package backend. At the very least some kind of translation is needed there before this gets enabled.

Where did this requirement come from?

Cheers,

Richard

author
#13 lore raw
Quoted 5 lines · Richard Purdie
Quoted 3 lines · Khem Raj

Majority of the changes are backported from OE one additional patch is to opkg-utils/opkg-build to allow uppercase letters.

Quoted 7 lines

Upperspace package names are a violation of debian packaging guidelines (which OE has aimed to roughly follow) and will break the debian package backend. At the very least some kind of translation is needed there before this gets enabled.

Where did this requirement come from?

I was building kernel for efikamx wich has some uppercase chars appended to version
but I think I can patch the kernel for that and we can drop uppercase-letters.patch

Do you want me to update the patch ?

Quoted 10 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core