dpkg pinning fails using dpkg --set-selections
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I am unable to place mesa-utils on hold status so it doesnt get updated with apt-get dist-upgrade using the following.
wirechief@
dpkg: operation requires read/write access to dpkg status area
the first try it seemed to work but then it would just give the above, the first try it asked for my password.
[sudo] password for wirechief:
but subsequent packages would only have the dpkg: operation requires read/write access to dpkg status area
message.
I worked around this by actually going root, then it processed all my dpkg --set-selections without error.
root@wirechief-
I don't think it should work this way, you should just be able to use sudo echo mesa-utils hold | dpkg --set-selections
Linux wirechief-laptop 2.6.28-11-generic #41-Ubuntu SMP Wed Apr 8 04:39:23 UTC 2009 x86_64 GNU/Linux
ii apt 0.7.20.2ubuntu5 Advanced front-end for dpkg
ii dpkg 1.14.24ubuntu1 Debia
The problem is that the sudo is applying to the echo command but not to the dpkg. As the command that requires elevation is dpkg --set-selections, you should be able set the flag with either of the following commands:
sudo sh -c "echo libglul-mesa hold | dpkg --set-selections"
or:
echo libglul-mesa hold | sudo dpkg --set-selections