Re: [HEADSUP & CFT] pkg 1.0rc1 and schedule

From: Matthew Seaman <matthew_at_FreeBSD.org>
Date: Mon, 16 Jul 2012 07:18:05 +0100
On 16/07/2012 04:32, Peter Jeremy wrote:
> On 2012-Jul-12 10:01:10 +0000, Baptiste Daroussin <bapt_at_freebsd.org> wrote:
>> What is pkg
>> -----------
>> pkg is a new package manager for FreeBSD. It is designed as a replacement for
>> the pkg_* tools, and as a full featured binary package manager.
> 
> A couple of specific questions that I haven't seen answered during
> this thread or in the wiki:
> - Can pkgng cope with parallel installs?  What happpens if I
>   simultaneously (attempt to) install conflicting packages?

No.  Parallel installs will not work -- the first to start will lock the
DB, and the second won't be able to proceed.

> - If I use "pkg delete -f", what happens to packages that depended
>   on the forcibly-deleted package?

Nothing.  If you forcibly delete a package it's assumed you understand
that you know you're doing something that can break your system.
pkg check will detect missing dependency packages and reinstall as required.

> - What happens if I delete a package where I've modified one of the
>   files managed by the package?

The package is removed, but modified file is not:

# pkg check -s pciids
pciids-20120625: checksum mismatch for /usr/local/share/pciids/pci.ids
# pkg delete pciids
The following packages will be deinstalled:

	pciids-20120625

The deinstallation will free 788 kB
Deinstalling pciids-20120625...pkg: /usr/local/share/pciids/pci.ids
fails original SHA256 checksum, not removing
pkg: rmdir(/usr/local/share/pciids/): Directory not empty
 done
# pkg info pciids
pkg: No package(s) matching pciids
# ls -l /usr/local/share/pciids/pci.ids
-rw-r--r--  1 root  wheel  752925 Jul 16 07:05
/usr/local/share/pciids/pci.ids


> - What facilities does it have for auditing and repairing the package
>   database? (ie checking for inconsistencies between installed files
>   and the content of the package database)

See pkg-check(8)

> - How does it handle the situation where I install a package that
>   depends on foo version 1.2.3 but have foo version 1.2.4 (or 1.2.2)
>   installed?  What about if I have bar version 1.3, which is ABI-
>   compatible with foo version 1.2.3, installed?

This is an open issue at the moment.  If you have foo-1.2.2 installed,
it will upgrade for foo-1.2.3 (which is OK).  If you have foo-1.2.4
installed, at the moment it attempts to downgrade to foo-1.2.3; the
response should be to refuse to do that unless forced.

> - Will it detect that a package install would overwrite an existing
>   file?  What does it do in this case?

No.  Existing files are overwritten:

# pkg install pciids
Updating repository catalogue
Repository catalogue is up-to-date, no need to fetch fresh copy
The following packages will be installed:

	Installing pciids: 20120625

The installation will require 788 kB more space

92 B to be downloaded
pkg: cached package pciids-20120625: checksum mismatch, fetching from remote
pciids-20120625.txz                 100%  163KB 163.5KB/s 163.5KB/s
00:00
Checking integrity... done
Installing pciids-20120625... done


> - I gather it handles "update package" more intelligently than
>   "uninstall old package, install new package".  Will it avoid
>   replacing an old file with an identical one in the new package?

Yes exactly that.  Files in the older package that are identical in the
newer one are left untouched.  Otherwise, files from the older package
are removed, and files from the newer package are installed.

>   If so, what happens to the file metadata (particularly uid, gid
>   and mtime)?

Nothing.

> - Can it track user-edited configuration files that are associated
>   with packages?

This works in exactly the same way as it does currently in the ports.

> - Can it do 2- or 3-way merges of package configuration files?

No.  In general the package will install sample configuration files,
and will only touch the live config files if either the live configs
don't exist, or the live configs are identical to the sample configs.
This is the standard way things work in the ports at the moment.

> - The README states "Directory leftovers are automatically removed if
>   they are not in the MTREE."  How does this work for directories
>   that are shared between multiple packages?  Does this mean that if
>   I add a file to a directory that was created by a package, that
>   file will be deleted automatically if I delete the package?

No.  Directories have to be empty before they will be removed.

	Cheers,

	Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




Received on Mon Jul 16 2012 - 04:18:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC