Forum
« messed up /etc/apt/preferences file »

Welcome Guest. Please Login or Register.
May 25, 2013, 3:17am



Return to or visit the SalineOS webpage

Forum :: General :: Software and Applications :: messed up /etc/apt/preferences file
   [Search This Thread] [Share Topic] [Print]
 AuthorTopic: messed up /etc/apt/preferences file (Read 125 times)
malspa
Full Member
***
member is offline

[avatar]



Joined: Jan 2011
Posts: 171
Location: albuquerque
 messed up /etc/apt/preferences file
« Thread Started on May 26, 2012, 5:15pm »

I ran AutoUpdate today and it seems to have messed up my /etc/apt/preferences file. Here are the first few lines of output that I see:

Code:
--2012-05-26 15:59:02-- [url]http://www.salineos.com/apt/preferences[/url]
Resolving [url]www.salineos.com...[/url] 72.167.2.128
Connecting to [url]www.salineos.com[/url]|72.167.2.128|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “/etc/apt/preferences” [ <=> ] 415 --.-K/s in 0s

2012-05-26 15:59:07 (45.4 MB/s) - “/etc/apt/preferences” saved [415]

E: Invalid record in the preferences file /etc/apt/preferences, no Package header
E: Invalid record in the preferences file /etc/apt/preferences, no Package header



My /etc/apt/preferences file is a .html file (???) modified 2012-05-26 15:59. Here's what it contains:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> -->
<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="0.1">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<TITLE></TITLE>
</HEAD>
<BODY><P></BODY>
</HTML>


Not sure what happened here. Any way to fix it?
Link to Post - Back to Top  IP: Logged
beardedragon
Global Moderator
*****
member is offline

[avatar]



Joined: Feb 2011
Gender: Male
Posts: 858
 Re: messed up /etc/apt/preferences file
« Reply #1 on May 26, 2012, 7:10pm »

Note, this is SalineOS 1.5 upgraded 64bit system. You seem to have missing Headers. My Auto-update started like this:

Code:
--2012-05-26 18:59:17-- [url]http://www.salineos.com/apt/preferences[/url]
Resolving [url]www.salineos.com...[/url] 72.167.2.128
Connecting to [url]www.salineos.com[/url]|72.167.2.128|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2168 (2.1K) [text/plain]
Saving to: “/etc/apt/preferences”

100%[======================================>] 2,168 --.-K/s in 0s

2012-05-26 18:59:23 (5.63 MB/s) - “/etc/apt/preferences” saved [2168/2168]

Get:1 [url]http://dl.google.com[/url] stable Release.gpg [198 B]
Ign [url]http://dl.google.com/linux/earth/deb/[/url] stable/main Translation-en
Ign [url]http://dl.google.com/linux/earth/deb/[/url] stable/main Translation-en_US
Get:2 [url]http://dl.google.com[/url] stable Release [1,338 B]
Get:3 [url]http://dl.google.com[/url] stable/main amd64 Packages [469 B]
Hit [url]http://backports.debian.org[/url] squeeze-backports Release.gpg
Ign [url]http://backports.debian.org/debian-backports/[/url] squeeze-backports/contrib Translation-en


Preferences file (which is a plaintext file) Looks like this:

Code:
Package: python-beautifulsoup python-pymtp exaile libmtp8
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: virtualbox-ose virtualbox-ose-qt virtualbox-ose-source virtualbox-ose-guest-source virtualbox-ose-dkms virtualbox-ose-guest-dkms virtualbox-ose-dbg virtualbox-ose-fuse virtualbox-ose-guest-x11 virtualbox-ose-guest-additions virtualbox-ose-guest-utils
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: gnucash gnucash-common libaqbanking-data
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: icedove icedove-dbg icedove-dev icedove-l10n-af icedove-l10n-all icedove-l10n-ar icedove-l10n-be icedove-l10n-bg icedove-l10n-bn-bd icedove-l10n-ca icedove-l10n-cs icedove-l10n-da icedove-l10n-de icedove-l10n-el icedove-l10n-en-gb icedove-l10n-es-ar icedove-l10n-es-es icedove-l10n-et icedove-l10n-eu icedove-l10n-fi icedove-l10n-fr icedove-l10n-fy-nl icedove-l10n-ga-ie icedove-l10n-gd icedove-l10n-gl icedove-l10n-he icedove-l10n-hu icedove-l10n-id icedove-l10n-is icedove-l10n-it icedove-l10n-ja icedove-l10n-ko icedove-l10n-lt icedove-l10n-nb-no icedove-l10n-nl icedove-l10n-nn-no icedove-l10n-pa-in icedove-l10n-pl icedove-l10n-pt-br icedove-l10n-pt-pt icedove-l10n-ro icedove-l10n-ru icedove-l10n-si icedove-l10n-sk icedove-l10n-sl icedove-l10n-sq icedove-l10n-sr icedove-l10n-sv-se icedove-l10n-tr icedove-l10n-uk icedove-l10n-vi icedove-l10n-zh-cn icedove-l10n-zh-tw icedove-sieve xul-ext-sieve
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: libnm-glib2 libnm-util1 network-manager network-manager-gnome network-manager-openvpn network-manager-kde network-manager-dev network-manager-dbg network-manager-openvpn-gnome network-manager-pptp network-manager-pptp-gnome network-manager-vpnc network-manager-vpnc-gnome
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: usb-modeswitch usb-modeswitch-data usb-modeswitch-data-packed
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: *
Pin: release a=squeeze-backports
Pin-Priority: 200

Package: *
Pin: release a=squeeze
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 200

Package: *
Pin: release a=wheezy
Pin-Priority: 200



First open Thunar with
Code:
gksu thunar

Then navigate to /etc/apt/preferences and change the name to preferences.old, save your work and reboot.
« Last Edit: May 26, 2012, 7:30pm by beardedragon »Link to Post - Back to Top  IP: Logged

Robert Collard, Madison, WI
HP s5710f, 2x AMD Athlon II 260@3.2Ghz 3GB RAM, 640GB HD
Debian 7.0 XFCE-4.10 3.2.0-4-amd64

If you are satisfied with the results, please Edit your first post and add [Solved] to the Subject line.
malspa
Full Member
***
member is offline

[avatar]



Joined: Jan 2011
Posts: 171
Location: albuquerque
 Re: messed up /etc/apt/preferences file
« Reply #2 on May 26, 2012, 8:51pm »

- If I have "missing headers," how do I correct that (and why are they missing)?

- After renaming the html file, is it okay to use your /etc/apt/preferences? This is the same system that I've been keeping updated since I first installed SalineOS-1.0-i386.
Link to Post - Back to Top  IP: Logged
beardedragon
Global Moderator
*****
member is offline

[avatar]



Joined: Feb 2011
Gender: Male
Posts: 858
 Re: messed up /etc/apt/preferences file
« Reply #3 on May 26, 2012, 8:55pm »


May 26, 2012, 8:51pm, malspa wrote:
- If I have "missing headers," how do I correct that (and why are they missing)?

- After renaming the html file, is it okay to use your /etc/apt/preferences? This is the same system that I've been keeping updated since I first installed SalineOS-1.0-i386.

I would not advise it, I made a point of telling you System number and version AMD64 so you would not use it for anything else. Perhaps if someone has the same setup as you they can help out?
Link to Post - Back to Top  IP: Logged

Robert Collard, Madison, WI
HP s5710f, 2x AMD Athlon II 260@3.2Ghz 3GB RAM, 640GB HD
Debian 7.0 XFCE-4.10 3.2.0-4-amd64

If you are satisfied with the results, please Edit your first post and add [Solved] to the Subject line.
Anthony Nordquist
Administrator
*****
member is offline




[homepage]

Joined: Dec 2010
Gender: Male
Posts: 1,339
 Re: messed up /etc/apt/preferences file
« Reply #4 on May 26, 2012, 9:10pm »

Honestly I can't come up with a how your preferences file got that way, but yes it is safe to use the contents of his file as long as you haven't updated to Debian Testing.

For the record this is what your preferences file should contain:


Package: python-beautifulsoup python-pymtp exaile libmtp8
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: virtualbox-ose virtualbox-ose-qt virtualbox-ose-source virtualbox-ose-guest-source virtualbox-ose-dkms virtualbox-ose-guest-dkms virtualbox-ose-dbg virtualbox-ose-fuse virtualbox-ose-guest-x11 virtualbox-ose-guest-additions virtualbox-ose-guest-utils
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: gnucash gnucash-common libaqbanking-data
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: icedove icedove-dbg icedove-dev icedove-l10n-af icedove-l10n-all icedove-l10n-ar icedove-l10n-be icedove-l10n-bg icedove-l10n-bn-bd icedove-l10n-ca icedove-l10n-cs icedove-l10n-da icedove-l10n-de icedove-l10n-el icedove-l10n-en-gb icedove-l10n-es-ar icedove-l10n-es-es icedove-l10n-et icedove-l10n-eu icedove-l10n-fi icedove-l10n-fr icedove-l10n-fy-nl icedove-l10n-ga-ie icedove-l10n-gd icedove-l10n-gl icedove-l10n-he icedove-l10n-hu icedove-l10n-id icedove-l10n-is icedove-l10n-it icedove-l10n-ja icedove-l10n-ko icedove-l10n-lt icedove-l10n-nb-no icedove-l10n-nl icedove-l10n-nn-no icedove-l10n-pa-in icedove-l10n-pl icedove-l10n-pt-br icedove-l10n-pt-pt icedove-l10n-ro icedove-l10n-ru icedove-l10n-si icedove-l10n-sk icedove-l10n-sl icedove-l10n-sq icedove-l10n-sr icedove-l10n-sv-se icedove-l10n-tr icedove-l10n-uk icedove-l10n-vi icedove-l10n-zh-cn icedove-l10n-zh-tw icedove-sieve xul-ext-sieve
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: libnm-glib2 libnm-util1 network-manager network-manager-gnome network-manager-openvpn network-manager-kde network-manager-dev network-manager-dbg network-manager-openvpn-gnome network-manager-pptp network-manager-pptp-gnome network-manager-vpnc network-manager-vpnc-gnome
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: usb-modeswitch usb-modeswitch-data usb-modeswitch-data-packed
Pin: release a=squeeze-backports
Pin-Priority: 900

Package: *
Pin: release a=squeeze-backports
Pin-Priority: 200

Package: *
Pin: release a=squeeze
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 200

Package: *
Pin: release a=wheezy
Pin-Priority: 200
Link to Post - Back to Top  IP: Logged
malspa
Full Member
***
member is offline

[avatar]



Joined: Jan 2011
Posts: 171
Location: albuquerque
 Re: messed up /etc/apt/preferences file
« Reply #5 on May 26, 2012, 9:24pm »

OK, thanks.

Prior to my renaming /etc/apt/preferences to /etc/apt/preferences.old, the only changes made to the file, as far as I know, were made by the RunUpdate script.

/usr/local/bin/RunUpdate:

Code:
#!/bin/bash
wget [url]http://www.salineos.com/apt/preferences[/url] -O /etc/apt/preferences
aptitude update
DEBIAN_FRONTEND='gnome' dbus-launch aptitude dist-upgrade
aptitude clean
echo Done
exit


So it appears that when I ran AutoUpdate today, /etc/apt/preferences was replaced with that html file. Not sure why.

I see what's probably the correct contents of the file at http://www.salineos.com/apt/preferences, so I replaced mine with that. After that, AutoUpdate appeared to run correctly.
Link to Post - Back to Top  IP: Logged
malspa
Full Member
***
member is offline

[avatar]



Joined: Jan 2011
Posts: 171
Location: albuquerque
 Re: messed up /etc/apt/preferences file
« Reply #6 on May 26, 2012, 9:25pm »

Thanks, Mr. Nordquist, my last post was actually done before I saw yours.
Link to Post - Back to Top  IP: Logged
   [Search This Thread] [Share Topic] [Print]



Anthony Nordquist, on behalf of the SalineOS project, is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. As such, if you click the above banner and then make any purchase including digital downloads, a small percentage will be paid to the SalineOS project.
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile