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

Re: Installing app list on a new dist

On Sun, Oct 04, 2009 at 12:40:57PM -0700, Bill wrote:
> Hi folks,
> About a month ago there was a thread entitled "Installed list of
> Apps" concerning the right way to duplicate installed apps on one
> box to another. 
> Johan Gronquist suggested:
> dpkg --get-selections
> dpkg --set-selections
> http://ubuntuforums.org/showthread.php?t=169062

this method will give every installed package
> Oumar Niane suggested:
> $ aptitude -F "%p" search '~i!~M' > package_list
> $ aptitude install < package_list
> and pointed out that:
> With [the other] method, you loose the flag for packages that 
> were automatically installed.

this method gives only manually installed packages. automatically
installed packages will be brought in, well, automatically.

> OK so my situation is somewhat different. I wish to install 
> the packages from a sarge install to a fresh install of lenny
> and keep the list of installed packages more or less the same.
> If lenny upgrades the package then I'd prefer to use the newer
> version rather than install an older version. I don't want to 
> "loose" all the extra packages I've installed on sarge by moving 
> to a fresh install.
> So in testing the two methods, the dpkg list is 1923 lines long
> including 73 "deinstalled" lines, whereas the aptitude method is 
> 1276 lines long. 

this makes sense. only a subset of installed packages were explicitly
installed. the others were brought in automatically.

> So I have two questions:
> 1. Why is there such a substantial discrepancy between the two
> methods and which method would be preferable?

hopefully that is already clear from the above.

> 2. What about discrepancies between versions? Many lines include
> a version number. Will I wind up with older package versions or 
> will it be upgraded to the lenny version? How can I get around
> that if necessary?

I think to make this work you'd want to manually go over the
list. Jumping two versions like that will leave you trying to install
packages that just don't exist anymore. 

definitely, whichever method you use, I would remove any packages that
start with lib, and review the whole thing manually. Also, spend some
time decrufting the system before producing the lists. deborphan is
your friend here. 

in the end, there may not really be any good way to do this
automatically unless you want to script up something to parse the list
and check against the apt-cache to see if they exist, throwing out the
ones that fail.'



Attachment: signature.asc
Description: Digital signature

Reply to: