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

Re: How to consistently install a set of packages?



Le 07/06/2013 00:22, paul e condon a écrit :
[...]
Are there any better methods I should be aware of, to ensure that
everywhere the packages are installed in the same sequence?


David,

I am involved in a project that parallels your's in that it is just as 'outside the mainstream' as your's seems to be. I have found some useful features of Aptitude for building and using a personal selection of packages:
To generate a list of installed packages, run;

# aptitude -F "%p %M" search "~i" | tr -s " " > /root/packages-all

This generates a list of all installed packages, followed by ' A' if the package marked as needed by some other package.
Run:

# grep -v ' A$' /root/packages-all > packages-noA

to generate a minimum length list of packages that must be installed by Aptitude to force the installation of all packages via the dependency mechanism.

Then to install the whole lot on a nearly naked computer, run:

# aptitude install $(cat /root/packages-noA)

The files are text which can be edited in vim or emacs to remove cruft that is actually on the source computer but that you really don't to be automatically propagated to all your computers.

The order in which packages are actually install is, I think, not alphabetical. Aptitude has some internal logic that installs in an order that is defined by the dependency tree.

On a related topic:
Numbering of groups depends on the order in which the named groups were created during installation of the packages. You only have one user so that one user will always have a uid==1000 on Debian. All real users in Debian also have their own group, so your gid will be gid==1000. If you list the file /etc/group, you will find gid == 1000 towards the end of the list, but not at the end because /etc/group grows during install by adding new group name/gid as they are needed. You say the hardware of your several computers in not identical. There will likely be differences in the dependency tree in different architectures, so there will be problems over time keeping the name/number pairs the same in different architectures and different releases. I sure the problem is solvable but the effort may be beyond what you want expend on going your own way. It does sound like an interesting way to become very familiar with the insides of Debian, and a rich source of knit-picking bug reports on the documentation ;-)

Good Luck,
Paul


You can have in one command what you do :
And more, with the installed version, to be sure to install the same version, even if there were updates since :

# aptitude -F "%p=%V" --disable-columns search '~i!M'

For the ordering problem. I dont think the solver is silly enought to install in a different order the same set of packages, asuming the starting state is the same of course.

Anyway, you can change the uid/gid afeterward if they are different !
And change the rights with a command like :

# find / -uid 120 -exec chown 110 {} \;
# find / -gid 120 -exec chgrp 110 {} \;



Reply to: