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

Re: Installing same packages in a Squeeze installation in a new Wheezy installation



On Wed, Nov 6, 2013 at 9:25 PM, Bob Proulx <bob@proulx.com> wrote:
> Ken Heard wrote:
>>
>> In a new box where the Wheezy OS will be freshly installed I want to
>> install all the packages which I presently have in a box with Squeeze.
>
> This is a question that appears on the list every so often. People
> want to be able to do this. But unfortunately it isn't easy to do
> well in practice. It is easy do sloppily. But hard to do well. And
> so there are many proposed solutions but none of them work well.
>
>> # dpkg --get-selections '*' > selection.dpkg
>> # debconf-get-selections > selection.debconf
>> ...
>> You can transfer these 2 files to another computer, and install there
>> with the following.
>> # dselect update
>> # debconf-set-selections < myselection.debconf
>> # dpkg --set-selections < myselection.dpkg
>> # apt-get -u select-upgrade # or dselect install
>
> Typo there: s/select-upgrade/dselect-upgrade/
>
> That is definitely the old venerable way of doing this on Debian from
> a decade of years ago. When working on the same version of Debian it
> even worked relatively well. Then. But now we have extended_states
> in APT supporting 'apt-get autoremove'. With regards to that the
> above no longer works well. For one problem it completely breaks the
> extended_states paradigm.
>
> The extended_states paradigm is to track for each package whether it
> was installed manually or installed as a dependency of another
> package. If you install foo and foo depends upon libfoo then foo is
> marked as manual and libfoo is marked as automatic.
>
> With the above get-selections, set-selections method then everything
> is set to manually installed. So if you do this then you must also
> take into consideration the extended states and handle it somehow.

You can select the non-automatically installed packages with "aptitude
search '?narrow(~i,!~M)'".


Reply to: