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

Bug#115520: "-t" for apt-cache, default preferences, # for preferences



Package: apt
Version: 0.5.4
Severity: wishlist

Thank you for nice system tools. Here is my feature requests:
 1) -t and other similar commands for apt-cache as in apt-get
 2) preferences file to allow # lead comments (officially)
 3) creation of default preferences file

Here is my long story with example file:

1) 
Even though, 

 # apt-cache -o APT::Default-Release=testing policy packagename

exists, its nice to have equivalent "-t" found in "apt-get" to do

 # apt-cache -t testing policy packagename

This makes life easy.  (Yes, I know -s option for apt-get...)

2)
Also, include a basic sane /etc/apt/preferences with many comment lines
needs to be installed by install script if no file existed during
upgrade.  If testing and unstable entries are added to sources.list
without /etc/apt/preferences, system end up with:

Pin-priority=500 for stable,testing,unstable
Pin-priority=100 for installed package

I think reasonable starting /etc/apt/preferences is:
-------- x8 
# Make stable as default system.
Package: *
Pin: release a=stable
Pin-Priority: 500

# Make testing as 2nd priority
Package: *
Pin: release a=testing
Pin-Priority: 400

# Make unstable as 3rd priority
Package: *
Pin: release a=unstable
Pin-Priority: 300
#
# Read "man 5 apt_preferences"
#
# If one wants to track testing (with missing packages from unstable)
# change Pin-priority for testing to 700 and unstable to 600.
#
# If one wants to keep particular package at fixed version do as
# following example. (Remove leading # to activate): 
# Package: apt 
# Pin: version 0.5.*
# Pin-Priority: 2000
#
# If one must force to downgrade to particular distribution, set its
# Pin-priority of the distribution to above 1001.  
#
# apt(5.4) allow meaningless entry which enabled this comments.
# Be careful not to have empty line which break this.
-------- x8

3)
Leading # may not be a correct documented feature, but current engine
disregard strange starting token and happily considers as a comment, I
think ;-)  Of course, adding # lead comment as feature is nice to have.

-- 
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ 
+  Osamu Aoki <debian@aokiconsulting.com>, GnuPG-key: 1024D/D5DE453D  +




Reply to: