[oe-issues] [Bug 2461] New: ipkg upgrade does nothing, allthough newer packages are available in the feed

bugzilla-daemon at tinman.treke.net bugzilla-daemon at tinman.treke.net
Sun Jun 10 02:59:37 UTC 2007


http://bugs.openembedded.org/show_bug.cgi?id=2461

           Summary: ipkg upgrade does nothing, allthough newer packages are
                    available in the feed
           Product: Openembedded
           Version: unspecified
          Platform: MIPS
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Distributions
        AssignedTo: openembedded-issues at lists.openembedded.org
        ReportedBy: jin at mediatomb.cc
         QAContact: tinderbox-oe at gmx.net


ipkg version: ipkg-0.99.163-r4 (most recent in OE), .bb file as in OE without
any modifications.

I am using a self-created distro with an own feed. I add new packages to the
feed and make sure ipkg-make-index is run correctly (Packages* files contain
the updated versions).

I run ipkg update ony my client machine to synchronize with the feed. 
After that I do ipkg upgrade - and here is the problem: it does nothing,
allthough newer versions are available.

I ran "ipkg upgrade upnpclient-dfb" in verbose mode, and I could see that it is
comparing the wrong versions - it compares new vs new instead of old vs new:

 Found a valid candidate for the install: upnpclient-dfb
1.0.1+svn20070610020025-r0  
comparing visible versions of pkg upnpclient-dfb:
        1.0.1+svn20070610020025-r0 is installed 
        1.0.1+svn20070610020025-r0 is available 
        0 was comparison result
Package upnpclient-dfb (1.0.1+svn20070610020025-r0) installed in root is up to
date.

However, when I run ipkg list_installed I get:
upnpclient-dfb - 1.0.1+svn20070610014518-r0

At first I thought that my distro/setup may be messed up, so I spent quite some
time debugging/rebuilding/etc. my distro, but it seemed ok, so I started to
debug the ipkg sourcecode.

I could see that it reads the feed file and adds the packages to the hash, 
I could see that it then reads the status file, and adds the installed packages
to the hash. However, the ipkg_upgrade_cmd() function in ipkg_cmd.c seems to
be getting wrong data. 
To be more precise, the pkg_hash_fetch_installed_by_name(&conf->pkg_hash,
argv[i]); call returns the new package, but int ipkg_upgrade_pkg(ipkg_conf_t
*conf, pkg_t *old) expects the old one. 
Btw, pkg->old_pkg is NULL at this point, so the comment in pkg.h does not 
make much sense either? ( pkg_t *old_pkg; /* during upgrade, points from
installee to previously installed */)

So, the ipkg_upgrade_pkg(conf, pkg); (called from ipkg_upgrade_cmd() in
ipkg_cmd.c) gets the new package as parameter (i.e. pkg->version prints as
1.0.1+svn20070610020025-r0 and not as 1.0.1+svn20070610014518-r0), so it ends
up comparing two same versions - the new version from the feed against itself.

I had a suspicion that pkg_merge() may be doing something bad, but I could not
prove it :>

I hope that someone who has understanding of the ipkg code may have an idea
about what is going wrong.

Thanks!


-- 
Configure bugmail: http://bugs.openembedded.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.




More information about the Openembedded-issues mailing list