Commit Graph

24 Commits

Author SHA1 Message Date
bapt
f16e768e50 Fix detection of arm ABIs
Submitted by:	andrew
Obtained from:	pkg git
2013-07-28 20:11:31 +00:00
bapt
640526e380 Fix a bad calloc(3) call
MFC after:	2 weeks
2013-06-08 23:48:13 +00:00
antoine
606ff9a6e8 Fix a typo in DPADD. 2013-03-10 17:10:16 +00:00
bapt
6438218c14 Fix bootstrapping pkgng by not appending "/latest/" to PACKAGESITE.
Reporter by :	Alexander Yerenkow (via irc)
2013-03-08 10:43:03 +00:00
bapt
c7071f4d0a choose in priority the allocated ABI if any to do the ${ABI} substitution in PACKAGESITE
Reviewed by:	bdrewery
2013-03-05 14:08:36 +00:00
bapt
94bcfee7d0 Add the ability to correctly read pkg.conf is exists.
Only look for boostrap useful options:
 - PACKAGESITE
 - ABI
 - MIRROR_TYPE
 - ASSUME_ALWAYS_YES

While here makes PACKAGESITE expand the ${ABI} variable.
Allow to deactivate any SRV record look up (MIRROR_TYPE=none)
Use the same mechanism as for pkgng itself: first get configuration out of
environment variable and fallback on pkg.conf if exists.

Reviewed by:	bdrewery
2013-03-05 13:31:06 +00:00
bapt
f4e406048b Do not use deprecated functions from libarchive 2013-02-20 22:51:42 +00:00
bapt
efbce5fcea In case of failure of the pkg boostrap advice the user to either change the
PACKAGESITE they use or install from ports directly indicating where the port
is localted in the port collection

Submitted by:	kientzle
2013-02-14 12:42:09 +00:00
bapt
a150559b39 Directly uses calloc(3) instread of malloc(3) + memset(3)
Reported by:	Jeremy Chadwick <jdc@koitsu.org>
MFC after:	3 days
2013-01-14 07:17:38 +00:00
matthew
7653472013 Remove extraneous space and new-line.
Submitted by:	pjd, gcooper
Approved by:	bapt
MFC after:	2 weeks
2012-12-23 20:39:03 +00:00
matthew
2fa689448c Third time's the charm. pkg -N output needs to go to stderr.
Approved by:	bapt
MFC after:	2 weeks
2012-12-23 11:22:18 +00:00
matthew
45679ebc7b Switch from 'pkg -n' to 'pkg -N' as the test for pkgn activation
status. '-n' is already used extensively elsewhere in pkgng (to mean
'dry-run') and this reduces the potential confusion

Submitted by:	eadler
Approved by:	bapt
MFC after:	2 weeks
2012-12-22 15:13:16 +00:00
matthew
0a2c07efd7 In preparation for making 'pkg -n' the one true method of determining
whether a system has been configured to use pkgng, cause /usr/sbin/pkg
recognise a -n option and exit with a failure code when the pkg port
is not installed.

Approved by:	bapt
MFC after:	2 weeks
2012-12-21 20:01:13 +00:00
bapt
aa139cc58e if PACKAGESITE url scheme is not 'file://', always try to revolv SRV records and
use them if any. It allows the bootstrap to use directly pkg.FreeBSD.org instead
of pkgbeta.FreeBSD.org

MFC after:	1 month
2012-12-05 11:35:50 +00:00
ed
af31e8843c More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
2012-10-19 14:49:42 +00:00
bapt
160bf30663 Fix confirmation logic when detecting a tty
Reported by:	mjg
2012-08-24 21:45:52 +00:00
bapt
c01de85820 - change ALWAYS_ASSUME_YES to ASSUME_ALWAYS_YES for consistency with pkg(8)
- if not on a tty prompt about the missing pkg(8) but default on 'no' except if
  ASSUME_ALWAYS_YES is set

MFC after:	2 days
2012-08-24 21:08:56 +00:00
kan
ee2618962b Make pkg bootstrap program ask for confirmation before proceeding.
The previous behaviour was to silently download and install the pkg
package, without ever telling user about what it was doing and why.

Discussed with:	bapt
Reviewed by: kib
2012-07-15 04:15:27 +00:00
bapt
f165b50eeb Add missing \n when generating pkg.conf
Reported by:	beat
Approved by:	des (mentor)
MFC after:	1 day
2012-05-21 15:45:18 +00:00
bapt
8f1960d6cc - close the open file after fetching
- create a default /usr/local/etc/pkg.conf

Approved by:	des (mentor)
2012-05-01 10:16:12 +00:00
bapt
10552859c1 - Use _PATH_TMP instead of hardcoded /tmp
- more style(9) fixes
- some refactoring
- better error detection
- Add the DPADD to Makefile

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Approved by:	des (mentor)
2012-04-16 20:41:25 +00:00
bapt
c8f7bbe987 - Fix style(9) bugs + inconsistencies
Submitted by:	marius
Approved by:	des (mentor)
2012-04-15 18:32:14 +00:00
bapt
008e190698 Do not do double initialisation
style(9) says for (;;) not while (1)

Reported by:	culot
Approved by:	des
2012-04-15 16:00:32 +00:00
bapt
d1d7ab95bb add usr.sbin/pkg which is a bootstrap tool for pkgng.
it respects PACKAGESITE, PACKAGEROOT, and a new environment variable ABI (if a user want to use a different API from the base one for its packages)
it has no man page on purpose to avoid hidding the pkg(8) man page from the pkgng package.
for now uses pkgbeta.FreeBSD.org as default mirror to find its package
it respects MK_PKGTOOLS

Approved by:	des (mentor)
2012-04-15 15:13:36 +00:00