* [PATCH] rootfs_ipk.bbclass: Ensure bad recommendations persist in the status file
@ 2011-11-12 8:36 Richard Purdie
2011-11-12 15:57 ` Otavio Salvador
2014-08-26 0:51 ` Andreas Oberritter
0 siblings, 2 replies; 6+ messages in thread
From: Richard Purdie @ 2011-11-12 8:36 UTC (permalink / raw)
To: openembedded-core
Currently bad recommendations are added to the status file with status
"ok". After a single opkg command, whilst it will ignore the recommendation,
the status changes to "installed" even if the recommended package was not
installed. Whilst this is likely a glitch in opkg's logic, the correct
way to persist the information in the status file is to set the status
to "hold" as deinstall packages with that status remain. With this change
the bad recommendations persist accross multiple opkg runs and the system
behaves as expected.
[YOCTO #1758]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 3b4c392..4a5a2dd 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -44,7 +44,7 @@ fakeroot rootfs_ipk_do_rootfs () {
pkginfo="`opkg-cl ${IPKG_ARGS} info $i`"
if [ ! -z "$pkginfo" ]; then
echo "$pkginfo" | grep -e '^Package:' -e '^Architecture:' -e '^Version:' >> $STATUS
- echo "Status: deinstall ok not-installed" >> $STATUS
+ echo "Status: deinstall hold not-installed" >> $STATUS
echo >> $STATUS
else
echo "Requested ignored recommendation $i is not a package"
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] rootfs_ipk.bbclass: Ensure bad recommendations persist in the status file
2011-11-12 8:36 [PATCH] rootfs_ipk.bbclass: Ensure bad recommendations persist in the status file Richard Purdie
@ 2011-11-12 15:57 ` Otavio Salvador
2011-11-12 18:17 ` Richard Purdie
2014-08-26 0:51 ` Andreas Oberritter
1 sibling, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2011-11-12 15:57 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On Sat, Nov 12, 2011 at 06:36, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Currently bad recommendations are added to the status file with status
> "ok". After a single opkg command, whilst it will ignore the recommendation,
> the status changes to "installed" even if the recommended package was not
> installed. Whilst this is likely a glitch in opkg's logic, the correct
> way to persist the information in the status file is to set the status
> to "hold" as deinstall packages with that status remain. With this change
> the bad recommendations persist accross multiple opkg runs and the system
> behaves as expected.
I personally dislike fixing it in rootfs_ipk instead of opkg ... opkg
has change its behaviour behind the scenes and this needs to be fixed
IMO.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rootfs_ipk.bbclass: Ensure bad recommendations persist in the status file
2011-11-12 15:57 ` Otavio Salvador
@ 2011-11-12 18:17 ` Richard Purdie
2011-11-12 18:21 ` Otavio Salvador
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2011-11-12 18:17 UTC (permalink / raw)
To: Otavio Salvador; +Cc: openembedded-core
On Sat, 2011-11-12 at 13:57 -0200, Otavio Salvador wrote:
> On Sat, Nov 12, 2011 at 06:36, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > Currently bad recommendations are added to the status file with status
> > "ok". After a single opkg command, whilst it will ignore the recommendation,
> > the status changes to "installed" even if the recommended package was not
> > installed. Whilst this is likely a glitch in opkg's logic, the correct
> > way to persist the information in the status file is to set the status
> > to "hold" as deinstall packages with that status remain. With this change
> > the bad recommendations persist accross multiple opkg runs and the system
> > behaves as expected.
>
> I personally dislike fixing it in rootfs_ipk instead of opkg ... opkg
> has change its behaviour behind the scenes and this needs to be fixed
> IMO.
I'm not sure opkg has changed behaviour. We used to just do one single
"opkg install" after which the status file was incorrect but the bad
recommends was not installed. We started doing more than one "opkg
install" and this has muddied the waters so to speak. I'm still unclear
if the bad recommends actually make it onto the target system but
certainly the status file was incorrect.
The summary is we were not using opkg correctly in the first place. This
patch corrects that problem so we do what we what that code intended to
do and persists the bad recommend into the status file. This fixes the
bug that was reported too.
There look to be remaining issues in opkg but not ones that directly
affect the build system. Please do take this up with the opkg people but
I'm afraid I personally don't have time to start debugging opkg and I
think there are other more urgent priorities at the moment now this is a
non-issue for the builds.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rootfs_ipk.bbclass: Ensure bad recommendations persist in the status file
2011-11-12 18:17 ` Richard Purdie
@ 2011-11-12 18:21 ` Otavio Salvador
0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2011-11-12 18:21 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On Sat, Nov 12, 2011 at 16:17, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Sat, 2011-11-12 at 13:57 -0200, Otavio Salvador wrote:
>> On Sat, Nov 12, 2011 at 06:36, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > Currently bad recommendations are added to the status file with status
>> > "ok". After a single opkg command, whilst it will ignore the recommendation,
>> > the status changes to "installed" even if the recommended package was not
>> > installed. Whilst this is likely a glitch in opkg's logic, the correct
>> > way to persist the information in the status file is to set the status
>> > to "hold" as deinstall packages with that status remain. With this change
>> > the bad recommendations persist accross multiple opkg runs and the system
>> > behaves as expected.
>>
>> I personally dislike fixing it in rootfs_ipk instead of opkg ... opkg
>> has change its behaviour behind the scenes and this needs to be fixed
>> IMO.
>
> I'm not sure opkg has changed behaviour. We used to just do one single
> "opkg install" after which the status file was incorrect but the bad
> recommends was not installed. We started doing more than one "opkg
> install" and this has muddied the waters so to speak. I'm still unclear
> if the bad recommends actually make it onto the target system but
> certainly the status file was incorrect.
It does end onto the target.
> The summary is we were not using opkg correctly in the first place. This
> patch corrects that problem so we do what we what that code intended to
> do and persists the bad recommend into the status file. This fixes the
> bug that was reported too.
>
> There look to be remaining issues in opkg but not ones that directly
> affect the build system. Please do take this up with the opkg people but
> I'm afraid I personally don't have time to start debugging opkg and I
> think there are other more urgent priorities at the moment now this is a
> non-issue for the builds.
This does fix the problem we were having but I am concerned about
other possible behaviour changes it might happen.
I think this patch ought to go but someone skilled on opkg might take
a look at opkg code to see if this isn't a regression of lately
changes.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rootfs_ipk.bbclass: Ensure bad recommendations persist in the status file
2011-11-12 8:36 [PATCH] rootfs_ipk.bbclass: Ensure bad recommendations persist in the status file Richard Purdie
2011-11-12 15:57 ` Otavio Salvador
@ 2014-08-26 0:51 ` Andreas Oberritter
2014-08-26 20:01 ` Richard Purdie
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Oberritter @ 2014-08-26 0:51 UTC (permalink / raw)
To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer
Hello Richard,
sorry for digging out such an old message, but please see below.
On 12.11.2011 09:36, Richard Purdie wrote:
> Currently bad recommendations are added to the status file with status
> "ok". After a single opkg command, whilst it will ignore the recommendation,
> the status changes to "installed" even if the recommended package was not
> installed. Whilst this is likely a glitch in opkg's logic, the correct
> way to persist the information in the status file is to set the status
> to "hold" as deinstall packages with that status remain. With this change
> the bad recommendations persist accross multiple opkg runs and the system
> behaves as expected.
>
> [YOCTO #1758]
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
> index 3b4c392..4a5a2dd 100644
> --- a/meta/classes/rootfs_ipk.bbclass
> +++ b/meta/classes/rootfs_ipk.bbclass
> @@ -44,7 +44,7 @@ fakeroot rootfs_ipk_do_rootfs () {
> pkginfo="`opkg-cl ${IPKG_ARGS} info $i`"
> if [ ! -z "$pkginfo" ]; then
> echo "$pkginfo" | grep -e '^Package:' -e '^Architecture:' -e '^Version:' >> $STATUS
> - echo "Status: deinstall ok not-installed" >> $STATUS
> + echo "Status: deinstall hold not-installed" >> $STATUS
I just implemented bad recommendations for deb (in dora) and by looking
at dpkg's source code I realized that "hold" is only a valid value for
the first field. Maybe you meant to write "Status: hold ok
not-installed" instead? Valid values for the second field are ok and
reinstreq.
The code above doesn't exist in master anymore, but the status line
hasn't changed in the newer version implemented in python.
Regards,
Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] rootfs_ipk.bbclass: Ensure bad recommendations persist in the status file
2014-08-26 0:51 ` Andreas Oberritter
@ 2014-08-26 20:01 ` Richard Purdie
0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2014-08-26 20:01 UTC (permalink / raw)
To: Andreas Oberritter, Paul Barker
Cc: Patches and discussions about the oe-core layer
On Tue, 2014-08-26 at 02:51 +0200, Andreas Oberritter wrote:
> Hello Richard,
>
> sorry for digging out such an old message, but please see below.
>
> On 12.11.2011 09:36, Richard Purdie wrote:
> > Currently bad recommendations are added to the status file with status
> > "ok". After a single opkg command, whilst it will ignore the recommendation,
> > the status changes to "installed" even if the recommended package was not
> > installed. Whilst this is likely a glitch in opkg's logic, the correct
> > way to persist the information in the status file is to set the status
> > to "hold" as deinstall packages with that status remain. With this change
> > the bad recommendations persist accross multiple opkg runs and the system
> > behaves as expected.
> >
> > [YOCTO #1758]
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> > diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
> > index 3b4c392..4a5a2dd 100644
> > --- a/meta/classes/rootfs_ipk.bbclass
> > +++ b/meta/classes/rootfs_ipk.bbclass
> > @@ -44,7 +44,7 @@ fakeroot rootfs_ipk_do_rootfs () {
> > pkginfo="`opkg-cl ${IPKG_ARGS} info $i`"
> > if [ ! -z "$pkginfo" ]; then
> > echo "$pkginfo" | grep -e '^Package:' -e '^Architecture:' -e '^Version:' >> $STATUS
> > - echo "Status: deinstall ok not-installed" >> $STATUS
> > + echo "Status: deinstall hold not-installed" >> $STATUS
>
> I just implemented bad recommendations for deb (in dora) and by looking
> at dpkg's source code I realized that "hold" is only a valid value for
> the first field. Maybe you meant to write "Status: hold ok
> not-installed" instead? Valid values for the second field are ok and
> reinstreq.
>
> The code above doesn't exist in master anymore, but the status line
> hasn't changed in the newer version implemented in python.
I'm not sure what opkg accepts or what is correct. Paul, cc'd may have a
better idea though. What we have seems to work, that doesn't necessarily
mean its correct though...
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-08-26 20:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-12 8:36 [PATCH] rootfs_ipk.bbclass: Ensure bad recommendations persist in the status file Richard Purdie
2011-11-12 15:57 ` Otavio Salvador
2011-11-12 18:17 ` Richard Purdie
2011-11-12 18:21 ` Otavio Salvador
2014-08-26 0:51 ` Andreas Oberritter
2014-08-26 20:01 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.