| Submitter | Marko Lindqvist |
|---|---|
| Date | May 9, 2012, 11:50 p.m. |
| Message ID | <CAF6bG8eVQcJHEH8RHsAGV2CP6ZjH1+sZUyvBTFLvB6cv--ZUhw@mail.gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/27417/ |
| State | Superseded |
| Headers | show |
Comments
On 05/09/2012 04:50 PM, Marko Lindqvist wrote: > From: Marko Lindqvist<cazfi74@gmail.com> > Date: Thu, 10 May 2012 02:41:06 +0300 > Subject: [PATCH] package_deb.bbclass: don't handle advanced dependency marker > as version number > > Strip advanced dependency markers away from Provides before writing > them to control file. Left in place they would mean package version > number in control file format. > > Signed-off-by: Marko Lindqvist<cazfi74@gmail.com> > --- > meta/classes/package_deb.bbclass | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass > index dc0f963..c51bf3c 100644 > --- a/meta/classes/package_deb.bbclass > +++ b/meta/classes/package_deb.bbclass > @@ -206,6 +206,23 @@ python do_package_deb () { > import re, copy > import textwrap > > + def deb_explode_dep_ver(varname): > + # Remove markers from string so they won't get handled as > version numbers > + depstr = localdata.getVar(varname, True) or "" > + start = depstr.find("(") > + while start != -1: > + # We are not searching ")" from full string in case it's > malformed in a way > + # that first ")" is before first "(" > + endstr = depstr[start:len(depstr)] > + end = endstr.find(")") > + if (end == len(endstr) - 1) or (end == -1): > + tmpstr = depstr[0:start] > + else: > + tmpstr = depstr[0:start] + depstr[start+end+1:len(depstr)] > + depstr = tmpstr > + start = depstr.find("(") > + return bb.utils.explode_dep_versions(depstr) > + > workdir = d.getVar('WORKDIR', True) > if not workdir: > bb.error("WORKDIR not defined, unable to package") > @@ -341,7 +358,7 @@ python do_package_deb () { > if '*' in dep: > del rrecommends[dep] > rsuggests = > bb.utils.explode_dep_versions(localdata.getVar("RSUGGESTS", True) or > "") > - rprovides = > bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or > "") > + rprovides = deb_explode_dep_ver("RPROVIDES") > rreplaces = > bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or > "") > rconflicts = > bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or > "") > if rdepends: Marko, I am not sure what's wrong with this patch or the others you sent recently but none of them are applying cleanly with "git am" what are you using to format the patch and mail it? Please use git format-patch and git send-email or the scripts create-pull-request/send-pull-request. Thanks Sau!
On 10 May 2012 03:10, Saul Wold <sgw@linux.intel.com> wrote: > > Marko, > > I am not sure what's wrong with this patch or the others you sent recently > but none of them are applying cleanly with "git am" what are you using to > format the patch and mail it? > > Please use git format-patch and git send-email or the scripts > create-pull-request/send-pull-request. > > Thanks > Sau! Mailer problems. I reworked my setup somewhat, but sending patches round the world back to myself still results in corruption somewhere. As there's slight hope that remaining problem is in patch's way back home, and not in sending, I'll test resending this one to list. - ML
Patch
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index dc0f963..c51bf3c 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass @@ -206,6 +206,23 @@ python do_package_deb () { import re, copy import textwrap + def deb_explode_dep_ver(varname): + # Remove markers from string so they won't get handled as version numbers + depstr = localdata.getVar(varname, True) or "" + start = depstr.find("(") + while start != -1: + # We are not searching ")" from full string in case it's malformed in a way + # that first ")" is before first "(" + endstr = depstr[start:len(depstr)] + end = endstr.find(")") + if (end == len(endstr) - 1) or (end == -1): + tmpstr = depstr[0:start] + else: + tmpstr = depstr[0:start] + depstr[start+end+1:len(depstr)] + depstr = tmpstr + start = depstr.find("(") + return bb.utils.explode_dep_versions(depstr) + workdir = d.getVar('WORKDIR', True)