Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first-time install of build-essential returns non-zero exit status #7

Closed
bixu opened this issue Aug 28, 2013 · 8 comments
Closed

first-time install of build-essential returns non-zero exit status #7

bixu opened this issue Aug 28, 2013 · 8 comments

Comments

@bixu
Copy link

bixu commented Aug 28, 2013

This occurs after a successful install of build-essential and its dependencies. This causes big problems for tools like chef, which want to exit/bail when this happens.

/cc @sax @bixu

@bixu
Copy link
Author

bixu commented Aug 28, 2013

...
installing build-essential-1.0...
Package build-essential-1.0 registered in /opt/local/pkg/build-essential-1.0
reading local summary...
processing local summary...
updating database: 100%
marking build-essential-1.0 as non auto-removable
[root@host ~]# echo $?
1

@bixu
Copy link
Author

bixu commented Aug 28, 2013

This may be related to this issue:
NetBSDfr/pkgin#2

@bixu
Copy link
Author

bixu commented Aug 28, 2013

When trussing the pkgin install, we found that the following is written out to /var/db/pkgin/sql.log:

SQL error: callback requested query abort
SQL query: SELECT PKGDB_MTIME FROM PKGDB;
SQL error: callback requested query abort
SQL query: SELECT FULLPKGNAME,PKGNAME,PKGPATH FROM LOCAL_PKG WHERE PKG_KEEP IS NOT NULL;
SQL error: callback requested query abort
SQL query: SELECT FULLPKGNAME,PKGNAME,PKGVERS,COMMENT,FILE_SIZE,SIZE_PKG,CATEGORIES,PKGPATH FROM REMOTE_PKG ORDER BY FULLPKGNAME ASC;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_DEPS_DEWEY, REMOTE_DEPS_PKGNAME FROM REMOTE_DEPS WHERE PKG_ID = (SELECT PKG_ID FROM REMOTE_PKG WHERE PKGNAME = 'patch' ORDER BY FULLPKGNAME DESC LIMIT 1);
SQL error: callback requested query abort
SQL query: SELECT REMOTE_DEPS_DEWEY, REMOTE_DEPS_PKGNAME FROM REMOTE_DEPS WHERE PKG_ID = (SELECT PKG_ID FROM REMOTE_PKG WHERE PKGNAME = 'gcc47-libs' ORDER BY FULLPKGNAME DESC LIMIT 1);
SQL error: callback requested query abort
SQL query: SELECT REMOTE_DEPS_DEWEY, REMOTE_DEPS_PKGNAME FROM REMOTE_DEPS WHERE PKG_ID = (SELECT PKG_ID FROM REMOTE_PKG WHERE PKGNAME = 'pkg_install-info' ORDER BY FULLPKGNAME DESC LIMIT 1);
SQL error: callback requested query abort
SQL query: SELECT REMOTE_DEPS_DEWEY, REMOTE_DEPS_PKGNAME FROM REMOTE_DEPS WHERE PKG_ID = (SELECT PKG_ID FROM REMOTE_PKG WHERE PKGNAME = 'scmgit-docs' ORDER BY FULLPKGNAME DESC LIMIT 1);
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'build-essential-1.0' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'autoconf-2.69nb2' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'automake-1.13.3' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'libtool-2.4.2nb2' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'scmgit-1.8.3.1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'scmgit-docs-1.8.3.1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'scmgit-gitk-1.8.3.1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'libtool-base-2.4.2nb4' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'libtool-fortran-2.4.2nb3' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'libtool-info-2.4.2' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Authen-SASL-2.16nb1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Email-Valid-0.190nb2' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Error-0.17019nb1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-MIME-Base64-3.13nb3' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-MailTools-2.12nb1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Net-SMTP-SSL-1.01nb4' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-IO-Socket-SSL-1.86nb1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-TimeDate-1.20nb4' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Net-DNS-0.69nb1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Digest-HMAC-1.03nb2' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-GSSAPI-0.28nb4' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Digest-MD5-2.52nb2' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Digest-SHA-5.84nb1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-IO-Socket-INET6-2.70' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Net-IP-1.26nb1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Socket6-0.23nb4' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Net-LibIDN-0.12nb5' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;
SQL error: callback requested query abort
SQL query: SELECT REMOTE_REQUIRES.REMOTE_REQUIRES_PKGNAME FROM REMOTE_REQUIRES,REMOTE_PKG WHERE REMOTE_PKG.FULLPKGNAME = 'p5-Net-SSLeay-1.54nb1' AND REMOTE_REQUIRES.PKG_ID = REMOTE_PKG.PKG_ID;

@bixu
Copy link
Author

bixu commented Aug 29, 2013

Note: This only appears to happen with pkgsrc 0.6.4 (smartos-base64 13.2.0, for example).

@bixu
Copy link
Author

bixu commented Aug 29, 2013

We get a nonzero exit status when installing scmgit on its own, so the problem may lie there.

@mamash
Copy link
Contributor

mamash commented Aug 29, 2013

It's a known issue - pkgin will return non-zero if one of the packages it installs already exists on the system. It's due to the core pkg_add, which behaves the same if '-f' forced (as pkgin executes it), whereas it should really just no-op "nothing to do".

@jperkin
Copy link
Collaborator

jperkin commented Sep 2, 2013

I've built an updated pkg_install to fix this for 2013Q1 and 2013Q2. In order to upgrade, you must run

pkg_add -u pkg_install

Subsequent pkgin runs should return the correct error code, though you will probably notice a bogus value for errors in the output, e.g.

pkg_install warnings: 0, errors: -4

This is merely cosmetic, and will be fixed in subsequent releases.

@AlainODea
Copy link

@jperkin I have included your workaround in my version of the joyent-smartmachine.erb bootstrap file for Chef.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants