Re: Reduce scope to one distribution?
----- Original Message -----
From: Ed Cogburn <ecogburn@greene.xtn.net>
To: Debian-Users <debian-user@lists.debian.org>
Sent: Friday, January 08, 1999 7:18 AM
Subject: Re: Reduce scope to one distribution?
>john@dhh.gt.org wrote:
>>
>> Morgan Fletcher writes:
>> > What happened: I had a system pointing at unstable, then I realized
that
>> > unstable is not slink, but rather potato. I didn't want a bleeding-edge
>> > distribution, so I pointed the system at slink (frozen). Now when I run
>> > dselect, there are potato-era packages listed that aren't really
>> > available to me, like kernel-source-2.0.36. Since apt can only see
>> > packages in slink, I'd rather my package database reflected that. How
can
>> > I restrict the package database and/or dselect to just encompass slink
>> > packages?
>>
>> Sounds like you would like to run the nonexistent command
>> 'apt-get dist-downgrade'. So would I.
No it sounds like he wants dselect to forget about packages it thinks are
available that arn't available any more.
> If you are feeling adventurous, take a look at 'man dpkg'. There
>is a couple of switches that might be useful, like
>--forget-old-unavailable and the --get-selection/--set selection
>combo. Please make a full backup of both /var/lib/dpkg/, and
>/var/cache/apt, before tinkering.
> --forget-old-unavailable might do what you want. The selection
>switches might be use in concert with an update of the Packages
>file. Lets say you use --get-selection to get the list of
>packages you have installed. Now remove the data files in the
>dpkg & apt dir and select Update from dselect (a clean rebuilding
>of the data files). Now run --set-selections so dpkg knows which
>packages are already installed.
> Try the -forget-old-unavailable and/or --clear-avail first. One
>of these may help.
> There's bound to be a dpkg guru out there, somewhere. Anyone?
>
I don't consider myself a guru but this sounds unnecessary to me.
>From what I read in the manual page dpkg has exactly the feature
you are looking for.
dpkg --update-avail | --merge-avail Packages-file
Update dpkg's and dselect's idea of which packages
are available. With action --merge-avail, old
information is combined with information from Pack
ages-file. With action --update-avail, old infor
mation is replaced with the information in the
Packages-file. The Packages-file distributed with
Debian GNU/Linux is simply named Packages. dpkg
keeps its record of available packages in
/var/lib/dpkg/available.
If you run dpkg with this option (--update-avail) it will forget about all
the packages that you don't want it to know about. The option is about
available packages not installed packages so the get-selections,
set-selections thing is unnecessary.
I have used this option on a running system, it does not "forget" which
packages are installed, just the ones that were available but arn't in the
revised Packages file.
So to recap, just run
dpkg --update-avail Packages-file
where Packages-file is pacakages you do want your system to know about :-)
Reply to: