- How can I start using pkgng?
- Is there an equivalent for pkg-orphan/pkg_cutleaves with pkgng?
- How is pkgng different from the FreeBSD pkg_* tools? What is the motivation behind pkgng?
- How is pkgng different from PC-BSD PBI packages?
- What is the difference between
pkg delete -y
andpkg delete -f
? - Where is
pkg info -R
, the oldpkg_info
had-R
? - Can pkgng replace a package with an another version, eg. pkg upgrade pkg-1.0 pkg-2.0?
- How does pkgng deal with dependencies?
- The repository format of pkgng is different from the old one. Will pkgng adapt the old format too?
- Does
pkg repo
include symlinked packages? - How do I know if I have packages with the same origin?
- How to start working with multi-repos in pkgng?
- Why is
pkg create
slow? - Does pkgng work with portaudit?
- When will pkgng be the default package manager?
- How can I use pkgng with portmaster?
- How can I use pkgng with portupgrade?
- pkgng does not work it says: /usr/local/sbin/pkg: Undefined symbol "pkg_event_register"
- Can pkgng cope with parallel installs? What happpens if I simultaneously (attempt to) install conflicting packages?
- If I use "pkg delete -f", what happens to packages that depended on the forcibly-deleted package?
- What happens if I delete a package where I've modified one of the files managed by the package?
- 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)?
- Will it detect that a package install would overwrite an existing?
- If so, what happens to the file metadata (particularly uid, gid and mtime)?
- Can it track user-edited configuration files that are associated with packages?
- Can it do 2- or 3-way merges of package configuration files?
- 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?
- How to create a new plugin for pkgng?
In order to start using pkgng, please follow the steps below.
Install ports-mgmt/pkg:
# make -C /usr/ports/ports-mgmt/pkg install clean
# echo "WITH_PKGNG=yes" >> /etc/make.conf
Now register all packages you have in the pkgng database:
# pkg2ng
And that was it. Please read the man pages for more information on the commands.
pkg autoremove
is what you are looking for.
The README should explain all of that :)
PBI are flat/complete packages, where pkgng do package ports as there are.
By default pkgng will ask before doing something, -y == yes
means yes do it.
But if a package it depends on it will fail saying it is depend on, -f == force
means that delete it anyway.
New flags are: pkg info -d
for depends on, and pkg info -r
for reverse dependencies.
Currently not, but it is in the todo list.
Q: How does pkgng deal with dependencies? If pkgA-1.0
depends on pkgB-1.0
and pkgB-1.0
is updated to pkgB-2.0
, will pkgA
notice the change?
Yes, pkgA
will automatically notice the change.
Q: The repository format of pkgng is different from the old one. Will pkgng adapt the old format too?
The documented (README) way to create a new repository creates all packages in one directory.
This is different from earlier repository format, which creates it in separate directories.
Pkgng does not depend on a hierarchy, it recursively finds the packages from the provided directory entry.
The default hierarchy has lots of symlinks which should just be ignored and thus pkgng does not read symlinks.
Here is how to do that:
sh -c 'find . -type f -name "*-*.txz" -exec pkg query -F {} %o \;' | sort | uniq -d
As of beta17, pkg repo
will emit a warning message and ignore any
older versions if it finds multiple packages from the same origin
when building a repo.
Please refer to the README, which explains how to enable and get started with multi-repos in pkgng.
The number one reason is the XZ compression, which is slow.
No, pkgng uses internal pkg audit
command.
Possibly in version 9.2+
Ensure your ports tree is up-to-date, select the PKGNG option, and install/upgrade portmaster:
# portsnap fetch update
# make -C /usr/ports/ports-mgmt/portmaster config clean build deinstall install
# echo "WITH_PKGNG=yes" >> /etc/make.conf
# pkg2ng
Install the latest ports-mgmt/portupgrade, or ports-mgmt/portupgrade-devel. Both support pkgng.
# portsnap fetch update
# portupgrade ports-mgmt/portupgrade
# echo "WITH_PKGNG=yes" >> /etc/make.conf
# pkg2ng
More information can be found in the portupgrade NEWS file.
You forgot to run make delete-old-libs
when you upgraded your system.
During 9-CURRENT life the pkg_install tools have been split to provide a shared library: libpkg.so.0. This has been reverted, this error message means that this library is still on your system. Check for and delete /usr/lib/libpkg.so.0.
Q: 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.
Q: 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.
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
Q: 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)
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.
Nothing.
This works in exactly the same way as it does currently in the ports. Except if the package provide the configuration with a .pkgconf extension In that if there is no user config the default configuration is created otherwise, the user edited version is kept
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.
Q: 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.
If you are interested in creating a new plugin for pkgng you might want to check the following handbook which is an introduction to plugins writing for pkgng.