Compare commits
25 Commits
master
...
mixed-upin
Author | SHA1 | Date | |
---|---|---|---|
a2626355ac | |||
bfb5cde112 | |||
d2951b0897 | |||
1287e9920d | |||
a073423a89 | |||
284b9e5e21 | |||
4c821419fb | |||
e97879074b | |||
449c0e0553 | |||
5ee692a858 | |||
91632a574d | |||
1c3bcde003 | |||
4b069aa3d6 | |||
e67aa2cbd3 | |||
507afd9766 | |||
68239f077b | |||
06b1599c8c | |||
7c1126f0b0 | |||
b5aa185537 | |||
3a53676253 | |||
7dc024e103 | |||
6e4a4d8daa | |||
f2c0f370d4 | |||
8ac36484c5 | |||
5d2b5e0ac0 |
38
ChangeLog
38
ChangeLog
@ -1,15 +1,39 @@
|
||||
* 31.08.2023 John McQuah
|
||||
- allow prt-get to remove build log when uninstalling a package (feature
|
||||
requested by samsep10l)
|
||||
- allow deletion of build log when a package is removed (feature requested
|
||||
by samsep10l)
|
||||
- man-page updates
|
||||
- demonstrate how to troubleshoot a failed depinst due to omitted softdeps
|
||||
- discuss the rmlog_on_uninst feature
|
||||
|
||||
* 31.03.2023 John McQuah
|
||||
- respect the user's choice of --install-root when running pre- or
|
||||
* 29.05.2023 John McQuah
|
||||
- eliminate code duplication in printDepTree
|
||||
- respect the user's choice of --install-root when running pre- and
|
||||
post-install scripts
|
||||
- update man-page with an example of core-only sysup
|
||||
- switch from autotools to meson
|
||||
|
||||
* 19.03.2023 John McQuah
|
||||
- switch between install and update on a port-by-port basis, whichever is needed
|
||||
- allow dependency injection during sysup (controllable via --nodeps)
|
||||
- check whether a built package already exists before calling pkgmk
|
||||
- consolidate printDependent and printDepTree
|
||||
- consolidate sysup, printQuickDiff, and printDiff
|
||||
- let the argParser recognize some synonyms for old commands
|
||||
- assign meanings to --nodeps and --depsort for other subroutines
|
||||
|
||||
* 10.03.2023 John McQuah
|
||||
- make it possible to consider optional dependencies when updating
|
||||
- bump version of the cache file format, to warn users about the
|
||||
'Packager' field being replaced by 'Optional'
|
||||
- make it possible for the dependency resolver to consider optionals
|
||||
|
||||
* 27.02.2022 Alexandr Savca, Tim Biermann
|
||||
- fix segfault in prt-cache
|
||||
|
||||
* 5.19.5 16.10.2020 Matt Housh, Juergen Daubert
|
||||
- add a regex fix for listinst
|
||||
- move aliases file to /etc
|
||||
|
||||
* 5.19.2 01.03.2019 James Buren
|
||||
- fix misc compiler warnings
|
||||
- fix FS#1646, caused by wrong use of close() instead of fclose()
|
||||
|
||||
* 5.16 26.06.2008 Johannes Winkelmann
|
||||
- don't loop forever when version= contains unsupported $() tokens
|
||||
|
8
FAQ
8
FAQ
@ -1,8 +0,0 @@
|
||||
Q: Why are there no wildcards for install/update/grpinst
|
||||
A: Because you don't want it (dependencies)
|
||||
|
||||
Q: Why is there no prt-get depinst?
|
||||
A:
|
||||
|
||||
Q: Why is there no GUI or shared lib for/of prt-get?
|
||||
A:
|
15
README
15
README
@ -9,6 +9,7 @@ ports from crux (http://crux.nu). It offers some simplification over
|
||||
pure pkgmk, but might hide some interesting details about the install
|
||||
process.
|
||||
|
||||
|
||||
Installing:
|
||||
-----------
|
||||
Download an iso of the latest CRUX release for a precompiled package.
|
||||
@ -23,18 +24,20 @@ found _first_ will be used.
|
||||
Feel free to file a bug report on the Gitea issue tracker:
|
||||
https://git.crux.nu:82/farkuhar/prt-get/issues/
|
||||
|
||||
more information
|
||||
----------------
|
||||
See the man pages for prt-get(8), prt-get.conf(5) and prt-cache for more
|
||||
|
||||
More information:
|
||||
-----------------
|
||||
See the man pages for prt-get(8), prt-get.conf(5) and prt-cache(8) for more
|
||||
information. The CRUX homepage also offers a (somewhat dated) User Manual
|
||||
and Quick Start guide:
|
||||
https://crux.nu/doc/prt-get%20-%20User%20Manual.html
|
||||
https://crux.nu/doc/prt-get%20-%20Quick%20start.html
|
||||
|
||||
|
||||
"it must be user error" (thinkgeek)
|
||||
-----------------------------------
|
||||
|
||||
port directories may only contain ports, or else prt-get can fail (which
|
||||
means that nothing is installed, your system takes no harm). The reason
|
||||
Port directories may only contain ports, or else prt-get can fail (which
|
||||
means that nothing is installed, your system suffers no harm). The reason
|
||||
for this is because the additional checking slows down the application
|
||||
too much
|
||||
too much.
|
||||
|
2
TODO
2
TODO
@ -1,5 +1,5 @@
|
||||
- add --rebuild-set to dependent
|
||||
- allow dependency injection for sysup, with previews
|
||||
- allow dependency injection for sysup (done), with previews (?)
|
||||
- prefer toolchain (patch in trac)
|
||||
- logging: check for non-root owned symlinks
|
||||
- logging: reject relative logfile names
|
||||
|
@ -1,10 +0,0 @@
|
||||
|
||||
man_MANS = prt-get.8 prt-cache.8 prt-get.conf.5
|
||||
|
||||
clean-local:
|
||||
rm -rf *.log *.aux *.toc *.dvi *.idx *.pdf api
|
||||
|
||||
apidoc:
|
||||
doxygen
|
||||
|
||||
EXTRA_DIST = $(man_MANS) coding
|
492
doc/Makefile.in
492
doc/Makefile.in
@ -1,492 +0,0 @@
|
||||
# Makefile.in generated by automake 1.12.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = doc
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/mkinstalldirs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
man5dir = $(mandir)/man5
|
||||
am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
|
||||
man8dir = $(mandir)/man8
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
man_MANS = prt-get.8 prt-cache.8 prt-get.conf.5
|
||||
EXTRA_DIST = $(man_MANS) coding
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-man5: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man5dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.5[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man5:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man5dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.5[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man8: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man8dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.8[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man8:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man8dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.8[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@list='$(MANS)'; if test -n "$$list"; then \
|
||||
list=`for p in $$list; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
|
||||
if test -n "$$list" && \
|
||||
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
|
||||
echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
|
||||
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
|
||||
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
|
||||
echo " typically 'make maintainer-clean' will remove them" >&2; \
|
||||
exit 1; \
|
||||
else :; fi; \
|
||||
else :; fi
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man5 install-man8
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man5 uninstall-man8
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-local \
|
||||
distclean distclean-generic distdir dvi dvi-am html html-am \
|
||||
info info-am install install-am install-data install-data-am \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-man5 install-man8 install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-man \
|
||||
uninstall-man5 uninstall-man8
|
||||
|
||||
|
||||
clean-local:
|
||||
rm -rf *.log *.aux *.toc *.dvi *.idx *.pdf api
|
||||
|
||||
apidoc:
|
||||
doxygen
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
110
doc/i3-softdeps.md
Normal file
110
doc/i3-softdeps.md
Normal file
@ -0,0 +1,110 @@
|
||||
# Followup on installing i3 with the softdeps-aware fork of prt-get
|
||||
## (Was: Re: [prt-get nicetohave](https://lists.crux.nu/pipermail/crux/2023-August/007375.html))
|
||||
## 2023-08-25
|
||||
|
||||
The "Optional" metadata field stirred up some controversy when first
|
||||
proposed. At the time, it was preferred to write Pkgfiles whose build()
|
||||
functions contain no branching logic to customize the build for the host
|
||||
machine. Maintainers would even try to suppress the branching logic hidden
|
||||
inside the autotools ./configure script using command-line switches to
|
||||
hard-code the desired defaults [1]. Peer pressure eventually wore away at
|
||||
the resistance to this new metadata field, so it is now in widespread use
|
||||
despite there being no official mandate for contributors to test their ports
|
||||
under all possible configurations. Whenever a port can adapt to a variety of
|
||||
use-cases, maintainers try to document that versatility in the "Optional"
|
||||
field. But our package management tools remain unable to use that data! At
|
||||
present, it requires a human reading the Pkgfile, for the data in the "Optional"
|
||||
field to affect the order in which ports are built. Thankfully, sorting with
|
||||
optional dependencies taken into account is now possible in prt-get itself,
|
||||
either with the
|
||||
[softdeps](https://git.crux.nu:82/farkuhar/prt-get/src/branch/softdeps) or the
|
||||
[mixed-upinst](https://git.crux.nu:82/farkuhar/prt-get/src/branch/mixed-upinst)
|
||||
branch of the fork by farkuhar.
|
||||
|
||||
Respecting the limitations of a prt-get that only knows about hard dependencies
|
||||
would entail following the old practice and hard-coding the configure options
|
||||
in each port. This example of letting our tools dictate how we work (rather
|
||||
than updating the tools to fit a new workflow) would encourage a portdb more
|
||||
like the AUR, with a seemingly endless variety of dups that all have
|
||||
their own particular combination of configure options. Thankfully the
|
||||
unwieldiness of this prospect was enough to deter maintainers from clinging to
|
||||
an outmoded interpretation of KISS [3], and they adopted the new norm of
|
||||
"fluid Pkgfiles" (FS#1576) even as prt-get remained unable to incorporate this
|
||||
fluidity in its operations.
|
||||
|
||||
As recently as November 2021, users of CRUX could still have noticed a remnant
|
||||
of the historical preference for non-fluid Pkgfiles, illustrated by the
|
||||
coexisting pair harfbuzz and harfbuzz-icu. These ports differed from each other
|
||||
only in the configuration option that enables linking to icu. A port that
|
||||
depends on the icu-linked harfbuzz would list harfbuzz-icu among its
|
||||
dependencies, while a port that did not require such linking would only
|
||||
list harfbuzz.
|
||||
|
||||
Such dups in the portdb, all using the same upstream tarball, inevitably
|
||||
have overlapping footprints, and it becomes impossible to avoid filesystem
|
||||
collisions if a user running `prt-get depinst foo` triggers an attempt to
|
||||
pkgadd a variant of an already-installed port. Once the set of installed
|
||||
ports is sufficiently diverse, maintaining prt-get.aliases so as to avoid
|
||||
such collisions becomes an impossible task.
|
||||
|
||||
Nix (and GoboLinux even earlier) solves the overlapping footprint problem
|
||||
by giving each package its own separate directory in the filesystem. This
|
||||
solution arguably fits quite well with the historical CRUX preference for
|
||||
rigid Pkgfiles, offering a one-to-one correspondence between a repository
|
||||
of non-fluid ports, and the filesystem where built packages are unpacked.
|
||||
But CRUX was reluctant to impose an additional layer of complexity on top
|
||||
of the Filesystem Hierarchy Standard, and so the Nix and GoboLinux solution
|
||||
never gained serious consideration in the CRUX community.
|
||||
|
||||
As the last vestige of a historical preference for non-fluid ports,
|
||||
harfbuzz and harfbuzz-icu persisted alongside each other until surprisingly
|
||||
recently, only getting merged into one fluid port with commit
|
||||
b2e30dbf8c96e03f4fe4b39b1e5ffbecd8372787. This merge allowed users to
|
||||
simplify prt-get.aliases, removing `harfbuzz-icu: harfbuzz` (if they had
|
||||
ever added such an entry to avoid filesystem collisions).
|
||||
|
||||
Equipping prt-get with softdeps awareness is just letting our tools evolve
|
||||
to match the trend toward fluid Pkgfiles. If the new prt-get capabilities
|
||||
are deemed to violate the CRUX Mantra [2], then the same criticism can be
|
||||
leveled against fluid Pkgfiles. Such criticisms were in fact expressed
|
||||
(by Anton most stridently, and by Tilman and Juergen in a gentler tone)
|
||||
during the discussions of USE flags and "prt-get nicetohave" [3,4]. But the
|
||||
resistance to fluid Pkgfiles has diminished over the years, to such an extent
|
||||
that nobody has seriously proposed crafting the dependency graph so that
|
||||
`prt-get depinst i3` is impossible to fail [5], say by making i3 depend on a
|
||||
duplicate port libxkbcommon-x11 (which would differ from libxkbcommon only by
|
||||
hard-coding the meson option "-D enable-x11" and by listing xkeyboard-config
|
||||
as a hard dependency --- similar to how harfbuzz-icu differed from harfbuzz).
|
||||
|
||||
A duplicate port of libxkbcommon is indeed a KISS solution, with prt-get in its
|
||||
present state. That nobody bothered to propose such a dup is a clear indication
|
||||
that we are not going back to non-fluid Pkgfiles anytime soon. So either our
|
||||
Pkgfiles have irrevocably become "just a bit" more complex (and therefore no
|
||||
longer "simple"), or they are in fact the simplest way to accommodate the modern
|
||||
software landscape. In the latter case, a KISS objection to the corresponding
|
||||
logic in prt-get is hypocritical. In the former case, it could be argued that two
|
||||
wrongs do not make a right, and the trend away from KISS Pkgfiles does not
|
||||
justify making prt-get "just a bit" more complex. But then we would have an
|
||||
awkward mismatch between the capabilities of prt-get, and the ports that it
|
||||
has to handle. This mismatch is only a slight annoyance at present (the
|
||||
experienced users that make up the CRUX target audience can usually diagnose
|
||||
the problem themselves if they encounter a build failure like [5]), but before the
|
||||
software landscape becomes even more convoluted and such build failures harder
|
||||
to avoid, we should have the discussion on adding new logic to prt-get.
|
||||
|
||||
[1] It should be noted that the autotools ./configure script (or its
|
||||
meson or cmake counterpart) might not actually expose all compile-time
|
||||
options via command-line switches. Hence some testing of the host
|
||||
environment is unavoidable, unless the port maintainer performs substantial
|
||||
downstream patching of the source tree.
|
||||
|
||||
[2] We do not want to prepare for all necessities and build a complex system
|
||||
which in 90% of all cases is overkill ... making something "just a bit"
|
||||
more complex is not "simple" anymore. (https://crux.nu/Main/Mantra)
|
||||
|
||||
[3] https://lists.crux.nu/pipermail/crux-devel/2006-August/001912.html
|
||||
|
||||
[4] https://lists.crux.nu/pipermail/crux-devel/2008-May/003366.html
|
||||
|
||||
[5] The possibility of this command failing was first noted by jaeger in
|
||||
https://libera.irclog.whitequark.org/crux/2023-08-21 (16:36)
|
291
doc/i3-softdeps.test
Normal file
291
doc/i3-softdeps.test
Normal file
@ -0,0 +1,291 @@
|
||||
Thanks to hestia and jaeger for inspiring this hacking session (2023-08-22).
|
||||
(Update 2023-08-25): see i3-softdeps.md in this directory for more
|
||||
discussion on the merits of adding new prt-get features.
|
||||
|
||||
In light of the recent changes to libxkbcommon, jaeger made the observation
|
||||
that `prt-get depinst i3` on a core-only system hits an error, as
|
||||
libxkbcommon will be built without x11 support. To establish a reference point
|
||||
for subsequent experiments, here is the list of targets that would be selected
|
||||
by the latest official release of prt-get (5.19.6), in response to the
|
||||
recommended way of installing a desired port.
|
||||
|
||||
All commands were performed on a pkg-cleaned installation of CRUX 3.7, leaving
|
||||
the ports at whatever outdated version they had when this particular system was
|
||||
last in daily use.
|
||||
|
||||
In[0]: prt-get depinst --test i3
|
||||
Out[0]:
|
||||
*** prt-get: test mode
|
||||
|
||||
-- Packages installed
|
||||
fribidi
|
||||
xorg-util-macros
|
||||
xorg-libpixman
|
||||
libev
|
||||
libpng
|
||||
libxml2
|
||||
xorg-xtrans
|
||||
libxkbcommon
|
||||
libxslt
|
||||
xorg-xcb-proto
|
||||
yajl
|
||||
xorg-xorgproto
|
||||
freetype
|
||||
glib
|
||||
xorg-libice
|
||||
xorg-libxau
|
||||
xorg-libxdmcp
|
||||
fontconfig
|
||||
gobject-introspection
|
||||
xorg-libsm
|
||||
xorg-libxcb
|
||||
xorg-libx11
|
||||
xorg-xcb-util
|
||||
xorg-xcb-util-renderutil
|
||||
xorg-xcb-util-keysyms
|
||||
xorg-xcb-util-wm
|
||||
xorg-libxext
|
||||
xorg-libxrender
|
||||
xorg-libxt
|
||||
xorg-libxkbfile
|
||||
xorg-xcb-util-image
|
||||
xorg-xcb-util-xrm
|
||||
cairo
|
||||
startup-notification
|
||||
xorg-xkbcomp
|
||||
xorg-xcb-util-cursor
|
||||
harfbuzz
|
||||
xkeyboard-config
|
||||
xorg-libxft
|
||||
pango
|
||||
i3
|
||||
|
||||
-- installed packages with README files:
|
||||
fontconfig
|
||||
|
||||
prt-get: installed successfully
|
||||
|
||||
*** prt-get: test mode end
|
||||
|
||||
As seen in the output above, at the time of building libxkbcommon, there are
|
||||
only 7 non-core ports installed, none of which is xkeyboard-config,
|
||||
so the flag '-D enable-x11=false' gets passed to the meson setup command for
|
||||
libxkbcommon. Thus the necessary linking to x11 libs does not happen, and i3
|
||||
cannot compile successfully.
|
||||
|
||||
Suppose we try to fix this omission in the most natural way: append
|
||||
xkeyboard-config at the end of i3's dependency list.
|
||||
|
||||
sed -i '/^# Depends on/s/$/ xkeyboard-config/' /usr/ports/opt/i3/Pkgfile
|
||||
|
||||
Even this change is not enough! prt-get is not aware of the optional
|
||||
dependency relationship between libxkbcommon and xkeyboard-config, and so
|
||||
cannot insist that libxkbcommon comes later in the list of targets. jw
|
||||
came to a similar conclusion 15 years ago (footnote 1).
|
||||
|
||||
Let's see whether farkuhar's softdeps-aware fork can do any better on this
|
||||
task. The naive approach, prt-get depinst --softdeps i3, still doesn't work
|
||||
because it will not automagically make two passes through the dependency tree
|
||||
(the first pass to assemble a minimal installation set, and the second pass to
|
||||
insert edges in the digraph based on optional dependency relationships among
|
||||
the targets found). Instead, you have to manually ask for two traversals of the
|
||||
dependency tree using a command substitution.
|
||||
|
||||
In[1]: prt-get isinst $(prt-get quickdep i3) | awk '/not installed/ {print $2}' \
|
||||
| xargs prt-get depinst --test --softdeps
|
||||
|
||||
(Note that it's also necessary to filter out the already-installed ports before
|
||||
passing the quickdep output to `prt-get depinst` because this branch still
|
||||
makes a distinction between install and update transactions.)
|
||||
|
||||
Out[1]:
|
||||
*** prt-get: test mode
|
||||
|
||||
-- Packages installed
|
||||
fribidi
|
||||
xorg-util-macros
|
||||
xorg-libpixman
|
||||
libev
|
||||
xorg-xtrans
|
||||
libpng
|
||||
libxml2
|
||||
fontconfig
|
||||
libxslt
|
||||
xorg-xcb-proto
|
||||
yajl
|
||||
xorg-xorgproto
|
||||
glib [post: deferred]
|
||||
xorg-libxau
|
||||
xorg-libxdmcp
|
||||
xorg-libice
|
||||
xorg-libxcb
|
||||
xorg-libsm
|
||||
xorg-libx11
|
||||
xorg-xcb-util
|
||||
xorg-xcb-util-renderutil
|
||||
xorg-xcb-util-keysyms
|
||||
xorg-xcb-util-wm
|
||||
xorg-libxkbfile
|
||||
xorg-libxext
|
||||
xorg-libxrender
|
||||
xorg-libxt
|
||||
xorg-xcb-util-image
|
||||
xorg-xcb-util-xrm
|
||||
xorg-xkbcomp
|
||||
cairo
|
||||
startup-notification
|
||||
xorg-xcb-util-cursor
|
||||
xkeyboard-config
|
||||
gobject-introspection
|
||||
libxkbcommon
|
||||
harfbuzz
|
||||
freetype
|
||||
xorg-libxft
|
||||
pango
|
||||
i3
|
||||
|
||||
-- installed packages with README files:
|
||||
/usr/ports/opt/fontconfig
|
||||
|
||||
prt-get: installed successfully
|
||||
|
||||
*** prt-get: test mode end
|
||||
|
||||
|
||||
This output looks more likely to succeed. Note that libxkbcommon would be built
|
||||
AFTER its optional dependency xkeyboard-config, because when xkeyboard-config
|
||||
appears among the depinst targets, that dependency relationship gets
|
||||
incorporated into the sorting algorithm.
|
||||
|
||||
|
||||
The mixed-upinst branch of farkuhar's prt-get goes further. Not only do you
|
||||
get the feature of respecting optional dependencies, you can also do the
|
||||
command substitution without the awk filter, and the appropriate mode
|
||||
(install or update) will be selected for each target.
|
||||
|
||||
In[2]: prt-get depinst --softdeps --test $(prt-get quickdep i3)
|
||||
|
||||
Out[2]:
|
||||
*** prt-get: test mode
|
||||
|
||||
-- Successful packages
|
||||
fribidi
|
||||
xz
|
||||
zlib
|
||||
ncurses
|
||||
expat
|
||||
libffi
|
||||
libnghttp2
|
||||
openssl
|
||||
libuv
|
||||
lzlib
|
||||
rhash
|
||||
xorg-util-macros
|
||||
libpcre2
|
||||
xorg-libpixman
|
||||
libev
|
||||
libpng
|
||||
elfutils
|
||||
libxml2
|
||||
readline
|
||||
fontconfig
|
||||
xorg-xtrans
|
||||
file
|
||||
curl
|
||||
libxslt
|
||||
sqlite3
|
||||
libarchive
|
||||
util-linux
|
||||
python3
|
||||
cmake
|
||||
python3-setuptools
|
||||
xorg-xcb-proto
|
||||
yajl
|
||||
meson
|
||||
xorg-xorgproto
|
||||
glib [post: deferred]
|
||||
xorg-libxau
|
||||
xorg-libxdmcp
|
||||
xorg-libice
|
||||
xorg-libxcb
|
||||
xorg-libsm
|
||||
xorg-libx11
|
||||
xorg-xcb-util
|
||||
xorg-xcb-util-renderutil
|
||||
xorg-xcb-util-keysyms
|
||||
xorg-xcb-util-wm
|
||||
xorg-libxkbfile
|
||||
xorg-libxext
|
||||
xorg-libxrender
|
||||
xorg-libxt
|
||||
xorg-xcb-util-image
|
||||
xorg-xcb-util-xrm
|
||||
xorg-xkbcomp
|
||||
cairo
|
||||
startup-notification
|
||||
xorg-xcb-util-cursor
|
||||
xkeyboard-config
|
||||
gobject-introspection
|
||||
libxkbcommon
|
||||
harfbuzz
|
||||
freetype
|
||||
xorg-libxft
|
||||
pango
|
||||
i3
|
||||
|
||||
-- Successful packages with README files:
|
||||
fontconfig
|
||||
|
||||
prt-get: install successful.
|
||||
|
||||
*** prt-get: test mode end
|
||||
|
||||
The output of the last command reveals why we recommend performing a sysup
|
||||
before installing new ports. Because dependencies in core are not listed unless
|
||||
they are dynamically linked in, some of the out-of-date core ports on my test
|
||||
system would get updated later, possibly leading to breakage (e.g, if the
|
||||
desired port is relying on a new or backward-incompatible feature in one of
|
||||
the foundational pieces of the toolchain).
|
||||
|
||||
Footnotes:
|
||||
1. https://lists.crux.nu/pipermail/crux-devel/2008-May/003375.html
|
||||
|
||||
2. The more intuitive version of the above commands, `prt-get depinst
|
||||
--test --softdeps i3`, currently does NOT consider the dependency
|
||||
relationship "libxkbcommon optionally depends on xkeyboard-config", because
|
||||
the latter port is neither currently installed, nor listed explicitly as an
|
||||
install target. This safeguard is meant to allow the operation to proceed
|
||||
after a SINGLE pass through the deptree, without pulling in ALL the ports
|
||||
listed as "Optional:" . In future we might consider letting the more
|
||||
intuitive command automatically make TWO passes through the deptree:
|
||||
first to pick up all the hard dependencies, and then to insert edges in the
|
||||
digraph that encode the optional dependencies among these targets. But such
|
||||
"automagic side-effects" (two traversals versus one) are typically frowned
|
||||
upon in CRUX, so for now we are happy to employ the command substitution
|
||||
$(prt-get quickdep i3) thereby communicating to prt-get our intention for
|
||||
two traversals of the deptree.
|
||||
|
||||
|
||||
3. The result of trial 2 would be identical to that of
|
||||
`prt-get install --softdeps $(prt-get quickdep i3)` using the
|
||||
mixed-upinst branch, because 'install' on this branch behaves the same
|
||||
as 'depinst'. In https://lists.crux.nu/pipermail/crux/2008-June/001784.html
|
||||
jw describes this change as "prt-get no more silently assumes that the user
|
||||
didn't want a particular dependency".
|
||||
farkuhar's mixed-upinst branch still gives you the option to override this
|
||||
dependency-resolution-by-default; you just have to enter 'install --nodeps'
|
||||
instead of simply 'install'.
|
||||
|
||||
|
||||
4. Some maintainers prefer to do a filesystem check to determine whether a
|
||||
needed dependency was linked to one of its optional libraries, and then
|
||||
exit early with a message alerting the user to rebuild one of the packages
|
||||
in the dependency tree. See contrib/libreoffice for an example. This
|
||||
preference is arguably more aligned with CRUX's stance against excessively
|
||||
"holding the user's hand". The softdeps feature is not intended to supplant
|
||||
the user's thinking, but rather to give convenient access to a more versatile
|
||||
topological sorting algorithm than the one coded in the official prt-get. The
|
||||
toposort algorithm used in the above experiments remains true to the style
|
||||
of jw's original code, but you can see another working implementation in
|
||||
farkuhar's Perl rewrite
|
||||
https://git.sdf.org/jmq/Documentation/src/branch/master/scripts/prt-auf .
|
397
doc/prt-get.8
397
doc/prt-get.8
@ -14,7 +14,7 @@ pkgutils from CRUX (see http://www.crux.nu)
|
||||
.B prt\-get command [options] <arguments>
|
||||
.br
|
||||
.SH "DESCRIPTION"
|
||||
prt\-get is a package management tool which provides additional
|
||||
prt-get is a package management tool which provides additional
|
||||
functionality to the CRUX package management system. It works with the
|
||||
local ports tree and is therefore fully compatible with ports(8) and
|
||||
pkgmk(8)/pkgadd(8)/pkgrm(8). It offers the following features:
|
||||
@ -42,16 +42,16 @@ search within the ports
|
||||
|
||||
.PP
|
||||
|
||||
What prt\-get basically does is build, install/upgrade, and remove packages, using
|
||||
pkgmk, pkgadd, and pkgrm. Additionally, you don't have be in the port's
|
||||
directory to call prt\-get. prt\-get will search for the respective port
|
||||
itself in a list of directories specified in /etc/prt\-get.conf. This
|
||||
What prt-get basically does is build, install/upgrade, and remove packages,
|
||||
using pkgmk, pkgadd, and pkgrm. Additionally, you don't have be in the port's
|
||||
directory to call prt-get. prt-get will search for the respective port
|
||||
itself in a list of directories specified in /etc/prt-get.conf. This
|
||||
allows you to just install or update a package, without caring where
|
||||
it actually is located on your file system.
|
||||
|
||||
.PP
|
||||
|
||||
prt\-get also lets you search for ports by name,
|
||||
prt-get also lets you search for ports by name,
|
||||
find information about ports (without installing them of course),
|
||||
or print the dependencies of a port (as a space- or newline-separated list,
|
||||
or a formatted tree). Note that dependencies are no
|
||||
@ -59,109 +59,91 @@ requirement for crux packages and therefore not always accurate.
|
||||
|
||||
.PP
|
||||
|
||||
prt\-get has a test mode so you can see what effect an install/update
|
||||
operation would have. Use the \-\-test switch for this (more details in
|
||||
prt-get has a test mode so you can see what effect an install/update
|
||||
operation would have. Use the --test switch for this (more details in
|
||||
the \fBOPTIONS\fP section below).
|
||||
|
||||
.SH "RETURN VALUE"
|
||||
prt\-get returns 0 on success and a non-zero value otherwise (exact
|
||||
prt-get returns 0 on success and a non-zero value otherwise (exact
|
||||
value -> meaning mapping to be determined...)
|
||||
|
||||
.SH "COMMANDS"
|
||||
prt\-get uses so\-called commands, which always have to be the first
|
||||
prt-get uses so-called commands, which always have to be the first
|
||||
non-option argument passed. This is very similar to
|
||||
.B cvs(1).
|
||||
[command] can be one of the following:
|
||||
|
||||
|
||||
.TP
|
||||
.B install [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...]
|
||||
Install all packages in the listed order. Note that you can do this
|
||||
from any directory.
|
||||
.B install [\-\-margs] [\-\-aargs] [\-\-log] [\-\-nodeps] [\-\-softdeps] <package1> [<package2> ...]
|
||||
Install or update the packages given on the command line. Note that you can do
|
||||
this from any directory. Pass the --nodeps flag to prevent \fBprt\-get\fP from
|
||||
resolving dependencies and injecting any needed packages into the list of targets.
|
||||
Pass the --softdeps flag if you want the dependency resolver to also consider
|
||||
the "Optional" relationships among the packages given on the command line.
|
||||
|
||||
.TP
|
||||
.B depinst [\-\-margs] [\-\-aargs] [\-\-log] [\-\-softdeps] <package1> [<package2> ...]
|
||||
Install all packages given on the command line, including their dependencies.
|
||||
Note that already-installed packages will be left at their current version,
|
||||
even if out of date. prt\-get depinst behaves this way because all of its
|
||||
child pkgadd processes will \fBlack\fP the \-u flag, which is needed when
|
||||
updating an already-installed package.
|
||||
|
||||
Passing the --softdeps flag tells \fBprt-get\fP to consider also the optional
|
||||
dependencies when sorting. The --softdeps flag does NOT affect the
|
||||
calculation of the minimal set of packages needed to satisfy the
|
||||
transaction; only hard dependencies are used when constructing this set. But
|
||||
if there are any optional dependency relationships among the ports in the
|
||||
resulting set, they will be respected when prt-get determines the sequence
|
||||
in which to build.
|
||||
Basically a synonym for install (without the --nodeps flag).
|
||||
|
||||
.TP
|
||||
.B update [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...]
|
||||
Update all packages listed in this order. Note: if the latest version of a
|
||||
package has acquired dependencies that were not needed by the
|
||||
currently-installed version and are not present on the system, the update
|
||||
command will not attempt to resolve this omission. prt-get update behaves
|
||||
this way because pkgadd invocations inherit the flag -u for every package in
|
||||
the transaction, causing an error if the package is not already installed.
|
||||
You can follow the CRUX mailing list or the IRC channels to stay informed of
|
||||
the situations where an update will require manual intervention, or filter
|
||||
the output of
|
||||
.B prt\-get quickdep $(prt\-get quickdiff)
|
||||
through \fBprt\-get isinst\fP to get a list of packages suitable for an
|
||||
\fBinstall\fP or \fBupdate\fP command.
|
||||
See the \fBEXAMPLES\fP section below for details.
|
||||
.B update [\-\-margs] [\-\-aargs] [\-\-log] [\-\-softdeps] <package1> [<package2> ...]
|
||||
Basically a synonym for install. Earlier versions of \fBprt\-get\fP did not
|
||||
adjust the \fBpkgadd(8)\fP arguments on a package-by-package basis, but
|
||||
applied "install mode" or "update mode" to the entire transaction. This
|
||||
version of \fBprt\-get\fP interprets the install command less rigidly, and tries
|
||||
to sync all affected ports with their repository versions unless instructed
|
||||
otherwise (using \fBprt\-get lock\fP, the --prefer-higher option, or the
|
||||
prt-get.aliases file).
|
||||
|
||||
.TP
|
||||
.B remove <package1> [<package2> ...]
|
||||
Remove packages listed in this order
|
||||
|
||||
.TP
|
||||
.B sysup [\-\-softdeps] [\-\-nodeps]
|
||||
.B sysup [\-\-softdeps] [\-\-nodeps] [\-\-prefer\-higher] [\-\-strict\-diff]
|
||||
Update all installed packages which are outdated. Sorts by hard dependencies
|
||||
by default. Passing the --softdeps switch tells \fBprt\-get\fP to also consider
|
||||
optional dependencies when sorting. Passing the --nodeps switch tells prt-get
|
||||
not to sort by dependencies at all, for approximately the same effect as
|
||||
.B prt\-get update $(prt\-get quickdiff).
|
||||
As with an \fBupdate\fP command, the child \fBpkgadd\fP processes will
|
||||
inherit the \-u flag, so if a port has acquired new dependencies since
|
||||
its last successful build, those new dependencies will be omitted from
|
||||
the transaction (unless they happen to be installed for some other reason and
|
||||
are also in need of an update). See the \fBEXAMPLES\fP section for a way to
|
||||
automate the resolution of such omissions. Also see the
|
||||
.B lock
|
||||
and
|
||||
.B unlock
|
||||
commands to keep the currently installed versions, even if there are
|
||||
changes in the ports tree. If you want to update only diffs which have
|
||||
a lower version installed than the one in the ports tree, use the
|
||||
--prefer-higher option.
|
||||
not to sort by dependencies at all.
|
||||
|
||||
.B Note:
|
||||
If a port has acquired new dependencies since its last successful build,
|
||||
those new dependencies \fIwill\fP be injected into the transaction. An elegant
|
||||
description of this new behaviour is "prt-get no more silently assumes that
|
||||
the user didn't want a particular dependency" [1]. You can still disable the
|
||||
automatic dependency injection by passing the --nodeps switch. Other
|
||||
ways to fine-tune the selection of ports that are included in a \fBsysup\fP are the
|
||||
commands \fBlock\fP and \fBunlock\fP, the prt-get.aliases file, and the
|
||||
mutually exclusive switches --prefer-higher, --strict-diff (documented below).
|
||||
|
||||
[1] https://lists.crux.nu/pipermail/crux/2008-June/001784.html
|
||||
|
||||
.TP
|
||||
.B lock <package1> [<package2>...]
|
||||
Do not update these packages in a
|
||||
Exclude these packages from being updated in a
|
||||
.B sysup
|
||||
operation
|
||||
operation.
|
||||
|
||||
.TP
|
||||
.B unlock <package1> [<package2>...]
|
||||
Remove lock from these packages
|
||||
|
||||
.TP
|
||||
.B listlocked [-v|-vv]
|
||||
.B listlocked [\-v|\-vv]
|
||||
List names of packages which are locked. As always,
|
||||
.B -v
|
||||
.B \-v
|
||||
will additionally show the version, and
|
||||
.B -vv
|
||||
.B \-vv
|
||||
also includes the description from the Pkgfile. Note that the
|
||||
.B -vv
|
||||
.B \-vv
|
||||
switch will slow down the operation remarkably.
|
||||
|
||||
.TP
|
||||
.B diff [\-\-all] [\-\-prefer\-higher] [<package1> <package2> ...]
|
||||
Show differences between installed packages and ports in the ports
|
||||
tree. If arguments are given, shows only differences for these
|
||||
packages, otherwise all differences are shown. It's also possible to use
|
||||
shell-like
|
||||
tree. Package names passed as argument will truncate the output to
|
||||
show only those packages. It's also possible to use shell-like
|
||||
.B wildcards
|
||||
for the diff command. Make sure you escape where needed. Locked
|
||||
packages are only displayed if you use the --all switch. If you want
|
||||
@ -169,20 +151,14 @@ to see only diffs which have a lower version installed than the one in
|
||||
the ports tree, use the --prefer-higher option.
|
||||
|
||||
.TP
|
||||
.B quickdiff
|
||||
.B quickdiff [\-\-prefer\-higher]
|
||||
Print a simple list of packages which have a different version in the
|
||||
ports tree than what is installed. The output is sorted alphabetically,
|
||||
but you can generate a (larger) list sorted by dependencies using
|
||||
.B prt\-get quickdep $(prt\-get quickdiff).
|
||||
Note that the resulting list is usually a mix of installed and
|
||||
not-installed packages, so it must be filtered by
|
||||
.B prt\-get isinst
|
||||
before being passed as argument to prt\-get install or prt\-get update. See the
|
||||
.B EXAMPLES
|
||||
section below.
|
||||
|
||||
If you want to see only diffs which have a lower version installed than the one in
|
||||
the ports tree, use the --prefer-higher option.
|
||||
If you want to see only diffs which have a lower version installed than
|
||||
the one in the ports tree, use the --prefer-higher option.
|
||||
|
||||
.TP
|
||||
.B search [\-v|\-vv] [\-\-path] [\-\-regex] <expr>
|
||||
@ -195,20 +171,19 @@ in their name
|
||||
Search the ports tree (both name and description) for the pattern
|
||||
.B expr
|
||||
(which can be a shell-like wildcard pattern or a regexp). The search in
|
||||
the description is not case sensitive. Note that this requires prt\-get
|
||||
to read every Pkgfile, which makes it rather slow. If you like searching by
|
||||
description, consider using the cache functionality, so you only have to
|
||||
read all the Pkgfiles after each update of the ports tree.
|
||||
the description is not case sensitive. Note that this requires prt-get
|
||||
to read every Pkgfile, which makes it rather slow; if you like searching
|
||||
by description, consider using the cache functionality, so you only have to
|
||||
read every Pkgfile when the ports tree is updated.
|
||||
|
||||
.TP
|
||||
.B fsearch [\-\-full] [\-\-regex] <pattern>
|
||||
Search the ports tree for
|
||||
.B pattern
|
||||
as file name in their footprint. When called without '--full', strips
|
||||
the directories from the file names before matching.
|
||||
Pattern can be a shell-like wildcard pattern (e.g. prt-get fsearch "*.h")
|
||||
or a regular expression (e.g. prt-get fsearch --regex 'liblz(o2|ma).*')
|
||||
|
||||
the directories from the file names before matching. Pattern can be a
|
||||
shell-like wildcard pattern (e.g. prt-get fsearch "*.h") or a regular
|
||||
expression (e.g. prt-get fsearch --regex 'liblz(o2|ma).*')
|
||||
|
||||
.TP
|
||||
.B info <port>
|
||||
@ -224,22 +199,22 @@ Print the port's README file if it exists; if set, uses $PAGER
|
||||
|
||||
.TP
|
||||
.B depends [\-\-softdeps] <package1> [<package2> ...]
|
||||
Print a recursive list of dependencies needed to install the packages
|
||||
passed as argument. It shows a list of the dependencies that were found in
|
||||
the ports tree, plus a list of the dependencies that could not be found.
|
||||
Pass the --softdeps flag if you want the sorting algorithm to consider
|
||||
Print a recursive list of dependencies needed to install the packages passed
|
||||
as argument. It shows a list of the dependencies that were found in the
|
||||
ports tree, plus a list of the dependencies that could not be found. Pass
|
||||
the --softdeps flag if you want the sorting algorithm to consider
|
||||
optional dependencies too.
|
||||
|
||||
.TP
|
||||
.B quickdep [\-\-softdeps] <package1> [<package2> ...]
|
||||
Same output as \fBdepends\fP, but separated by spaces rather than newlines,
|
||||
and stripped of any dependencies that could not be found in the ports tree.
|
||||
Useful in case the list of dependencies is too large to fit on one screen,
|
||||
or if you don't want to filter out manually the ports that are invalid
|
||||
targets for installation. For example, instead of
|
||||
Same output as \fBdepends\fP, but separated by spaces rather than newlines, and
|
||||
stripped of any dependencies that could not be found in the ports tree.
|
||||
Useful in case the list of dependencies is too large to fit on one screen, or
|
||||
if you don't want to filter out manually the ports that are invalid targets for
|
||||
installation. For example, instead of
|
||||
.B prt\-get depinst xorg-server
|
||||
you might micromanage the process as follows:
|
||||
.B for i in $(prt\-get quickdep xorg-server); do if prt\-get isinst $i 2>/dev/null; then prt\-get update \-fr $i; else prt\-get install $i; fi; done
|
||||
.B for i in $(prt\-get quickdep xorg-server); do prt\-get install \-fr \-\-nodeps $i; done
|
||||
which ensures that the latest version of each dependency is built.
|
||||
|
||||
Note: It might be useful to run
|
||||
@ -251,30 +226,29 @@ for successful builds.
|
||||
.B deptree [\-\-softdeps] <package>
|
||||
Print a tree of the dependencies of the package
|
||||
.B <package>.
|
||||
Pass the --softdeps flag to also show the installed packages that might
|
||||
have been eagerly linked, if they were present when
|
||||
Pass the --softdeps flag to also show the installed packages that might have been
|
||||
eagerly linked when
|
||||
.B <package>
|
||||
(or its dependencies) were built.
|
||||
or its dependencies were compiled.
|
||||
Subtrees already shown are marked with '-->' to save some space. In
|
||||
order to show them all, add the --all switch.
|
||||
|
||||
.SH ""
|
||||
|
||||
.TP
|
||||
.B dependent [\-\-recursive] [\-\-softdeps] [\-\-all] [\-\-tree] <package>
|
||||
.B dependent [\-\-recursive] [\-\-softdeps] [\-\-all] <package>
|
||||
Print a list of ports whose "Depends on:" line contains
|
||||
.B <package>
|
||||
(or its dependents, if --recursive was passed). Use the --softdeps flag to
|
||||
also search the "Optional:" lines for \fB<package>\fP.
|
||||
(or its dependents, if --recursive is passed). Use the --softdeps flag to also
|
||||
search the "Optional:" lines for \fB<package>\fP .
|
||||
|
||||
By default, output is restricted to ports that are installed. To see all
|
||||
the dependencies, use the --all switch. Use --tree to get a nicely indented
|
||||
list.
|
||||
By default, output is restricted to ports that are installed. To see all the
|
||||
dependencies, add the --all switch. Use --tree to get a nicely indented list.
|
||||
|
||||
.TP
|
||||
.B dup [-v] [format]
|
||||
.B dup [\-v] [format]
|
||||
List ports which can be found in multiple directories configured in
|
||||
.B /etc/prt-get.conf
|
||||
\fB/etc/prt\-get.conf\fP.
|
||||
Use the \fB\-v\fP switch to see a verbose report, which will show for each
|
||||
dup the port that takes precedence, and the port that is hidden (including
|
||||
full path and version info). The verbose switch is basically an alias for a
|
||||
@ -291,19 +265,19 @@ symbols will be replaced as follows.
|
||||
|
||||
.TP
|
||||
\ \ \ \(bu
|
||||
%p1 -> Full path (including name) to port taking precedence
|
||||
%p1 -> full path (including name) to port taking precedence
|
||||
|
||||
.TP
|
||||
\ \ \ \(bu
|
||||
%p2 -> Full path (including name) to port being hidden
|
||||
%p2 -> full path (including name) to port being hidden
|
||||
|
||||
.TP
|
||||
\ \ \ \(bu
|
||||
%v1 -> Version of port taking precedence
|
||||
%v1 -> version of port taking precedence
|
||||
|
||||
.TP
|
||||
\ \ \ \(bu
|
||||
%v2 -> Version of port being hidden
|
||||
%v2 -> version of port being hidden
|
||||
|
||||
.TP
|
||||
\ \ \ \(bu
|
||||
@ -333,7 +307,7 @@ for the list command. Make sure you escape where needed
|
||||
|
||||
.TP
|
||||
.B printf <format string1> [\-\-sort=<format string2>] [\-\-filter=<filter>]
|
||||
Print formatted port list format string can contain variables, which
|
||||
Print formatted port list. Format string can contain variables, which
|
||||
are replaced like this:
|
||||
.TP
|
||||
\ \ \ \(bu
|
||||
@ -369,11 +343,11 @@ are replaced like this:
|
||||
|
||||
.TP
|
||||
\ \ \ \(bu
|
||||
%M -> Maintainer
|
||||
%M -> maintainer
|
||||
|
||||
.TP
|
||||
\ \ \ \(bu
|
||||
%R -> Readme ("yes"/"no")
|
||||
%R -> readme ("yes"/"no")
|
||||
|
||||
.TP
|
||||
\ \ \ \(bu
|
||||
@ -393,8 +367,8 @@ are replaced like this:
|
||||
up to date and "diff" if it's installed and a new version is in the
|
||||
ports tree.
|
||||
|
||||
Use "\\n" and "\\t" to format your output (no additional format symbols
|
||||
suported). The optional format string2 can contain the same variables
|
||||
Use "\en" and "\et" to format your output (no additional format codes
|
||||
supported). The optional format string2 can contain the same variables
|
||||
as format string1 and is used to sort the output. You can specify a
|
||||
.B wildcard filter
|
||||
to filter by package name.
|
||||
@ -425,8 +399,8 @@ Output appears alphabetically separated by newlines, making it suitable for
|
||||
process substitution as shown in the
|
||||
.B EXAMPLES
|
||||
section below. Note that some core ports might be runtime
|
||||
dependencies despite their absence in the "Depends on:" line; see \fBPkgfile(5)\fP
|
||||
for an explanation of this practice.
|
||||
dependencies despite their absence in the "Depends on:" line;
|
||||
see \fBPkgfile(5)\fP for an explanation of this practice.
|
||||
|
||||
.TP
|
||||
.B isinst <package1> [<package2> ...]
|
||||
@ -439,28 +413,24 @@ but does not print the version information. This command has a return value of
|
||||
greater than 0.
|
||||
|
||||
.TP
|
||||
.B current <package>
|
||||
Show the currently-installed version of <package>, or a message
|
||||
that <package> is not installed. Unlike
|
||||
.B prt\-get isinst package1 package2,
|
||||
this command does \fBnot\fP accept more than one package as argument. Use
|
||||
.B pkginfo \-i| grep \-E '^(package1|package2|...)'
|
||||
to work around this limitation.
|
||||
.B current <package1> [<package2> ...]
|
||||
Shows the currently-installed version of <package>, or a message
|
||||
that <package> is not installed.
|
||||
|
||||
.TP
|
||||
.B ls [\-\-path] <package>
|
||||
List the contents of the port's directory
|
||||
Print out a listing of the port's directory
|
||||
|
||||
.TP
|
||||
.B cat <package> [<file>]
|
||||
Print the file to stdout. If <file> is not specified, 'Pkgfile' is used. If set, uses $PAGER.
|
||||
Print to stdout (or $PAGER, if set) the contents of <file> in the port's
|
||||
directory. If <file> is not specified, 'Pkgfile' is used.
|
||||
|
||||
.TP
|
||||
.B edit <package> [<file>]
|
||||
Edit the file using the editor specified in the $EDITOR environment variable.
|
||||
If <file> is not specified, 'Pkgfile' is used.
|
||||
|
||||
|
||||
.TP
|
||||
.B help
|
||||
Show a help screen
|
||||
@ -495,14 +465,6 @@ Force install; Implies 'pkgadd -f'; same as --aargs=-f
|
||||
.B \-fr
|
||||
Force rebuild, Implies 'pkgmk -f'; same as --margs=-f
|
||||
|
||||
.TP
|
||||
.B \-um
|
||||
Update md5sum, implies 'pkgmk -um'; same as --margs=-um
|
||||
|
||||
.TP
|
||||
.B \-im
|
||||
Ignore md5sum, implies 'pkgmk -im'; same as --margs=-im
|
||||
|
||||
.TP
|
||||
.B \-us
|
||||
Update signature, implies 'pkgmk -us'; same as --margs=-us
|
||||
@ -545,10 +507,15 @@ future uses and consistency reasons
|
||||
.B \-\-ignore=<package1,package2,...>
|
||||
Don't install these packages, even if they're listed as dependencies
|
||||
|
||||
.TP
|
||||
.B \-\-nodeps
|
||||
Leave the list of requested packages as-is, without sorting by dependencies
|
||||
or injecting missing dependencies.
|
||||
|
||||
.TP
|
||||
.B \-\-softdeps
|
||||
Consider optional dependencies when determining the order in which to build
|
||||
the packages passed as arguments (in a \fBdepinst\fP or \fBsysup\fP operation).
|
||||
the packages passed as arguments (in \fBinstall\fP or \fBsysup\fP operations).
|
||||
Also affects the output of \fBdeptree\fP, \fBdependent\fP, and \fBlistorphans\fP.
|
||||
|
||||
.TP
|
||||
@ -557,20 +524,20 @@ Use cache file for this command
|
||||
|
||||
.TP
|
||||
.B \-\-test
|
||||
Dry run, don't actually install anything, mostly interesting for
|
||||
Dry run, don't actually install anything. Mostly interesting for
|
||||
.B prt\-get install, prt\-get update, prt\-get sysup
|
||||
|
||||
.TP
|
||||
.B \-\-pre-install
|
||||
.B \-\-pre\-install
|
||||
Execute pre-install script if it's there
|
||||
|
||||
.TP
|
||||
.B \-\-post-install
|
||||
.B \-\-post\-install
|
||||
Execute post-install script if it's there
|
||||
|
||||
.TP
|
||||
.B \-\-install-scripts
|
||||
Execute pre-install and post-install script if they're there
|
||||
.B \-\-install\-scripts
|
||||
Execute pre-install and post-install script if they're there.
|
||||
|
||||
The options --pre-install, --post-install, and --install-scripts offer a
|
||||
convenient way to temporarily override the prt-get.conf directive 'runscripts
|
||||
@ -581,18 +548,17 @@ no\(dq, or point prt-get to an alternative configuration file using
|
||||
--config=<file>. (see below for the documentation of these options)
|
||||
|
||||
.TP
|
||||
.B \-\-install-root=<dir>
|
||||
.B \-\-install\-root=<dir>
|
||||
Use <dir> as root directory for your installation; allows you to install
|
||||
the requested packages onto a different directory than '/'. In daily usage,
|
||||
this option is not required; it's primarily interesting if you're developing
|
||||
an independent installation.
|
||||
|
||||
Pre- and post-install scripts will not be executed if the target root directory
|
||||
lacks a copy of the ports tree. So if you're maintaining an installation on a
|
||||
volume mounted somewhere other than '/', it's not enough to have the
|
||||
line 'runscripts yes' in your prt-get.conf; you also have to ensure that
|
||||
the pre- and post-install scripts can be found in the same location
|
||||
relative to <dir>.
|
||||
Pre- and post-install scripts will not be executed if the requested
|
||||
root directory lacks a copy of the ports tree. So if you're maintaining an
|
||||
installation mounted somewhere different than '/', it's not enough to put
|
||||
the line 'runscripts yes' in your prt-get.conf; you also have to ensure that the
|
||||
pre- and post-install scripts can be found in the same location relative to <dir>.
|
||||
|
||||
The setting for --install-root determines which package database is used for
|
||||
reading/writing (so <dir>/var/lib/pkg/db must exist), and where the pkg.tar.?z
|
||||
@ -611,15 +577,15 @@ unpacks it into <dir>.
|
||||
When setting --install-root=<dir>, install or update commands might behave
|
||||
unexpectedly if <dir>/etc/pkgadd.conf exists and is different from
|
||||
/etc/pkgadd.conf . In order to preserve the \fBpkgadd.conf(5)\fP settings from
|
||||
the host system, append the option --aargs='-c /etc/pkgadd.conf' to your
|
||||
\fBprt-get install\fP command, or just copy the desired directives into
|
||||
host system, append the option --aargs='-c /etc/pkgadd.conf' to your \fBprt\-get
|
||||
install\fP command, or just copy the desired directives into
|
||||
<dir>/etc/pkgadd.conf .
|
||||
|
||||
.TP
|
||||
.B \-\-log
|
||||
Write build output to log file. Basically a convenient alias for
|
||||
\fB\-\-config\-set=\(dqwritelog enabled\(dq\fP. Note that there is no similar
|
||||
alias allowing you to temporarily override the one configuration directive
|
||||
alias allowing you to temporarily override the configuration directive
|
||||
\(dqwritelog enabled\(dq; you have to resort to \fB\-\-config\-set=\(dqwritelog
|
||||
disabled\(dq\fP if that is your intention.
|
||||
|
||||
@ -651,8 +617,9 @@ transactions as well.
|
||||
|
||||
.TP
|
||||
.B \-v, \-vv
|
||||
(verbosity level) Show version of a port (\-v), or show both version
|
||||
and description (\-vv). Passing more than one of these options is equivalent to \-vv.
|
||||
(verbosity level) Show version of a port (-v), or show both version
|
||||
and description (-vv). Passing more than one of these options is equivalent
|
||||
to -vv.
|
||||
|
||||
.TP
|
||||
.B \-\-path
|
||||
@ -677,29 +644,49 @@ Override the 'preferhigher' configuration option. Equivalent to
|
||||
|
||||
.SH "CONFIGURATION"
|
||||
.TP
|
||||
See man prt\-get.conf(5)
|
||||
See man prt-get.conf(5)
|
||||
|
||||
.SH "EXAMPLES"
|
||||
.TP
|
||||
.B prt\-get install irssi
|
||||
Download, build and install irssi, with one simple command
|
||||
Download, build and install irssi (and any of its missing dependencies), with
|
||||
one simple command
|
||||
|
||||
.TP
|
||||
.B prt\-get install paper yasm
|
||||
Install paper and yasm. Abort with an informative error message if either
|
||||
package is already installed, allowing you to issue a revised command.
|
||||
.B prt\-get install --nodeps jasper
|
||||
Install jasper, without trying to resolve dependencies.
|
||||
|
||||
.TP
|
||||
.B prt\-get update --softdeps webkitgtk
|
||||
Get the latest version of webkitgtk, rebuilding any of its outdated dependencies
|
||||
(hard and soft) in the optimal order.
|
||||
|
||||
.TP
|
||||
.B prt\-get update \-fr openssh
|
||||
Update your current version of openssh, forcing a rebuild even if no version difference is detected.
|
||||
Useful if there was a major version change in one of its dependencies, and \fBrevdep openssh\fP
|
||||
indicates a broken package. :\-)
|
||||
.B prt\-get update -fr openssh
|
||||
Update your current version of openssh, forcing a rebuild even if no version
|
||||
difference is detected.
|
||||
Useful if there was a major soversion change in one of its dependencies,
|
||||
and \fBrevdep openssh\fP indicates a broken package. :-)
|
||||
|
||||
.TP
|
||||
.B MISSLIBS=$(revdep \-vvv mpv | awk \-v FS=: '/(missing library)/ {print $3}'); [ \-n \(dq${MISSLIBS[@]}\(dq ] && for i in ${MISSLIBS[@]}; do prt\-get fsearch $i; done
|
||||
(adapted from a script by ppetrov^) Check for the presence of the runtime libraries needed by mpv.
|
||||
If any are absent, search the footprints to determine which ports provide the missing libraries.
|
||||
|
||||
.TP
|
||||
.B prt\-get isinst $(ls /usr/pkgmk/packages/*.tar.gz | sed 's/.*\e///; s/#.*//;') | awk '/not installed/ { print $2 }'
|
||||
Determine whether there are any packages (in a shared output directory) that
|
||||
have since been uninstalled, or were never installed after a successful run
|
||||
of \fBpkgmk\fP.
|
||||
|
||||
.TP
|
||||
.B prt\-get printf '%i:%p:%n\en' | awk \-v FS=: '/^diff:\e/usr\e/ports\e/core/ { print $3 }' | xargs prt\-get update
|
||||
Basically a \fBsysup\fP operation, but restricted to the core collection.
|
||||
Because core ports are often omitted from the dependency line if they aren't
|
||||
dynamically linked in, the \fBsysup\fP sorting algorithm might not put them
|
||||
at the front of the queue. Run this command before a regular \fBsysup\fP in
|
||||
order to ensure that core ports are updated first.
|
||||
|
||||
.TP
|
||||
.B prt\-get isinst $(prt\-get info ffmpeg | awk \-v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}') | awk \-v FS=\(dq \(dq '/not installed/ {print $2}'
|
||||
Show all the optional dependencies of ffmpeg that are not currently installed.
|
||||
@ -713,16 +700,17 @@ spend any resources on ffmpeg until all of its optional dependencies are in
|
||||
place.
|
||||
|
||||
.TP
|
||||
.B prt\-get isinst $(if grep \-qE '^ffmpeg:' /etc/prt\-get.softdeps 2>/dev/null; then grep \-E '^ffmpeg:' /etc/prt\-get.softdeps | cut \-d: \-f2 | tr ',' ' '; else prt\-get info ffmpeg | awk \-v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}'; fi) | awk \-v FS=\(dq \(dq '/not installed/ {print $2}' | xargs prt\-get depinst \-\-group \-\-softdeps ffmpeg
|
||||
.B prt\-get isinst $(if grep \-qE '^ffmpeg:' /etc/prt\-get.softdeps 2>/dev/null; then grep \-E '^ffmpeg:' /etc/prt\-get.softdeps | cut \-d: \-f2 | tr ',' ' '; else prt-get info ffmpeg | awk \-v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}'; fi) | awk \-v FS=\(dq \(dq '/not installed/ {print $2}' | xargs prt\-get depinst \-\-group \-\-softdeps ffmpeg
|
||||
Extension of the above (addressing a use case envisioned by ivandi). The
|
||||
user can create the file /etc/prt-get.softdeps containing a line like
|
||||
.B ffmpeg: x264 x265
|
||||
and then the above command will perform a depinst --group operation to ensure that
|
||||
at least x264 and x265 (but not necessarily any of the other optional
|
||||
dependencies) are present before trying to build ffmpeg. In the absence of such
|
||||
a .softdeps config, the operation reverts to the behaviour of the preceding
|
||||
example (maximal feature set). Implementing Gentoo USE flags with such an
|
||||
awkward one-liner might draw criticism from advocates of the KISS principle.
|
||||
and then the above command will perform a depinst --group operation to
|
||||
ensure that at least x264 and x265 (but not necessarily any of the other
|
||||
optional dependencies) are present before trying to build ffmpeg. In the
|
||||
absence of such a .softdeps config, the operation reverts to the behaviour
|
||||
of the preceding example (maximal feature set). Implementing Gentoo USE
|
||||
flags with such an awkward one-liner might draw criticism from advocates of
|
||||
the KISS principle.
|
||||
|
||||
.TP
|
||||
.B prt\-get search \-\-regex '^(m|n|p)c.*'
|
||||
@ -733,32 +721,29 @@ Return a list of all ports whose names start with "mc", "nc", or "pc"
|
||||
Return a list of all ports having "irc" in their name or description
|
||||
|
||||
.TP
|
||||
.B prt\-get fsearch \-\-full \(dq/usr/etc/*\(dq | awk '/^Found in/ { $0=gensub(/Found in .*\e/(.+):/,\(dq\e\e1\(dq,\(dqg\(dq); print;}'
|
||||
Return a list of all ports that store their configs in /usr/etc. Omit the
|
||||
pipe to awk if you also want a detailed list of the files that matched.
|
||||
|
||||
.TP
|
||||
.B comm \-13 <(ls /usr/ports/core) <(prt\-get listorphans)
|
||||
.B comm -13 <(ls /usr/ports/core) <(prt-get listorphans)
|
||||
(based on comments from Romster and jue) Filter out the core ports from the list of orphans, in
|
||||
shells (like bash) that support process substitution
|
||||
|
||||
.TP
|
||||
.B comm \-13 <(cat ~/.keepers <(ls /usr/ports/core) | sort) <(prt\-get listorphans) | xargs prt\-get remove
|
||||
.B comm -13 <(cat ~/.keepers <(ls /usr/ports/core) | sort) <(prt\-get listorphans) | xargs prt\-get remove
|
||||
(system-hosing extension of the above) A one-liner inspired by \fBpkg\-clean\fP
|
||||
and \fBpkgfoster\fP, but without the safeguard of interactivity. \fBDo not try this on a
|
||||
mission-critical system.\fP
|
||||
and \fBpkgfoster\fP, but without the safeguard of interactivity.
|
||||
\fBDo not try this on a mission-critical system.\fP
|
||||
|
||||
.TP
|
||||
.B prt\-get isinst $(prt\-get quickdep $(prt\-get quickdiff)) | awk '/not installed/ {print $2}'
|
||||
(adapted from a comment by Fun) After updating your ports tree, print out a list of dependencies
|
||||
that were not needed the last time you built your currently-installed ports, but are needed now by
|
||||
the newer versions of these ports. The output of this command is sorted by dependencies, therefore
|
||||
(adapted from a comment by Fun) After updating your ports tree, print out a
|
||||
list of dependencies that were not needed the last time you built your
|
||||
currently-installed ports, but are needed now by the newer versions of
|
||||
these ports. The output of this command is sorted by dependencies, therefore
|
||||
suitable for piping to \fBxargs prt\-get install\fP.
|
||||
|
||||
.TP
|
||||
.B prt\-get isinst $(prt\-get quickdep $(prt\-get quickdiff)) | awk '/is installed/ {print $2}'
|
||||
Same as above, but only print the dependencies that are already installed. The output of this
|
||||
command is suitable for piping to \fBxargs prt\-get update\fP.
|
||||
.TP
|
||||
.B comm \-13 <(prt\-get depends firefox\-bin |tail \-n +2 |sort) <(prt\-get depends firefox |tail \-n +2 |sort)
|
||||
Find the build-time dependencies of firefox. Runtime dependencies would
|
||||
also appear in the list generated by the first process substitution, and
|
||||
\fBcomm \-13\fP will suppress what the two lists have in common.
|
||||
|
||||
.TP
|
||||
.B prt\-get isinst $(prt\-get quickdep i3) | awk '/not installed/ { print $2 }' | xargs prt\-get depinst \-\-softdeps \-\-test
|
||||
@ -769,13 +754,17 @@ awk filter in the middle is needed to prevent the command from failing with the
|
||||
error message "already installed".
|
||||
|
||||
.TP
|
||||
.B comm \-3 <(prt\-get printf \(dq%i:%n %v\-%r\en\(dq | grep \-v ^no | cut \-d: \-f2 | sort) <(pkginfo \-i | sort)
|
||||
(inspired by a bug report from teodor) an alternative to \fBprt\-get diff\fP.
|
||||
In the output, left-justified lines show the version available in the
|
||||
repositories, while indented lines show the version installed. On a
|
||||
reasonably up-to-date system, the two processes in the above command will
|
||||
return many identical lines; these are suppressed by the -3 flag to
|
||||
\fBcomm(1)\fP.
|
||||
.B prt\-get printf \(dq%p\et%u\en\(dq | grep myrepo | cut \-f 2
|
||||
Print the upstream URL for each port in the collection \(dqmyrepo\(dq,
|
||||
perhaps as the first step in keeping your personal overlay up to date.
|
||||
|
||||
.TP
|
||||
.B for u in $(prt\-get printf \(dq%M:%p/%n\en\(dq | grep \-i ^unmaintained | cut \-d: \-f2); do cd ${u%/*}; printf \(dq||%s ||\(dq ${u##*/}; git log ${u##*/} | head \-n 5 | awk '/^Date/ { $0=gensub(/^Date:\es+/,"","g"); printf(\(dq %s ||\en\(dq,$0); }'; cd \- >/dev/null; done
|
||||
Generate a table of unmaintained ports and the dates of their most recent
|
||||
commit, in PmWiki syntax (left-justified port names, centered dates).
|
||||
Requires that your repositories are synchronized using the \fBgit(1)\fP driver.
|
||||
Subsequent sorting by date may be done using \fBsort(1)\fP with the flags
|
||||
-k, -M, and -n (the appropriate key defs will depend on your locale).
|
||||
|
||||
.TP
|
||||
.B for L in /var/log/pkgbuild/*.log; do P=${L%__*}; P=${P##*/}; VR=${L##*__}; VR=${VR%.log}; if ! prt\-get isinst $P >/dev/null; then mv $L /var/log/uninstalled/; elif [ \(dq$(prt\-get current $P)\(dq != \(dq$VR\(dq ]; then mv $L /var/log/oldbuild/; fi; done
|
||||
@ -787,37 +776,21 @@ on declaring \(dqlogfile /var/log/pkgbuild/%n__%v-%r.log\(dq and \(dqwritelog
|
||||
enabled\(dq in \fBprt\-get.conf(5)\fP. Logs saved with a different filename
|
||||
pattern will require slight adjustments to the command.
|
||||
|
||||
.TP
|
||||
.B prt\-get printf \(dq%p\et%u\en\(dq | awk '($1 ~ /\e/myrepo$/) { print $2 }'
|
||||
Print the upstream URL for each port in the collection \(dqmyrepo\(dq, perhaps
|
||||
as the first step in keeping your personal overlay up to date.
|
||||
|
||||
.TP
|
||||
.B prt\-get printf \(dq%M\et%n\en\(dq | grep \-c ^Tim
|
||||
Count how many ports our most-overworked core team member claims responsibility for.
|
||||
|
||||
.TP
|
||||
.B for u in $(prt\-get printf \(dq%M:%p/%n\en\(dq | grep \-i ^unmaintained | cut \-d: \-f2); do cd ${u%/*}; printf \(dq||%s ||\(dq ${u##*/}; git log ${u##*/} | head \-n 5 | awk '/^Date/ { $0=gensub(/^Date:\es+/,"","g"); printf(\(dq %s ||\en\(dq,$0); }'; cd \- >/dev/null; done
|
||||
Generate a table of unmaintained ports and the dates of their most recent
|
||||
commit, in PmWiki syntax (left-justified port names, centered dates).
|
||||
Requires that your repositories are synchronized using the \fBgit(1)\fP driver.
|
||||
Subsequent sorting by date may be done using \fBsort(1)\fP with the flags
|
||||
-k, -M, and -n (the appropriate key defs will depend on your locale).
|
||||
|
||||
.TP
|
||||
.B prt\-get listinst \-\-depsort | xargs prt\-get install \-\-install\-root=/mnt
|
||||
Sort the list of installed packages by dependencies, and then install all
|
||||
those packages onto a backup filesystem (mounted at /mnt). If you have a customized
|
||||
pkgadd.conf that you want applied to this operation, either copy it to
|
||||
/mnt/etc where pkgadd will be looking for it, or pass the additional option \-\-aargs=\(dq\-c
|
||||
/etc/pkgadd.conf\(dq to the install command.
|
||||
those packages onto a backup filesystem (mounted at /mnt). If you have a
|
||||
customized pkgadd.conf that you want applied to this operation, either copy
|
||||
it to /mnt/etc where pkgadd will be looking for it, or pass the additional
|
||||
option \-\-aargs=\(dq\-c /etc/pkgadd.conf\(dq to the install command.
|
||||
|
||||
.TP
|
||||
.B prt\-get list \-\-path \-\-regex '^xorg.*' | grep \-v \(dq/usr/ports/xorg\(dq
|
||||
Show the ports whose names begin with xorg, but which appear outside the xorg port collection.
|
||||
Show the ports whose names begin with xorg, but which appear outside the
|
||||
xorg port collection.
|
||||
(At the time of writing, this command returned at least two font ports.)
|
||||
|
||||
.SH "AUTHORS"
|
||||
Johannes Winkelmann <jw@tks6.net>, and others cited inline
|
||||
.SH "SEE ALSO"
|
||||
prt\-get.conf(5), prt\-cache(8), Pkgfile(5), pkgmk(8), pkgadd(8), ports(8)
|
||||
prt-get.conf(5), prt-cache(8), Pkgfile(5), pkgmk(8), pkgadd(8), ports(8)
|
||||
|
@ -128,35 +128,36 @@ replaced with the port's path, e.g. for port gcc in core, %p would be
|
||||
and %n would be
|
||||
.B gcc.
|
||||
This allows you to have separate log files per port.
|
||||
Separate log files for each version and release can be achieved
|
||||
using the placeholders %v and %r, respectively. But if you want to
|
||||
enable \fBrmlog_on_uninst\fP, it is best to avoid %p, %v, and %r
|
||||
when specifying \fBlogfile\fP (as explained below).
|
||||
Separate log files for each version and release can be achieved using
|
||||
the placeholders %v and %r, respectively. But if you want to enable
|
||||
\fBrmlog_on_uninst\fP, it is best to avoid %p, %v, and %r when
|
||||
specifying \fBlogfile\fP (as explained below).
|
||||
|
||||
.B rmlog_on_uninst
|
||||
which can be set to 'yes' or 'no'; when set to yes, uninstalling a
|
||||
package will also try to delete its build log. Replacements in the template
|
||||
\fBlogfile\fP will be made using the \fIcurrent values\fP from the database
|
||||
of installed packages, and from the active repositories. If log files exist
|
||||
with different values of %p, %v, or %r than what the database and repositories
|
||||
provide, then the pattern substitutions will fail to match the names of those
|
||||
logs, and this feature will be a no-op. For example, suppose you specify
|
||||
the logfile pattern \(dq%p/.buildlogs/%n-%v-%r.log\(dq, and you have a package
|
||||
installed on your system through many versions, or after it has been
|
||||
moved from opt to contrib. Uninstalling that package would leave behind all the
|
||||
build logs except the latest. This pattern is also fragile with respect to
|
||||
repository purges; if one of your installed ports is dropped from the official
|
||||
repos, then either \(dq%p\(dq will expand to the path of your personal overlay
|
||||
(you did make a copy, right?), or it will not expand at all! See the EXAMPLES
|
||||
section of \fBprt\-get(8)\fP for an alternative way to tidy up your directory
|
||||
of build logs.
|
||||
can be set to 'yes' or 'no'; when set to yes, uninstalling a package
|
||||
will also try to delete its build log. Replacements in the template
|
||||
\fBlogfile\fP will be made using the \fIcurrent values\fP from the
|
||||
database of installed packages, and from the active repositories. If
|
||||
log files exist with different values of %p, %v, or %r than what the
|
||||
database and repositories provide, then the pattern substitutions will
|
||||
fail to match the names of those logs, and this feature will be a no-op.
|
||||
For example, suppose you specify the logfile pattern
|
||||
\(dq%p/.buildlogs/%n__%v-%r.log\(dq, and you have a package installed
|
||||
on your system through many versions, or after it has been moved from
|
||||
opt to contrib. Uninstalling that package would leave behind all the
|
||||
build logs except the latest. This pattern is also fragile with respect
|
||||
to repository purges; if one of your installed ports is dropped from
|
||||
the official repos, then either \(dq%p\(dq will expand to the path of
|
||||
your personal overlay (you did make a copy, right?), or it will not
|
||||
expand at all! See the EXAMPLES section of \fBprt\-get(8)\fP for
|
||||
alternative ways to tidy up your directory of build logs.
|
||||
|
||||
.B readme
|
||||
can be set to 'disabled', to suppress the notification after
|
||||
installing a port with a README file; 'compact', to collect all the READMEs
|
||||
can be set to 'disabled', to suppress the notification after installing
|
||||
a port with a README file; 'compact', to collect all the READMEs
|
||||
into one post-transaction output; or 'verbose', to print separate
|
||||
information about each port with a README file. See
|
||||
.B prt-get(8)
|
||||
.B prt\-get(8)
|
||||
and especially the readme command how to read those README files using
|
||||
prt-get.
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
EXTRA_DIST = prt-get_complete prt-get.aliases prt-get.deplist prt-get.conf
|
||||
|
||||
sysconf_DATA = prt-get.conf
|
||||
|
403
misc/Makefile.in
403
misc/Makefile.in
@ -1,403 +0,0 @@
|
||||
# Makefile.in generated by automake 1.12.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = misc
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/mkinstalldirs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(sysconfdir)"
|
||||
DATA = $(sysconf_DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = prt-get_complete prt-get.aliases prt-get.deplist prt-get.conf
|
||||
sysconf_DATA = prt-get.conf
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu misc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu misc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-sysconfDATA: $(sysconf_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-sysconfDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir)
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(sysconfdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-sysconfDATA
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-sysconfDATA
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip install-sysconfDATA installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
|
||||
uninstall-am uninstall-sysconfDATA
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -17,8 +17,7 @@ prtdir /usr/ports/opt
|
||||
### log options:
|
||||
# writelog enabled # (enabled|disabled)
|
||||
# logmode overwrite # (append|overwrite)
|
||||
# rmlog_on_success no # (yes|no)
|
||||
# rmlog_on_uninst no # (yes|no)
|
||||
# rm_on_success no # (yes|no)
|
||||
logfile /var/log/pkgbuild/%n.log
|
||||
# path, %p=path to port dir, %n=port name
|
||||
# %v=version, %r=release
|
||||
|
@ -1,29 +0,0 @@
|
||||
# Makefile.am for prt-get by Johannes Winkelmann
|
||||
|
||||
install-exec-local: install-binPROGRAMS
|
||||
(cd $(DESTDIR)$(bindir); ln -sf prt-get prt-cache)
|
||||
|
||||
bin_PROGRAMS=prt-get
|
||||
|
||||
prt_get_SOURCES= argparser.cpp argparser.h\
|
||||
depresolver.cpp depresolver.h \
|
||||
installtransaction.cpp installtransaction.h \
|
||||
main.cpp \
|
||||
package.cpp package.h \
|
||||
pkgdb.cpp pkgdb.h \
|
||||
prtget.cpp prtget.h \
|
||||
repository.cpp repository.h \
|
||||
stringhelper.cpp stringhelper.h \
|
||||
process.cpp process.h \
|
||||
configuration.cpp configuration.h \
|
||||
signaldispatcher.cpp signaldispatcher.h \
|
||||
lockfile.cpp lockfile.h \
|
||||
file.cpp file.h \
|
||||
locker.cpp locker.h \
|
||||
versioncomparator.cpp versioncomparator.h \
|
||||
datafileparser.cpp datafileparser.h \
|
||||
pg_regex.cpp pg_regex.h
|
||||
|
||||
|
||||
AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" \
|
||||
-DLOCALSTATEDIR=\"$(localstatedir)\"
|
552
src/Makefile.in
552
src/Makefile.in
@ -1,552 +0,0 @@
|
||||
# Makefile.in generated by automake 1.12.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Makefile.am for prt-get by Johannes Winkelmann
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
bin_PROGRAMS = prt-get$(EXEEXT)
|
||||
subdir = src
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_prt_get_OBJECTS = argparser.$(OBJEXT) depresolver.$(OBJEXT) \
|
||||
installtransaction.$(OBJEXT) main.$(OBJEXT) package.$(OBJEXT) \
|
||||
pkgdb.$(OBJEXT) prtget.$(OBJEXT) repository.$(OBJEXT) \
|
||||
stringhelper.$(OBJEXT) process.$(OBJEXT) \
|
||||
configuration.$(OBJEXT) signaldispatcher.$(OBJEXT) \
|
||||
lockfile.$(OBJEXT) file.$(OBJEXT) locker.$(OBJEXT) \
|
||||
versioncomparator.$(OBJEXT) datafileparser.$(OBJEXT) \
|
||||
pg_regex.$(OBJEXT)
|
||||
prt_get_OBJECTS = $(am_prt_get_OBJECTS)
|
||||
prt_get_LDADD = $(LDADD)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
-o $@
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(prt_get_SOURCES)
|
||||
DIST_SOURCES = $(prt_get_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
prt_get_SOURCES = argparser.cpp argparser.h\
|
||||
depresolver.cpp depresolver.h \
|
||||
installtransaction.cpp installtransaction.h \
|
||||
main.cpp \
|
||||
package.cpp package.h \
|
||||
pkgdb.cpp pkgdb.h \
|
||||
prtget.cpp prtget.h \
|
||||
repository.cpp repository.h \
|
||||
stringhelper.cpp stringhelper.h \
|
||||
process.cpp process.h \
|
||||
configuration.cpp configuration.h \
|
||||
signaldispatcher.cpp signaldispatcher.h \
|
||||
lockfile.cpp lockfile.h \
|
||||
file.cpp file.h \
|
||||
locker.cpp locker.h \
|
||||
versioncomparator.cpp versioncomparator.h \
|
||||
datafileparser.cpp datafileparser.h \
|
||||
pg_regex.cpp pg_regex.h
|
||||
|
||||
AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" \
|
||||
-DLOCALSTATEDIR=\"$(localstatedir)\"
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p; \
|
||||
then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' `; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
prt-get$(EXEEXT): $(prt_get_OBJECTS) $(prt_get_DEPENDENCIES) $(EXTRA_prt_get_DEPENDENCIES)
|
||||
@rm -f prt-get$(EXEEXT)
|
||||
$(CXXLINK) $(prt_get_OBJECTS) $(prt_get_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argparser.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configuration.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datafileparser.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/depresolver.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/installtransaction.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locker.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lockfile.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/package.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pg_regex.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgdb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prtget.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repository.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signaldispatcher.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringhelper.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versioncomparator.Po@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
cscopelist: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS install-exec-local
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic cscopelist ctags distclean distclean-compile \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-exec-local install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-binPROGRAMS
|
||||
|
||||
|
||||
install-exec-local: install-binPROGRAMS
|
||||
(cd $(DESTDIR)$(bindir); ln -sf prt-get prt-cache)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -27,26 +27,28 @@ ArgParser::ArgParser( int argc, char** argv )
|
||||
m_hasFilter( false ),
|
||||
m_noStdConfig( false ),
|
||||
m_writeLog( false ),
|
||||
m_nodeps( false ),
|
||||
m_depSort( true ),
|
||||
m_softdeps( false ),
|
||||
m_revdep(false),
|
||||
m_all( false ),
|
||||
m_printPath( false ),
|
||||
m_execPreInstall( false ),
|
||||
m_execPostInstall( false ),
|
||||
m_preferHigher( false ),
|
||||
m_strictDiff( false ),
|
||||
m_sysup( false ),
|
||||
m_group( false ),
|
||||
m_useRegex(false),
|
||||
m_fullPath(false),
|
||||
m_quick(false),
|
||||
m_recursive(false),
|
||||
m_printTree(false),
|
||||
m_depSort(false),
|
||||
m_alternateConfigFile( "" ),
|
||||
m_pkgmkArgs( "" ),
|
||||
m_pkgaddArgs( "" ),
|
||||
m_pkgrmArgs( "" ),
|
||||
m_sortArgs( "" ),
|
||||
m_filter( "" ),
|
||||
m_sortArgs( "" ),
|
||||
m_commandName( "" ),
|
||||
m_unknownOption( "" ),
|
||||
m_installRoot( "" ),
|
||||
@ -80,7 +82,7 @@ bool ArgParser::isCommandGiven() const
|
||||
/*!
|
||||
\return a list of arguments not processed by ArgParser
|
||||
*/
|
||||
const list<char*>& ArgParser::otherArgs() const
|
||||
const list<string>& ArgParser::otherArgs() const
|
||||
{
|
||||
return m_otherArgs;
|
||||
}
|
||||
@ -103,7 +105,6 @@ const string& ArgParser::pkgmkArgs() const
|
||||
return m_pkgmkArgs;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\return addtional arguments to pkgadd
|
||||
*/
|
||||
@ -112,7 +113,6 @@ const string& ArgParser::pkgaddArgs() const
|
||||
return m_pkgaddArgs;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\return the name of the alternative configuration file
|
||||
*/
|
||||
@ -121,36 +121,34 @@ const string& ArgParser::alternateConfigFile() const
|
||||
return m_alternateConfigFile;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
parse the arguments
|
||||
\return true on success
|
||||
*/
|
||||
bool ArgParser::parse()
|
||||
{
|
||||
const int commandCount = 34;
|
||||
string commands[commandCount] = { "list", "search", "dsearch",
|
||||
"info", "version", "cache",
|
||||
"depends", "install", "depinst",
|
||||
"help", "isinst", "dup", "update",
|
||||
"quickdep", "diff", "quickdiff",
|
||||
"path", "listinst", "printf", "readme",
|
||||
"dependent", "sysup", "current",
|
||||
"fsearch", "lock", "unlock",
|
||||
"listlocked", "cat", "ls", "edit",
|
||||
"remove", "deptree", "dumpconfig",
|
||||
"listorphans" };
|
||||
bool ArgParser::parse() {
|
||||
const int commandCount = 28;
|
||||
string commands[commandCount] = { "help", "info", "version",
|
||||
"search", "dsearch", "fsearch",
|
||||
"cache", "install", "remove",
|
||||
"current", "isinst", "diff",
|
||||
"path", "printf", "readme",
|
||||
"list", "listinst", "listorphans",
|
||||
"lock", "unlock", "listlocked",
|
||||
"cat", "ls", "edit", "dumpconfig",
|
||||
"dup", "depends", "deptree"
|
||||
};
|
||||
|
||||
Type commandID[commandCount] = { HELP, INFO, SHOW_VERSION,
|
||||
SEARCH, DSEARCH, FSEARCH,
|
||||
CREATE_CACHE, INSTALL, REMOVE,
|
||||
CURRENT, ISINST, DIFF,
|
||||
PATH, PRINTF, README,
|
||||
LIST, LISTINST, LISTORPHANS,
|
||||
LOCK, UNLOCK, LISTLOCKED,
|
||||
CAT, LS, EDIT, DUMPCONFIG,
|
||||
DUP, DEPENDS, DEPTREE
|
||||
};
|
||||
|
||||
Type commandID[commandCount] = { LIST, SEARCH, DSEARCH, INFO,
|
||||
SHOW_VERSION, CREATE_CACHE,
|
||||
DEPENDS, INSTALL, DEPINST,
|
||||
HELP, ISINST, DUP, UPDATE,
|
||||
QUICKDEP, DIFF, QUICKDIFF,
|
||||
PATH, LISTINST, PRINTF, README,
|
||||
DEPENDENT, SYSUP, CURRENT,
|
||||
FSEARCH, LOCK, UNLOCK, LISTLOCKED,
|
||||
CAT, LS, EDIT, REMOVE, DEPTREE,
|
||||
DUMPCONFIG, LISTORPHANS };
|
||||
if ( m_argc < 2 ) {
|
||||
return false;
|
||||
}
|
||||
@ -170,71 +168,42 @@ bool ArgParser::parse()
|
||||
for ( int i = 1; i < m_argc; ++i ) {
|
||||
if ( m_argv[i][0] == '-' ) {
|
||||
string s = m_argv[i];
|
||||
if ( s == "-v" ) {
|
||||
m_verbose += 1;
|
||||
} else if ( s == "-vv" ) {
|
||||
m_verbose += 2;
|
||||
} else if ( s == "--test" ) {
|
||||
m_isTest = true;
|
||||
} else if ( s == "--cache" ) {
|
||||
m_useCache = true;
|
||||
} else if ( s == "--nodeps" ) {
|
||||
m_nodeps = true;
|
||||
} else if ( s == "--softdeps" ) {
|
||||
m_softdeps = true;
|
||||
} else if ( s == "--all" ) {
|
||||
m_all = true;
|
||||
} else if ( s == "--path" ) {
|
||||
m_printPath = true;
|
||||
} else if ( s == "--log" ) {
|
||||
m_writeLog = true;
|
||||
} else if ( s == "--pre-install" ) {
|
||||
m_execPreInstall = true;
|
||||
} else if ( s == "--post-install" ) {
|
||||
if ( s == "-v" ) { m_verbose += 1;
|
||||
} else if ( s == "-vv" ) { m_verbose += 2;
|
||||
} else if ( s == "--test" ) { m_isTest = true;
|
||||
} else if ( s == "--cache" ) { m_useCache = true;
|
||||
} else if ( s == "--depsort" ) { m_depSort = true;
|
||||
} else if ( s == "--nodeps" ) { m_depSort = false;
|
||||
} else if ( s == "--softdeps" ) { m_softdeps = true;
|
||||
} else if ( s == "--all" ) { m_all = true;
|
||||
} else if ( s == "--path" ) { m_printPath = true;
|
||||
} else if ( s == "--log" ) { m_writeLog = true;
|
||||
} else if ( s == "--pre-install" ) { m_execPreInstall = true;
|
||||
} else if ( s == "--post-install" ) { m_execPostInstall = true;
|
||||
} else if ( s == "--install-scripts" ) { m_execPreInstall = true;
|
||||
m_execPostInstall = true;
|
||||
} else if ( s == "--install-scripts" ) {
|
||||
m_execPreInstall = true;
|
||||
m_execPostInstall = true;
|
||||
} else if ( s == "--no-std-config" ) {
|
||||
m_noStdConfig = true;
|
||||
} else if ( s == "--no-std-config" ) { m_noStdConfig = true;
|
||||
} else if ( s == "--prefer-higher" || s == "-ph" ) {
|
||||
m_preferHigher = true;
|
||||
} else if ( s == "--strict-diff" || s == "-sd" ) {
|
||||
m_strictDiff = true;
|
||||
} else if ( s == "--group" || s == "-g" ) {
|
||||
m_group = true;
|
||||
} else if ( s == "--regex" ) {
|
||||
m_useRegex = true;
|
||||
} else if ( s == "--full" ) {
|
||||
m_fullPath = true;
|
||||
} else if ( s == "--recursive" ) {
|
||||
m_recursive = true;
|
||||
} else if ( s == "--tree" ) {
|
||||
m_printTree = true;
|
||||
} else if ( s == "--depsort" ) {
|
||||
m_depSort = true;
|
||||
} else if ( s == "-f" ) {
|
||||
m_pkgaddArgs += " " + s;
|
||||
} else if ( s == "-fr" ) {
|
||||
m_pkgmkArgs += " -f";
|
||||
} else if ( s == "-if" ) {
|
||||
m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-uf" ) {
|
||||
m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-im" ) {
|
||||
m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-um" ) {
|
||||
m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-is" ) {
|
||||
m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-us" ) {
|
||||
m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-kw" ) {
|
||||
m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-ns" ) {
|
||||
m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-fi" ) {
|
||||
m_pkgaddArgs += " -f";
|
||||
} else if ( s == "--group" || s == "-g" ) { m_group = true;
|
||||
} else if ( s == "--quick" || s == "-Q" ) { m_quick = true;
|
||||
} else if ( s == "--regex" ) { m_useRegex = true;
|
||||
} else if ( s == "--full" ) { m_fullPath = true;
|
||||
} else if ( s == "--recursive" || s == "-R" ) { m_recursive = true;
|
||||
} else if ( s == "--tree" || s == "-T" ) { m_printTree = true;
|
||||
} else if ( s == "-f" ) { m_pkgaddArgs += " " + s;
|
||||
} else if ( s == "-fi" ) { m_pkgaddArgs += " -f";
|
||||
} else if ( s == "-fr" ) { m_pkgmkArgs += " -f";
|
||||
} else if ( s == "-if" ) { m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-uf" ) { m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-im" ) { m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-um" ) { m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-is" ) { m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-us" ) { m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-kw" ) { m_pkgmkArgs += " " + s;
|
||||
} else if ( s == "-ns" ) { m_pkgmkArgs += " " + s;
|
||||
}
|
||||
|
||||
// substrings
|
||||
@ -244,11 +213,11 @@ bool ArgParser::parse()
|
||||
m_pkgaddArgs += " " + s.substr( 8 );
|
||||
} else if ( s.substr( 0, 8 ) == "--rargs=" ) {
|
||||
m_pkgrmArgs = s.substr( 8 );
|
||||
} else if ( s.substr( 0, 7 ) == "--sort=" ) {
|
||||
m_sortArgs = s.substr( 7 );
|
||||
} else if ( s.substr( 0, 9 ) == "--filter=" ) {
|
||||
m_filter = s.substr( 9 );
|
||||
m_hasFilter = true;
|
||||
} else if ( s.substr( 0, 7 ) == "--sort=" ) {
|
||||
m_sortArgs = s.substr( 7 );
|
||||
} else if ( s.substr( 0, 9 ) == "--config=" ) {
|
||||
m_alternateConfigFile = s.substr( 9 );
|
||||
m_isAlternateConfigGiven = true;
|
||||
@ -271,22 +240,45 @@ bool ArgParser::parse()
|
||||
} else {
|
||||
if (!m_isCommandGiven) {
|
||||
string s = m_argv[i];
|
||||
m_commandName = s;
|
||||
if ( s == "grpinst" ) {
|
||||
m_isCommandGiven = true;
|
||||
m_commandType = commandID[7];
|
||||
m_group = true;
|
||||
cout << "Warning: grpinst is obsolescent";
|
||||
cout << "; using install --group" << endl;
|
||||
} else {
|
||||
for ( int i = 0; i < commandCount; ++i ) {
|
||||
if ( s == commands[i] ) {
|
||||
m_isCommandGiven = true;
|
||||
m_commandType = commandID[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( s == "grpinst") {
|
||||
m_isCommandGiven = true;
|
||||
m_commandType = INSTALL;
|
||||
m_group = true;
|
||||
cout << "Warning: grpinst is obsolescent";
|
||||
cout << "; using install --group" << endl;
|
||||
} else if (s == "depinst") {
|
||||
m_isCommandGiven = true;
|
||||
m_commandType = INSTALL;
|
||||
m_depSort = true;
|
||||
} else if (s == "update") {
|
||||
m_isCommandGiven = true;
|
||||
m_commandType = INSTALL;
|
||||
} else if (s == "sysup") {
|
||||
m_isCommandGiven = true;
|
||||
m_commandType = DIFF;
|
||||
m_sysup = true;
|
||||
} else if (s == "quickdiff") {
|
||||
m_isCommandGiven = true;
|
||||
m_commandType = DIFF;
|
||||
m_quick = true;
|
||||
} else if (s == "quickdep") {
|
||||
m_isCommandGiven = true;
|
||||
m_commandType = DEPENDS;
|
||||
m_quick = true;
|
||||
} else if (s == "dependent") {
|
||||
m_isCommandGiven = true;
|
||||
m_commandType = DEPTREE;
|
||||
m_revdep = true;
|
||||
} else {
|
||||
for ( int i = 0; i < commandCount; ++i ) {
|
||||
if ( s == commands[i] ) {
|
||||
m_isCommandGiven = true;
|
||||
m_commandName = s;
|
||||
m_commandType = commandID[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// first argument must be command
|
||||
if ( !m_isCommandGiven ) {
|
||||
return false;
|
||||
@ -297,12 +289,9 @@ bool ArgParser::parse()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return m_isCommandGiven;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\return true whether --test has been specified
|
||||
*/
|
||||
@ -311,7 +300,6 @@ bool ArgParser::isTest() const
|
||||
return m_isTest;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\return the level of verbose: -v -> 1, -vv -> 2
|
||||
*/
|
||||
@ -320,7 +308,6 @@ int ArgParser::verbose() const
|
||||
return m_verbose;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\return whether --cache has been specified
|
||||
*/
|
||||
@ -329,7 +316,6 @@ bool ArgParser::useCache() const
|
||||
return m_useCache;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\return whether prt-get was called as 'prt-cache' or not
|
||||
*/
|
||||
@ -346,14 +332,6 @@ bool ArgParser::writeLog() const
|
||||
return m_writeLog;
|
||||
}
|
||||
|
||||
/*!
|
||||
\return the --sort="..." string
|
||||
*/
|
||||
const string& ArgParser::sortArgs() const
|
||||
{
|
||||
return m_sortArgs;
|
||||
}
|
||||
|
||||
/*!
|
||||
\return whether there was a --filter argument
|
||||
*/
|
||||
@ -362,7 +340,6 @@ bool ArgParser::hasFilter() const
|
||||
return m_hasFilter;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\return whether there was a --no-std-config argument
|
||||
*/
|
||||
@ -371,7 +348,6 @@ bool ArgParser::noStdConfig() const
|
||||
return m_noStdConfig;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\return the --filter="..." string
|
||||
*/
|
||||
@ -381,16 +357,18 @@ const string& ArgParser::filter() const
|
||||
}
|
||||
|
||||
/*!
|
||||
\return whether there was a --nodeps argument
|
||||
\return the --sort="..." string
|
||||
*/
|
||||
bool ArgParser::nodeps() const
|
||||
const string& ArgParser::sortArgs() const
|
||||
{
|
||||
return m_nodeps;
|
||||
return m_sortArgs;
|
||||
}
|
||||
|
||||
bool ArgParser::depSort() const
|
||||
{
|
||||
return m_depSort;
|
||||
}
|
||||
|
||||
/*!
|
||||
\return whether there was a --softdeps argument
|
||||
*/
|
||||
bool ArgParser::followSoftdeps() const
|
||||
{
|
||||
return m_softdeps;
|
||||
@ -409,6 +387,16 @@ bool ArgParser::printPath() const
|
||||
return m_printPath;
|
||||
}
|
||||
|
||||
bool ArgParser::revdep() const
|
||||
{
|
||||
return m_revdep;
|
||||
}
|
||||
|
||||
bool ArgParser::quick() const
|
||||
{
|
||||
return m_quick;
|
||||
}
|
||||
|
||||
bool ArgParser::recursive() const
|
||||
{
|
||||
return m_recursive;
|
||||
@ -416,12 +404,7 @@ bool ArgParser::recursive() const
|
||||
|
||||
bool ArgParser::printTree() const
|
||||
{
|
||||
return m_printTree;
|
||||
}
|
||||
|
||||
bool ArgParser::depSort() const
|
||||
{
|
||||
return m_depSort;
|
||||
return (m_printTree || m_commandName == "deptree");
|
||||
}
|
||||
|
||||
const string& ArgParser::commandName() const
|
||||
@ -470,6 +453,11 @@ bool ArgParser::strictDiff() const
|
||||
return m_strictDiff;
|
||||
}
|
||||
|
||||
bool ArgParser::sysup() const
|
||||
{
|
||||
return m_sysup;
|
||||
}
|
||||
|
||||
bool ArgParser::group() const
|
||||
{
|
||||
return m_group;
|
||||
@ -485,7 +473,6 @@ bool ArgParser::fullPath() const
|
||||
return m_fullPath;
|
||||
}
|
||||
|
||||
|
||||
const string& ArgParser::ignore() const
|
||||
{
|
||||
return m_ignore;
|
||||
|
@ -31,14 +31,15 @@ public:
|
||||
bool parse();
|
||||
|
||||
/*! Command type */
|
||||
enum Type { HELP, LIST, SEARCH, DSEARCH, INSTALL, DEPINST,
|
||||
INFO, DEPENDS, ISINST, DUP, UPDATE,
|
||||
QUICKDEP, DIFF,
|
||||
QUICKDIFF, SHOW_VERSION, CREATE_CACHE, PATH,
|
||||
LISTINST, PRINTF, README, DEPENDENT, SYSUP,
|
||||
CURRENT, FSEARCH, LOCK, UNLOCK, LISTLOCKED,
|
||||
CAT, LS, EDIT, REMOVE,
|
||||
DEPTREE, DUMPCONFIG, LISTORPHANS };
|
||||
enum Type { HELP, INFO, SHOW_VERSION,
|
||||
SEARCH, DSEARCH, FSEARCH,
|
||||
CREATE_CACHE, INSTALL, REMOVE,
|
||||
CURRENT, ISINST, DIFF,
|
||||
PATH, PRINTF, README,
|
||||
LIST, LISTINST, LISTORPHANS,
|
||||
LOCK, UNLOCK, LISTLOCKED,
|
||||
CAT, LS, EDIT, DUMPCONFIG,
|
||||
DUP, DEPENDS, DEPTREE };
|
||||
|
||||
bool isCommandGiven() const;
|
||||
bool isTest() const;
|
||||
@ -48,27 +49,29 @@ public:
|
||||
bool writeLog() const;
|
||||
bool hasFilter() const;
|
||||
bool noStdConfig() const;
|
||||
bool nodeps() const;
|
||||
bool depSort() const;
|
||||
bool followSoftdeps() const;
|
||||
bool all() const;
|
||||
bool printPath() const;
|
||||
bool execPreInstall() const;
|
||||
bool execPostInstall() const;
|
||||
bool preferHigher() const;
|
||||
bool strictDiff() const;
|
||||
bool sysup() const;
|
||||
bool group() const;
|
||||
bool useRegex() const;
|
||||
bool fullPath() const;
|
||||
bool revdep() const;
|
||||
bool quick() const;
|
||||
bool recursive() const;
|
||||
bool printTree() const;
|
||||
bool depSort() const;
|
||||
bool followSoftdeps() const;
|
||||
|
||||
const string& alternateConfigFile() const;
|
||||
const string& pkgmkArgs() const;
|
||||
const string& pkgaddArgs() const;
|
||||
const string& pkgrmArgs() const;
|
||||
const string& sortArgs() const;
|
||||
const string& filter() const;
|
||||
const string& sortArgs() const;
|
||||
const string& installRoot() const;
|
||||
const string& ignore() const;
|
||||
|
||||
@ -78,7 +81,7 @@ public:
|
||||
const string& commandName() const;
|
||||
const string& unknownOption() const;
|
||||
|
||||
const list<char*>& otherArgs() const;
|
||||
const list<string>& otherArgs() const;
|
||||
|
||||
int verbose() const;
|
||||
|
||||
@ -99,8 +102,9 @@ private:
|
||||
|
||||
bool m_writeLog;
|
||||
|
||||
bool m_nodeps;
|
||||
bool m_depSort;
|
||||
bool m_softdeps;
|
||||
bool m_revdep;
|
||||
|
||||
bool m_all;
|
||||
bool m_printPath;
|
||||
@ -109,21 +113,21 @@ private:
|
||||
bool m_execPostInstall;
|
||||
bool m_preferHigher;
|
||||
bool m_strictDiff;
|
||||
bool m_sysup;
|
||||
bool m_group;
|
||||
bool m_useRegex;
|
||||
bool m_fullPath;
|
||||
|
||||
bool m_quick;
|
||||
bool m_recursive;
|
||||
bool m_printTree;
|
||||
|
||||
bool m_depSort;
|
||||
|
||||
string m_alternateConfigFile;
|
||||
string m_pkgmkArgs;
|
||||
string m_pkgaddArgs;
|
||||
string m_pkgrmArgs;
|
||||
string m_sortArgs;
|
||||
string m_filter;
|
||||
string m_sortArgs;
|
||||
string m_commandName;
|
||||
string m_unknownOption;
|
||||
string m_installRoot;
|
||||
@ -136,7 +140,7 @@ private:
|
||||
|
||||
int m_verbose;
|
||||
|
||||
list<char*> m_otherArgs;
|
||||
list<string> m_otherArgs;
|
||||
|
||||
list< pair<char*, ConfigArgType> > m_configData;
|
||||
};
|
||||
|
@ -37,7 +37,8 @@ Configuration::Configuration( const std::string& configFile,
|
||||
m_useRegex( false ),
|
||||
m_followSoftdeps( false ),
|
||||
m_makeCommand( "" ), m_addCommand( "" ),
|
||||
m_removeCommand( "" ), m_runscriptCommand( "" )
|
||||
m_removeCommand( "" ), m_runscriptCommand( "" ),
|
||||
m_compressionMode( "" ), m_packageDir( "" )
|
||||
{
|
||||
|
||||
}
|
||||
@ -95,6 +96,25 @@ string Configuration::logFilePattern() const
|
||||
return m_logFilePattern;
|
||||
}
|
||||
|
||||
string Configuration::packageDir() const
|
||||
{
|
||||
string value = "";
|
||||
char line[256];
|
||||
string cmd = "eval " + m_packageDir + " && echo \"$PKGMK_PACKAGE_DIR\"";
|
||||
FILE* p = popen(cmd.c_str(), "r");
|
||||
if (p) {
|
||||
fgets(line, 256, p);
|
||||
value = StringHelper::stripWhiteSpace(line);
|
||||
pclose(p);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
string Configuration::compressionMode() const
|
||||
{
|
||||
return ( m_compressionMode == "" ) ? "gz" : m_compressionMode;
|
||||
}
|
||||
|
||||
const list< pair<string, string> >& Configuration::rootList() const
|
||||
{
|
||||
@ -156,8 +176,6 @@ void Configuration::parseLine(const string& line, bool prepend)
|
||||
} else if ( startsWithNoCase( s, "writelog" ) ) {
|
||||
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
|
||||
if ( s == "enabled" ) {
|
||||
// it's already set to false, so we can just enable it.
|
||||
// like this, the command line switch works as well
|
||||
m_writeLog = true;
|
||||
} else if ( s == "disabled" ) {
|
||||
m_writeLog = false;
|
||||
@ -197,7 +215,7 @@ void Configuration::parseLine(const string& line, bool prepend)
|
||||
m_runScripts = true;
|
||||
} else if ( s == "no" ) {
|
||||
m_runScripts = false;
|
||||
}
|
||||
}
|
||||
} else if ( startsWithNoCase( s, "preferhigher" ) ) {
|
||||
s = stripWhiteSpace( s.replace( 0, 12, "" ) );
|
||||
if ( s == "yes" ) {
|
||||
@ -209,7 +227,9 @@ void Configuration::parseLine(const string& line, bool prepend)
|
||||
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
|
||||
if ( s == "yes" ) {
|
||||
m_useRegex = true;
|
||||
}
|
||||
} else if ( s == "no" ) {
|
||||
m_useRegex = false;
|
||||
}
|
||||
} else if ( startsWithNoCase( s, "softdeps" ) ) {
|
||||
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
|
||||
if ( s == "yes" ) {
|
||||
@ -228,6 +248,32 @@ void Configuration::parseLine(const string& line, bool prepend)
|
||||
}
|
||||
}
|
||||
|
||||
bool Configuration::parsePkgmkConf(int readOrder)
|
||||
{
|
||||
string fileName = (readOrder == 1) ? "/etc/pkgmk.conf" : "/usr/bin/pkgmk";
|
||||
FILE* fp = fopen(fileName.c_str(), "r");
|
||||
if (!fp)
|
||||
return false;
|
||||
|
||||
string s;
|
||||
char line[256];
|
||||
while (fgets(line, 256, fp)) {
|
||||
s = StringHelper::stripWhiteSpace(getValueBefore(line,'#'));
|
||||
if ( StringHelper::startsWith(s, "PKGMK_COMPRESSION_MODE=") &&
|
||||
(readOrder==1 || m_compressionMode == "") ) {
|
||||
m_compressionMode = s.substr(23);
|
||||
StringHelper::replaceAll(m_compressionMode,"\"","");
|
||||
StringHelper::replaceAll(m_compressionMode,"'","");
|
||||
} else if ( StringHelper::startsWith(s, "PKGMK_PACKAGE_DIR=") &&
|
||||
(readOrder==1 || m_packageDir == "" ) ) {
|
||||
m_packageDir = s;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
return ( m_compressionMode != "" && m_packageDir != "" );
|
||||
}
|
||||
|
||||
bool Configuration::runScripts() const
|
||||
{
|
||||
return m_runScripts;
|
||||
|
@ -46,6 +46,8 @@ public:
|
||||
bool useRegex() const;
|
||||
bool followSoftdeps() const;
|
||||
|
||||
bool parsePkgmkConf(int readOrder);
|
||||
|
||||
void addConfig(const std::string& line,
|
||||
bool configSet,
|
||||
bool configPrepend);
|
||||
@ -55,6 +57,9 @@ public:
|
||||
std::string removeCommand() const;
|
||||
std::string runscriptCommand() const;
|
||||
|
||||
std::string compressionMode() const;
|
||||
std::string packageDir() const;
|
||||
|
||||
private:
|
||||
std::string m_configFile;
|
||||
const ArgParser* m_parser;
|
||||
@ -82,6 +87,8 @@ private:
|
||||
std::string m_removeCommand;
|
||||
std::string m_runscriptCommand;
|
||||
|
||||
std::string m_compressionMode;
|
||||
std::string m_packageDir;
|
||||
|
||||
void parseLine(const std::string& line, bool prepend=false);
|
||||
};
|
||||
|
@ -27,6 +27,7 @@ using namespace std;
|
||||
#include "pkgdb.h"
|
||||
#include "stringhelper.h"
|
||||
#include "argparser.h"
|
||||
#include "versioncomparator.h"
|
||||
#include "process.h"
|
||||
#include "configuration.h"
|
||||
|
||||
@ -71,38 +72,6 @@ InstallTransaction::InstallTransaction( const list<string>& names,
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
Create a nice InstallTransaction
|
||||
\param names a list of port names to be installed
|
||||
\param repo the repository to look for packages
|
||||
\param pkgDB the pkgDB with already installed packages
|
||||
*/
|
||||
InstallTransaction::InstallTransaction( const list<char*>& names,
|
||||
const Repository* repo,
|
||||
PkgDB* pkgDB,
|
||||
const Configuration* config )
|
||||
: m_pkgDB( pkgDB ),
|
||||
m_resolver(),
|
||||
m_repo( repo ),
|
||||
m_depCalced( false ),
|
||||
m_installedPackages(),
|
||||
m_alreadyInstalledPackages(),
|
||||
m_ignoredPackages(),
|
||||
m_depNameList(),
|
||||
m_depList(),
|
||||
m_missingPackages(),
|
||||
m_installErrors(),
|
||||
m_config( config )
|
||||
{
|
||||
list<char*>::const_iterator it = names.begin();
|
||||
for ( ; it != names.end(); ++it ) {
|
||||
m_packages.push_back( make_pair( *it, m_repo->getPackage( *it ) ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
Create a nice InstallTransaction
|
||||
\param names a list of port names to be installed
|
||||
@ -142,17 +111,17 @@ InstallTransaction::installError() const
|
||||
/*!
|
||||
install (commit) a transaction
|
||||
\param parser the argument parser
|
||||
\param update whether this is an update operation
|
||||
\return returns an InstallResult telling whether installation worked
|
||||
*/
|
||||
InstallTransaction::InstallResult
|
||||
InstallTransaction::install( const ArgParser* parser,
|
||||
bool update )
|
||||
InstallTransaction::install( const ArgParser* parser )
|
||||
{
|
||||
if ( m_packages.empty() ) {
|
||||
return NO_PACKAGE_GIVEN;
|
||||
}
|
||||
|
||||
bool update;
|
||||
const string forceRebuild = "-fr";
|
||||
list<string> ignoredPackages;
|
||||
StringHelper::split(parser->ignore(), ',', ignoredPackages);
|
||||
|
||||
@ -175,45 +144,62 @@ InstallTransaction::install( const ArgParser* parser,
|
||||
continue;
|
||||
}
|
||||
|
||||
// consider aliases here, but don't show them specifically
|
||||
if ( !update && m_pkgDB->isInstalled( package->name(), true ) ) {
|
||||
// ignore
|
||||
m_alreadyInstalledPackages.push_back( package->name() );
|
||||
continue;
|
||||
}
|
||||
// Set the update flag if the package is installed and out of date,
|
||||
// or if the user has forced a rebuild.
|
||||
// Proceed to the next target if package is installed and up to date,
|
||||
// or is provided by an alias.
|
||||
if ( m_pkgDB->isInstalled( it->first, false ) ) {
|
||||
VersionComparator::COMP_RESULT
|
||||
rpDiff = VersionComparator::compareVersions(
|
||||
m_repo->getPackageVersion( package->name() ),
|
||||
m_pkgDB->getPackageVersion( package->name() ) );
|
||||
if ( rpDiff == VersionComparator::EQUAL &&
|
||||
parser->pkgmkArgs().find(forceRebuild) == string::npos ) {
|
||||
m_alreadyInstalledPackages.push_back( package->name() );
|
||||
continue;
|
||||
} else if ( (! m_config->preferHigher()) || parser->strictDiff()
|
||||
|| rpDiff == VersionComparator::GREATER
|
||||
|| ( parser->pkgmkArgs().find(forceRebuild)
|
||||
!= string::npos && find(parser->otherArgs().begin(),
|
||||
parser->otherArgs().end(), it->first)
|
||||
!= parser->otherArgs().end() ) ) {
|
||||
update = true;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else if ( m_pkgDB->isInstalled( it->first, true ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
InstallTransaction::InstallResult result;
|
||||
InstallInfo info( package->hasReadme() );
|
||||
if ( parser->isTest() ) {
|
||||
info.preState = ( package->hasPreInstall() &&
|
||||
(parser->execPreInstall() || m_config->runScripts())
|
||||
) ? DEFERRED : NONEXISTENT;
|
||||
(parser->execPreInstall() || m_config->runScripts())
|
||||
) ? DEFERRED : NONEXISTENT;
|
||||
info.postState = ( package->hasPostInstall() &&
|
||||
(parser->execPostInstall() || m_config->runScripts())
|
||||
) ? DEFERRED : NONEXISTENT;
|
||||
m_installedPackages.push_back( make_pair( package->path()
|
||||
+ "/" + package->name(), info));
|
||||
continue;
|
||||
}
|
||||
|
||||
(parser->execPostInstall() || m_config->runScripts())
|
||||
) ? DEFERRED : NONEXISTENT;
|
||||
m_installedPackages.push_back( make_pair( package->path() + "/" + package->name(), info));
|
||||
continue;
|
||||
}
|
||||
if ((result = installPackage( package, parser, update, info )) == SUCCESS) {
|
||||
|
||||
m_installedPackages.push_back( make_pair( package->path()
|
||||
+ "/" + package->name(), info));
|
||||
m_installedPackages.push_back( make_pair( package->path() + "/" + package->name(), info));
|
||||
} else {
|
||||
|
||||
// log failures are critical
|
||||
// log failures and pkgdest errors are critical,
|
||||
// don't proceed to the next install target if encountered
|
||||
if ( result == LOG_DIR_FAILURE ||
|
||||
result == LOG_FILE_FAILURE ||
|
||||
result == NO_LOG_FILE ||
|
||||
result == CANT_LOCK_LOG_FILE ||
|
||||
|
||||
// or pkgdest
|
||||
result == PKGDEST_ERROR ) {
|
||||
return result;
|
||||
}
|
||||
|
||||
m_installErrors.push_back( make_pair(package->name(), info) );
|
||||
m_installErrors.push_back( make_pair(package->path() + "/" + package->name(), info) );
|
||||
if ( parser->group() ) {
|
||||
return PKGMK_FAILURE;
|
||||
}
|
||||
@ -235,8 +221,7 @@ InstallTransaction::installPackage( const Package* package,
|
||||
const ArgParser* parser,
|
||||
bool update,
|
||||
InstallTransaction::InstallInfo& info )
|
||||
const
|
||||
{
|
||||
const {
|
||||
|
||||
InstallTransaction::InstallResult result = SUCCESS;
|
||||
#ifdef USE_LOCKING
|
||||
@ -252,7 +237,7 @@ InstallTransaction::installPackage( const Package* package,
|
||||
commandName = "prt-cache";
|
||||
}
|
||||
|
||||
// - initial information about the package to be build
|
||||
// - initial information about the package to be built
|
||||
string message;
|
||||
message = commandName + ": ";
|
||||
if (update) {
|
||||
@ -310,23 +295,25 @@ InstallTransaction::installPackage( const Package* package,
|
||||
write( fdlog, timestamp.c_str(), timestamp.length());
|
||||
}
|
||||
|
||||
string pkgdir = package->path() + "/" + package->name();
|
||||
chdir( pkgdir.c_str() );
|
||||
string portdir = package->path() + "/" + package->name();
|
||||
chdir( portdir.c_str() );
|
||||
|
||||
string runscriptCommand = "sh";
|
||||
string runscriptCommand = "/bin/sh";
|
||||
if (m_config->runscriptCommand() != "") {
|
||||
runscriptCommand = m_config->runscriptCommand();
|
||||
}
|
||||
if (parser->installRoot() != "") {
|
||||
runscriptCommand = "chroot " + parser->installRoot() + runscriptCommand;
|
||||
runscriptCommand = "chroot " + parser->installRoot() + " "
|
||||
+ runscriptCommand;
|
||||
}
|
||||
|
||||
// -- pre-install
|
||||
struct stat statData;
|
||||
struct stat statData; struct stat fstatData;
|
||||
if ((parser->execPreInstall() || m_config->runScripts()) &&
|
||||
stat((parser->installRoot() + pkgdir + "/" + "pre-install").c_str(), &statData) == 0) {
|
||||
stat((parser->installRoot() + portdir + "/pre-install").c_str(),
|
||||
&statData) == 0) {
|
||||
Process preProc( runscriptCommand,
|
||||
pkgdir + "/" + "pre-install",
|
||||
portdir + "/pre-install",
|
||||
fdlog );
|
||||
if (preProc.executeShell()) {
|
||||
info.preState = FAILED;
|
||||
@ -336,22 +323,39 @@ InstallTransaction::installPackage( const Package* package,
|
||||
}
|
||||
|
||||
// -- build
|
||||
string pkgdest = m_config->packageDir();
|
||||
string builtPkg = package->name() + "#" + package->version() + "-" +
|
||||
package->release() + ".pkg.tar." + m_config->compressionMode();
|
||||
string builtPkgPath = ( pkgdest != "" ) ? pkgdest + "/" + builtPkg :
|
||||
portdir + "/" + builtPkg ;
|
||||
string cmd = PKGMK_DEFAULT_COMMAND;
|
||||
if (m_config->makeCommand() != "") {
|
||||
cmd = m_config->makeCommand();
|
||||
}
|
||||
|
||||
// skip the build if a package exists newer than Pkgfile
|
||||
// (e.g., created by running pkgmk manually)
|
||||
if ( stat(builtPkgPath.c_str(), &statData) +
|
||||
stat((portdir + "/Pkgfile").c_str(), &fstatData) == 0) {
|
||||
time_t pkgMtime = statData.st_mtime;
|
||||
time_t pfMtime = fstatData.st_mtime;
|
||||
if ( ( difftime(pkgMtime,pfMtime) > 0 ) and
|
||||
(parser->pkgmkArgs().find(" -f") == string::npos) ) {
|
||||
cmd = "/bin/true"; }
|
||||
}
|
||||
|
||||
string args = "-d " + parser->pkgmkArgs();
|
||||
if ( parser->pkgmkArgs().find(" -f") != string::npos &&
|
||||
find( parser->otherArgs().begin(), parser->otherArgs().end(),
|
||||
package->name() ) == parser->otherArgs().end() ) {
|
||||
StringHelper::replaceAll(args," -f","");
|
||||
}
|
||||
Process makeProc( cmd, args, fdlog );
|
||||
if ( makeProc.executeShell() ) {
|
||||
result = PKGMK_FAILURE;
|
||||
} else {
|
||||
// -- update
|
||||
string pkgdest = getPkgmkPackageDir();
|
||||
if ( pkgdest != "" ) {
|
||||
// TODO: don't manipulate pkgdir
|
||||
pkgdir = pkgdest;
|
||||
string message = "prt-get: Using PKGMK_PACKAGE_DIR: " + pkgdir;
|
||||
string message = ( pkgdest == "" ) ? "" :
|
||||
commandName + ": Using PKGMK_PACKAGE_DIR " + pkgdest;
|
||||
if (parser->verbose() > 0) {
|
||||
cout << message << endl;
|
||||
}
|
||||
@ -359,94 +363,79 @@ InstallTransaction::installPackage( const Package* package,
|
||||
write( fdlog, message.c_str(), message.length() );
|
||||
write( fdlog, "\n", 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the following chdir is a noop if usePkgDest() returns false
|
||||
if ( chdir( pkgdir.c_str() ) != 0 ) {
|
||||
result = PKGDEST_ERROR;
|
||||
// no need to chdir if we provide absolute paths to pkgadd
|
||||
cmd = PKGADD_DEFAULT_COMMAND;
|
||||
if (m_config->addCommand() != "") {
|
||||
cmd = m_config->addCommand();
|
||||
}
|
||||
|
||||
args = "";
|
||||
if (parser->installRoot() != "") {
|
||||
args = "-r " + parser->installRoot() + " ";
|
||||
}
|
||||
|
||||
if ( update ) {
|
||||
args += "-u ";
|
||||
}
|
||||
if ( !parser->pkgaddArgs().empty() ) {
|
||||
args += parser->pkgaddArgs() + " ";
|
||||
}
|
||||
args += builtPkgPath;
|
||||
|
||||
// - inform the user about what's happening
|
||||
string fullCommand = commandName + ": " + cmd + args;
|
||||
string summary;
|
||||
if (update) {
|
||||
string from = m_pkgDB->getPackageVersion(package->name());
|
||||
string to = m_repo->getPackageVersion(package->name());
|
||||
if (from == to) {
|
||||
summary = commandName + ": " + "reinstalling " +
|
||||
package->name() + " " + to;
|
||||
} else {
|
||||
cmd = PKGADD_DEFAULT_COMMAND;
|
||||
if (m_config->addCommand() != "") {
|
||||
cmd = m_config->addCommand();
|
||||
}
|
||||
summary = commandName + ": " + "updating " +
|
||||
package->name() + " from " + from + " to " + to;
|
||||
}
|
||||
} else {
|
||||
summary = commandName + ": " + "installing " + package->name() +
|
||||
" " + package->version() + "-" + package->release();
|
||||
}
|
||||
|
||||
args = "";
|
||||
if (parser->installRoot() != "") {
|
||||
args = "-r " + parser->installRoot() + " ";
|
||||
}
|
||||
// - print and log
|
||||
cout << summary << endl;
|
||||
if (parser->verbose() > 0) {
|
||||
cout << fullCommand << endl;
|
||||
}
|
||||
if ( m_config->writeLog() ) {
|
||||
time_t endTime;
|
||||
time(&endTime);
|
||||
timestamp = ctime(&endTime);
|
||||
timestamp = commandName + ": build done " + timestamp;
|
||||
|
||||
write( fdlog, summary.c_str(), summary.length() );
|
||||
write( fdlog, "\n", 1 );
|
||||
write( fdlog, fullCommand.c_str(), fullCommand.length() );
|
||||
write( fdlog, "\n", 1 );
|
||||
write( fdlog, timestamp.c_str(), timestamp.length());
|
||||
write( fdlog, "\n", 1 );
|
||||
}
|
||||
|
||||
if ( update ) {
|
||||
args += "-u ";
|
||||
}
|
||||
if ( !parser->pkgaddArgs().empty() ) {
|
||||
args += parser->pkgaddArgs() + " ";
|
||||
}
|
||||
args +=
|
||||
package->name() + "#" +
|
||||
package->version() + "-" +
|
||||
package->release() + ".pkg.tar." + getPkgmkCompressionMode();
|
||||
|
||||
|
||||
// - inform the user about what's happening
|
||||
string fullCommand = commandName + ": " + cmd + " " + args;
|
||||
string summary;
|
||||
if (update) {
|
||||
string from = m_pkgDB->getPackageVersion(package->name());
|
||||
string to = package->version() + "-" + package->release();
|
||||
if (from == to) {
|
||||
summary = commandName + ": " + "reinstalling " +
|
||||
package->name() + " " + to;
|
||||
Process installProc( cmd, args, fdlog );
|
||||
if ( installProc.executeShell() ) {
|
||||
result = PKGADD_FAILURE;
|
||||
} else {
|
||||
// exec post install
|
||||
if ((parser->execPostInstall() || m_config->runScripts() ) &&
|
||||
stat((parser->installRoot() + portdir + "/post-install").c_str(),
|
||||
&statData) == 0) {
|
||||
Process postProc( runscriptCommand,
|
||||
portdir + "/post-install", fdlog );
|
||||
if (postProc.executeShell()) {
|
||||
info.postState = FAILED;
|
||||
} else {
|
||||
summary = commandName + ": " + "updating " +
|
||||
package->name() + " from " + from + " to " + to;
|
||||
info.postState = EXEC_SUCCESS;
|
||||
}
|
||||
} else {
|
||||
summary = commandName + ": " + "installing " +
|
||||
package->name() + " " +
|
||||
package->version() + "-" + package->release();
|
||||
}
|
||||
|
||||
// - print and log
|
||||
cout << summary << endl;
|
||||
if (parser->verbose() > 0) {
|
||||
cout << fullCommand << endl;
|
||||
}
|
||||
if ( m_config->writeLog() ) {
|
||||
time_t endTime;
|
||||
time(&endTime);
|
||||
timestamp = ctime(&endTime);
|
||||
timestamp = commandName + ": build done " + timestamp;
|
||||
|
||||
write( fdlog, summary.c_str(), summary.length() );
|
||||
write( fdlog, "\n", 1 );
|
||||
write( fdlog, fullCommand.c_str(), fullCommand.length() );
|
||||
write( fdlog, "\n", 1 );
|
||||
write( fdlog, timestamp.c_str(), timestamp.length());
|
||||
write( fdlog, "\n", 1 );
|
||||
}
|
||||
|
||||
Process installProc( cmd, args, fdlog );
|
||||
if ( installProc.executeShell() ) {
|
||||
result = PKGADD_FAILURE;
|
||||
} else {
|
||||
// exec post install
|
||||
if ((parser->execPostInstall() || m_config->runScripts() ) &&
|
||||
stat((parser->installRoot() + package->path()
|
||||
+ "/" + package->name() + "/" + "post-install").c_str(),
|
||||
&statData) == 0) {
|
||||
// Work around the pkgdir variable change
|
||||
Process postProc( runscriptCommand,
|
||||
package->path() + "/" + package->name()+
|
||||
"/" + "post-install",
|
||||
fdlog );
|
||||
if (postProc.executeShell()) {
|
||||
info.postState = FAILED;
|
||||
} else {
|
||||
info.postState = EXEC_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -481,8 +470,7 @@ bool InstallTransaction::calculateDependencies()
|
||||
return false;
|
||||
}
|
||||
|
||||
list< pair<string, const Package*> >::const_iterator it =
|
||||
m_packages.begin();
|
||||
list<pair<string, const Package*>>::const_iterator it = m_packages.begin();
|
||||
for ( ; it != m_packages.end(); ++it ) {
|
||||
const Package* package = it->second;
|
||||
if ( package ) {
|
||||
@ -526,8 +514,8 @@ void InstallTransaction::checkDependencies( bool greedy,
|
||||
|
||||
if ( index == -1 ) {
|
||||
index = m_depList.size();
|
||||
if ( (!greedy) or isRequired( package->name() ) ) {
|
||||
m_depList.push_back( package->name() );
|
||||
if ( ( not greedy ) or (isRequired( package->name() )) ) {
|
||||
m_depList.push_back( package->name() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -580,7 +568,7 @@ void InstallTransaction::checkDependencies( bool greedy,
|
||||
m_missingPackages.
|
||||
push_back( make_pair( softdep, package->name() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -593,8 +581,8 @@ void InstallTransaction::checkDependencies( bool greedy,
|
||||
Method to determine whether a soft dependency should be part of the transaction
|
||||
*/
|
||||
bool InstallTransaction::isRequired(const string &pname) {
|
||||
if ( m_pkgDB->isInstalled(pname,false) ) { return true; }
|
||||
list< pair<string, const Package*> >::iterator it = m_packages.begin();
|
||||
if ( m_pkgDB->isInstalled(pname) ) { return true; }
|
||||
list<pair<string, const Package*>>::iterator it = m_packages.begin();
|
||||
for ( ; it != m_packages.end(); ++it ) {
|
||||
if ( pname == it->first ) { return true; }
|
||||
}
|
||||
@ -652,11 +640,11 @@ InstallTransaction::installedPackages() const
|
||||
/*!
|
||||
calculate dependendencies for this package
|
||||
*/
|
||||
InstallTransaction::InstallResult
|
||||
InstallTransaction::calcDependencies( )
|
||||
bool InstallTransaction::calcDependencies( )
|
||||
{
|
||||
if ( m_packages.empty() ) {
|
||||
return NO_PACKAGE_GIVEN;
|
||||
cout << "No packages given for this transaction" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool validPackages = false;
|
||||
@ -669,75 +657,19 @@ InstallTransaction::calcDependencies( )
|
||||
m_missingPackages.push_back( make_pair( it->first, string("") ) );
|
||||
}
|
||||
}
|
||||
if ( !validPackages ) {
|
||||
return PACKAGE_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (!validPackages) {
|
||||
cout << "No valid packages for this transaction" << endl;
|
||||
return false;
|
||||
}
|
||||
if ( !calculateDependencies() ) {
|
||||
return CYCLIC_DEPEND;
|
||||
cout << "Cyclic dependencies detected" << endl;
|
||||
return false;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* getPkgDest assumes that you're in the build directory already
|
||||
*/
|
||||
string InstallTransaction::getPkgmkSetting(const string& setting)
|
||||
{
|
||||
string value = "";
|
||||
value = getPkgmkSettingFromFile(setting, "/etc/pkgmk.conf");
|
||||
if (value.size() == 0) {
|
||||
value = getPkgmkSettingFromFile(setting, "/usr/bin/pkgmk");
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
string InstallTransaction::getPkgmkSettingFromFile(const string& setting, const string& fileName)
|
||||
{
|
||||
FILE* fp = fopen(fileName.c_str(), "r");
|
||||
if (!fp)
|
||||
return "";
|
||||
|
||||
string candidate;
|
||||
string s;
|
||||
char line[256];
|
||||
while (fgets(line, 256, fp)) {
|
||||
s = StringHelper::stripWhiteSpace(line);
|
||||
if (StringHelper::startsWith(s, setting + "=")) {
|
||||
candidate = s;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
string value = "";
|
||||
if (candidate.length() > 0) {
|
||||
string cmd = "eval " + candidate + " && echo $" + setting;
|
||||
FILE* p = popen(cmd.c_str(), "r");
|
||||
if (p) {
|
||||
fgets(line, 256, p);
|
||||
value = StringHelper::stripWhiteSpace(line);
|
||||
pclose(p);
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
return true;
|
||||
}
|
||||
|
||||
const list<string>& InstallTransaction::ignoredPackages() const
|
||||
{
|
||||
return m_ignoredPackages;
|
||||
}
|
||||
|
||||
string InstallTransaction::getPkgmkPackageDir()
|
||||
{
|
||||
return getPkgmkSetting("PKGMK_PACKAGE_DIR");
|
||||
}
|
||||
|
||||
string InstallTransaction::getPkgmkCompressionMode()
|
||||
{
|
||||
string value = getPkgmkSetting("PKGMK_COMPRESSION_MODE");
|
||||
|
||||
return value.size() ? value : "gz";
|
||||
}
|
||||
|
@ -33,10 +33,6 @@ class Configuration;
|
||||
class InstallTransaction
|
||||
{
|
||||
public:
|
||||
InstallTransaction( const list<char*>& names,
|
||||
const Repository* repo,
|
||||
PkgDB* pkgDB,
|
||||
const Configuration* config );
|
||||
InstallTransaction( const list<string>& names,
|
||||
const Repository* repo,
|
||||
PkgDB* pkgDB,
|
||||
@ -54,10 +50,10 @@ public:
|
||||
/*! Result of an installation */
|
||||
enum InstallResult {
|
||||
SUCCESS, /*!< yeah, success */
|
||||
NO_PACKAGE_GIVEN, /*!< no package give to install */
|
||||
NO_PACKAGE_GIVEN, /*!< no package given to install */
|
||||
PACKAGE_NOT_FOUND, /*!< package not found */
|
||||
PKGMK_FAILURE, /*!< error while pkgmk */
|
||||
PKGDEST_ERROR, /*!< can't change to PKGDEST */
|
||||
PKGDEST_ERROR, /*!< can't change to PKGDEST */
|
||||
PKGADD_FAILURE, /*!< error while pkgadd */
|
||||
CYCLIC_DEPEND, /*!< cyclic dependencies found */
|
||||
LOG_DIR_FAILURE, /*!< couldn't create log directory */
|
||||
@ -83,22 +79,17 @@ public:
|
||||
bool hasReadme;
|
||||
};
|
||||
|
||||
InstallResult install( const ArgParser* parser,
|
||||
bool update );
|
||||
InstallResult calcDependencies();
|
||||
InstallResult install( const ArgParser* parser );
|
||||
bool calcDependencies();
|
||||
|
||||
const list< pair<string, InstallInfo> >& installedPackages() const;
|
||||
const list<string>& alreadyInstalledPackages() const;
|
||||
const list<string>& ignoredPackages() const;
|
||||
|
||||
|
||||
const list<string>& dependencies() const;
|
||||
const list< pair<string,string> >& missing() const;
|
||||
const list< pair<string, InstallInfo> >& installError() const;
|
||||
|
||||
static string getPkgmkPackageDir();
|
||||
static string getPkgmkCompressionMode();
|
||||
|
||||
private:
|
||||
bool calculateDependencies();
|
||||
void checkDependencies( bool greedy, const Package* package, int depends=-1 );
|
||||
@ -109,10 +100,6 @@ private:
|
||||
InstallInfo& info ) const;
|
||||
bool isRequired(const string &pname);
|
||||
|
||||
static string getPkgmkSetting(const string& setting);
|
||||
static string getPkgmkSettingFromFile(const string& setting,
|
||||
const string& fileName);
|
||||
|
||||
PkgDB* m_pkgDB;
|
||||
DepResolver m_resolver;
|
||||
const Repository* m_repo;
|
||||
@ -126,21 +113,20 @@ private:
|
||||
// packages< pair<name, hasReadme> > installed by this transaction
|
||||
list< pair<string, InstallInfo> > m_installedPackages;
|
||||
|
||||
// packages which were requested to be installed which where already
|
||||
// packages requested to be installed, but already present
|
||||
list<string> m_alreadyInstalledPackages;
|
||||
|
||||
// packages which are required by the transaction, but ignored by
|
||||
// the user
|
||||
// packages required by the transaction, but ignored by the user
|
||||
list<string> m_ignoredPackages;
|
||||
|
||||
list<string> m_depNameList;
|
||||
vector<string> m_depList;
|
||||
vector<string> treeWalk;
|
||||
|
||||
// packages requested to be installed not found in the ports tree
|
||||
// packages requested to be installed, but not found in the ports tree
|
||||
list< pair<string, string> > m_missingPackages;
|
||||
|
||||
// packages where build/installed failed
|
||||
// packages where build/install failed
|
||||
list< pair<string, InstallInfo> > m_installErrors;
|
||||
|
||||
/// prt-get itself
|
||||
|
57
src/main.cpp
57
src/main.cpp
@ -57,17 +57,13 @@ int main( int argc, char** argv )
|
||||
|
||||
|
||||
ArgParser::Type command = argParser.commandType();
|
||||
switch ( command )
|
||||
{
|
||||
switch ( command ) {
|
||||
case ArgParser::HELP:
|
||||
prtGet.printUsage();
|
||||
break;
|
||||
case ArgParser::SHOW_VERSION:
|
||||
prtGet.printVersion();
|
||||
break;
|
||||
case ArgParser::LIST:
|
||||
prtGet.listPackages();
|
||||
break;
|
||||
case ArgParser::DUP:
|
||||
prtGet.listShadowed();
|
||||
break;
|
||||
@ -84,25 +80,16 @@ int main( int argc, char** argv )
|
||||
prtGet.isInstalled();
|
||||
break;
|
||||
case ArgParser::INSTALL:
|
||||
prtGet.install();
|
||||
prtGet.install( argParser.depSort() );
|
||||
break;
|
||||
case ArgParser::DEPINST:
|
||||
prtGet.install( false, true );
|
||||
break;
|
||||
case ArgParser::DEPENDS:
|
||||
prtGet.printDepends();
|
||||
break;
|
||||
case ArgParser::QUICKDEP:
|
||||
prtGet.printDepends( true );
|
||||
break;
|
||||
case ArgParser::UPDATE:
|
||||
prtGet.install( true );
|
||||
prtGet.printDepends( argParser.quick() );
|
||||
break;
|
||||
case ArgParser::DEPTREE:
|
||||
prtGet.printDepTree();
|
||||
break;
|
||||
case ArgParser::DIFF:
|
||||
prtGet.printDiff();
|
||||
break;
|
||||
case ArgParser::QUICKDIFF:
|
||||
prtGet.printQuickDiff();
|
||||
prtGet.printDiff( argParser.quick() );
|
||||
break;
|
||||
case ArgParser::CREATE_CACHE:
|
||||
prtGet.createCache();
|
||||
@ -110,36 +97,36 @@ int main( int argc, char** argv )
|
||||
case ArgParser::PATH:
|
||||
prtGet.printPath();
|
||||
break;
|
||||
case ArgParser::LISTINST:
|
||||
prtGet.listInstalled();
|
||||
break;
|
||||
case ArgParser::PRINTF:
|
||||
prtGet.printf();
|
||||
break;
|
||||
case ArgParser::README:
|
||||
prtGet.readme();
|
||||
break;
|
||||
case ArgParser::DEPENDENT:
|
||||
prtGet.printDependent();
|
||||
break;
|
||||
case ArgParser::SYSUP:
|
||||
prtGet.sysup();
|
||||
break;
|
||||
case ArgParser::CURRENT:
|
||||
prtGet.current();
|
||||
break;
|
||||
case ArgParser::FSEARCH:
|
||||
prtGet.fsearch();
|
||||
break;
|
||||
case ArgParser::LIST:
|
||||
prtGet.listPackages();
|
||||
break;
|
||||
case ArgParser::LISTINST:
|
||||
prtGet.listInstalled();
|
||||
break;
|
||||
case ArgParser::LISTORPHANS:
|
||||
prtGet.listOrphans();
|
||||
break;
|
||||
case ArgParser::LISTLOCKED:
|
||||
prtGet.listLocked();
|
||||
break;
|
||||
case ArgParser::LOCK:
|
||||
prtGet.setLock( true );
|
||||
break;
|
||||
case ArgParser::UNLOCK:
|
||||
prtGet.setLock( false );
|
||||
break;
|
||||
case ArgParser::LISTLOCKED:
|
||||
prtGet.listLocked();
|
||||
break;
|
||||
case ArgParser::CAT:
|
||||
prtGet.cat();
|
||||
break;
|
||||
@ -152,15 +139,9 @@ int main( int argc, char** argv )
|
||||
case ArgParser::REMOVE:
|
||||
prtGet.remove();
|
||||
break;
|
||||
case ArgParser::DEPTREE:
|
||||
prtGet.printDependTree();
|
||||
break;
|
||||
case ArgParser::DUMPCONFIG:
|
||||
prtGet.dumpConfig();
|
||||
break;
|
||||
case ArgParser::LISTORPHANS:
|
||||
prtGet.listOrphans();
|
||||
break;
|
||||
default:
|
||||
cerr << "unknown command" << endl;
|
||||
break;
|
||||
|
@ -222,6 +222,7 @@ void Package::load() const
|
||||
|
||||
StringHelper::replaceAll( depends, " ", "," );
|
||||
StringHelper::replaceAll( depends, ",,", "," );
|
||||
|
||||
m_data->depends = depends;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
bool useAlias = false,
|
||||
bool* isAlias = 0,
|
||||
string* aliasOrignalName = 0 ) const;
|
||||
bool isOutdated( const std::string& name ) const;
|
||||
|
||||
|
||||
std::string getPackageVersion( const std::string& name ) const;
|
||||
|
1064
src/prtget.cpp
1064
src/prtget.cpp
File diff suppressed because it is too large
Load Diff
40
src/prtget.h
40
src/prtget.h
@ -55,22 +55,25 @@ public:
|
||||
void listPackages();
|
||||
void listShadowed();
|
||||
void listInstalled();
|
||||
void listOrphans();
|
||||
void listLocked();
|
||||
void setLock( bool lock );
|
||||
|
||||
void searchPackages( bool searchDesc=false );
|
||||
void fsearch();
|
||||
|
||||
void printInfo();
|
||||
void isInstalled();
|
||||
bool isOutdated();
|
||||
void current();
|
||||
void readme();
|
||||
|
||||
void install( bool update=false,
|
||||
bool dependencies=false );
|
||||
void sysup();
|
||||
void current();
|
||||
void install( bool dependencies=false );
|
||||
void remove();
|
||||
|
||||
void printDepends( bool simpleListing=false );
|
||||
void printDependTree();
|
||||
void printDependent();
|
||||
void printDiff();
|
||||
void printQuickDiff();
|
||||
void listOrphans();
|
||||
void printDiff( bool simpleListing=false );
|
||||
void printDepTree();
|
||||
|
||||
void createCache();
|
||||
|
||||
@ -80,14 +83,6 @@ public:
|
||||
void cat();
|
||||
void ls();
|
||||
void edit();
|
||||
|
||||
void remove();
|
||||
|
||||
void setLock( bool lock );
|
||||
void listLocked();
|
||||
|
||||
void fsearch();
|
||||
|
||||
void dumpConfig();
|
||||
|
||||
int returnValue() const;
|
||||
@ -96,14 +91,10 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
void printDepsLevel(int indent, const Package* package, bool greedy);
|
||||
void printDepsLevel(int level, const Package* package, bool greedy);
|
||||
|
||||
void printDependent(const std::string& dep, int level);
|
||||
|
||||
void executeTransaction( InstallTransaction& transaction,
|
||||
bool update );
|
||||
void evaluateResult( InstallTransaction& transaction,
|
||||
bool update,
|
||||
void executeTransaction( InstallTransaction& transaction );
|
||||
void evaluateResult( InstallTransaction& transaction,
|
||||
bool interrupted=false );
|
||||
void reportPrePost(const InstallTransaction::InstallInfo& info);
|
||||
|
||||
@ -122,7 +113,6 @@ protected:
|
||||
const string& version2,
|
||||
bool locked);
|
||||
|
||||
|
||||
Repository* m_repo;
|
||||
PkgDB* m_pkgDB;
|
||||
Configuration* m_config;
|
||||
|
@ -86,12 +86,26 @@ const Package* Repository::getPackage( const string& name ) const
|
||||
return it->second;
|
||||
}
|
||||
|
||||
/*!
|
||||
\param name the package name to be matched
|
||||
\return the version-release in the repository
|
||||
*/
|
||||
std::string Repository::getPackageVersion( const string& name ) const
|
||||
{
|
||||
map<string, Package*>::const_iterator it = m_packageMap.find( name );
|
||||
if ( it == m_packageMap.end() ) {
|
||||
return "0";
|
||||
}
|
||||
const Package* p = it->second;
|
||||
string result = p->version()+"-"+p->release();
|
||||
return result;
|
||||
}
|
||||
|
||||
/*!
|
||||
Search packages for a match of \a pattern in name, and description of
|
||||
Search packages for a match of \a pattern in name, or in description if
|
||||
\a searchDesc is true.
|
||||
\note Name searches can often done without opening the Pkgfiles, but not
|
||||
description search. Therefore, the later is much slower
|
||||
\note Name searches can often be done without opening the Pkgfiles, but not
|
||||
description search. Therefore, the latter is much slower
|
||||
|
||||
\param pattern the pattern to be found
|
||||
\param searchDesc whether descriptions should be searched as well
|
||||
@ -188,11 +202,10 @@ void Repository::initFromFS( const list< pair<string, string> >& rootList,
|
||||
|
||||
|
||||
|
||||
// TODO: think about whether it would be faster (more
|
||||
// efficient) to put all packages into a map, and the iterate
|
||||
// over the list of allowed packages and copy them
|
||||
// over. depending in the efficiency of find(), this might be
|
||||
// faster
|
||||
// TODO: think about whether it would be faster (more efficient)
|
||||
// to put all packages into a map, and then iterate
|
||||
// over the list of allowed packages and copy them over.
|
||||
// Depending on the efficiency of find(), this might be faster.
|
||||
d = opendir( path.c_str() );
|
||||
while ( ( de = readdir( d ) ) != NULL ) {
|
||||
name = de->d_name;
|
||||
@ -327,9 +340,20 @@ Repository::WriteResult Repository::writeCache( const string& cacheFile )
|
||||
const Package* p = it->second;
|
||||
|
||||
// TODO: encode
|
||||
hasReadme = ( p->hasReadme() ) ? yesStr : noStr;
|
||||
hasPreInstall = ( p->hasPreInstall() ) ? yesStr : noStr;
|
||||
hasPostInstall = ( p->hasPostInstall() ) ? yesStr : noStr;
|
||||
hasReadme = noStr;
|
||||
if ( p->hasReadme() ) {
|
||||
hasReadme = yesStr;
|
||||
}
|
||||
|
||||
hasPreInstall = noStr;
|
||||
if ( p->hasPreInstall() ) {
|
||||
hasPreInstall = yesStr;
|
||||
}
|
||||
|
||||
hasPostInstall = noStr;
|
||||
if ( p->hasPostInstall() ) {
|
||||
hasPostInstall = yesStr;
|
||||
}
|
||||
|
||||
fprintf( fp, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n",
|
||||
p->name().c_str(),
|
||||
@ -379,6 +403,37 @@ bool Repository::createOutputDir( const string& path )
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
look for any port mentioning \a pattern as a dependency or soft dependency.
|
||||
searchOptionals=false (the default) only searches the "Depends on:" line.
|
||||
The output will need to be trimmed afterward, because in this namespace we
|
||||
can't check whether the matching ports are installed.
|
||||
*/
|
||||
void Repository::getDependentPackages( const string& pattern,
|
||||
list<Package*>& target,
|
||||
bool searchOptionals ) const {
|
||||
|
||||
map<string, Package*>::const_iterator im = m_packageMap.begin();
|
||||
for ( ; im != m_packageMap.end(); ++im ) {
|
||||
Package* q = im->second; string s;
|
||||
if (searchOptionals) {
|
||||
s = toLowerCase(q->optionals());
|
||||
} else {
|
||||
s = toLowerCase(q->dependencies());
|
||||
}
|
||||
|
||||
if ( s.find( pattern ) != string::npos ) {
|
||||
list<string> tokens;
|
||||
split( s, ',', tokens );
|
||||
list<string>::iterator ik = find( tokens.begin(),
|
||||
tokens.end(), pattern );
|
||||
if ( ik != tokens.end() ) {
|
||||
target.push_back( q );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Search packages for a match of \a pattern in name. The name can
|
||||
|
@ -19,6 +19,7 @@
|
||||
using namespace std;
|
||||
|
||||
#include "package.h"
|
||||
#include "stringhelper.h"
|
||||
|
||||
/*!
|
||||
\class Repository
|
||||
@ -33,6 +34,7 @@ public:
|
||||
~Repository();
|
||||
|
||||
const Package* getPackage( const string& name ) const;
|
||||
std::string getPackageVersion( const string& name ) const;
|
||||
const map<string, Package*>& packages() const;
|
||||
const list<pair<Package*, Package*> >& shadowedPackages() const;
|
||||
|
||||
@ -40,6 +42,10 @@ public:
|
||||
list<Package*>& target,
|
||||
bool searchDesc ) const;
|
||||
|
||||
void getDependentPackages( const string& pattern,
|
||||
list<Package*>& target,
|
||||
bool searchOptionals ) const;
|
||||
|
||||
void getMatchingPackages( const string& pattern,
|
||||
list<Package*>& target ) const;
|
||||
|
||||
|
@ -155,5 +155,4 @@ string replaceAll( string& in,
|
||||
return in;
|
||||
}
|
||||
|
||||
|
||||
}; // Namespace
|
||||
|
Loading…
Reference in New Issue
Block a user