Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jul 2016 17:17:08 +0300
From:      Slawa Olhovchenkov <slw@zxy.spb.ru>
To:        freebsd-stable@FreeBSD.org
Subject:   pkg: dup2(rootfd): Invalid argument
Message-ID:  <20160710141708.GE20831@zxy.spb.ru>

next in thread | raw e-mail | index | archive | help
I am trying to install xtrabackup on FreeBSD 9.1.

pkg enforce to upgrade:

=====
Installed packages to be UPGRADED:
        pkg: 1.5.2 -> 1.8.7
=====

After upgrade pkg will be broken:

=====
# pkg install qpress
Updating FreeBSD1 repository catalogue...
FreeBSD1 repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        qpress: 1.1

Number of packages to be installed: 1

Proceed with this action? [y/N]: y
[1/1] Installing qpress-1.1...
pkg: dup2(rootfd): Invalid argument
[1/1] Extracting qpress-1.1:   0%
pkg: Fail to create /usr: Bad file descriptor
[1/1] Extracting qpress-1.1: 100%
=====

Now I am try to downgrade:

====
# pkg add /var/cache/pkg/pkg-1.5.2.txz
Installing pkg-1.5.2...
the most recent version of pkg-1.8.7 is already installed
# pkg add -f /var/cache/pkg/pkg-1.5.2.txz
Installing pkg-1.5.2...
package pkg is already installed, forced install
pkg: dup2(rootfd): Invalid argument
Extracting pkg-1.5.2:   0%
pkg: Fail to create /usr: Bad file descriptor
Extracting pkg-1.5.2: 100%

Failed to install the following 1 package(s):
/var/cache/pkg/pkg-1.5.2.txz
====

Nice result. And for pkg-base niced.

====
# mkdir pkg
# cd !$
# tar xvf /var/cache/pkg/pkg-1.5.2.txz
 # ./usr/local/sbin/pkg-static add -f /var/cache/pkg/pkg-1.5.2.txz
pkg-static: warning: database version 33 is newer than libpkg(3)
version 31, but still compatible
Installing pkg-1.5.2...
package pkg is already installed, forced install
Extracting pkg-1.5.2: 100%
Message for pkg-1.5.2:
If you are upgrading from the old package format, first run:

  # pkg2ng
====

This is realy right way?!
This is like linux disorder.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160710141708.GE20831>