synaptic doesn't unlock packages

Bug #12461 reported by Cms-ruinedsoft
6
Affects Status Importance Assigned to Milestone
synaptic (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

To reproduce...
Run synaptic, and lock a package (I used evolution):
Ctrl+F -> evolution
select the package.
Choose from the menu Package->Lock Version
Restart Synaptic.
Unlock evolution using the same procedure (it appears unlocked but is not).
Restart Synapitc.
Note that evolution is still locked.

The locks can be removed by clearning the appropriate lines in
/root/.synaptic/preferences

This bug has existed for some time and persists with the current cvs version
20050131.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I just tried to reproduce it but it seems to work for me. Can you please send me
your /root/.synaptic/preferences file with the locked package that does not want
to be unlocked?
Can you also please tell me if I have to lock a install/not installed/upgradable
package to trigger that bug or if it does not matter.

thanks,
 Michael

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

Created an attachment (id=1241)
Only evolution cannot be unlocked

This all started a long time ago in hoary.

At one point I used evolution and didn't want to break it by upgrading so it
was locked for a long time. 2.1.1 i think. Only recently did I realize it was
locked and I had to apt-get to install it. The evolution respritory version
went up while the package was locked, several times in fact. Over this period I
upgraded synaptic several times as well.

Running synaptic from the command line as a root shell doesn't seem to report
any error messages either.

With regards to your second comment, this seems to affect all packages
(regardless of status)... and I think I may have found another bug:

I just "Reload"ed the packages late last night and there is an upgradable
synaptic. Selecting lock on that package results in the same behavior (it is
locked even after unlocking and restarting the application). Furthermore, after
it is unlocked (and before you quit the application), synaptic reports that
current installed version is the latest version even though it is not (I know
for a fact there is a new version in the apt cache, but it no longer appears
upgradable through synaptic). So I am unable to upgrade the synaptic package
unless I remove this preferences file. I will attach another prefs file for
this example.

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

Created an attachment (id=1242)
I am unable to unlock synaptic and evolution, and synaptic is not displayed as
upgradable when it is "temporarily" unlocked.

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

I forgot to say, this behavior is definitely the same across all types
(not-installed as well).

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your help.

I still can't reproduce the problem here. Can you please try to rename the
/root/.synaptic/ directory and tell me if the problem persists? If remaming
solves the problem, it would be very kind if you could tar up the old synaptic
directory that caused the trouble and attach it to this bugreport.
(use "$sudo tar czvf bad-bad-synaptic.tgz /root/.synaptic.old")

thanks,
 Michael

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

The problem persists despite deleting the directory. The problem persists
despite the method used to invoke synaptic (as sudo -s or through the panel's menu).
The permissions of my root's home directory are
drwxr-xr-x 17 root root 4.0K Feb 4 19:46 root

I know I removed the directory properly because on start up synaptic warned me
about running it frequently for updates.

The permissions of the synaptic directory are
drwx------ 2 root root 4.0K Feb 4 19:47 .synaptic

What a strange bug.

Revision history for this message
Michael Vogt (mvo) wrote :

(In reply to comment #6)
> The problem persists despite deleting the directory. The problem persists
> despite the method used to invoke synaptic (as sudo -s or through the panel's
menu).
> The permissions of my root's home directory are
> drwxr-xr-x 17 root root 4.0K Feb 4 19:46 root
>
> I know I removed the directory properly because on start up synaptic warned me
> about running it frequently for updates.
>
> The permissions of the synaptic directory are
> drwx------ 2 root root 4.0K Feb 4 19:47 .synaptic
>
> What a strange bug.

Indeed! What machine do you run synaptic on? Is it a i386 or some other
architecture? What do you see if you mointor the file
/root/.synaptic/perferences when locking/unlocking.

Thanks,
 Michael

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

(In reply to comment #7)
> (In reply to comment #6)
> > The problem persists despite deleting the directory. The problem persists
> > despite the method used to invoke synaptic (as sudo -s or through the panel's
> menu).
> > The permissions of my root's home directory are
> > drwxr-xr-x 17 root root 4.0K Feb 4 19:46 root
> >
> > I know I removed the directory properly because on start up synaptic warned me
> > about running it frequently for updates.
> >
> > The permissions of the synaptic directory are
> > drwx------ 2 root root 4.0K Feb 4 19:47 .synaptic
> >
> > What a strange bug.
>
> Indeed! What machine do you run synaptic on? Is it a i386 or some other
> architecture? What do you see if you mointor the file
> /root/.synaptic/perferences when locking/unlocking.
>
> Thanks,
> Michael
>
>

I run synaptic on 686-smp with the specific kernel 2.6.9-1-686-smp version
2.6.9-11 (2.6.10 hasn't been stable). Some form of pentium 4 with hyperthreading.

I found something interesting monitoring preferences.
Locking a package definitely updates my preferences file. Unlocking a package
doesn't.
However the updates to the preferences file aren't what expected:
0. Removed the preferences file.
1. I locked evolution (preferences was created with evolution), then restarted
the program.
2. I opened up the program and unlocked evolution and the evolution
locked/installed icon when to a regular installed one (preferences file remained
unchanged). After each of these lock settings changes "Building dependency tree"
can be seen in the status bar.
3. I locked evolution-webcal assuming it would update the prefs file
appropriately hopefully remove the evolution entry but leave me with a locked
webcal only. Instead, the preferences file was updated with both evolution and
webcal locked.
4. The display on synaptic said evolution was unlocked and that webcal was locked.
5. Restarting the program shows them both locked.

My file system is ext3 and I have a separate partition for /boot (not sure if
that makes a difference). I also sym linked my /var/cache/apt/archives to a
different directory on another partition. Those are the only oddities.

It's like the code to remove the locked entry from the preferences file never
executes but the program sets the correctly locked flags in memory.

Revision history for this message
Michael Vogt (mvo) wrote :

I reworked the the code that does the lock/unlock a bit. It may fix the problem,
I'm interessted if it helps. You will need synaptic-0.55+cvs20050218 (may take a
bit until it hits your mirror).

Revision history for this message
Cms-ruinedsoft (cms-ruinedsoft) wrote :

(In reply to comment #9)
> I reworked the the code that does the lock/unlock a bit. It may fix the problem,
> I'm interessted if it helps. You will need synaptic-0.55+cvs20050218 (may take a
> bit until it hits your mirror).
>

Yep, this did the trick! Locking/Unlocking, even across exits, works as
expected. Nice job.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.