Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Sep 2012 03:24:42 GMT
From:      Garrett Cooper <yanegomi@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/171831: [pkgng] ports-mgmt/pkg: `make clean all deinstall install' always fails
Message-ID:  <201209210324.q8L3OgxN014943@red.freebsd.org>
Resent-Message-ID: <201209210330.q8L3UKsG008269@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         171831
>Category:       ports
>Synopsis:       [pkgng] ports-mgmt/pkg: `make clean all deinstall install' always fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 21 03:30:19 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        9.1-PRERELEASE
>Organization:
EMC Isilon
>Environment:
FreeBSD forza.west.isilon.com 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0 r240770: Thu Sep 20 19:28:45 PDT 2012     gcooper@forza.west.isilon.com:/usr/obj/usr/src/sys/FORZA  amd64
>Description:
I commonly do `make all deinstall install`, and this fails (for obvious reasons) because pkgng is deleting itself:

..

sted-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../pkg//version.c
cc -O2 -pipe -O2 -fno-strict-aliasing -O2 -fno-strict-aliasing  -I/scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../libpkg -g -O0 -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../pkg//which.c
cc -O2 -pipe -O2 -fno-strict-aliasing -O2 -fno-strict-aliasing  -I/scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../libpkg -g -O0 -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../pkg//fetch.c
cc -O2 -pipe -O2 -fno-strict-aliasing -O2 -fno-strict-aliasing  -I/scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../libpkg -g -O0 -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../pkg//shell.c
cc -O2 -pipe -O2 -fno-strict-aliasing -O2 -fno-strict-aliasing  -I/scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../libpkg -g -O0 -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../pkg//stats.c
cc -O2 -pipe -O2 -fno-strict-aliasing -O2 -fno-strict-aliasing  -I/scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../libpkg -g -O0 -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign  -static -o pkg-static add.o audit.o autoremove.o backup.o check.o clean.o create.o delete.o event.o info.o install.o main.o progressmeter.o query.o register.o repo.o rquery.o update.o upgrade.o search.o set.o shlib.o updating.o utils.o version.o which.o fetch.o shell.o stats.o -L/scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../libpkg  -lpkg  -lutil  -ljail  -lpthread  -L/scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../external/sqlite  -L/scratch/freebsd/ports/por
 ts-mgmt/pkg/work/pkg-1.0/pkg-static/../external/libyaml  -lsqlite3  -lyaml  -larchive  -lsbuf  -lfetch  -lpthread  -lelf  -lssl  -lcrypto  -lmd  -lz  -lbz2  -llzma -ledit  -lncursesw
/scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/pkg-static/../libpkg/libpkg.a(update.o): In function `pkg_update':
/scratch/freebsd/ports/ports-mgmt/pkg/work/pkg-1.0/libpkg/update.c:97: warning: warning: mktemp() possibly used unsafely; consider using mkstemp()
===>  Deinstalling for ports-mgmt/pkg
===>   Deinstalling pkg-1.0
The following packages will be deinstalled:

        pkg-1.0

The deinstallation will free 6 MB
Deleting pkg-1.0... done
===>  Installing for pkg-1.0
===>   Generating temporary packing list
===>  Checking if ports-mgmt/pkg already installed
/usr/local/sbin/pkg: not found
*** [check-already-installed] Error code 127

Stop in /scratch/freebsd/ports/ports-mgmt/pkg.

I'm can think of some ways that this could be resolved (hardlinks, copying, etc), but I'm not sure if they're the most safe/secure means to do it.
>How-To-Repeat:
cd /usr/ports/ports-mgmt/pkg make clean all deinstall install
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



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