Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559044 - sys-apps/portage: emerge --search --usepkg (or --getbinpkg) shows duplicate results
Summary: sys-apps/portage: emerge --search --usepkg (or --getbinpkg) shows duplicate r...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 549914
  Show dependency tree
 
Reported: 2015-08-28 15:52 UTC by marco
Modified: 2015-09-22 01:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description marco 2015-08-28 15:52:47 UTC
I apologies cause this is a long post.

We use a layman profile to personalize our installations.
We use a builder server that build binary packages and than ours servers update the packages with the binary packages throught the Binary Host.

Before the upgrade we had:
sys-apps/portage-2.2.14
profile metadata/layout.conf
  profile-formats = portage-2

profile make.defaults
  FEATURES="getbinpkg"

profile packages ( to include the packages in the @system)
  *app-portage/layman
  *app-portage/gentoolkit
  ...

Now we want to move @system packages to @profile as the new portage feature can do and recommends

Before upgrading the packages we have changed some profiles options:
profile metadata/layout.conf
  profile-formats = portage-2 profile-set build-id
  ( build-id cause in the future maybe we want to refer to specific builds)

profile make.defaults
  FEATURES="getbinpkg binpkg-multi-instance"

profile packages
  app-portage/layman
  app-portage/gentoolkit
  ...

On the builder server all the udates was ok.
On the test server where we test the binary updates we have some strange problems:
we update the portage 

emerge -va1  portage

that triggers installation of binary dev-lang/python-3.4.1 and binary sys-apps/portage-2.2.20.1
current portage notifies that cannot understand binpkg-multi-instance but this is not a problem as read in others post.

###First Problem

with or without "eselect python set --python3 python3.4"
a first strange behaviour is that now emerge --search print double a package name
eg:
emerge --search @sys-apps/iproute2
or
emerge --search iproute2
Local copy of remote index is up-to-date and will be used.
  
[ Results for search key : @sys-apps/iproute2 ]
Searching...

*  sys-apps/iproute2
      Latest version available: 3.19.0
      Latest version installed: 3.17.0
      Size of files: 445 KiB
      Homepage:      http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
      Description:   kernel routing and traffic control utilities
      License:       GPL-2

*  sys-apps/iproute2
      Latest version available: 3.19.0
      Latest version installed: 3.17.0
      Size of files: 445 KiB
      Homepage:      http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
      Description:   kernel routing and traffic control utilities
      License:       GPL-2

[ Applications found : 2 ]

if i remove the Packages file from the Binhost the problem disappears

emerge --search iproute2


!!! Error fetching binhost package info from 'http://xxxxxx'
!!! HTTP Error 404: Not Found

  
[ Results for search key : iproute2 ]
Searching...

*  sys-apps/iproute2
      Latest version available: 3.19.0
      Latest version installed: 3.17.0
      Size of files: 445 KiB
      Homepage:      http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
      Description:   kernel routing and traffic control utilities
      License:       GPL-2

[ Applications found : 1 ]

is this a problem or only a "visualization problem" ?


###Second problem on the test server while updating

emerge -tavuND  world
!!! The following binary packages have been ignored due to changed dependencies:

     sys-libs/libcap-2.22-r2::gentoo


NOTE: The --binpkg-changed-deps=n option will prevent emerge
      from ignoring these binary packages if possible.
      Using --binpkg-changed-deps=y will silence this warning.

if i try to force reinstallation of  sys-libs/libcap-2.22-r2 i have the same problem

In the Packages file of the Binhost sys-libs/libcap-2.22-r2 is define as:
BUILD_TIME: 1402672863
CPV: sys-libs/libcap-2.22-r2
DEFINED_PHASES: compile configure install prepare test
DEPEND: sys-apps/attr[abi_x86_64(-)] virtual/pam sys-kernel/linux-headers
DESC: POSIX 1003.1e capabilities
EAPI: 4
IUSE: pam abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32
KEYWORDS: ~alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux
LICENSE: || ( GPL-2 BSD )
MD5: f5edffc1c2b1c9e0c5342bc75595fe42
RDEPEND: sys-apps/attr[abi_x86_64(-)] virtual/pam
SHA1: 32b3f4f33f5aab24dc04540e82abb002c03532c6
SIZE: 77170
USE: abi_x86_64 amd64 elibc_glibc kernel_linux pam userland_GNU
MTIME: 1402672865

the /usr/portage/sys-libs/libcap/libcap-2.22-r2.ebuild
has these RDEPEND and DEPEND
RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]
        pam? ( virtual/pam )"
DEPEND="${RDEPEND}
        sys-kernel/linux-headers"

we update the builder server with:
emerge  -avtuND --with-bdeps=y world

in this update there is ,apart from the rest, an update from net-dns/bind-9.10.1_p1 to net-dns/bind-9.10.2_p3 that requires >=sys-libs/libcap-2.1.0

I expected that libcap was rebuilded if the RDEPEND changed from sys-apps/attr[abi_x86_64(-)] to >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] .
or i am missing something ?

Thanks and sorry for the huge post





Reproducible: Always
Comment 1 Zac Medico gentoo-dev 2015-08-29 03:01:13 UTC
The issue is that the search._cp_all is passing an un-ordered iterator into MultiIterGroupBy. All of the iterators need to be ordered there.
Comment 2 Zac Medico gentoo-dev 2015-08-29 05:52:25 UTC
There's a patch in the following branch:

https://github.com/zmedico/portage/tree/bug_559044

It can be installed like this:

echo '=sys-apps/portage-9999 **' >> /etc/portage/package.accept_keywords
portage_LIVE_BRANCH=bug_559044 \
portage_LIVE_REPO=https://github.com/zmedico/portage.git \
emerge -1 =sys-apps/portage-9999

I've posted it for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/809edbc9bc0409c89fd0d49bfb27a653
Comment 4 marco 2015-08-31 15:54:37 UTC
Patch tested and working :) .

emerge --search iproute2 or emerge --search @sys-apps/iproute2

Local copy of remote index is up-to-date and will be used.
  
[ Results for search key : @sys-apps/iproute2 ]
Searching...

*  sys-apps/iproute2
      Latest version available: 3.19.0
      Latest version installed: 3.17.0
      Size of files: 445 KiB
      Homepage:      http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
      Description:   kernel routing and traffic control utilities
      License:       GPL-2

[ Applications found : 1 ]

Now the Second problem ( ... The following binary packages have been ignored due to changed dependencies ...) on the test server disappeared after the new portage update.

Do you think is better to rebuilt the @world packages on the builder server with the patched portage ?

When do you think the patch can be included in the stable portage ?

thanks
Comment 5 Zac Medico gentoo-dev 2015-08-31 16:34:56 UTC
(In reply to marco from comment #4)
> Now the Second problem ( ... The following binary packages have been ignored
> due to changed dependencies ...) on the test server disappeared after the
> new portage update.

That's a separate issue, and it's probably behaving as intended. You need to use --binpkg-changed-deps=n if you want to use binary packages with changed dependencies relative to the currently ebuilds available on your binhost client.

> Do you think is better to rebuilt the @world packages on the builder server
> with the patched portage ?

This patch only affects emerge --search output, so there's no reason to do that.

> When do you think the patch can be included in the stable portage ?

I don't know when the next release will be.
Comment 6 Brian Dolbec (RETIRED) gentoo-dev 2015-09-22 01:40:38 UTC
Released in portage-2.2.21