Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Update Manager (mintupdate) and Synaptic Package Manager > E: Invalid record in the preferences file, no Package header E: Unable to lock the list directory #161

Closed
kimariterikishi opened this issue Jun 21, 2020 · 1 comment

Comments

@kimariterikishi
Copy link

kimariterikishi commented Jun 21, 2020

By the way, the problem arose on a Mint forum.
I was looking for a reason ...

Cause of the error:

My forum partner blacklisted the mintstick application in Update Manager, but also locked the minstick application (in parallel) in Synaptic Package Manager.

So far, everything is working fine.

The error occurs when I unlock the minstick application in Synaptic!

I searched, Synaptic stores the lock in the preferences file.

File path:

/var/lib/synaptic/preferences

Contents

at the time of locking:

-- read

cat /var/lib/synaptic/preferences

-- output

Package: mintstick
Pin: version 1.4.4
Pin-Priority: 1001

one line that looks empty remains after the unlock in terminal output (when I read preferences file with cat).

Examined with the diff application, the empty line already looks different:
(I created a new lock, and then unlocked. Therefore, the preferences file that I renamed earlier „mv” exists.)

diff preferences.ORIG preferences

... there is no difference here.

and highlighted 0a1,3 what would (I think) be important, which is not visible in the lock settings after the lock above:

0a1,3
> Package: mintstick
> Pin: version 1.4.4
> Pin-Priority: 1001

To fix the Update Manager error, rename the preferences file:

sudo mv /var/lib/synaptic/preferences /var/lib/synaptic/preferences.ORIG

I've figured out the cause of the error, maybe it might be worth making some fixes for this event as well. I know the user's thinking wasn't reasonable, but he still did what he did ...

The cause of the error is to unlock the application in Synaptic Package Manager.

Describe the bug
The error only occurs in the graphical interface.
When the panel is updated with an application when the GUI is not open, the update is OK. (Picture 5)
It may also be related to using the blacklist option. Signed up today, with version 5.6.7.

Screenshots
mintupdate 5 6 7 - frissítés (Ulyana Beta)_01
mintupdate 5 6 7 - frissítés (Ulyana Beta)_02
mintupdate 5 6 7 - frissítés (Ulyana Beta)_03
mintupdate 5 6 7 - frissítés (Ulyana Beta)_04
mintupdate 5 6 7 - frissítés (Ulyana Beta)_05

To Reproduce

  1. Go to 'mintupdate open GUI'
  2. Click on 'Refresh'
  3. See error

Expected behavior
Opening the mintupdate in the GUI, there is an error.

Distribution:
Linux Mint 20 (beta), Cinnamon Desktop Environment

Software version: mintupdate
5.6.7 and 5.6.8

Logs:
Where is mintupdate.log? I don't know.

Crash report: (LANGUAGE=en mintupdate)

/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1137: DeprecationWarning: Gdk.threads_init is deprecated
Gdk.threads_init()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1283: DeprecationWarning: Gtk.ImageMenuItem.set_image is deprecated
menuItem3.set_image(image)
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1515: DeprecationWarning: Gdk.threads_enter is deprecated
Gdk.threads_enter()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:670: DeprecationWarning: Gdk.threads_leave is deprecated
Gdk.threads_leave()

Additional context

Could not download all repository indexes

The repository may no longer be available or could not be contacted because of network problems. If available an older version of the failed index will be used. Otherwise the repository will be ignored. Check your network connection and ensure the repository address in the preferences is correct.
An error occurred

The following details are provided:

E: Invalid record in the preferences file, no Package header
E: Unable to lock the list directory

Locale:
HU (Hungarian)
EN (LANGUAGE=en mintupdate)

It's duplicate here (stable line): linuxmint/mintupdate#627
Sorry.


I tried to find out where the Update Manager stores the blacklist setting. No results yet, search in progress:

sudo grep -insr "mintstick" /

... but that’s just curiosity on the part, it doesn’t belong closely to the bug report.

@kimariterikishi kimariterikishi changed the title E: Invalid record in the preferences file, no Package header E: Unable to lock the list directory Update Manager (mintupdate) and Synaptic Package Manager > E: Invalid record in the preferences file, no Package header E: Unable to lock the list directory Jun 21, 2020
@xenopeek
Copy link

xenopeek commented Jun 21, 2020

You've provided a lot of information with this observation but it's not reproducible with the provided steps (1. Go to 'mintupdate open GUI'; 2. Click on 'Refresh'; 3. See error) nor does blacklisting a package in mintupdate and/or (I tried both) locking the version of the same package in Synaptic, or after lifting the lock, make a difference to reproduce this.

It looks unrelated to blacklisting / locking the version and to be that your apt lists files have a problem following from network issues on your system. I suggest you try to run Fix MergeList problems from Software Sources > Maintenance to see if that will fix it. Otherwise in Software Sources switch your main and base mirrors to a server closer to you. For further help with troubleshooting this I suggest to first take more help from the support forums to narrow down on exact steps to reproduce it, also on other systems. If you can narrow down on steps to reproduce this on other systems please open a new issue.

To answer some questions you had:

  • mintupdate stores blacklists in the user's dconf database (~/.config/dconf/user). You can query the blacklists stored in the dconf database with command: gsettings get com.linuxmint.updates blacklisted-packages or dconf read /com/linuxmint/updates/blacklisted-packages.
  • The empty line in /var/lib/synaptic/preferences is indeed just a newline character stored at the end of the file. This isn't a problem. You can dump the contents of the file with xxd /var/lib/synaptic/preferences to see after you've removed locks it just has 0x0a (newline) character in it. Not a problem.
  • mintupdate logs are stored in the /tmp/mintUpdate/ directory. Look in the newest file after you have an issue in mintupdate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants