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

Re: Downgrading packages (with dependencies)



Lukas Linhart wrote:
> we're building packages with concept of "metapackage": package whose only 
> purpose is to specify particular versions it depends on.

Sounds good.  It is very commonly done.

> Problem is, we'd like to be able to downgrade. However. I did not found the 
> option to "force download in dependency chain"; when metapackage is being 
> downgraded, all dependencies forced to download must be specified on command 
> line (with version to download to).
> 
> This is very annoying and yields whole downgrade concept unusable.
> 
> Is there any way to force said behavior or work around it?

No.  In general downgrades are not supported.  Packages are held
accountable to ensure that their installation scripts (preinst, prerm,
postinst, postrm, etc.) all behave correctly during upgrades.  There
isn't any systematic testing or requirement that they operate
correctly on downgrades.  Some do and some don't.

For example packages may convert configuration files forward from old
formats to new formats.  But I don't know of any that convert new
formats to old formats when downgrading.

Therefore apt and dpkg require extra confirmation that you know what
you are doing when you request a downgrade.  You can't upgrade a meta
package that depends upon a specific older dependency.  That appears
to the system more like a problem than a feature and so it is
disallowed.

If you want to do this then the best you can do is to create a script
that installs the packages that you need by specific version and then
'holds' them.  Tools like /bin/sh, cfengine, puppet, chef, all come to
mind.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: