[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 20131102_142017, Ken Heard wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 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.
> 
> In section 2.7.16 of Aoki Osamu San's excellent Debian Reference,
> titled "Recording and copying system configuration" appears the following:
> 
> You can make a local copy of the package and debconf selection states
> by the following.
> # dpkg --get-selections '*' > selection.dpkg
> # debconf-get-selections    > selection.debconf

I don't have squeeze installed any more, but on my wheezy there is not
any 'debconf-get-selections'. This raises in my mind the suspicion
that Debian Reference needs updating. Or maybe debian-install was
incomplete at the time when I installed wheezy. 

> 
> Here, "*" makes "selection.dpkg" to include package entries for
> "purge" too.

This comment indicates to me that the get/set selections feature needs 
to be made more 'user friendly'. What is the use case for which one would
want a mixed list of installed and purged packages? 

I worked on this problem but never really finished. I did write a script
which I put into my nightly backup that produces a list of installed
packages *that have been because of specific user request*:

# aptitude -F "%p %M" search '~i' |tr -s ' ' | grep -v ' A$' > pkg-lst

To install all the packages in pkg-lst and all the packages on which
they depend, do:

# aptitude install $(cat pkg-lst)

Aptitude will re-order the list into an installable order and bring in
all the needed libraries, etc. Or you can edit the list, deleting the
ones you realize that you really don't want, and then run Aptitude against
the edited list. 

But if you are installing on a new machine, you will need to do a clean
install of the base system BEFORE the aptitude install step ;-)

Note that this procedure is NOT an upgrade. So notes about how to
upgrade to the new release should not apply.

I never reduced this to a neat easy to use system because the more I 
thought about it, the more different, use cases I thought of, and I
became to confused to finish.

Think about files other than Debian packages. Do you want to copy .ssh files,
and config files in /etc? Probably, yes. And a clean new install is a good
time to review the dreggs of completed, or abandoned, old projects.  


HTH

> 
> 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
> 
> Will this command sequence generally work when the "from" box has
> Squeeze and the "to" box has Wheezy?  Specifically, will the packages
> installed in the Wheezy box having the same names as the ones in the
> Squeeze box be the Wheezy versions rather than the Squeeze versions?
>  I would assume that when the second group of commands is run any
> packages or config files already in the Wheezy box which are later
> versions of than those in the Squeeze box would be left alone.
> 
> Also it would appear that where there are no exact equivalents in the
> two boxes the Squeeze versions would be installed if the dependency
> situation allowed it; otherwise they would not be.
> 
> To know what happened when the second group of commands is run can a
> log file be thereby created for that purpose?
> 
> Regards, Ken Heard
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> 
> iEYEARECAAYFAlJ1QmEACgkQlNlJzOkJmTeOOwCfYDUF8JAHENU93dqNOnTvonU/
> 8aQAn2BFrHhc9Ptn4WSrp3ctcSBERpFv
> =is3E
> -----END PGP SIGNATURE-----
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 52754261.1090306@teksavvy.com">http://lists.debian.org/[🔎] 52754261.1090306@teksavvy.com
> 

-- 
Paul E Condon           
pecondon@mesanetworks.net


Reply to: