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#9403 - makepkg tries to remove dependencies even when not installed

Attached to Project: Pacman
Opened by Roman Kyrylych (Romashka) - Wednesday, 30 January 2008, 15:46 GMT
Last edited by Allan McRae (Allan) - Tuesday, 12 August 2008, 15:55 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version git
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

makepkg tries to remove makedepends *and* depends,
but if depends were not yet installed (aborted by user) then pacman fails because of unknown targets,
so makedepends are not removed as well.
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 12 August 2008, 15:55 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 3.2
Comment by Roman Kyrylych (Romashka) - Wednesday, 30 January 2008, 15:46 GMT
$ makepkg -sr
==> Making package: mail-notification 5.0-1 (середа, 30 січня 2008 17:38:51 +0200)
==> Checking Runtime Dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for inter-conflicts...

Targets: postgresql-libs-8.2.6-1 libmysqlclient-5.0.51-1
cyrus-sasl-plugins-2.1.22-6 sharutils-4.6.3-1 gmime-2.2.15-1

Total Download Size: 0,36 MB
Total Installed Size: 3,71 MB

Proceed with installation? [Y/n]
:: Retrieving packages from extra...
gmime-2.2.15-1-i686 364,2K 6,3K/s 00:00:58 [#####################] 100%
checking package integrity...
(5/5) checking for file conflicts [#####################] 100%
(1/5) installing postgresql-libs [#####################] 100%
(2/5) installing libmysqlclient [#####################] 100%
(3/5) installing cyrus-sasl-plugins [#####################] 100%
(4/5) installing sharutils [#####################] 100%
(5/5) installing gmime [#####################] 100%
==> Checking Buildtime Dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for inter-conflicts...

Targets: gob2-2.0.14-1 libnetworkmanager-0.6.5-1 gtkhtml-3.16.3-1
evolution-2.12.3-1

Total Download Size: 47,62 MB
Total Installed Size: 48,65 MB

Proceed with installation? [Y/n]

==> ERROR: Aborted by user! Exiting...
==> Removing installed dependencies...
loading package data... failed.
error: failed to add target 'gob2' (could not find or read package)
Comment by Aaron Griffin (phrakture) - Wednesday, 30 January 2008, 17:39 GMT
It'd probably be easier for us to maintain a list of "packages installed" for the -r flag, rather than try to uninstall all everything.
Comment by Xavier (shining) - Thursday, 31 January 2008, 08:01 GMT
Another question I had in the past that would have an impact on this :
Do we want pacman to fail when it doesn't find a target? Why not just skip it?
Comment by Aaron Griffin (phrakture) - Thursday, 31 January 2008, 17:34 GMT
For removal? Skipping it makes sense to me with a warning or something
Comment by Dan McGee (toofishes) - Thursday, 07 February 2008, 04:30 GMT
I like failing hard when something goes wrong on the command line- I think of pacman as a transactional tool in the sense that it is going to do everything I tell it, or nothing at all if something is invalid.
Comment by Xavier (shining) - Thursday, 07 February 2008, 09:40 GMT
Hm yes, I wanted to mention your point of view here since you stated it on the ML too.
Well, I understand your position, even if I find it less practical. So forget my comment,
and this bug should be fixed the proper way like Aaron suggested.
Comment by Xavier (shining) - Wednesday, 23 July 2008, 11:53 GMT
It is almost impossible to implement this "remove dependencies" feature correctly.
Have a look at Nagy's arguments there :
http://www.nabble.com/-PATCH--No-error-in-makepkg-when-removing-deps-fails-tc16453391.html#a16493483

What is wrong with just using pacman -Qtd manually?
This seems to give a much better guarantee that the correct packages will be removed.
Comment by Allan McRae (Allan) - Wednesday, 23 July 2008, 13:00 GMT
I agree we can do the remove dependencies properly due to provides, replaces etc.

But, to fix this specific bug, we can just not do add $deplist to $pkgdeps until the line after "if handledeps $deplist; then". Then makepkg would not add the (make)depends to the pkgdeps until they were actually installed. Patch on its way.

Loading...