dpkg pinning fails using dpkg --set-selections

Bug #360157 reported by wirechief on 2009-04-12
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
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@wirechief-laptop:~$ sudo echo mesa-utils hold | dpkg --set-selections
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-laptop:/home/wirechief# echo libglu1-mesa hold | dpkg --set-selections

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

wirechief (wirechief) wrote :
wirechief (wirechief) wrote :
Vin Shankar (v-shankar) wrote :

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

Interesting..
Thank you for adding to my knowledge of how to control my packages
between holding and install
(one bug falls to the floor with all four feet in the air)

On Mon, Apr 13, 2009 at 6:12 PM, Vin Shankar
<email address hidden> wrote:
> 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
>
> --
> dpkg pinning fails using dpkg --set-selections
> https://bugs.launchpad.net/bugs/360157
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Reach out and share life, care for others,

Monkey (monkey-libre) wrote :

I´ve closed this bug. Please if You have any problem about this issue reopen it.

Thank You for making Ubuntu better.

Changed in ubuntu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers