Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#20221 - Installing a group with --needed and a package in multiple repos fails on the needed part

Attached to Project: Pacman
Opened by Allan McRae (Allan) - Monday, 19 July 2010, 13:32 GMT
Last edited by Allan McRae (Allan) - Tuesday, 24 August 2010, 13:36 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version 3.4.0
Due in Version 3.4.1
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:

The use of --needed partially fails when trying to install a group which has one package in two repos. The package version from the first repo is recognised as installed and removed from the list, but the second version of the package is "not installed" (as the version number is different?) and it not removed from the software that is needed to be installed. Similarly, when the package version from the second repo is installed, the version of the package from the first repo is flagged despite using --needed.

Is --needed using pkgname-pkgver-pkgrel matching rather than just pkgname?


> pacman -S --needed base base-devel
<snip>
Targets (18): ... autoconf-2.65-2 ...
<snip>


> pacman -S --needed autoconf
warning: autoconf-2.66-2 is up to date -- skipping
there is nothing to do


> pacman -Ss autoconf
testing/autoconf 2.66-2 (base-devel) [installed]
A GNU tool for automatically configuring source code
core/autoconf 2.65-2 (base-devel) [installed: 2.66-2]
A GNU tool for automatically configuring source code


> pacman -Qs autoconf
local/autoconf 2.66-2 (base-devel)
A GNU tool for automatically configuring source code
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 24 August 2010, 13:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  git commits e702f56e and f8d7cd6b
Comment by Dan McGee (toofishes) - Monday, 26 July 2010, 03:01 GMT
Looks like the fault lies in _alpm_sync_pkg(). Because we aren't adding higher-precedence packages to the target list when using --needed, we skip adding it when going through [testing] and then try to add it during the look at [core]. You can see this with gcc/base-devel right now in the repos.

I think we need to make this logic a bit smarter and not use the targets list directly, but some other list we build up as we go that can include both targets (those packages getting installed) and non-targets (those we found but decided to skip in the case of needed). We could also change the return semantics slightly so a different code is returned when a package is found but skipped or something.
Comment by Dan McGee (toofishes) - Tuesday, 24 August 2010, 02:24 GMT
Allan, I think I fixed this with e702f56ea671c6cd1154a0ddb41fa63e97587c85 and f8d7cd6b2623a864aa85fbdcdd629f3ff92a631c, does that look true to you? If so we can close this out as fixed and it will be in 3.4.1.
Comment by Allan McRae (Allan) - Tuesday, 24 August 2010, 13:35 GMT
Looks fixed here. Just tried --needed with base-devel. The package "make" is in [testing] and [core] and now does not appear in the install list with current maint.

Loading...