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.
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.
FS#10823 - Marking package as explicitely installed doesn't work
Attached to Project:
Pacman
Opened by Daniel D. (danieldanner) - Friday, 04 July 2008, 13:59 GMT
Last edited by Dan McGee (toofishes) - Saturday, 05 July 2008, 23:05 GMT
Opened by Daniel D. (danieldanner) - Friday, 04 July 2008, 13:59 GMT
Last edited by Dan McGee (toofishes) - Saturday, 05 July 2008, 23:05 GMT
|
DetailsSummary and Info:
"pacman -Qtd" showed some packages I wanted to keep as explicitely installed so I did "pacman -S <pkgs>" for these. Afterwards, "pacman -Qi <pkg>" still claimed the packages to be "Installed as a dependency for another package". Steps to Reproduce: 1. pacman -Qtd (about 20 packages show up) 2. (choose pkgconfig, for example) 3. pacman -Qi pkgconfig | grep "Install Reason" ->Install Reason : Installed as a dependency for another package 4. pacman -S pkgconfig 5. pacman -Qi pkgconfig | grep "Install Reason" ->Install Reason : Installed as a dependency for another package Also see this log: root@jukebox ~ # pacman -Qi pkgconfig | grep "Install Reason" Install Reason : Installed as a dependency for another package root@jukebox ~ # pacman -S pkgconfig warning: pkgconfig-0.23-1 is up to date -- reinstalling resolving dependencies... looking for inter-conflicts... Targets: pkgconfig-0.23-1 Total Download Size: 0.00 MB Total Installed Size: 0.10 MB Proceed with installation? [Y/n] checking package integrity... (1/1) checking for file conflicts [###########################################################################################] 100% (1/1) upgrading pkgconfig [###########################################################################################] 100% root@jukebox ~ # pacman -Qi pkgconfig | grep "Install Reason" Install Reason : Installed as a dependency for another package |
This task depends upon
Closed by Dan McGee (toofishes)
Saturday, 05 July 2008, 23:05 GMT
Reason for closing: Implemented
Additional comments about closing: --asexplicit in GIT/3.2 will cover this case
Saturday, 05 July 2008, 23:05 GMT
Reason for closing: Implemented
Additional comments about closing: --asexplicit in GIT/3.2 will cover this case
Though, it is still unclear why in 3.1.4 "pacman -S" *sometimes* (or on *some* packages) just behaves as 3.2 would do with --asexplicit.
And still I don't have any idea how I should achieve the same result with <3.2.
1. If a package is already installed as a dep and is reinstalled with -S, then it will still be marked as installed as a dep.
2. If a package is already installed as explicit and is reinstalled with -S, then it will still be marked as installed as explicit.
3. If a package is not already installed and installed using -S, then it will be marked as installed as explicit.
Hardly, since I did pacman -S <...> in one run for all "affected" packages, noticing some of them still being marked as deps afterwards. The pacman.log probably isn't any useful here...
I'll have a look onto some other machines and will carefully watch for any unexpected behaviour... brb ;)
"And still I don't have any idea how I should achieve the same result with <3.2."
I don't want to instruct you to hack your database by hand, so I show you a safe method (the given package is foo):
1. pacman -S foo (maybe -Sy): upgrade/reinstall.
2. _If this was successful_, pacman -Rd foo
3. pacman -S foo
Just right now, I managed to reproduce the behaviour of -S marking a package as explicitely installed.
See this log:
bash-3.2# pacman -Qtd
hwdetect 0.9-1
bash-3.2# pacman -S hwdetect
resolving dependencies...
looking for inter-conflicts...
Targets: hwdetect-0.9-1
Total Download Size: 0.00 MB
Total Installed Size: 0.03 MB
Proceed with installation? [Y/n]
checking package integrity...
(1/1) checking for file conflicts [#############################] 100%
(1/1) installing hwdetect [#############################] 100%
bash-3.2# pacman -Qtd
bash-3.2# pacman -Qi hwdetect | grep "Install Reason"
Install Reason : Explicitly installed
What confuses me here is the fact that it didn't say "... is up to date -- reinstalling". Is that related?
That's strange. Can you reproduce it?
"Honestly, I don't like the idea of having to restore all pacsave-Files after a complete un- and reinstall."
Then you should vote to
FS#8645:-P> That's strange. Can you reproduce it?
Well, I experienced that every case in which "pacman -S" marked the as explicitely installed didn't show the warning, while it did show on packages that remained their install reason.
> Then you should vote to
FS#8645:-PThanks for the hint. :)
It shows for me. I looked into the source code too, I don't see any reason it shouldn't show.
Back to the original bug report, imho this can be closed as not a bug, and your feature request will be implemented in 3.2. Is this OK?
As long as no one is concerned about completely unexplained, seemingly random, unexpected behavior, yes. ;)
I'd still be interested in the hacking-the-database way of working around the yet missing --asexplicit flag, since -Rd/-S isn't really comfortable to me, compared to just flipping some bytes in some files (_if_ it isn' more than that).
Go into /var/lib/pacman/local/, this is the local database of pacman. In this directory the subdirectories are the database "entries". You will need to edit desc files here.
For example, my pcre package is installed as dependency, I show you how to change this to explicit:
Edit /var/lib/pacman/local/pcre-7.7-1/desc (as root):
You will see 2 lines (probably the last 2 one):
--------
%REASON%
1
--------
Set this 1 to 0.
P.S.: In fact, we don't store %REASON% 0 (In this case, we don't store %REASON% at all).
So alternatively, you can delete the 2 lines listed above (this is the "official" hack).
Thank you!