In <[🔎] 87y667y15i.fsf@pobox.com>, Tom Roche wrote:
>summary: I'm preparing to migrate a laptop from Ubuntu Lucid to Linux
>Mint Debian Edition 10 and want to have the same packages (c.p.) active
>after the migration. I believe I know how to migrate the packages using
>`dpkg` and `apt-get`, but would prefer to migrate the packages using
>`aptitude` alone. Is this possible? Are there reasons not to do this?
There are plenty of reasons not to do it that way. It's not supported by the
LMDE team or the Ubuntu team would be the first one. Package names varying
between distributions is the other big one. There's quite a lot that can go
wrong so I hope you are comfortable with your package manager.
># in terminal in ubuntu
>dpkg --get-selections > "${PACKAGE_FILE}"
># in terminal in LMDE
>sudo dpkg --set-selections < "${PACKAGE_FILE}"
I think this loses the information on what package as "automatically
installed" which can ease upgrades. I think the easiest way to access that
right now is through aptitude, but I know that information was supposed to be
stored by APT, at least post-Squeeze.
(FWIW, I'm not as familiar with Ubuntu as I am with Debian and I've never used
LMDE.)
>sudo apt-get dselect-upgrade
>sudo aptitude update
>sudo aptitude -s full-upgrade
>
>Is that correct? If so:
>
>I've been managing its packages exclusively with `aptitude` and would
>prefer to continue doing so. I'd like to know,
>
>1 Is there a way to do all of the above using only `aptitude`?
If you aren't picky about specific *versions* of the packages, I think so.
It's unlikely you'll be able to preserve much version information anyway since
your are migrating between distributions.
# Source
aptitude search '~i' --disable-columns -F '%p' > installed_packages
aptitude search '~i~M' --disable-columns -F '%p' > auto_installed_packages
# Destination
sudo aptitude purge --schedule-only '~i'
sudo xargs -- aptitude install --schedule-only < installed_packages
sudo xargs -- aptitude markauto --schedule-only < auto_installed_packages
That should handle everything you did with dpkg, but without even the pretense
of preserving version numbers.
>2 Is there a way to do all of the above using only `aptitude` and `dpkg`?
> I.e. is there an `aptitude` equivalent of `apt-get dselect-upgrade`?
> FWIW I don't see that argument in `info aptitude`.
No, although aptitude does something similar when simply run as (aptitude
install). It tries to satisfy the current selections even if the specific
versions requested are not available. I propose this instead:
# After dpkg stuff (or aptitude stuff above)
sudo aptitude
press 'U'
press 'e'
Use interactive resolver to get your system in a consistent state. You
can use this simple process: Are the proposed actions acceptable? If so,
press '!'. If not, highlight the least acceptable action, press 'r' then '.'
and repeat.
press 'g'
Final confirmation of actions.
press 'g'
That said, I've never tried something this big and messy with aptitude. I'm
also a big fan of the interactive resolver and the CUI. You might try the
much more risky (sudo aptitude -y install) instead of using the CUI if you
don't like it.
>3 Is there a reason to prefer the [`dpkg`, `apt-get`, `aptitude`]
> workflow above to a purely-`aptitude` workflow for this usecase?
Probably not. That said, the aptitude and apt-get resolvers do differ in
their behavior, so if you run into dependency problems, it might be worth it
to use both tools.
I wouldn't do something like you are proposing anyway, but it seems like most
(if not all) the problems with the migration should be caught by the package
managers. If you can make them happy, I think your system will probably be
fine after the migration.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
Attachment:
signature.asc
Description: This is a digitally signed message part.