All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rootfs_ipk.bbclass: fix BAD_RECOMMENDATIONS
@ 2010-02-24 20:52 Denys Dmytriyenko
  2010-02-24 21:00 ` Phil Blundell
  0 siblings, 1 reply; 8+ messages in thread
From: Denys Dmytriyenko @ 2010-02-24 20:52 UTC (permalink / raw)
  To: openembedded-devel

New opkg requires full and correct package name, version, revision and
architecture to be specified when requiring de-installation of a package.
Collect that info from opkg-info.

Signed-off-by: Denys Dmytriyenko <denis@denix.org>
---
 classes/rootfs_ipk.bbclass |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 38d6121..c32e4e3 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -36,16 +36,19 @@ fakeroot rootfs_ipk_do_rootfs () {
 	mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg/
 
 	STATUS=${IMAGE_ROOTFS}${libdir}/opkg/status
+
+	opkg-cl ${IPKG_ARGS} update
+
 	# prime the status file with bits that we don't want
 	for i in ${BAD_RECOMMENDATIONS}; do
-		echo "Package: $i" >> $STATUS
-		echo "Architecture: ${TARGET_ARCH}" >> $STATUS
-		echo "Status: deinstall ok not-installed" >> $STATUS
-		echo >> $STATUS
+		infln="`opkg-cl ${IPKG_ARGS} info $i | grep -e '^Package:' -e '^Architecture:' -e '^Version:'`"
+		if [ ! -z "$infln" ]; then
+			echo "$infln" >> $STATUS
+			echo "Status: deinstall ok not-installed" >> $STATUS
+			echo >> $STATUS
+		fi
 	done
 
-	opkg-cl ${IPKG_ARGS} update
-
 	# Uclibc builds don't provide this stuff...
 	if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then 
 		if [ ! -z "${LINGUAS_INSTALL}" ]; then
-- 
1.6.3.3




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] rootfs_ipk.bbclass: fix BAD_RECOMMENDATIONS
  2010-02-24 20:52 [PATCH] rootfs_ipk.bbclass: fix BAD_RECOMMENDATIONS Denys Dmytriyenko
@ 2010-02-24 21:00 ` Phil Blundell
  2010-02-24 21:48   ` Graham Gower
  0 siblings, 1 reply; 8+ messages in thread
From: Phil Blundell @ 2010-02-24 21:00 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 2010-02-24 at 15:52 -0500, Denys Dmytriyenko wrote:
> New opkg requires full and correct package name, version, revision and
> architecture to be specified when requiring de-installation of a package.
> Collect that info from opkg-info.

This seems like a bug in opkg.  Would it not be better to fix it there?

p.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] rootfs_ipk.bbclass: fix BAD_RECOMMENDATIONS
  2010-02-24 21:00 ` Phil Blundell
@ 2010-02-24 21:48   ` Graham Gower
  2010-02-24 21:59     ` Phil Blundell
  0 siblings, 1 reply; 8+ messages in thread
From: Graham Gower @ 2010-02-24 21:48 UTC (permalink / raw)
  To: openembedded-devel

On 25 February 2010 07:30, Phil Blundell <philb@gnu.org> wrote:
> On Wed, 2010-02-24 at 15:52 -0500, Denys Dmytriyenko wrote:
>> New opkg requires full and correct package name, version, revision and
>> architecture to be specified when requiring de-installation of a package.
>> Collect that info from opkg-info.
>
> This seems like a bug in opkg.  Would it not be better to fix it there?
>
> p.
>

This is an unintended side effect of other changes, however I'm not
sure that I consider it inappropriate behaviour. That status does
apply to a particular package version, does it not?

-Graham



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] rootfs_ipk.bbclass: fix BAD_RECOMMENDATIONS
  2010-02-24 21:48   ` Graham Gower
@ 2010-02-24 21:59     ` Phil Blundell
  2010-02-24 23:06       ` Denys Dmytriyenko
  0 siblings, 1 reply; 8+ messages in thread
From: Phil Blundell @ 2010-02-24 21:59 UTC (permalink / raw)
  To: openembedded-devel

On Thu, 2010-02-25 at 08:18 +1030, Graham Gower wrote:
> This is an unintended side effect of other changes, however I'm not
> sure that I consider it inappropriate behaviour. That status does
> apply to a particular package version, does it not?

No, the SW_xx flags should apply to any version and architecture rather
than being nailed down to a specific tuple.  Otherwise, these flags
would be subverted as soon as a new version appears in the feed.

p.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] rootfs_ipk.bbclass: fix BAD_RECOMMENDATIONS
  2010-02-24 21:59     ` Phil Blundell
@ 2010-02-24 23:06       ` Denys Dmytriyenko
  2010-02-24 23:15         ` Phil Blundell
  0 siblings, 1 reply; 8+ messages in thread
From: Denys Dmytriyenko @ 2010-02-24 23:06 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Feb 24, 2010 at 09:59:26PM +0000, Phil Blundell wrote:
> On Thu, 2010-02-25 at 08:18 +1030, Graham Gower wrote:
> > This is an unintended side effect of other changes, however I'm not
> > sure that I consider it inappropriate behaviour. That status does
> > apply to a particular package version, does it not?
> 
> No, the SW_xx flags should apply to any version and architecture rather
> than being nailed down to a specific tuple.  Otherwise, these flags
> would be subverted as soon as a new version appears in the feed.

The thing is, those SW_xx flags are not preserved anyway - the status file is 
primed with BAD_RECOMMENDATIONS (Status: deinstall), but later gets 
overwritten by the list of only installed packages. Of course, "deinstall" 
packages are being skipped, but they are not preserved in the status file for 
later use...

But, on the other hand, if there are multiple versions of the package present 
in the deploy/feed, then it will, probably, deinstall one version and install 
another one, which is not the correct behavior.

-- 
Denys



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] rootfs_ipk.bbclass: fix BAD_RECOMMENDATIONS
  2010-02-24 23:06       ` Denys Dmytriyenko
@ 2010-02-24 23:15         ` Phil Blundell
  0 siblings, 0 replies; 8+ messages in thread
From: Phil Blundell @ 2010-02-24 23:15 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 2010-02-24 at 18:06 -0500, Denys Dmytriyenko wrote:
> The thing is, those SW_xx flags are not preserved anyway - the status file is 
> primed with BAD_RECOMMENDATIONS (Status: deinstall), but later gets 
> overwritten by the list of only installed packages. Of course, "deinstall" 
> packages are being skipped, but they are not preserved in the status file for 
> later use...

Ah.  If that's happening then that is also a bug.  Are you saying that
opkg basically throws away anything that isn't SS_INSTALLED when it
writes out the status file?  That is definitely no good: it ought to
preserve all the SW_xx values that are set in the status file,
essentially indefinitely.

> But, on the other hand, if there are multiple versions of the package
> present in the deploy/feed, then it will, probably, deinstall one
> version and install another one, which is not the correct behavior.

Yeah, that would also be pretty broken.

p.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] rootfs_ipk.bbclass: Fix BAD_RECOMMENDATIONS.
  2010-08-18  5:51 [PATCH] rootfs_ipk.bbclass: Fix BAD_RECOMMENDATIONS Graham Gower
@ 2010-08-19  5:32 ` Martin Jansa
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Jansa @ 2010-08-19  5:32 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Aug 18, 2010 at 03:21:11PM +0930, Graham Gower wrote:
> See http://code.google.com/p/opkg/source/detail?r=553
> And previous discussions:
> http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg01423.html
> http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg04051.html
> 
> Signed-off-by: Graham Gower <graham.gower@gmail.com>

Image rebuilt from scratch and it looks good

Acked-by: Martin Jansa <Martin.Jansa@gmail.com>

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] rootfs_ipk.bbclass: Fix BAD_RECOMMENDATIONS.
@ 2010-08-18  5:51 Graham Gower
  2010-08-19  5:32 ` Martin Jansa
  0 siblings, 1 reply; 8+ messages in thread
From: Graham Gower @ 2010-08-18  5:51 UTC (permalink / raw)
  To: openembedded-devel

See http://code.google.com/p/opkg/source/detail?r=553
And previous discussions:
http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg01423.html
http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg04051.html

Signed-off-by: Graham Gower <graham.gower@gmail.com>
---
 classes/rootfs_ipk.bbclass           |    2 +-
 conf/distro/include/sane-srcrevs.inc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 915e3d7..77e573c 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -41,7 +41,7 @@ fakeroot rootfs_ipk_do_rootfs () {
 	for i in ${BAD_RECOMMENDATIONS}; do
 		echo "Package: $i" >> $STATUS
 		echo "Architecture: ${TARGET_ARCH}" >> $STATUS
-		echo "Status: deinstall ok not-installed" >> $STATUS
+		echo "Status: deinstall hold not-installed" >> $STATUS
 		echo >> $STATUS
 	done
 
diff --git a/conf/distro/include/sane-srcrevs.inc b/conf/distro/include/sane-srcrevs.inc
index bfce5ad..6efdd21 100644
--- a/conf/distro/include/sane-srcrevs.inc
+++ b/conf/distro/include/sane-srcrevs.inc
@@ -1,5 +1,5 @@
 # this is alphabetical!
 # only SRCREVs included in more recipes should be here, otherwise put sane SRCREV to recipe directly
 
-OPKG_SRCREV ?= "550"
+OPKG_SRCREV ?= "554"
 EFL_SRCREV ?= "50438"
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-08-19  5:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-24 20:52 [PATCH] rootfs_ipk.bbclass: fix BAD_RECOMMENDATIONS Denys Dmytriyenko
2010-02-24 21:00 ` Phil Blundell
2010-02-24 21:48   ` Graham Gower
2010-02-24 21:59     ` Phil Blundell
2010-02-24 23:06       ` Denys Dmytriyenko
2010-02-24 23:15         ` Phil Blundell
2010-08-18  5:51 [PATCH] rootfs_ipk.bbclass: Fix BAD_RECOMMENDATIONS Graham Gower
2010-08-19  5:32 ` Martin Jansa

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.