[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to comment out lines in /etc/apt/preferences?



On Thu, 2003-01-23 at 07:06, Lloyd Zusman wrote:
> Ron Johnson <ron.l.johnson@cox.net> writes:
> 
> > On Thu, 2003-01-23 at 05:39, Lloyd Zusman wrote:
> >> Is there a way to comment out lines in /etc/apt/preferences?  I tried
> >> various comment characters, but none worked.  I couldn't find anything
> >> about this in the documentation.
> >
> > The hash (#) always works for me...
> 
> But the hash doesn't work for me on /etc/apt/preferences ...
> 
>   # cat /etc/apt/preferences
>   Package: mplayer*
>   Pin: release a=unstable
>   Pin-Priority: 700
> 
>   #Package: ruby*
>   #Pin: release a=unstable
>   #Pin-Priority: 700
> 
>   Package: *
>   Pin: release a=testing
>   Pin-Priority: 650
> 
>   Package: *
>   Pin: release a=unstable
>   Pin-Priority: 600
> 
>   # apt-get update
>   ... normal `apt-get update' output, followed by:
>   E: Invalid record in the preferences file, no Package header
> 
> If I remove the hashes before lines in the "ruby*" section, I no longer
> get that error.
> 
> This seems to imply that the hash mark is not considered to be a proper
> comment character in /etc/apt/preferences.
> 
> 
> -- 
>  Lloyd Zusman
>  ljz@asfast.com

Leave a space between # and the line you're commenting out.
 
-- 
Dale Hair <dale@meridian-electric.com>



Reply to: