Compare commits
10 Commits
mixed-upin
...
master
Author | SHA1 | Date | |
---|---|---|---|
dad928b20f | |||
d9ec1c1e98 | |||
d1060afc5c | |||
c029a01d00 | |||
af59c55bed | |||
e7d2481dcb | |||
934e044f86 | |||
d9a0d39b60 | |||
21f2e52314 | |||
b3404ff38e |
1
AUTHORS
1
AUTHORS
@ -1,2 +1 @@
|
|||||||
Johannes Winkelmann, jw@tks6.net
|
Johannes Winkelmann, jw@tks6.net
|
||||||
John McQuah, jmq@rawtext.club
|
|
||||||
|
38
ChangeLog
38
ChangeLog
@ -1,39 +1,15 @@
|
|||||||
* 31.08.2023 John McQuah
|
* 31.08.2023 John McQuah
|
||||||
- allow deletion of build log when a package is removed (feature requested
|
- allow prt-get to remove build log when uninstalling a package (feature
|
||||||
by samsep10l)
|
requested by samsep10l)
|
||||||
- man-page updates
|
|
||||||
- demonstrate how to troubleshoot a failed depinst due to omitted softdeps
|
|
||||||
- discuss the rmlog_on_uninst feature
|
|
||||||
|
|
||||||
* 29.05.2023 John McQuah
|
* 31.03.2023 John McQuah
|
||||||
- eliminate code duplication in printDepTree
|
- respect the user's choice of --install-root when running pre- or
|
||||||
- respect the user's choice of --install-root when running pre- and
|
|
||||||
post-install scripts
|
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
|
* 10.03.2023 John McQuah
|
||||||
- make it possible for the dependency resolver to consider optionals
|
- make it possible to consider optional dependencies when updating
|
||||||
|
- bump version of the cache file format, to warn users about the
|
||||||
* 27.02.2022 Alexandr Savca, Tim Biermann
|
'Packager' field being replaced by 'Optional'
|
||||||
- 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
|
* 5.16 26.06.2008 Johannes Winkelmann
|
||||||
- don't loop forever when version= contains unsupported $() tokens
|
- don't loop forever when version= contains unsupported $() tokens
|
||||||
|
8
FAQ
Normal file
8
FAQ
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
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,7 +9,6 @@ ports from crux (http://crux.nu). It offers some simplification over
|
|||||||
pure pkgmk, but might hide some interesting details about the install
|
pure pkgmk, but might hide some interesting details about the install
|
||||||
process.
|
process.
|
||||||
|
|
||||||
|
|
||||||
Installing:
|
Installing:
|
||||||
-----------
|
-----------
|
||||||
Download an iso of the latest CRUX release for a precompiled package.
|
Download an iso of the latest CRUX release for a precompiled package.
|
||||||
@ -24,20 +23,18 @@ found _first_ will be used.
|
|||||||
Feel free to file a bug report on the Gitea issue tracker:
|
Feel free to file a bug report on the Gitea issue tracker:
|
||||||
https://git.crux.nu:82/farkuhar/prt-get/issues/
|
https://git.crux.nu:82/farkuhar/prt-get/issues/
|
||||||
|
|
||||||
|
more information
|
||||||
More information:
|
----------------
|
||||||
-----------------
|
See the man pages for prt-get(8), prt-get.conf(5) and prt-cache for more
|
||||||
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
|
information. The CRUX homepage also offers a (somewhat dated) User Manual
|
||||||
and Quick Start guide:
|
and Quick Start guide:
|
||||||
https://crux.nu/doc/prt-get%20-%20User%20Manual.html
|
https://crux.nu/doc/prt-get%20-%20User%20Manual.html
|
||||||
https://crux.nu/doc/prt-get%20-%20Quick%20start.html
|
https://crux.nu/doc/prt-get%20-%20Quick%20start.html
|
||||||
|
|
||||||
|
|
||||||
"it must be user error" (thinkgeek)
|
"it must be user error" (thinkgeek)
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
Port directories may only contain ports, or else prt-get can fail (which
|
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
|
means that nothing is installed, your system takes no harm). The reason
|
||||||
for this is because the additional checking slows down the application
|
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
|
- add --rebuild-set to dependent
|
||||||
- allow dependency injection for sysup (done), with previews (?)
|
- allow dependency injection for sysup, with previews
|
||||||
- prefer toolchain (patch in trac)
|
- prefer toolchain (patch in trac)
|
||||||
- logging: check for non-root owned symlinks
|
- logging: check for non-root owned symlinks
|
||||||
- logging: reject relative logfile names
|
- logging: reject relative logfile names
|
||||||
|
10
doc/Makefile.am
Normal file
10
doc/Makefile.am
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
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
Normal file
492
doc/Makefile.in
Normal file
@ -0,0 +1,492 @@
|
|||||||
|
# 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:
|
@ -1,110 +0,0 @@
|
|||||||
# 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)
|
|
@ -1,291 +0,0 @@
|
|||||||
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>
|
.B prt\-get command [options] <arguments>
|
||||||
.br
|
.br
|
||||||
.SH "DESCRIPTION"
|
.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
|
functionality to the CRUX package management system. It works with the
|
||||||
local ports tree and is therefore fully compatible with ports(8) and
|
local ports tree and is therefore fully compatible with ports(8) and
|
||||||
pkgmk(8)/pkgadd(8)/pkgrm(8). It offers the following features:
|
pkgmk(8)/pkgadd(8)/pkgrm(8). It offers the following features:
|
||||||
@ -42,16 +42,16 @@ search within the ports
|
|||||||
|
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
What prt-get basically does is build, install/upgrade, and remove packages,
|
What prt\-get basically does is build, install/upgrade, and remove packages, using
|
||||||
using pkgmk, pkgadd, and pkgrm. Additionally, you don't have be in the port's
|
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
|
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
|
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
|
allows you to just install or update a package, without caring where
|
||||||
it actually is located on your file system.
|
it actually is located on your file system.
|
||||||
|
|
||||||
.PP
|
.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),
|
find information about ports (without installing them of course),
|
||||||
or print the dependencies of a port (as a space- or newline-separated list,
|
or print the dependencies of a port (as a space- or newline-separated list,
|
||||||
or a formatted tree). Note that dependencies are no
|
or a formatted tree). Note that dependencies are no
|
||||||
@ -59,91 +59,109 @@ requirement for crux packages and therefore not always accurate.
|
|||||||
|
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
prt-get has a test mode so you can see what effect an install/update
|
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
|
operation would have. Use the \-\-test switch for this (more details in
|
||||||
the \fBOPTIONS\fP section below).
|
the \fBOPTIONS\fP section below).
|
||||||
|
|
||||||
.SH "RETURN VALUE"
|
.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...)
|
value -> meaning mapping to be determined...)
|
||||||
|
|
||||||
.SH "COMMANDS"
|
.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
|
non-option argument passed. This is very similar to
|
||||||
.B cvs(1).
|
.B cvs(1).
|
||||||
[command] can be one of the following:
|
[command] can be one of the following:
|
||||||
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B install [\-\-margs] [\-\-aargs] [\-\-log] [\-\-nodeps] [\-\-softdeps] <package1> [<package2> ...]
|
.B install [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...]
|
||||||
Install or update the packages given on the command line. Note that you can do
|
Install all packages in the listed order. Note that you can do this
|
||||||
this from any directory. Pass the --nodeps flag to prevent \fBprt\-get\fP from
|
from any directory.
|
||||||
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
|
.TP
|
||||||
.B depinst [\-\-margs] [\-\-aargs] [\-\-log] [\-\-softdeps] <package1> [<package2> ...]
|
.B depinst [\-\-margs] [\-\-aargs] [\-\-log] [\-\-softdeps] <package1> [<package2> ...]
|
||||||
Basically a synonym for install (without the --nodeps flag).
|
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.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B update [\-\-margs] [\-\-aargs] [\-\-log] [\-\-softdeps] <package1> [<package2> ...]
|
.B update [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...]
|
||||||
Basically a synonym for install. Earlier versions of \fBprt\-get\fP did not
|
Update all packages listed in this order. Note: if the latest version of a
|
||||||
adjust the \fBpkgadd(8)\fP arguments on a package-by-package basis, but
|
package has acquired dependencies that were not needed by the
|
||||||
applied "install mode" or "update mode" to the entire transaction. This
|
currently-installed version and are not present on the system, the update
|
||||||
version of \fBprt\-get\fP interprets the install command less rigidly, and tries
|
command will not attempt to resolve this omission. prt-get update behaves
|
||||||
to sync all affected ports with their repository versions unless instructed
|
this way because pkgadd invocations inherit the flag -u for every package in
|
||||||
otherwise (using \fBprt\-get lock\fP, the --prefer-higher option, or the
|
the transaction, causing an error if the package is not already installed.
|
||||||
prt-get.aliases file).
|
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.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B remove <package1> [<package2> ...]
|
.B remove <package1> [<package2> ...]
|
||||||
Remove packages listed in this order
|
Remove packages listed in this order
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B sysup [\-\-softdeps] [\-\-nodeps] [\-\-prefer\-higher] [\-\-strict\-diff]
|
.B sysup [\-\-softdeps] [\-\-nodeps]
|
||||||
Update all installed packages which are outdated. Sorts by hard dependencies
|
Update all installed packages which are outdated. Sorts by hard dependencies
|
||||||
by default. Passing the --softdeps switch tells \fBprt\-get\fP to also consider
|
by default. Passing the --softdeps switch tells \fBprt\-get\fP to also consider
|
||||||
optional dependencies when sorting. Passing the --nodeps switch tells prt-get
|
optional dependencies when sorting. Passing the --nodeps switch tells prt-get
|
||||||
not to sort by dependencies at all.
|
not to sort by dependencies at all, for approximately the same effect as
|
||||||
|
.B prt\-get update $(prt\-get quickdiff).
|
||||||
.B Note:
|
As with an \fBupdate\fP command, the child \fBpkgadd\fP processes will
|
||||||
If a port has acquired new dependencies since its last successful build,
|
inherit the \-u flag, so if a port has acquired new dependencies since
|
||||||
those new dependencies \fIwill\fP be injected into the transaction. An elegant
|
its last successful build, those new dependencies will be omitted from
|
||||||
description of this new behaviour is "prt-get no more silently assumes that
|
the transaction (unless they happen to be installed for some other reason and
|
||||||
the user didn't want a particular dependency" [1]. You can still disable the
|
are also in need of an update). See the \fBEXAMPLES\fP section for a way to
|
||||||
automatic dependency injection by passing the --nodeps switch. Other
|
automate the resolution of such omissions. Also see the
|
||||||
ways to fine-tune the selection of ports that are included in a \fBsysup\fP are the
|
.B lock
|
||||||
commands \fBlock\fP and \fBunlock\fP, the prt-get.aliases file, and the
|
and
|
||||||
mutually exclusive switches --prefer-higher, --strict-diff (documented below).
|
.B unlock
|
||||||
|
commands to keep the currently installed versions, even if there are
|
||||||
[1] https://lists.crux.nu/pipermail/crux/2008-June/001784.html
|
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.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B lock <package1> [<package2>...]
|
.B lock <package1> [<package2>...]
|
||||||
Exclude these packages from being updated in a
|
Do not update these packages in a
|
||||||
.B sysup
|
.B sysup
|
||||||
operation.
|
operation
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B unlock <package1> [<package2>...]
|
.B unlock <package1> [<package2>...]
|
||||||
Remove lock from these packages
|
Remove lock from these packages
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B listlocked [\-v|\-vv]
|
.B listlocked [-v|-vv]
|
||||||
List names of packages which are locked. As always,
|
List names of packages which are locked. As always,
|
||||||
.B \-v
|
.B -v
|
||||||
will additionally show the version, and
|
will additionally show the version, and
|
||||||
.B \-vv
|
.B -vv
|
||||||
also includes the description from the Pkgfile. Note that the
|
also includes the description from the Pkgfile. Note that the
|
||||||
.B \-vv
|
.B -vv
|
||||||
switch will slow down the operation remarkably.
|
switch will slow down the operation remarkably.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B diff [\-\-all] [\-\-prefer\-higher] [<package1> <package2> ...]
|
.B diff [\-\-all] [\-\-prefer\-higher] [<package1> <package2> ...]
|
||||||
Show differences between installed packages and ports in the ports
|
Show differences between installed packages and ports in the ports
|
||||||
tree. Package names passed as argument will truncate the output to
|
tree. If arguments are given, shows only differences for these
|
||||||
show only those packages. It's also possible to use shell-like
|
packages, otherwise all differences are shown. It's also possible to use
|
||||||
|
shell-like
|
||||||
.B wildcards
|
.B wildcards
|
||||||
for the diff command. Make sure you escape where needed. Locked
|
for the diff command. Make sure you escape where needed. Locked
|
||||||
packages are only displayed if you use the --all switch. If you want
|
packages are only displayed if you use the --all switch. If you want
|
||||||
@ -151,14 +169,20 @@ to see only diffs which have a lower version installed than the one in
|
|||||||
the ports tree, use the --prefer-higher option.
|
the ports tree, use the --prefer-higher option.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B quickdiff [\-\-prefer\-higher]
|
.B quickdiff
|
||||||
Print a simple list of packages which have a different version in the
|
Print a simple list of packages which have a different version in the
|
||||||
ports tree than what is installed. The output is sorted alphabetically,
|
ports tree than what is installed. The output is sorted alphabetically,
|
||||||
but you can generate a (larger) list sorted by dependencies using
|
but you can generate a (larger) list sorted by dependencies using
|
||||||
.B prt\-get quickdep $(prt\-get quickdiff).
|
.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
|
If you want to see only diffs which have a lower version installed than the one in
|
||||||
the one in the ports tree, use the --prefer-higher option.
|
the ports tree, use the --prefer-higher option.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B search [\-v|\-vv] [\-\-path] [\-\-regex] <expr>
|
.B search [\-v|\-vv] [\-\-path] [\-\-regex] <expr>
|
||||||
@ -171,19 +195,20 @@ in their name
|
|||||||
Search the ports tree (both name and description) for the pattern
|
Search the ports tree (both name and description) for the pattern
|
||||||
.B expr
|
.B expr
|
||||||
(which can be a shell-like wildcard pattern or a regexp). The search in
|
(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
|
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
|
to read every Pkgfile, which makes it rather slow. If you like searching by
|
||||||
by description, consider using the cache functionality, so you only have to
|
description, consider using the cache functionality, so you only have to
|
||||||
read every Pkgfile when the ports tree is updated.
|
read all the Pkgfiles after each update of the ports tree.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B fsearch [\-\-full] [\-\-regex] <pattern>
|
.B fsearch [\-\-full] [\-\-regex] <pattern>
|
||||||
Search the ports tree for
|
Search the ports tree for
|
||||||
.B pattern
|
.B pattern
|
||||||
as file name in their footprint. When called without '--full', strips
|
as file name in their footprint. When called without '--full', strips
|
||||||
the directories from the file names before matching. Pattern can be a
|
the directories from the file names before matching.
|
||||||
shell-like wildcard pattern (e.g. prt-get fsearch "*.h") or a regular
|
Pattern can be a shell-like wildcard pattern (e.g. prt-get fsearch "*.h")
|
||||||
expression (e.g. prt-get fsearch --regex 'liblz(o2|ma).*')
|
or a regular expression (e.g. prt-get fsearch --regex 'liblz(o2|ma).*')
|
||||||
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B info <port>
|
.B info <port>
|
||||||
@ -199,22 +224,22 @@ Print the port's README file if it exists; if set, uses $PAGER
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B depends [\-\-softdeps] <package1> [<package2> ...]
|
.B depends [\-\-softdeps] <package1> [<package2> ...]
|
||||||
Print a recursive list of dependencies needed to install the packages passed
|
Print a recursive list of dependencies needed to install the packages
|
||||||
as argument. It shows a list of the dependencies that were found in the
|
passed as argument. It shows a list of the dependencies that were found in
|
||||||
ports tree, plus a list of the dependencies that could not be found. Pass
|
the ports tree, plus a list of the dependencies that could not be found.
|
||||||
the --softdeps flag if you want the sorting algorithm to consider
|
Pass the --softdeps flag if you want the sorting algorithm to consider
|
||||||
optional dependencies too.
|
optional dependencies too.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B quickdep [\-\-softdeps] <package1> [<package2> ...]
|
.B quickdep [\-\-softdeps] <package1> [<package2> ...]
|
||||||
Same output as \fBdepends\fP, but separated by spaces rather than newlines, and
|
Same output as \fBdepends\fP, but separated by spaces rather than newlines,
|
||||||
stripped of any dependencies that could not be found in the ports tree.
|
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
|
Useful in case the list of dependencies is too large to fit on one screen,
|
||||||
if you don't want to filter out manually the ports that are invalid targets for
|
or if you don't want to filter out manually the ports that are invalid
|
||||||
installation. For example, instead of
|
targets for installation. For example, instead of
|
||||||
.B prt\-get depinst xorg-server
|
.B prt\-get depinst xorg-server
|
||||||
you might micromanage the process as follows:
|
you might micromanage the process as follows:
|
||||||
.B for i in $(prt\-get quickdep xorg-server); do prt\-get install \-fr \-\-nodeps $i; done
|
.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
|
||||||
which ensures that the latest version of each dependency is built.
|
which ensures that the latest version of each dependency is built.
|
||||||
|
|
||||||
Note: It might be useful to run
|
Note: It might be useful to run
|
||||||
@ -226,29 +251,30 @@ for successful builds.
|
|||||||
.B deptree [\-\-softdeps] <package>
|
.B deptree [\-\-softdeps] <package>
|
||||||
Print a tree of the dependencies of the package
|
Print a tree of the dependencies of the package
|
||||||
.B <package>.
|
.B <package>.
|
||||||
Pass the --softdeps flag to also show the installed packages that might have been
|
Pass the --softdeps flag to also show the installed packages that might
|
||||||
eagerly linked when
|
have been eagerly linked, if they were present when
|
||||||
.B <package>
|
.B <package>
|
||||||
or its dependencies were compiled.
|
(or its dependencies) were built.
|
||||||
Subtrees already shown are marked with '-->' to save some space. In
|
Subtrees already shown are marked with '-->' to save some space. In
|
||||||
order to show them all, add the --all switch.
|
order to show them all, add the --all switch.
|
||||||
|
|
||||||
.SH ""
|
.SH ""
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B dependent [\-\-recursive] [\-\-softdeps] [\-\-all] <package>
|
.B dependent [\-\-recursive] [\-\-softdeps] [\-\-all] [\-\-tree] <package>
|
||||||
Print a list of ports whose "Depends on:" line contains
|
Print a list of ports whose "Depends on:" line contains
|
||||||
.B <package>
|
.B <package>
|
||||||
(or its dependents, if --recursive is passed). Use the --softdeps flag to also
|
(or its dependents, if --recursive was passed). Use the --softdeps flag to
|
||||||
search the "Optional:" lines for \fB<package>\fP .
|
also search the "Optional:" lines for \fB<package>\fP.
|
||||||
|
|
||||||
By default, output is restricted to ports that are installed. To see all the
|
By default, output is restricted to ports that are installed. To see all
|
||||||
dependencies, add the --all switch. Use --tree to get a nicely indented list.
|
the dependencies, use the --all switch. Use --tree to get a nicely indented
|
||||||
|
list.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B dup [\-v] [format]
|
.B dup [-v] [format]
|
||||||
List ports which can be found in multiple directories configured in
|
List ports which can be found in multiple directories configured in
|
||||||
\fB/etc/prt\-get.conf\fP.
|
.B /etc/prt-get.conf
|
||||||
Use the \fB\-v\fP switch to see a verbose report, which will show for each
|
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
|
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
|
full path and version info). The verbose switch is basically an alias for a
|
||||||
@ -265,19 +291,19 @@ symbols will be replaced as follows.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
\ \ \ \(bu
|
\ \ \ \(bu
|
||||||
%p1 -> full path (including name) to port taking precedence
|
%p1 -> Full path (including name) to port taking precedence
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\ \ \ \(bu
|
\ \ \ \(bu
|
||||||
%p2 -> full path (including name) to port being hidden
|
%p2 -> Full path (including name) to port being hidden
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\ \ \ \(bu
|
\ \ \ \(bu
|
||||||
%v1 -> version of port taking precedence
|
%v1 -> Version of port taking precedence
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\ \ \ \(bu
|
\ \ \ \(bu
|
||||||
%v2 -> version of port being hidden
|
%v2 -> Version of port being hidden
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\ \ \ \(bu
|
\ \ \ \(bu
|
||||||
@ -307,7 +333,7 @@ for the list command. Make sure you escape where needed
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B printf <format string1> [\-\-sort=<format string2>] [\-\-filter=<filter>]
|
.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:
|
are replaced like this:
|
||||||
.TP
|
.TP
|
||||||
\ \ \ \(bu
|
\ \ \ \(bu
|
||||||
@ -343,11 +369,11 @@ are replaced like this:
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
\ \ \ \(bu
|
\ \ \ \(bu
|
||||||
%M -> maintainer
|
%M -> Maintainer
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\ \ \ \(bu
|
\ \ \ \(bu
|
||||||
%R -> readme ("yes"/"no")
|
%R -> Readme ("yes"/"no")
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\ \ \ \(bu
|
\ \ \ \(bu
|
||||||
@ -367,8 +393,8 @@ are replaced like this:
|
|||||||
up to date and "diff" if it's installed and a new version is in the
|
up to date and "diff" if it's installed and a new version is in the
|
||||||
ports tree.
|
ports tree.
|
||||||
|
|
||||||
Use "\en" and "\et" to format your output (no additional format codes
|
Use "\\n" and "\\t" to format your output (no additional format symbols
|
||||||
supported). The optional format string2 can contain the same variables
|
suported). The optional format string2 can contain the same variables
|
||||||
as format string1 and is used to sort the output. You can specify a
|
as format string1 and is used to sort the output. You can specify a
|
||||||
.B wildcard filter
|
.B wildcard filter
|
||||||
to filter by package name.
|
to filter by package name.
|
||||||
@ -399,8 +425,8 @@ Output appears alphabetically separated by newlines, making it suitable for
|
|||||||
process substitution as shown in the
|
process substitution as shown in the
|
||||||
.B EXAMPLES
|
.B EXAMPLES
|
||||||
section below. Note that some core ports might be runtime
|
section below. Note that some core ports might be runtime
|
||||||
dependencies despite their absence in the "Depends on:" line;
|
dependencies despite their absence in the "Depends on:" line; see \fBPkgfile(5)\fP
|
||||||
see \fBPkgfile(5)\fP for an explanation of this practice.
|
for an explanation of this practice.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B isinst <package1> [<package2> ...]
|
.B isinst <package1> [<package2> ...]
|
||||||
@ -413,24 +439,28 @@ but does not print the version information. This command has a return value of
|
|||||||
greater than 0.
|
greater than 0.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B current <package1> [<package2> ...]
|
.B current <package>
|
||||||
Shows the currently-installed version of <package>, or a message
|
Show the currently-installed version of <package>, or a message
|
||||||
that <package> is not installed.
|
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.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B ls [\-\-path] <package>
|
.B ls [\-\-path] <package>
|
||||||
Print out a listing of the port's directory
|
List the contents of the port's directory
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B cat <package> [<file>]
|
.B cat <package> [<file>]
|
||||||
Print to stdout (or $PAGER, if set) the contents of <file> in the port's
|
Print the file to stdout. If <file> is not specified, 'Pkgfile' is used. If set, uses $PAGER.
|
||||||
directory. If <file> is not specified, 'Pkgfile' is used.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B edit <package> [<file>]
|
.B edit <package> [<file>]
|
||||||
Edit the file using the editor specified in the $EDITOR environment variable.
|
Edit the file using the editor specified in the $EDITOR environment variable.
|
||||||
If <file> is not specified, 'Pkgfile' is used.
|
If <file> is not specified, 'Pkgfile' is used.
|
||||||
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B help
|
.B help
|
||||||
Show a help screen
|
Show a help screen
|
||||||
@ -465,6 +495,14 @@ Force install; Implies 'pkgadd -f'; same as --aargs=-f
|
|||||||
.B \-fr
|
.B \-fr
|
||||||
Force rebuild, Implies 'pkgmk -f'; same as --margs=-f
|
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
|
.TP
|
||||||
.B \-us
|
.B \-us
|
||||||
Update signature, implies 'pkgmk -us'; same as --margs=-us
|
Update signature, implies 'pkgmk -us'; same as --margs=-us
|
||||||
@ -507,15 +545,10 @@ future uses and consistency reasons
|
|||||||
.B \-\-ignore=<package1,package2,...>
|
.B \-\-ignore=<package1,package2,...>
|
||||||
Don't install these packages, even if they're listed as dependencies
|
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
|
.TP
|
||||||
.B \-\-softdeps
|
.B \-\-softdeps
|
||||||
Consider optional dependencies when determining the order in which to build
|
Consider optional dependencies when determining the order in which to build
|
||||||
the packages passed as arguments (in \fBinstall\fP or \fBsysup\fP operations).
|
the packages passed as arguments (in a \fBdepinst\fP or \fBsysup\fP operation).
|
||||||
Also affects the output of \fBdeptree\fP, \fBdependent\fP, and \fBlistorphans\fP.
|
Also affects the output of \fBdeptree\fP, \fBdependent\fP, and \fBlistorphans\fP.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
@ -524,20 +557,20 @@ Use cache file for this command
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-test
|
.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
|
.B prt\-get install, prt\-get update, prt\-get sysup
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-pre\-install
|
.B \-\-pre-install
|
||||||
Execute pre-install script if it's there
|
Execute pre-install script if it's there
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-post\-install
|
.B \-\-post-install
|
||||||
Execute post-install script if it's there
|
Execute post-install script if it's there
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-install\-scripts
|
.B \-\-install-scripts
|
||||||
Execute pre-install and post-install script if they're there.
|
Execute pre-install and post-install script if they're there
|
||||||
|
|
||||||
The options --pre-install, --post-install, and --install-scripts offer a
|
The options --pre-install, --post-install, and --install-scripts offer a
|
||||||
convenient way to temporarily override the prt-get.conf directive 'runscripts
|
convenient way to temporarily override the prt-get.conf directive 'runscripts
|
||||||
@ -548,17 +581,18 @@ no\(dq, or point prt-get to an alternative configuration file using
|
|||||||
--config=<file>. (see below for the documentation of these options)
|
--config=<file>. (see below for the documentation of these options)
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-install\-root=<dir>
|
.B \-\-install-root=<dir>
|
||||||
Use <dir> as root directory for your installation; allows you to install
|
Use <dir> as root directory for your installation; allows you to install
|
||||||
the requested packages onto a different directory than '/'. In daily usage,
|
the requested packages onto a different directory than '/'. In daily usage,
|
||||||
this option is not required; it's primarily interesting if you're developing
|
this option is not required; it's primarily interesting if you're developing
|
||||||
an independent installation.
|
an independent installation.
|
||||||
|
|
||||||
Pre- and post-install scripts will not be executed if the requested
|
Pre- and post-install scripts will not be executed if the target root directory
|
||||||
root directory lacks a copy of the ports tree. So if you're maintaining an
|
lacks a copy of the ports tree. So if you're maintaining an installation on a
|
||||||
installation mounted somewhere different than '/', it's not enough to put
|
volume mounted somewhere other than '/', it's not enough to have the
|
||||||
the line 'runscripts yes' in your prt-get.conf; you also have to ensure that the
|
line 'runscripts yes' in your prt-get.conf; you also have to ensure that
|
||||||
pre- and post-install scripts can be found in the same location relative to <dir>.
|
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
|
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
|
reading/writing (so <dir>/var/lib/pkg/db must exist), and where the pkg.tar.?z
|
||||||
@ -577,15 +611,15 @@ unpacks it into <dir>.
|
|||||||
When setting --install-root=<dir>, install or update commands might behave
|
When setting --install-root=<dir>, install or update commands might behave
|
||||||
unexpectedly if <dir>/etc/pkgadd.conf exists and is different from
|
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
|
/etc/pkgadd.conf . In order to preserve the \fBpkgadd.conf(5)\fP settings from
|
||||||
host system, append the option --aargs='-c /etc/pkgadd.conf' to your \fBprt\-get
|
the host system, append the option --aargs='-c /etc/pkgadd.conf' to your
|
||||||
install\fP command, or just copy the desired directives into
|
\fBprt-get install\fP command, or just copy the desired directives into
|
||||||
<dir>/etc/pkgadd.conf .
|
<dir>/etc/pkgadd.conf .
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-log
|
.B \-\-log
|
||||||
Write build output to log file. Basically a convenient alias for
|
Write build output to log file. Basically a convenient alias for
|
||||||
\fB\-\-config\-set=\(dqwritelog enabled\(dq\fP. Note that there is no similar
|
\fB\-\-config\-set=\(dqwritelog enabled\(dq\fP. Note that there is no similar
|
||||||
alias allowing you to temporarily override the configuration directive
|
alias allowing you to temporarily override the one configuration directive
|
||||||
\(dqwritelog enabled\(dq; you have to resort to \fB\-\-config\-set=\(dqwritelog
|
\(dqwritelog enabled\(dq; you have to resort to \fB\-\-config\-set=\(dqwritelog
|
||||||
disabled\(dq\fP if that is your intention.
|
disabled\(dq\fP if that is your intention.
|
||||||
|
|
||||||
@ -617,9 +651,8 @@ transactions as well.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-v, \-vv
|
.B \-v, \-vv
|
||||||
(verbosity level) Show version of a port (-v), or show both version
|
(verbosity level) Show version of a port (\-v), or show both version
|
||||||
and description (-vv). Passing more than one of these options is equivalent
|
and description (\-vv). Passing more than one of these options is equivalent to \-vv.
|
||||||
to -vv.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-path
|
.B \-\-path
|
||||||
@ -644,49 +677,29 @@ Override the 'preferhigher' configuration option. Equivalent to
|
|||||||
|
|
||||||
.SH "CONFIGURATION"
|
.SH "CONFIGURATION"
|
||||||
.TP
|
.TP
|
||||||
See man prt-get.conf(5)
|
See man prt\-get.conf(5)
|
||||||
|
|
||||||
.SH "EXAMPLES"
|
.SH "EXAMPLES"
|
||||||
.TP
|
.TP
|
||||||
.B prt\-get install irssi
|
.B prt\-get install irssi
|
||||||
Download, build and install irssi (and any of its missing dependencies), with
|
Download, build and install irssi, with one simple command
|
||||||
one simple command
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B prt\-get install --nodeps jasper
|
.B prt\-get install paper yasm
|
||||||
Install jasper, without trying to resolve dependencies.
|
Install paper and yasm. Abort with an informative error message if either
|
||||||
|
package is already installed, allowing you to issue a revised command.
|
||||||
.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
|
.TP
|
||||||
.B prt\-get update -fr openssh
|
.B prt\-get update \-fr openssh
|
||||||
Update your current version of openssh, forcing a rebuild even if no version
|
Update your current version of openssh, forcing a rebuild even if no version difference is detected.
|
||||||
difference is detected.
|
Useful if there was a major version change in one of its dependencies, and \fBrevdep openssh\fP
|
||||||
Useful if there was a major soversion change in one of its dependencies,
|
indicates a broken package. :\-)
|
||||||
and \fBrevdep openssh\fP indicates a broken package. :-)
|
|
||||||
|
|
||||||
.TP
|
.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
|
.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.
|
(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.
|
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
|
.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}'
|
.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.
|
Show all the optional dependencies of ffmpeg that are not currently installed.
|
||||||
@ -700,17 +713,16 @@ spend any resources on ffmpeg until all of its optional dependencies are in
|
|||||||
place.
|
place.
|
||||||
|
|
||||||
.TP
|
.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
|
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
|
user can create the file /etc/prt-get.softdeps containing a line like
|
||||||
.B ffmpeg: x264 x265
|
.B ffmpeg: x264 x265
|
||||||
and then the above command will perform a depinst --group operation to
|
and then the above command will perform a depinst --group operation to ensure that
|
||||||
ensure that at least x264 and x265 (but not necessarily any of the other
|
at least x264 and x265 (but not necessarily any of the other optional
|
||||||
optional dependencies) are present before trying to build ffmpeg. In the
|
dependencies) are present before trying to build ffmpeg. In the absence of such
|
||||||
absence of such a .softdeps config, the operation reverts to the behaviour
|
a .softdeps config, the operation reverts to the behaviour of the preceding
|
||||||
of the preceding example (maximal feature set). Implementing Gentoo USE
|
example (maximal feature set). Implementing Gentoo USE flags with such an
|
||||||
flags with such an awkward one-liner might draw criticism from advocates of
|
awkward one-liner might draw criticism from advocates of the KISS principle.
|
||||||
the KISS principle.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B prt\-get search \-\-regex '^(m|n|p)c.*'
|
.B prt\-get search \-\-regex '^(m|n|p)c.*'
|
||||||
@ -721,29 +733,32 @@ 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
|
Return a list of all ports having "irc" in their name or description
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B comm -13 <(ls /usr/ports/core) <(prt-get listorphans)
|
.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)
|
||||||
(based on comments from Romster and jue) Filter out the core ports from the list of orphans, in
|
(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
|
shells (like bash) that support process substitution
|
||||||
|
|
||||||
.TP
|
.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
|
(system-hosing extension of the above) A one-liner inspired by \fBpkg\-clean\fP
|
||||||
and \fBpkgfoster\fP, but without the safeguard of interactivity.
|
and \fBpkgfoster\fP, but without the safeguard of interactivity. \fBDo not try this on a
|
||||||
\fBDo not try this on a mission-critical system.\fP
|
mission-critical system.\fP
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B prt\-get isinst $(prt\-get quickdep $(prt\-get quickdiff)) | awk '/not installed/ {print $2}'
|
.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
|
(adapted from a comment by Fun) After updating your ports tree, print out a list of dependencies
|
||||||
list of dependencies that were not needed the last time you built your
|
that were not needed the last time you built your currently-installed ports, but are needed now by
|
||||||
currently-installed ports, but are needed now by the newer versions of
|
the newer versions of these ports. The output of this command is sorted by dependencies, therefore
|
||||||
these ports. The output of this command is sorted by dependencies, therefore
|
|
||||||
suitable for piping to \fBxargs prt\-get install\fP.
|
suitable for piping to \fBxargs prt\-get install\fP.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B comm \-13 <(prt\-get depends firefox\-bin |tail \-n +2 |sort) <(prt\-get depends firefox |tail \-n +2 |sort)
|
.B prt\-get isinst $(prt\-get quickdep $(prt\-get quickdiff)) | awk '/is installed/ {print $2}'
|
||||||
Find the build-time dependencies of firefox. Runtime dependencies would
|
Same as above, but only print the dependencies that are already installed. The output of this
|
||||||
also appear in the list generated by the first process substitution, and
|
command is suitable for piping to \fBxargs prt\-get update\fP.
|
||||||
\fBcomm \-13\fP will suppress what the two lists have in common.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B prt\-get isinst $(prt\-get quickdep i3) | awk '/not installed/ { print $2 }' | xargs prt\-get depinst \-\-softdeps \-\-test
|
.B prt\-get isinst $(prt\-get quickdep i3) | awk '/not installed/ { print $2 }' | xargs prt\-get depinst \-\-softdeps \-\-test
|
||||||
@ -754,17 +769,13 @@ awk filter in the middle is needed to prevent the command from failing with the
|
|||||||
error message "already installed".
|
error message "already installed".
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B prt\-get printf \(dq%p\et%u\en\(dq | grep myrepo | cut \-f 2
|
.B comm \-3 <(prt\-get printf \(dq%i:%n %v\-%r\en\(dq | grep \-v ^no | cut \-d: \-f2 | sort) <(pkginfo \-i | sort)
|
||||||
Print the upstream URL for each port in the collection \(dqmyrepo\(dq,
|
(inspired by a bug report from teodor) an alternative to \fBprt\-get diff\fP.
|
||||||
perhaps as the first step in keeping your personal overlay up to date.
|
In the output, left-justified lines show the version available in the
|
||||||
|
repositories, while indented lines show the version installed. On a
|
||||||
.TP
|
reasonably up-to-date system, the two processes in the above command will
|
||||||
.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
|
return many identical lines; these are suppressed by the -3 flag to
|
||||||
Generate a table of unmaintained ports and the dates of their most recent
|
\fBcomm(1)\fP.
|
||||||
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
|
.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
|
.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
|
||||||
@ -776,21 +787,37 @@ 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
|
enabled\(dq in \fBprt\-get.conf(5)\fP. Logs saved with a different filename
|
||||||
pattern will require slight adjustments to the command.
|
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
|
.TP
|
||||||
.B prt\-get listinst \-\-depsort | xargs prt\-get install \-\-install\-root=/mnt
|
.B prt\-get listinst \-\-depsort | xargs prt\-get install \-\-install\-root=/mnt
|
||||||
Sort the list of installed packages by dependencies, and then install all
|
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
|
those packages onto a backup filesystem (mounted at /mnt). If you have a customized
|
||||||
customized pkgadd.conf that you want applied to this operation, either copy
|
pkgadd.conf that you want applied to this operation, either copy it to
|
||||||
it to /mnt/etc where pkgadd will be looking for it, or pass the additional
|
/mnt/etc where pkgadd will be looking for it, or pass the additional option \-\-aargs=\(dq\-c
|
||||||
option \-\-aargs=\(dq\-c /etc/pkgadd.conf\(dq to the install command.
|
/etc/pkgadd.conf\(dq to the install command.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B prt\-get list \-\-path \-\-regex '^xorg.*' | grep \-v \(dq/usr/ports/xorg\(dq
|
.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
|
Show the ports whose names begin with xorg, but which appear outside the xorg port collection.
|
||||||
xorg port collection.
|
|
||||||
(At the time of writing, this command returned at least two font ports.)
|
(At the time of writing, this command returned at least two font ports.)
|
||||||
|
|
||||||
.SH "AUTHORS"
|
.SH "AUTHORS"
|
||||||
Johannes Winkelmann <jw@tks6.net>, and others cited inline
|
Johannes Winkelmann <jw@tks6.net>, and others cited inline
|
||||||
.SH "SEE ALSO"
|
.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,36 +128,35 @@ replaced with the port's path, e.g. for port gcc in core, %p would be
|
|||||||
and %n would be
|
and %n would be
|
||||||
.B gcc.
|
.B gcc.
|
||||||
This allows you to have separate log files per port.
|
This allows you to have separate log files per port.
|
||||||
Separate log files for each version and release can be achieved using
|
Separate log files for each version and release can be achieved
|
||||||
the placeholders %v and %r, respectively. But if you want to enable
|
using the placeholders %v and %r, respectively. But if you want to
|
||||||
\fBrmlog_on_uninst\fP, it is best to avoid %p, %v, and %r when
|
enable \fBrmlog_on_uninst\fP, it is best to avoid %p, %v, and %r
|
||||||
specifying \fBlogfile\fP (as explained below).
|
when specifying \fBlogfile\fP (as explained below).
|
||||||
|
|
||||||
.B rmlog_on_uninst
|
.B rmlog_on_uninst
|
||||||
can be set to 'yes' or 'no'; when set to yes, uninstalling a package
|
which can be set to 'yes' or 'no'; when set to yes, uninstalling a
|
||||||
will also try to delete its build log. Replacements in the template
|
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
|
\fBlogfile\fP will be made using the \fIcurrent values\fP from the database
|
||||||
database of installed packages, and from the active repositories. If
|
of installed packages, and from the active repositories. If log files exist
|
||||||
log files exist with different values of %p, %v, or %r than what the
|
with different values of %p, %v, or %r than what the database and repositories
|
||||||
database and repositories provide, then the pattern substitutions will
|
provide, then the pattern substitutions will fail to match the names of those
|
||||||
fail to match the names of those logs, and this feature will be a no-op.
|
logs, and this feature will be a no-op. For example, suppose you specify
|
||||||
For example, suppose you specify the logfile pattern
|
the logfile pattern \(dq%p/.buildlogs/%n-%v-%r.log\(dq, and you have a package
|
||||||
\(dq%p/.buildlogs/%n__%v-%r.log\(dq, and you have a package installed
|
installed on your system through many versions, or after it has been
|
||||||
on your system through many versions, or after it has been moved from
|
moved from opt to contrib. Uninstalling that package would leave behind all the
|
||||||
opt to contrib. Uninstalling that package would leave behind all the
|
build logs except the latest. This pattern is also fragile with respect to
|
||||||
build logs except the latest. This pattern is also fragile with respect
|
repository purges; if one of your installed ports is dropped from the official
|
||||||
to repository purges; if one of your installed ports is dropped from
|
repos, then either \(dq%p\(dq will expand to the path of your personal overlay
|
||||||
the official repos, then either \(dq%p\(dq will expand to the path of
|
(you did make a copy, right?), or it will not expand at all! See the EXAMPLES
|
||||||
your personal overlay (you did make a copy, right?), or it will not
|
section of \fBprt\-get(8)\fP for an alternative way to tidy up your directory
|
||||||
expand at all! See the EXAMPLES section of \fBprt\-get(8)\fP for
|
of build logs.
|
||||||
alternative ways to tidy up your directory of build logs.
|
|
||||||
|
|
||||||
.B readme
|
.B readme
|
||||||
can be set to 'disabled', to suppress the notification after installing
|
can be set to 'disabled', to suppress the notification after
|
||||||
a port with a README file; 'compact', to collect all the READMEs
|
installing a port with a README file; 'compact', to collect all the READMEs
|
||||||
into one post-transaction output; or 'verbose', to print separate
|
into one post-transaction output; or 'verbose', to print separate
|
||||||
information about each port with a README file. See
|
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
|
and especially the readme command how to read those README files using
|
||||||
prt-get.
|
prt-get.
|
||||||
|
|
||||||
|
4
misc/Makefile.am
Normal file
4
misc/Makefile.am
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
EXTRA_DIST = prt-get_complete prt-get.aliases prt-get.deplist prt-get.conf
|
||||||
|
|
||||||
|
sysconf_DATA = prt-get.conf
|
||||||
|
|
403
misc/Makefile.in
Normal file
403
misc/Makefile.in
Normal file
@ -0,0 +1,403 @@
|
|||||||
|
# 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,7 +17,8 @@ prtdir /usr/ports/opt
|
|||||||
### log options:
|
### log options:
|
||||||
# writelog enabled # (enabled|disabled)
|
# writelog enabled # (enabled|disabled)
|
||||||
# logmode overwrite # (append|overwrite)
|
# logmode overwrite # (append|overwrite)
|
||||||
# rm_on_success no # (yes|no)
|
# rmlog_on_success no # (yes|no)
|
||||||
|
# rmlog_on_uninst no # (yes|no)
|
||||||
logfile /var/log/pkgbuild/%n.log
|
logfile /var/log/pkgbuild/%n.log
|
||||||
# path, %p=path to port dir, %n=port name
|
# path, %p=path to port dir, %n=port name
|
||||||
# %v=version, %r=release
|
# %v=version, %r=release
|
||||||
|
29
src/Makefile.am
Normal file
29
src/Makefile.am
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# 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
Normal file
552
src/Makefile.in
Normal file
@ -0,0 +1,552 @@
|
|||||||
|
# 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,28 +27,26 @@ ArgParser::ArgParser( int argc, char** argv )
|
|||||||
m_hasFilter( false ),
|
m_hasFilter( false ),
|
||||||
m_noStdConfig( false ),
|
m_noStdConfig( false ),
|
||||||
m_writeLog( false ),
|
m_writeLog( false ),
|
||||||
m_depSort( true ),
|
m_nodeps( false ),
|
||||||
m_softdeps( false ),
|
m_softdeps( false ),
|
||||||
m_revdep(false),
|
|
||||||
m_all( false ),
|
m_all( false ),
|
||||||
m_printPath( false ),
|
m_printPath( false ),
|
||||||
m_execPreInstall( false ),
|
m_execPreInstall( false ),
|
||||||
m_execPostInstall( false ),
|
m_execPostInstall( false ),
|
||||||
m_preferHigher( false ),
|
m_preferHigher( false ),
|
||||||
m_strictDiff( false ),
|
m_strictDiff( false ),
|
||||||
m_sysup( false ),
|
|
||||||
m_group( false ),
|
m_group( false ),
|
||||||
m_useRegex(false),
|
m_useRegex(false),
|
||||||
m_fullPath(false),
|
m_fullPath(false),
|
||||||
m_quick(false),
|
|
||||||
m_recursive(false),
|
m_recursive(false),
|
||||||
m_printTree(false),
|
m_printTree(false),
|
||||||
|
m_depSort(false),
|
||||||
m_alternateConfigFile( "" ),
|
m_alternateConfigFile( "" ),
|
||||||
m_pkgmkArgs( "" ),
|
m_pkgmkArgs( "" ),
|
||||||
m_pkgaddArgs( "" ),
|
m_pkgaddArgs( "" ),
|
||||||
m_pkgrmArgs( "" ),
|
m_pkgrmArgs( "" ),
|
||||||
m_filter( "" ),
|
|
||||||
m_sortArgs( "" ),
|
m_sortArgs( "" ),
|
||||||
|
m_filter( "" ),
|
||||||
m_commandName( "" ),
|
m_commandName( "" ),
|
||||||
m_unknownOption( "" ),
|
m_unknownOption( "" ),
|
||||||
m_installRoot( "" ),
|
m_installRoot( "" ),
|
||||||
@ -82,7 +80,7 @@ bool ArgParser::isCommandGiven() const
|
|||||||
/*!
|
/*!
|
||||||
\return a list of arguments not processed by ArgParser
|
\return a list of arguments not processed by ArgParser
|
||||||
*/
|
*/
|
||||||
const list<string>& ArgParser::otherArgs() const
|
const list<char*>& ArgParser::otherArgs() const
|
||||||
{
|
{
|
||||||
return m_otherArgs;
|
return m_otherArgs;
|
||||||
}
|
}
|
||||||
@ -105,6 +103,7 @@ const string& ArgParser::pkgmkArgs() const
|
|||||||
return m_pkgmkArgs;
|
return m_pkgmkArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return addtional arguments to pkgadd
|
\return addtional arguments to pkgadd
|
||||||
*/
|
*/
|
||||||
@ -113,6 +112,7 @@ const string& ArgParser::pkgaddArgs() const
|
|||||||
return m_pkgaddArgs;
|
return m_pkgaddArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return the name of the alternative configuration file
|
\return the name of the alternative configuration file
|
||||||
*/
|
*/
|
||||||
@ -121,34 +121,36 @@ const string& ArgParser::alternateConfigFile() const
|
|||||||
return m_alternateConfigFile;
|
return m_alternateConfigFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
parse the arguments
|
parse the arguments
|
||||||
\return true on success
|
\return true on success
|
||||||
*/
|
*/
|
||||||
bool ArgParser::parse() {
|
bool ArgParser::parse()
|
||||||
const int commandCount = 28;
|
{
|
||||||
string commands[commandCount] = { "help", "info", "version",
|
const int commandCount = 34;
|
||||||
"search", "dsearch", "fsearch",
|
string commands[commandCount] = { "list", "search", "dsearch",
|
||||||
"cache", "install", "remove",
|
"info", "version", "cache",
|
||||||
"current", "isinst", "diff",
|
"depends", "install", "depinst",
|
||||||
"path", "printf", "readme",
|
"help", "isinst", "dup", "update",
|
||||||
"list", "listinst", "listorphans",
|
"quickdep", "diff", "quickdiff",
|
||||||
"lock", "unlock", "listlocked",
|
"path", "listinst", "printf", "readme",
|
||||||
"cat", "ls", "edit", "dumpconfig",
|
"dependent", "sysup", "current",
|
||||||
"dup", "depends", "deptree"
|
"fsearch", "lock", "unlock",
|
||||||
};
|
"listlocked", "cat", "ls", "edit",
|
||||||
|
"remove", "deptree", "dumpconfig",
|
||||||
Type commandID[commandCount] = { HELP, INFO, SHOW_VERSION,
|
"listorphans" };
|
||||||
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 ) {
|
if ( m_argc < 2 ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -168,42 +170,71 @@ bool ArgParser::parse() {
|
|||||||
for ( int i = 1; i < m_argc; ++i ) {
|
for ( int i = 1; i < m_argc; ++i ) {
|
||||||
if ( m_argv[i][0] == '-' ) {
|
if ( m_argv[i][0] == '-' ) {
|
||||||
string s = m_argv[i];
|
string s = m_argv[i];
|
||||||
if ( s == "-v" ) { m_verbose += 1;
|
if ( s == "-v" ) {
|
||||||
} else if ( s == "-vv" ) { m_verbose += 2;
|
m_verbose += 1;
|
||||||
} else if ( s == "--test" ) { m_isTest = true;
|
} else if ( s == "-vv" ) {
|
||||||
} else if ( s == "--cache" ) { m_useCache = true;
|
m_verbose += 2;
|
||||||
} else if ( s == "--depsort" ) { m_depSort = true;
|
} else if ( s == "--test" ) {
|
||||||
} else if ( s == "--nodeps" ) { m_depSort = false;
|
m_isTest = true;
|
||||||
} else if ( s == "--softdeps" ) { m_softdeps = true;
|
} else if ( s == "--cache" ) {
|
||||||
} else if ( s == "--all" ) { m_all = true;
|
m_useCache = true;
|
||||||
} else if ( s == "--path" ) { m_printPath = true;
|
} else if ( s == "--nodeps" ) {
|
||||||
} else if ( s == "--log" ) { m_writeLog = true;
|
m_nodeps = true;
|
||||||
} else if ( s == "--pre-install" ) { m_execPreInstall = true;
|
} else if ( s == "--softdeps" ) {
|
||||||
} else if ( s == "--post-install" ) { m_execPostInstall = true;
|
m_softdeps = true;
|
||||||
} else if ( s == "--install-scripts" ) { m_execPreInstall = 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;
|
m_execPostInstall = true;
|
||||||
} else if ( s == "--no-std-config" ) { m_noStdConfig = true;
|
} else if ( s == "--install-scripts" ) {
|
||||||
|
m_execPreInstall = true;
|
||||||
|
m_execPostInstall = true;
|
||||||
|
} else if ( s == "--no-std-config" ) {
|
||||||
|
m_noStdConfig = true;
|
||||||
} else if ( s == "--prefer-higher" || s == "-ph" ) {
|
} else if ( s == "--prefer-higher" || s == "-ph" ) {
|
||||||
m_preferHigher = true;
|
m_preferHigher = true;
|
||||||
} else if ( s == "--strict-diff" || s == "-sd" ) {
|
} else if ( s == "--strict-diff" || s == "-sd" ) {
|
||||||
m_strictDiff = true;
|
m_strictDiff = true;
|
||||||
} else if ( s == "--group" || s == "-g" ) { m_group = true;
|
} else if ( s == "--group" || s == "-g" ) {
|
||||||
} else if ( s == "--quick" || s == "-Q" ) { m_quick = true;
|
m_group = true;
|
||||||
} else if ( s == "--regex" ) { m_useRegex = true;
|
} else if ( s == "--regex" ) {
|
||||||
} else if ( s == "--full" ) { m_fullPath = true;
|
m_useRegex = true;
|
||||||
} else if ( s == "--recursive" || s == "-R" ) { m_recursive = true;
|
} else if ( s == "--full" ) {
|
||||||
} else if ( s == "--tree" || s == "-T" ) { m_printTree = true;
|
m_fullPath = true;
|
||||||
} else if ( s == "-f" ) { m_pkgaddArgs += " " + s;
|
} else if ( s == "--recursive" ) {
|
||||||
} else if ( s == "-fi" ) { m_pkgaddArgs += " -f";
|
m_recursive = true;
|
||||||
} else if ( s == "-fr" ) { m_pkgmkArgs += " -f";
|
} else if ( s == "--tree" ) {
|
||||||
} else if ( s == "-if" ) { m_pkgmkArgs += " " + s;
|
m_printTree = true;
|
||||||
} else if ( s == "-uf" ) { m_pkgmkArgs += " " + s;
|
} else if ( s == "--depsort" ) {
|
||||||
} else if ( s == "-im" ) { m_pkgmkArgs += " " + s;
|
m_depSort = true;
|
||||||
} else if ( s == "-um" ) { m_pkgmkArgs += " " + s;
|
} else if ( s == "-f" ) {
|
||||||
} else if ( s == "-is" ) { m_pkgmkArgs += " " + s;
|
m_pkgaddArgs += " " + s;
|
||||||
} else if ( s == "-us" ) { m_pkgmkArgs += " " + s;
|
} else if ( s == "-fr" ) {
|
||||||
} else if ( s == "-kw" ) { m_pkgmkArgs += " " + s;
|
m_pkgmkArgs += " -f";
|
||||||
} else if ( s == "-ns" ) { m_pkgmkArgs += " " + s;
|
} 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";
|
||||||
}
|
}
|
||||||
|
|
||||||
// substrings
|
// substrings
|
||||||
@ -213,11 +244,11 @@ bool ArgParser::parse() {
|
|||||||
m_pkgaddArgs += " " + s.substr( 8 );
|
m_pkgaddArgs += " " + s.substr( 8 );
|
||||||
} else if ( s.substr( 0, 8 ) == "--rargs=" ) {
|
} else if ( s.substr( 0, 8 ) == "--rargs=" ) {
|
||||||
m_pkgrmArgs = s.substr( 8 );
|
m_pkgrmArgs = s.substr( 8 );
|
||||||
|
} else if ( s.substr( 0, 7 ) == "--sort=" ) {
|
||||||
|
m_sortArgs = s.substr( 7 );
|
||||||
} else if ( s.substr( 0, 9 ) == "--filter=" ) {
|
} else if ( s.substr( 0, 9 ) == "--filter=" ) {
|
||||||
m_filter = s.substr( 9 );
|
m_filter = s.substr( 9 );
|
||||||
m_hasFilter = true;
|
m_hasFilter = true;
|
||||||
} else if ( s.substr( 0, 7 ) == "--sort=" ) {
|
|
||||||
m_sortArgs = s.substr( 7 );
|
|
||||||
} else if ( s.substr( 0, 9 ) == "--config=" ) {
|
} else if ( s.substr( 0, 9 ) == "--config=" ) {
|
||||||
m_alternateConfigFile = s.substr( 9 );
|
m_alternateConfigFile = s.substr( 9 );
|
||||||
m_isAlternateConfigGiven = true;
|
m_isAlternateConfigGiven = true;
|
||||||
@ -240,45 +271,22 @@ bool ArgParser::parse() {
|
|||||||
} else {
|
} else {
|
||||||
if (!m_isCommandGiven) {
|
if (!m_isCommandGiven) {
|
||||||
string s = m_argv[i];
|
string s = m_argv[i];
|
||||||
if ( s == "grpinst") {
|
m_commandName = s;
|
||||||
m_isCommandGiven = true;
|
if ( s == "grpinst" ) {
|
||||||
m_commandType = INSTALL;
|
m_isCommandGiven = true;
|
||||||
m_group = true;
|
m_commandType = commandID[7];
|
||||||
cout << "Warning: grpinst is obsolescent";
|
m_group = true;
|
||||||
cout << "; using install --group" << endl;
|
cout << "Warning: grpinst is obsolescent";
|
||||||
} else if (s == "depinst") {
|
cout << "; using install --group" << endl;
|
||||||
m_isCommandGiven = true;
|
} else {
|
||||||
m_commandType = INSTALL;
|
for ( int i = 0; i < commandCount; ++i ) {
|
||||||
m_depSort = true;
|
if ( s == commands[i] ) {
|
||||||
} else if (s == "update") {
|
m_isCommandGiven = true;
|
||||||
m_isCommandGiven = true;
|
m_commandType = commandID[i];
|
||||||
m_commandType = INSTALL;
|
break;
|
||||||
} 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
|
// first argument must be command
|
||||||
if ( !m_isCommandGiven ) {
|
if ( !m_isCommandGiven ) {
|
||||||
return false;
|
return false;
|
||||||
@ -289,9 +297,12 @@ bool ArgParser::parse() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return m_isCommandGiven;
|
return m_isCommandGiven;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return true whether --test has been specified
|
\return true whether --test has been specified
|
||||||
*/
|
*/
|
||||||
@ -300,6 +311,7 @@ bool ArgParser::isTest() const
|
|||||||
return m_isTest;
|
return m_isTest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return the level of verbose: -v -> 1, -vv -> 2
|
\return the level of verbose: -v -> 1, -vv -> 2
|
||||||
*/
|
*/
|
||||||
@ -308,6 +320,7 @@ int ArgParser::verbose() const
|
|||||||
return m_verbose;
|
return m_verbose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return whether --cache has been specified
|
\return whether --cache has been specified
|
||||||
*/
|
*/
|
||||||
@ -316,6 +329,7 @@ bool ArgParser::useCache() const
|
|||||||
return m_useCache;
|
return m_useCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return whether prt-get was called as 'prt-cache' or not
|
\return whether prt-get was called as 'prt-cache' or not
|
||||||
*/
|
*/
|
||||||
@ -332,6 +346,14 @@ bool ArgParser::writeLog() const
|
|||||||
return m_writeLog;
|
return m_writeLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\return the --sort="..." string
|
||||||
|
*/
|
||||||
|
const string& ArgParser::sortArgs() const
|
||||||
|
{
|
||||||
|
return m_sortArgs;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return whether there was a --filter argument
|
\return whether there was a --filter argument
|
||||||
*/
|
*/
|
||||||
@ -340,6 +362,7 @@ bool ArgParser::hasFilter() const
|
|||||||
return m_hasFilter;
|
return m_hasFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return whether there was a --no-std-config argument
|
\return whether there was a --no-std-config argument
|
||||||
*/
|
*/
|
||||||
@ -348,6 +371,7 @@ bool ArgParser::noStdConfig() const
|
|||||||
return m_noStdConfig;
|
return m_noStdConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return the --filter="..." string
|
\return the --filter="..." string
|
||||||
*/
|
*/
|
||||||
@ -357,18 +381,16 @@ const string& ArgParser::filter() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return the --sort="..." string
|
\return whether there was a --nodeps argument
|
||||||
*/
|
*/
|
||||||
const string& ArgParser::sortArgs() const
|
bool ArgParser::nodeps() const
|
||||||
{
|
{
|
||||||
return m_sortArgs;
|
return m_nodeps;
|
||||||
}
|
|
||||||
|
|
||||||
bool ArgParser::depSort() const
|
|
||||||
{
|
|
||||||
return m_depSort;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\return whether there was a --softdeps argument
|
||||||
|
*/
|
||||||
bool ArgParser::followSoftdeps() const
|
bool ArgParser::followSoftdeps() const
|
||||||
{
|
{
|
||||||
return m_softdeps;
|
return m_softdeps;
|
||||||
@ -387,16 +409,6 @@ bool ArgParser::printPath() const
|
|||||||
return m_printPath;
|
return m_printPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ArgParser::revdep() const
|
|
||||||
{
|
|
||||||
return m_revdep;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ArgParser::quick() const
|
|
||||||
{
|
|
||||||
return m_quick;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ArgParser::recursive() const
|
bool ArgParser::recursive() const
|
||||||
{
|
{
|
||||||
return m_recursive;
|
return m_recursive;
|
||||||
@ -404,7 +416,12 @@ bool ArgParser::recursive() const
|
|||||||
|
|
||||||
bool ArgParser::printTree() const
|
bool ArgParser::printTree() const
|
||||||
{
|
{
|
||||||
return (m_printTree || m_commandName == "deptree");
|
return m_printTree;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ArgParser::depSort() const
|
||||||
|
{
|
||||||
|
return m_depSort;
|
||||||
}
|
}
|
||||||
|
|
||||||
const string& ArgParser::commandName() const
|
const string& ArgParser::commandName() const
|
||||||
@ -453,11 +470,6 @@ bool ArgParser::strictDiff() const
|
|||||||
return m_strictDiff;
|
return m_strictDiff;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ArgParser::sysup() const
|
|
||||||
{
|
|
||||||
return m_sysup;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ArgParser::group() const
|
bool ArgParser::group() const
|
||||||
{
|
{
|
||||||
return m_group;
|
return m_group;
|
||||||
@ -473,6 +485,7 @@ bool ArgParser::fullPath() const
|
|||||||
return m_fullPath;
|
return m_fullPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const string& ArgParser::ignore() const
|
const string& ArgParser::ignore() const
|
||||||
{
|
{
|
||||||
return m_ignore;
|
return m_ignore;
|
||||||
|
@ -31,15 +31,14 @@ public:
|
|||||||
bool parse();
|
bool parse();
|
||||||
|
|
||||||
/*! Command type */
|
/*! Command type */
|
||||||
enum Type { HELP, INFO, SHOW_VERSION,
|
enum Type { HELP, LIST, SEARCH, DSEARCH, INSTALL, DEPINST,
|
||||||
SEARCH, DSEARCH, FSEARCH,
|
INFO, DEPENDS, ISINST, DUP, UPDATE,
|
||||||
CREATE_CACHE, INSTALL, REMOVE,
|
QUICKDEP, DIFF,
|
||||||
CURRENT, ISINST, DIFF,
|
QUICKDIFF, SHOW_VERSION, CREATE_CACHE, PATH,
|
||||||
PATH, PRINTF, README,
|
LISTINST, PRINTF, README, DEPENDENT, SYSUP,
|
||||||
LIST, LISTINST, LISTORPHANS,
|
CURRENT, FSEARCH, LOCK, UNLOCK, LISTLOCKED,
|
||||||
LOCK, UNLOCK, LISTLOCKED,
|
CAT, LS, EDIT, REMOVE,
|
||||||
CAT, LS, EDIT, DUMPCONFIG,
|
DEPTREE, DUMPCONFIG, LISTORPHANS };
|
||||||
DUP, DEPENDS, DEPTREE };
|
|
||||||
|
|
||||||
bool isCommandGiven() const;
|
bool isCommandGiven() const;
|
||||||
bool isTest() const;
|
bool isTest() const;
|
||||||
@ -49,29 +48,27 @@ public:
|
|||||||
bool writeLog() const;
|
bool writeLog() const;
|
||||||
bool hasFilter() const;
|
bool hasFilter() const;
|
||||||
bool noStdConfig() const;
|
bool noStdConfig() const;
|
||||||
bool depSort() const;
|
bool nodeps() const;
|
||||||
bool followSoftdeps() const;
|
|
||||||
bool all() const;
|
bool all() const;
|
||||||
bool printPath() const;
|
bool printPath() const;
|
||||||
bool execPreInstall() const;
|
bool execPreInstall() const;
|
||||||
bool execPostInstall() const;
|
bool execPostInstall() const;
|
||||||
bool preferHigher() const;
|
bool preferHigher() const;
|
||||||
bool strictDiff() const;
|
bool strictDiff() const;
|
||||||
bool sysup() const;
|
|
||||||
bool group() const;
|
bool group() const;
|
||||||
bool useRegex() const;
|
bool useRegex() const;
|
||||||
bool fullPath() const;
|
bool fullPath() const;
|
||||||
bool revdep() const;
|
|
||||||
bool quick() const;
|
|
||||||
bool recursive() const;
|
bool recursive() const;
|
||||||
bool printTree() const;
|
bool printTree() const;
|
||||||
|
bool depSort() const;
|
||||||
|
bool followSoftdeps() const;
|
||||||
|
|
||||||
const string& alternateConfigFile() const;
|
const string& alternateConfigFile() const;
|
||||||
const string& pkgmkArgs() const;
|
const string& pkgmkArgs() const;
|
||||||
const string& pkgaddArgs() const;
|
const string& pkgaddArgs() const;
|
||||||
const string& pkgrmArgs() const;
|
const string& pkgrmArgs() const;
|
||||||
const string& filter() const;
|
|
||||||
const string& sortArgs() const;
|
const string& sortArgs() const;
|
||||||
|
const string& filter() const;
|
||||||
const string& installRoot() const;
|
const string& installRoot() const;
|
||||||
const string& ignore() const;
|
const string& ignore() const;
|
||||||
|
|
||||||
@ -81,7 +78,7 @@ public:
|
|||||||
const string& commandName() const;
|
const string& commandName() const;
|
||||||
const string& unknownOption() const;
|
const string& unknownOption() const;
|
||||||
|
|
||||||
const list<string>& otherArgs() const;
|
const list<char*>& otherArgs() const;
|
||||||
|
|
||||||
int verbose() const;
|
int verbose() const;
|
||||||
|
|
||||||
@ -102,9 +99,8 @@ private:
|
|||||||
|
|
||||||
bool m_writeLog;
|
bool m_writeLog;
|
||||||
|
|
||||||
bool m_depSort;
|
bool m_nodeps;
|
||||||
bool m_softdeps;
|
bool m_softdeps;
|
||||||
bool m_revdep;
|
|
||||||
|
|
||||||
bool m_all;
|
bool m_all;
|
||||||
bool m_printPath;
|
bool m_printPath;
|
||||||
@ -113,21 +109,21 @@ private:
|
|||||||
bool m_execPostInstall;
|
bool m_execPostInstall;
|
||||||
bool m_preferHigher;
|
bool m_preferHigher;
|
||||||
bool m_strictDiff;
|
bool m_strictDiff;
|
||||||
bool m_sysup;
|
|
||||||
bool m_group;
|
bool m_group;
|
||||||
bool m_useRegex;
|
bool m_useRegex;
|
||||||
bool m_fullPath;
|
bool m_fullPath;
|
||||||
|
|
||||||
bool m_quick;
|
|
||||||
bool m_recursive;
|
bool m_recursive;
|
||||||
bool m_printTree;
|
bool m_printTree;
|
||||||
|
|
||||||
|
bool m_depSort;
|
||||||
|
|
||||||
string m_alternateConfigFile;
|
string m_alternateConfigFile;
|
||||||
string m_pkgmkArgs;
|
string m_pkgmkArgs;
|
||||||
string m_pkgaddArgs;
|
string m_pkgaddArgs;
|
||||||
string m_pkgrmArgs;
|
string m_pkgrmArgs;
|
||||||
string m_filter;
|
|
||||||
string m_sortArgs;
|
string m_sortArgs;
|
||||||
|
string m_filter;
|
||||||
string m_commandName;
|
string m_commandName;
|
||||||
string m_unknownOption;
|
string m_unknownOption;
|
||||||
string m_installRoot;
|
string m_installRoot;
|
||||||
@ -140,7 +136,7 @@ private:
|
|||||||
|
|
||||||
int m_verbose;
|
int m_verbose;
|
||||||
|
|
||||||
list<string> m_otherArgs;
|
list<char*> m_otherArgs;
|
||||||
|
|
||||||
list< pair<char*, ConfigArgType> > m_configData;
|
list< pair<char*, ConfigArgType> > m_configData;
|
||||||
};
|
};
|
||||||
|
@ -37,8 +37,7 @@ Configuration::Configuration( const std::string& configFile,
|
|||||||
m_useRegex( false ),
|
m_useRegex( false ),
|
||||||
m_followSoftdeps( false ),
|
m_followSoftdeps( false ),
|
||||||
m_makeCommand( "" ), m_addCommand( "" ),
|
m_makeCommand( "" ), m_addCommand( "" ),
|
||||||
m_removeCommand( "" ), m_runscriptCommand( "" ),
|
m_removeCommand( "" ), m_runscriptCommand( "" )
|
||||||
m_compressionMode( "" ), m_packageDir( "" )
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -96,25 +95,6 @@ string Configuration::logFilePattern() const
|
|||||||
return m_logFilePattern;
|
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
|
const list< pair<string, string> >& Configuration::rootList() const
|
||||||
{
|
{
|
||||||
@ -176,6 +156,8 @@ void Configuration::parseLine(const string& line, bool prepend)
|
|||||||
} else if ( startsWithNoCase( s, "writelog" ) ) {
|
} else if ( startsWithNoCase( s, "writelog" ) ) {
|
||||||
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
|
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
|
||||||
if ( s == "enabled" ) {
|
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;
|
m_writeLog = true;
|
||||||
} else if ( s == "disabled" ) {
|
} else if ( s == "disabled" ) {
|
||||||
m_writeLog = false;
|
m_writeLog = false;
|
||||||
@ -215,7 +197,7 @@ void Configuration::parseLine(const string& line, bool prepend)
|
|||||||
m_runScripts = true;
|
m_runScripts = true;
|
||||||
} else if ( s == "no" ) {
|
} else if ( s == "no" ) {
|
||||||
m_runScripts = false;
|
m_runScripts = false;
|
||||||
}
|
}
|
||||||
} else if ( startsWithNoCase( s, "preferhigher" ) ) {
|
} else if ( startsWithNoCase( s, "preferhigher" ) ) {
|
||||||
s = stripWhiteSpace( s.replace( 0, 12, "" ) );
|
s = stripWhiteSpace( s.replace( 0, 12, "" ) );
|
||||||
if ( s == "yes" ) {
|
if ( s == "yes" ) {
|
||||||
@ -227,9 +209,7 @@ void Configuration::parseLine(const string& line, bool prepend)
|
|||||||
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
|
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
|
||||||
if ( s == "yes" ) {
|
if ( s == "yes" ) {
|
||||||
m_useRegex = true;
|
m_useRegex = true;
|
||||||
} else if ( s == "no" ) {
|
}
|
||||||
m_useRegex = false;
|
|
||||||
}
|
|
||||||
} else if ( startsWithNoCase( s, "softdeps" ) ) {
|
} else if ( startsWithNoCase( s, "softdeps" ) ) {
|
||||||
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
|
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
|
||||||
if ( s == "yes" ) {
|
if ( s == "yes" ) {
|
||||||
@ -248,32 +228,6 @@ 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
|
bool Configuration::runScripts() const
|
||||||
{
|
{
|
||||||
return m_runScripts;
|
return m_runScripts;
|
||||||
|
@ -46,8 +46,6 @@ public:
|
|||||||
bool useRegex() const;
|
bool useRegex() const;
|
||||||
bool followSoftdeps() const;
|
bool followSoftdeps() const;
|
||||||
|
|
||||||
bool parsePkgmkConf(int readOrder);
|
|
||||||
|
|
||||||
void addConfig(const std::string& line,
|
void addConfig(const std::string& line,
|
||||||
bool configSet,
|
bool configSet,
|
||||||
bool configPrepend);
|
bool configPrepend);
|
||||||
@ -57,9 +55,6 @@ public:
|
|||||||
std::string removeCommand() const;
|
std::string removeCommand() const;
|
||||||
std::string runscriptCommand() const;
|
std::string runscriptCommand() const;
|
||||||
|
|
||||||
std::string compressionMode() const;
|
|
||||||
std::string packageDir() const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_configFile;
|
std::string m_configFile;
|
||||||
const ArgParser* m_parser;
|
const ArgParser* m_parser;
|
||||||
@ -87,8 +82,6 @@ private:
|
|||||||
std::string m_removeCommand;
|
std::string m_removeCommand;
|
||||||
std::string m_runscriptCommand;
|
std::string m_runscriptCommand;
|
||||||
|
|
||||||
std::string m_compressionMode;
|
|
||||||
std::string m_packageDir;
|
|
||||||
|
|
||||||
void parseLine(const std::string& line, bool prepend=false);
|
void parseLine(const std::string& line, bool prepend=false);
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,6 @@ using namespace std;
|
|||||||
#include "pkgdb.h"
|
#include "pkgdb.h"
|
||||||
#include "stringhelper.h"
|
#include "stringhelper.h"
|
||||||
#include "argparser.h"
|
#include "argparser.h"
|
||||||
#include "versioncomparator.h"
|
|
||||||
#include "process.h"
|
#include "process.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
|
||||||
@ -72,6 +71,38 @@ 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
|
Create a nice InstallTransaction
|
||||||
\param names a list of port names to be installed
|
\param names a list of port names to be installed
|
||||||
@ -111,17 +142,17 @@ InstallTransaction::installError() const
|
|||||||
/*!
|
/*!
|
||||||
install (commit) a transaction
|
install (commit) a transaction
|
||||||
\param parser the argument parser
|
\param parser the argument parser
|
||||||
|
\param update whether this is an update operation
|
||||||
\return returns an InstallResult telling whether installation worked
|
\return returns an InstallResult telling whether installation worked
|
||||||
*/
|
*/
|
||||||
InstallTransaction::InstallResult
|
InstallTransaction::InstallResult
|
||||||
InstallTransaction::install( const ArgParser* parser )
|
InstallTransaction::install( const ArgParser* parser,
|
||||||
|
bool update )
|
||||||
{
|
{
|
||||||
if ( m_packages.empty() ) {
|
if ( m_packages.empty() ) {
|
||||||
return NO_PACKAGE_GIVEN;
|
return NO_PACKAGE_GIVEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool update;
|
|
||||||
const string forceRebuild = "-fr";
|
|
||||||
list<string> ignoredPackages;
|
list<string> ignoredPackages;
|
||||||
StringHelper::split(parser->ignore(), ',', ignoredPackages);
|
StringHelper::split(parser->ignore(), ',', ignoredPackages);
|
||||||
|
|
||||||
@ -144,62 +175,45 @@ InstallTransaction::install( const ArgParser* parser )
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the update flag if the package is installed and out of date,
|
// consider aliases here, but don't show them specifically
|
||||||
// or if the user has forced a rebuild.
|
if ( !update && m_pkgDB->isInstalled( package->name(), true ) ) {
|
||||||
// Proceed to the next target if package is installed and up to date,
|
// ignore
|
||||||
// or is provided by an alias.
|
m_alreadyInstalledPackages.push_back( package->name() );
|
||||||
if ( m_pkgDB->isInstalled( it->first, false ) ) {
|
continue;
|
||||||
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;
|
InstallTransaction::InstallResult result;
|
||||||
InstallInfo info( package->hasReadme() );
|
InstallInfo info( package->hasReadme() );
|
||||||
if ( parser->isTest() ) {
|
if ( parser->isTest() ) {
|
||||||
info.preState = ( package->hasPreInstall() &&
|
info.preState = ( package->hasPreInstall() &&
|
||||||
(parser->execPreInstall() || m_config->runScripts())
|
(parser->execPreInstall() || m_config->runScripts())
|
||||||
) ? DEFERRED : NONEXISTENT;
|
) ? DEFERRED : NONEXISTENT;
|
||||||
info.postState = ( package->hasPostInstall() &&
|
info.postState = ( package->hasPostInstall() &&
|
||||||
(parser->execPostInstall() || m_config->runScripts())
|
(parser->execPostInstall() || m_config->runScripts())
|
||||||
) ? DEFERRED : NONEXISTENT;
|
) ? DEFERRED : NONEXISTENT;
|
||||||
m_installedPackages.push_back( make_pair( package->path() + "/" + package->name(), info));
|
m_installedPackages.push_back( make_pair( package->path()
|
||||||
continue;
|
+ "/" + package->name(), info));
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ((result = installPackage( package, parser, update, info )) == SUCCESS) {
|
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 {
|
} else {
|
||||||
|
|
||||||
// log failures and pkgdest errors are critical,
|
// log failures are critical
|
||||||
// don't proceed to the next install target if encountered
|
|
||||||
if ( result == LOG_DIR_FAILURE ||
|
if ( result == LOG_DIR_FAILURE ||
|
||||||
result == LOG_FILE_FAILURE ||
|
result == LOG_FILE_FAILURE ||
|
||||||
result == NO_LOG_FILE ||
|
result == NO_LOG_FILE ||
|
||||||
result == CANT_LOCK_LOG_FILE ||
|
result == CANT_LOCK_LOG_FILE ||
|
||||||
|
|
||||||
|
// or pkgdest
|
||||||
result == PKGDEST_ERROR ) {
|
result == PKGDEST_ERROR ) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_installErrors.push_back( make_pair(package->path() + "/" + package->name(), info) );
|
m_installErrors.push_back( make_pair(package->name(), info) );
|
||||||
if ( parser->group() ) {
|
if ( parser->group() ) {
|
||||||
return PKGMK_FAILURE;
|
return PKGMK_FAILURE;
|
||||||
}
|
}
|
||||||
@ -221,7 +235,8 @@ InstallTransaction::installPackage( const Package* package,
|
|||||||
const ArgParser* parser,
|
const ArgParser* parser,
|
||||||
bool update,
|
bool update,
|
||||||
InstallTransaction::InstallInfo& info )
|
InstallTransaction::InstallInfo& info )
|
||||||
const {
|
const
|
||||||
|
{
|
||||||
|
|
||||||
InstallTransaction::InstallResult result = SUCCESS;
|
InstallTransaction::InstallResult result = SUCCESS;
|
||||||
#ifdef USE_LOCKING
|
#ifdef USE_LOCKING
|
||||||
@ -237,7 +252,7 @@ const {
|
|||||||
commandName = "prt-cache";
|
commandName = "prt-cache";
|
||||||
}
|
}
|
||||||
|
|
||||||
// - initial information about the package to be built
|
// - initial information about the package to be build
|
||||||
string message;
|
string message;
|
||||||
message = commandName + ": ";
|
message = commandName + ": ";
|
||||||
if (update) {
|
if (update) {
|
||||||
@ -295,25 +310,23 @@ const {
|
|||||||
write( fdlog, timestamp.c_str(), timestamp.length());
|
write( fdlog, timestamp.c_str(), timestamp.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
string portdir = package->path() + "/" + package->name();
|
string pkgdir = package->path() + "/" + package->name();
|
||||||
chdir( portdir.c_str() );
|
chdir( pkgdir.c_str() );
|
||||||
|
|
||||||
string runscriptCommand = "/bin/sh";
|
string runscriptCommand = "sh";
|
||||||
if (m_config->runscriptCommand() != "") {
|
if (m_config->runscriptCommand() != "") {
|
||||||
runscriptCommand = m_config->runscriptCommand();
|
runscriptCommand = m_config->runscriptCommand();
|
||||||
}
|
}
|
||||||
if (parser->installRoot() != "") {
|
if (parser->installRoot() != "") {
|
||||||
runscriptCommand = "chroot " + parser->installRoot() + " "
|
runscriptCommand = "chroot " + parser->installRoot() + runscriptCommand;
|
||||||
+ runscriptCommand;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- pre-install
|
// -- pre-install
|
||||||
struct stat statData; struct stat fstatData;
|
struct stat statData;
|
||||||
if ((parser->execPreInstall() || m_config->runScripts()) &&
|
if ((parser->execPreInstall() || m_config->runScripts()) &&
|
||||||
stat((parser->installRoot() + portdir + "/pre-install").c_str(),
|
stat((parser->installRoot() + pkgdir + "/" + "pre-install").c_str(), &statData) == 0) {
|
||||||
&statData) == 0) {
|
|
||||||
Process preProc( runscriptCommand,
|
Process preProc( runscriptCommand,
|
||||||
portdir + "/pre-install",
|
pkgdir + "/" + "pre-install",
|
||||||
fdlog );
|
fdlog );
|
||||||
if (preProc.executeShell()) {
|
if (preProc.executeShell()) {
|
||||||
info.preState = FAILED;
|
info.preState = FAILED;
|
||||||
@ -323,39 +336,22 @@ const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// -- build
|
// -- 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;
|
string cmd = PKGMK_DEFAULT_COMMAND;
|
||||||
if (m_config->makeCommand() != "") {
|
if (m_config->makeCommand() != "") {
|
||||||
cmd = 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();
|
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 );
|
Process makeProc( cmd, args, fdlog );
|
||||||
if ( makeProc.executeShell() ) {
|
if ( makeProc.executeShell() ) {
|
||||||
result = PKGMK_FAILURE;
|
result = PKGMK_FAILURE;
|
||||||
} else {
|
} else {
|
||||||
string message = ( pkgdest == "" ) ? "" :
|
// -- update
|
||||||
commandName + ": Using PKGMK_PACKAGE_DIR " + pkgdest;
|
string pkgdest = getPkgmkPackageDir();
|
||||||
|
if ( pkgdest != "" ) {
|
||||||
|
// TODO: don't manipulate pkgdir
|
||||||
|
pkgdir = pkgdest;
|
||||||
|
string message = "prt-get: Using PKGMK_PACKAGE_DIR: " + pkgdir;
|
||||||
if (parser->verbose() > 0) {
|
if (parser->verbose() > 0) {
|
||||||
cout << message << endl;
|
cout << message << endl;
|
||||||
}
|
}
|
||||||
@ -363,79 +359,94 @@ const {
|
|||||||
write( fdlog, message.c_str(), message.length() );
|
write( fdlog, message.c_str(), message.length() );
|
||||||
write( fdlog, "\n", 1 );
|
write( fdlog, "\n", 1 );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 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 {
|
|
||||||
summary = commandName + ": " + "updating " +
|
|
||||||
package->name() + " from " + from + " to " + to;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
summary = commandName + ": " + "installing " + package->name() +
|
|
||||||
" " + package->version() + "-" + package->release();
|
|
||||||
}
|
|
||||||
|
|
||||||
// - print and log
|
// the following chdir is a noop if usePkgDest() returns false
|
||||||
cout << summary << endl;
|
if ( chdir( pkgdir.c_str() ) != 0 ) {
|
||||||
if (parser->verbose() > 0) {
|
result = PKGDEST_ERROR;
|
||||||
cout << fullCommand << endl;
|
} else {
|
||||||
}
|
cmd = PKGADD_DEFAULT_COMMAND;
|
||||||
if ( m_config->writeLog() ) {
|
if (m_config->addCommand() != "") {
|
||||||
time_t endTime;
|
cmd = m_config->addCommand();
|
||||||
time(&endTime);
|
}
|
||||||
timestamp = ctime(&endTime);
|
|
||||||
timestamp = commandName + ": build done " + timestamp;
|
|
||||||
|
|
||||||
write( fdlog, summary.c_str(), summary.length() );
|
args = "";
|
||||||
write( fdlog, "\n", 1 );
|
if (parser->installRoot() != "") {
|
||||||
write( fdlog, fullCommand.c_str(), fullCommand.length() );
|
args = "-r " + parser->installRoot() + " ";
|
||||||
write( fdlog, "\n", 1 );
|
}
|
||||||
write( fdlog, timestamp.c_str(), timestamp.length());
|
|
||||||
write( fdlog, "\n", 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
Process installProc( cmd, args, fdlog );
|
|
||||||
if ( installProc.executeShell() ) {
|
if ( update ) {
|
||||||
result = PKGADD_FAILURE;
|
args += "-u ";
|
||||||
} else {
|
}
|
||||||
// exec post install
|
if ( !parser->pkgaddArgs().empty() ) {
|
||||||
if ((parser->execPostInstall() || m_config->runScripts() ) &&
|
args += parser->pkgaddArgs() + " ";
|
||||||
stat((parser->installRoot() + portdir + "/post-install").c_str(),
|
}
|
||||||
&statData) == 0) {
|
args +=
|
||||||
Process postProc( runscriptCommand,
|
package->name() + "#" +
|
||||||
portdir + "/post-install", fdlog );
|
package->version() + "-" +
|
||||||
if (postProc.executeShell()) {
|
package->release() + ".pkg.tar." + getPkgmkCompressionMode();
|
||||||
info.postState = FAILED;
|
|
||||||
|
|
||||||
|
// - 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;
|
||||||
} else {
|
} else {
|
||||||
info.postState = EXEC_SUCCESS;
|
summary = commandName + ": " + "updating " +
|
||||||
|
package->name() + " from " + from + " to " + to;
|
||||||
}
|
}
|
||||||
|
} 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,7 +481,8 @@ bool InstallTransaction::calculateDependencies()
|
|||||||
return false;
|
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 ) {
|
for ( ; it != m_packages.end(); ++it ) {
|
||||||
const Package* package = it->second;
|
const Package* package = it->second;
|
||||||
if ( package ) {
|
if ( package ) {
|
||||||
@ -514,8 +526,8 @@ void InstallTransaction::checkDependencies( bool greedy,
|
|||||||
|
|
||||||
if ( index == -1 ) {
|
if ( index == -1 ) {
|
||||||
index = m_depList.size();
|
index = m_depList.size();
|
||||||
if ( ( not greedy ) or (isRequired( package->name() )) ) {
|
if ( (!greedy) or isRequired( package->name() ) ) {
|
||||||
m_depList.push_back( package->name() );
|
m_depList.push_back( package->name() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -568,7 +580,7 @@ void InstallTransaction::checkDependencies( bool greedy,
|
|||||||
m_missingPackages.
|
m_missingPackages.
|
||||||
push_back( make_pair( softdep, package->name() ) );
|
push_back( make_pair( softdep, package->name() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -581,8 +593,8 @@ void InstallTransaction::checkDependencies( bool greedy,
|
|||||||
Method to determine whether a soft dependency should be part of the transaction
|
Method to determine whether a soft dependency should be part of the transaction
|
||||||
*/
|
*/
|
||||||
bool InstallTransaction::isRequired(const string &pname) {
|
bool InstallTransaction::isRequired(const string &pname) {
|
||||||
if ( m_pkgDB->isInstalled(pname) ) { return true; }
|
if ( m_pkgDB->isInstalled(pname,false) ) { return true; }
|
||||||
list<pair<string, const Package*>>::iterator it = m_packages.begin();
|
list< pair<string, const Package*> >::iterator it = m_packages.begin();
|
||||||
for ( ; it != m_packages.end(); ++it ) {
|
for ( ; it != m_packages.end(); ++it ) {
|
||||||
if ( pname == it->first ) { return true; }
|
if ( pname == it->first ) { return true; }
|
||||||
}
|
}
|
||||||
@ -640,11 +652,11 @@ InstallTransaction::installedPackages() const
|
|||||||
/*!
|
/*!
|
||||||
calculate dependendencies for this package
|
calculate dependendencies for this package
|
||||||
*/
|
*/
|
||||||
bool InstallTransaction::calcDependencies( )
|
InstallTransaction::InstallResult
|
||||||
|
InstallTransaction::calcDependencies( )
|
||||||
{
|
{
|
||||||
if ( m_packages.empty() ) {
|
if ( m_packages.empty() ) {
|
||||||
cout << "No packages given for this transaction" << endl;
|
return NO_PACKAGE_GIVEN;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool validPackages = false;
|
bool validPackages = false;
|
||||||
@ -657,19 +669,75 @@ bool InstallTransaction::calcDependencies( )
|
|||||||
m_missingPackages.push_back( make_pair( it->first, string("") ) );
|
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() ) {
|
if ( !calculateDependencies() ) {
|
||||||
cout << "Cyclic dependencies detected" << endl;
|
return CYCLIC_DEPEND;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
const list<string>& InstallTransaction::ignoredPackages() const
|
const list<string>& InstallTransaction::ignoredPackages() const
|
||||||
{
|
{
|
||||||
return m_ignoredPackages;
|
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,6 +33,10 @@ class Configuration;
|
|||||||
class InstallTransaction
|
class InstallTransaction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
InstallTransaction( const list<char*>& names,
|
||||||
|
const Repository* repo,
|
||||||
|
PkgDB* pkgDB,
|
||||||
|
const Configuration* config );
|
||||||
InstallTransaction( const list<string>& names,
|
InstallTransaction( const list<string>& names,
|
||||||
const Repository* repo,
|
const Repository* repo,
|
||||||
PkgDB* pkgDB,
|
PkgDB* pkgDB,
|
||||||
@ -50,10 +54,10 @@ public:
|
|||||||
/*! Result of an installation */
|
/*! Result of an installation */
|
||||||
enum InstallResult {
|
enum InstallResult {
|
||||||
SUCCESS, /*!< yeah, success */
|
SUCCESS, /*!< yeah, success */
|
||||||
NO_PACKAGE_GIVEN, /*!< no package given to install */
|
NO_PACKAGE_GIVEN, /*!< no package give to install */
|
||||||
PACKAGE_NOT_FOUND, /*!< package not found */
|
PACKAGE_NOT_FOUND, /*!< package not found */
|
||||||
PKGMK_FAILURE, /*!< error while pkgmk */
|
PKGMK_FAILURE, /*!< error while pkgmk */
|
||||||
PKGDEST_ERROR, /*!< can't change to PKGDEST */
|
PKGDEST_ERROR, /*!< can't change to PKGDEST */
|
||||||
PKGADD_FAILURE, /*!< error while pkgadd */
|
PKGADD_FAILURE, /*!< error while pkgadd */
|
||||||
CYCLIC_DEPEND, /*!< cyclic dependencies found */
|
CYCLIC_DEPEND, /*!< cyclic dependencies found */
|
||||||
LOG_DIR_FAILURE, /*!< couldn't create log directory */
|
LOG_DIR_FAILURE, /*!< couldn't create log directory */
|
||||||
@ -79,17 +83,22 @@ public:
|
|||||||
bool hasReadme;
|
bool hasReadme;
|
||||||
};
|
};
|
||||||
|
|
||||||
InstallResult install( const ArgParser* parser );
|
InstallResult install( const ArgParser* parser,
|
||||||
bool calcDependencies();
|
bool update );
|
||||||
|
InstallResult calcDependencies();
|
||||||
|
|
||||||
const list< pair<string, InstallInfo> >& installedPackages() const;
|
const list< pair<string, InstallInfo> >& installedPackages() const;
|
||||||
const list<string>& alreadyInstalledPackages() const;
|
const list<string>& alreadyInstalledPackages() const;
|
||||||
const list<string>& ignoredPackages() const;
|
const list<string>& ignoredPackages() const;
|
||||||
|
|
||||||
|
|
||||||
const list<string>& dependencies() const;
|
const list<string>& dependencies() const;
|
||||||
const list< pair<string,string> >& missing() const;
|
const list< pair<string,string> >& missing() const;
|
||||||
const list< pair<string, InstallInfo> >& installError() const;
|
const list< pair<string, InstallInfo> >& installError() const;
|
||||||
|
|
||||||
|
static string getPkgmkPackageDir();
|
||||||
|
static string getPkgmkCompressionMode();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool calculateDependencies();
|
bool calculateDependencies();
|
||||||
void checkDependencies( bool greedy, const Package* package, int depends=-1 );
|
void checkDependencies( bool greedy, const Package* package, int depends=-1 );
|
||||||
@ -100,6 +109,10 @@ private:
|
|||||||
InstallInfo& info ) const;
|
InstallInfo& info ) const;
|
||||||
bool isRequired(const string &pname);
|
bool isRequired(const string &pname);
|
||||||
|
|
||||||
|
static string getPkgmkSetting(const string& setting);
|
||||||
|
static string getPkgmkSettingFromFile(const string& setting,
|
||||||
|
const string& fileName);
|
||||||
|
|
||||||
PkgDB* m_pkgDB;
|
PkgDB* m_pkgDB;
|
||||||
DepResolver m_resolver;
|
DepResolver m_resolver;
|
||||||
const Repository* m_repo;
|
const Repository* m_repo;
|
||||||
@ -113,20 +126,21 @@ private:
|
|||||||
// packages< pair<name, hasReadme> > installed by this transaction
|
// packages< pair<name, hasReadme> > installed by this transaction
|
||||||
list< pair<string, InstallInfo> > m_installedPackages;
|
list< pair<string, InstallInfo> > m_installedPackages;
|
||||||
|
|
||||||
// packages requested to be installed, but already present
|
// packages which were requested to be installed which where already
|
||||||
list<string> m_alreadyInstalledPackages;
|
list<string> m_alreadyInstalledPackages;
|
||||||
|
|
||||||
// packages required by the transaction, but ignored by the user
|
// packages which are required by the transaction, but ignored by
|
||||||
|
// the user
|
||||||
list<string> m_ignoredPackages;
|
list<string> m_ignoredPackages;
|
||||||
|
|
||||||
list<string> m_depNameList;
|
list<string> m_depNameList;
|
||||||
vector<string> m_depList;
|
vector<string> m_depList;
|
||||||
vector<string> treeWalk;
|
vector<string> treeWalk;
|
||||||
|
|
||||||
// packages requested to be installed, but not found in the ports tree
|
// packages requested to be installed not found in the ports tree
|
||||||
list< pair<string, string> > m_missingPackages;
|
list< pair<string, string> > m_missingPackages;
|
||||||
|
|
||||||
// packages where build/install failed
|
// packages where build/installed failed
|
||||||
list< pair<string, InstallInfo> > m_installErrors;
|
list< pair<string, InstallInfo> > m_installErrors;
|
||||||
|
|
||||||
/// prt-get itself
|
/// prt-get itself
|
||||||
|
59
src/main.cpp
59
src/main.cpp
@ -57,13 +57,17 @@ int main( int argc, char** argv )
|
|||||||
|
|
||||||
|
|
||||||
ArgParser::Type command = argParser.commandType();
|
ArgParser::Type command = argParser.commandType();
|
||||||
switch ( command ) {
|
switch ( command )
|
||||||
|
{
|
||||||
case ArgParser::HELP:
|
case ArgParser::HELP:
|
||||||
prtGet.printUsage();
|
prtGet.printUsage();
|
||||||
break;
|
break;
|
||||||
case ArgParser::SHOW_VERSION:
|
case ArgParser::SHOW_VERSION:
|
||||||
prtGet.printVersion();
|
prtGet.printVersion();
|
||||||
break;
|
break;
|
||||||
|
case ArgParser::LIST:
|
||||||
|
prtGet.listPackages();
|
||||||
|
break;
|
||||||
case ArgParser::DUP:
|
case ArgParser::DUP:
|
||||||
prtGet.listShadowed();
|
prtGet.listShadowed();
|
||||||
break;
|
break;
|
||||||
@ -80,16 +84,25 @@ int main( int argc, char** argv )
|
|||||||
prtGet.isInstalled();
|
prtGet.isInstalled();
|
||||||
break;
|
break;
|
||||||
case ArgParser::INSTALL:
|
case ArgParser::INSTALL:
|
||||||
prtGet.install( argParser.depSort() );
|
prtGet.install();
|
||||||
break;
|
break;
|
||||||
case ArgParser::DEPENDS:
|
case ArgParser::DEPINST:
|
||||||
prtGet.printDepends( argParser.quick() );
|
prtGet.install( false, true );
|
||||||
break;
|
|
||||||
case ArgParser::DEPTREE:
|
|
||||||
prtGet.printDepTree();
|
|
||||||
break;
|
break;
|
||||||
|
case ArgParser::DEPENDS:
|
||||||
|
prtGet.printDepends();
|
||||||
|
break;
|
||||||
|
case ArgParser::QUICKDEP:
|
||||||
|
prtGet.printDepends( true );
|
||||||
|
break;
|
||||||
|
case ArgParser::UPDATE:
|
||||||
|
prtGet.install( true );
|
||||||
|
break;
|
||||||
case ArgParser::DIFF:
|
case ArgParser::DIFF:
|
||||||
prtGet.printDiff( argParser.quick() );
|
prtGet.printDiff();
|
||||||
|
break;
|
||||||
|
case ArgParser::QUICKDIFF:
|
||||||
|
prtGet.printQuickDiff();
|
||||||
break;
|
break;
|
||||||
case ArgParser::CREATE_CACHE:
|
case ArgParser::CREATE_CACHE:
|
||||||
prtGet.createCache();
|
prtGet.createCache();
|
||||||
@ -97,36 +110,36 @@ int main( int argc, char** argv )
|
|||||||
case ArgParser::PATH:
|
case ArgParser::PATH:
|
||||||
prtGet.printPath();
|
prtGet.printPath();
|
||||||
break;
|
break;
|
||||||
|
case ArgParser::LISTINST:
|
||||||
|
prtGet.listInstalled();
|
||||||
|
break;
|
||||||
case ArgParser::PRINTF:
|
case ArgParser::PRINTF:
|
||||||
prtGet.printf();
|
prtGet.printf();
|
||||||
break;
|
break;
|
||||||
case ArgParser::README:
|
case ArgParser::README:
|
||||||
prtGet.readme();
|
prtGet.readme();
|
||||||
break;
|
break;
|
||||||
|
case ArgParser::DEPENDENT:
|
||||||
|
prtGet.printDependent();
|
||||||
|
break;
|
||||||
|
case ArgParser::SYSUP:
|
||||||
|
prtGet.sysup();
|
||||||
|
break;
|
||||||
case ArgParser::CURRENT:
|
case ArgParser::CURRENT:
|
||||||
prtGet.current();
|
prtGet.current();
|
||||||
break;
|
break;
|
||||||
case ArgParser::FSEARCH:
|
case ArgParser::FSEARCH:
|
||||||
prtGet.fsearch();
|
prtGet.fsearch();
|
||||||
break;
|
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:
|
case ArgParser::LOCK:
|
||||||
prtGet.setLock( true );
|
prtGet.setLock( true );
|
||||||
break;
|
break;
|
||||||
case ArgParser::UNLOCK:
|
case ArgParser::UNLOCK:
|
||||||
prtGet.setLock( false );
|
prtGet.setLock( false );
|
||||||
break;
|
break;
|
||||||
|
case ArgParser::LISTLOCKED:
|
||||||
|
prtGet.listLocked();
|
||||||
|
break;
|
||||||
case ArgParser::CAT:
|
case ArgParser::CAT:
|
||||||
prtGet.cat();
|
prtGet.cat();
|
||||||
break;
|
break;
|
||||||
@ -139,9 +152,15 @@ int main( int argc, char** argv )
|
|||||||
case ArgParser::REMOVE:
|
case ArgParser::REMOVE:
|
||||||
prtGet.remove();
|
prtGet.remove();
|
||||||
break;
|
break;
|
||||||
|
case ArgParser::DEPTREE:
|
||||||
|
prtGet.printDependTree();
|
||||||
|
break;
|
||||||
case ArgParser::DUMPCONFIG:
|
case ArgParser::DUMPCONFIG:
|
||||||
prtGet.dumpConfig();
|
prtGet.dumpConfig();
|
||||||
break;
|
break;
|
||||||
|
case ArgParser::LISTORPHANS:
|
||||||
|
prtGet.listOrphans();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
cerr << "unknown command" << endl;
|
cerr << "unknown command" << endl;
|
||||||
break;
|
break;
|
||||||
|
@ -222,7 +222,6 @@ void Package::load() const
|
|||||||
|
|
||||||
StringHelper::replaceAll( depends, " ", "," );
|
StringHelper::replaceAll( depends, " ", "," );
|
||||||
StringHelper::replaceAll( depends, ",,", "," );
|
StringHelper::replaceAll( depends, ",,", "," );
|
||||||
|
|
||||||
m_data->depends = depends;
|
m_data->depends = depends;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,6 @@ public:
|
|||||||
bool useAlias = false,
|
bool useAlias = false,
|
||||||
bool* isAlias = 0,
|
bool* isAlias = 0,
|
||||||
string* aliasOrignalName = 0 ) const;
|
string* aliasOrignalName = 0 ) const;
|
||||||
bool isOutdated( const std::string& name ) const;
|
|
||||||
|
|
||||||
|
|
||||||
std::string getPackageVersion( const std::string& name ) const;
|
std::string getPackageVersion( const std::string& name ) const;
|
||||||
|
1062
src/prtget.cpp
1062
src/prtget.cpp
File diff suppressed because it is too large
Load Diff
40
src/prtget.h
40
src/prtget.h
@ -55,25 +55,22 @@ public:
|
|||||||
void listPackages();
|
void listPackages();
|
||||||
void listShadowed();
|
void listShadowed();
|
||||||
void listInstalled();
|
void listInstalled();
|
||||||
void listOrphans();
|
|
||||||
void listLocked();
|
|
||||||
void setLock( bool lock );
|
|
||||||
|
|
||||||
void searchPackages( bool searchDesc=false );
|
void searchPackages( bool searchDesc=false );
|
||||||
void fsearch();
|
|
||||||
|
|
||||||
void printInfo();
|
void printInfo();
|
||||||
void isInstalled();
|
void isInstalled();
|
||||||
bool isOutdated();
|
|
||||||
void current();
|
|
||||||
void readme();
|
void readme();
|
||||||
|
|
||||||
void install( bool dependencies=false );
|
void install( bool update=false,
|
||||||
void remove();
|
bool dependencies=false );
|
||||||
|
void sysup();
|
||||||
|
void current();
|
||||||
void printDepends( bool simpleListing=false );
|
void printDepends( bool simpleListing=false );
|
||||||
void printDiff( bool simpleListing=false );
|
void printDependTree();
|
||||||
void printDepTree();
|
void printDependent();
|
||||||
|
void printDiff();
|
||||||
|
void printQuickDiff();
|
||||||
|
void listOrphans();
|
||||||
|
|
||||||
void createCache();
|
void createCache();
|
||||||
|
|
||||||
@ -83,6 +80,14 @@ public:
|
|||||||
void cat();
|
void cat();
|
||||||
void ls();
|
void ls();
|
||||||
void edit();
|
void edit();
|
||||||
|
|
||||||
|
void remove();
|
||||||
|
|
||||||
|
void setLock( bool lock );
|
||||||
|
void listLocked();
|
||||||
|
|
||||||
|
void fsearch();
|
||||||
|
|
||||||
void dumpConfig();
|
void dumpConfig();
|
||||||
|
|
||||||
int returnValue() const;
|
int returnValue() const;
|
||||||
@ -91,10 +96,14 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void printDepsLevel(int level, const Package* package, bool greedy);
|
void printDepsLevel(int indent, const Package* package, bool greedy);
|
||||||
|
|
||||||
void executeTransaction( InstallTransaction& transaction );
|
void printDependent(const std::string& dep, int level);
|
||||||
void evaluateResult( InstallTransaction& transaction,
|
|
||||||
|
void executeTransaction( InstallTransaction& transaction,
|
||||||
|
bool update );
|
||||||
|
void evaluateResult( InstallTransaction& transaction,
|
||||||
|
bool update,
|
||||||
bool interrupted=false );
|
bool interrupted=false );
|
||||||
void reportPrePost(const InstallTransaction::InstallInfo& info);
|
void reportPrePost(const InstallTransaction::InstallInfo& info);
|
||||||
|
|
||||||
@ -113,6 +122,7 @@ protected:
|
|||||||
const string& version2,
|
const string& version2,
|
||||||
bool locked);
|
bool locked);
|
||||||
|
|
||||||
|
|
||||||
Repository* m_repo;
|
Repository* m_repo;
|
||||||
PkgDB* m_pkgDB;
|
PkgDB* m_pkgDB;
|
||||||
Configuration* m_config;
|
Configuration* m_config;
|
||||||
|
@ -86,26 +86,12 @@ const Package* Repository::getPackage( const string& name ) const
|
|||||||
return it->second;
|
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, or in description if
|
Search packages for a match of \a pattern in name, and description of
|
||||||
\a searchDesc is true.
|
\a searchDesc is true.
|
||||||
\note Name searches can often be done without opening the Pkgfiles, but not
|
\note Name searches can often done without opening the Pkgfiles, but not
|
||||||
description search. Therefore, the latter is much slower
|
description search. Therefore, the later is much slower
|
||||||
|
|
||||||
\param pattern the pattern to be found
|
\param pattern the pattern to be found
|
||||||
\param searchDesc whether descriptions should be searched as well
|
\param searchDesc whether descriptions should be searched as well
|
||||||
@ -202,10 +188,11 @@ void Repository::initFromFS( const list< pair<string, string> >& rootList,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: think about whether it would be faster (more efficient)
|
// TODO: think about whether it would be faster (more
|
||||||
// to put all packages into a map, and then iterate
|
// efficient) to put all packages into a map, and the iterate
|
||||||
// over the list of allowed packages and copy them over.
|
// over the list of allowed packages and copy them
|
||||||
// Depending on the efficiency of find(), this might be faster.
|
// over. depending in the efficiency of find(), this might be
|
||||||
|
// faster
|
||||||
d = opendir( path.c_str() );
|
d = opendir( path.c_str() );
|
||||||
while ( ( de = readdir( d ) ) != NULL ) {
|
while ( ( de = readdir( d ) ) != NULL ) {
|
||||||
name = de->d_name;
|
name = de->d_name;
|
||||||
@ -340,20 +327,9 @@ Repository::WriteResult Repository::writeCache( const string& cacheFile )
|
|||||||
const Package* p = it->second;
|
const Package* p = it->second;
|
||||||
|
|
||||||
// TODO: encode
|
// TODO: encode
|
||||||
hasReadme = noStr;
|
hasReadme = ( p->hasReadme() ) ? yesStr : noStr;
|
||||||
if ( p->hasReadme() ) {
|
hasPreInstall = ( p->hasPreInstall() ) ? yesStr : noStr;
|
||||||
hasReadme = yesStr;
|
hasPostInstall = ( p->hasPostInstall() ) ? yesStr : noStr;
|
||||||
}
|
|
||||||
|
|
||||||
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",
|
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(),
|
p->name().c_str(),
|
||||||
@ -403,37 +379,6 @@ bool Repository::createOutputDir( const string& path )
|
|||||||
return true;
|
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
|
Search packages for a match of \a pattern in name. The name can
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include "package.h"
|
#include "package.h"
|
||||||
#include "stringhelper.h"
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Repository
|
\class Repository
|
||||||
@ -34,7 +33,6 @@ public:
|
|||||||
~Repository();
|
~Repository();
|
||||||
|
|
||||||
const Package* getPackage( const string& name ) const;
|
const Package* getPackage( const string& name ) const;
|
||||||
std::string getPackageVersion( const string& name ) const;
|
|
||||||
const map<string, Package*>& packages() const;
|
const map<string, Package*>& packages() const;
|
||||||
const list<pair<Package*, Package*> >& shadowedPackages() const;
|
const list<pair<Package*, Package*> >& shadowedPackages() const;
|
||||||
|
|
||||||
@ -42,10 +40,6 @@ public:
|
|||||||
list<Package*>& target,
|
list<Package*>& target,
|
||||||
bool searchDesc ) const;
|
bool searchDesc ) const;
|
||||||
|
|
||||||
void getDependentPackages( const string& pattern,
|
|
||||||
list<Package*>& target,
|
|
||||||
bool searchOptionals ) const;
|
|
||||||
|
|
||||||
void getMatchingPackages( const string& pattern,
|
void getMatchingPackages( const string& pattern,
|
||||||
list<Package*>& target ) const;
|
list<Package*>& target ) const;
|
||||||
|
|
||||||
|
@ -155,4 +155,5 @@ string replaceAll( string& in,
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}; // Namespace
|
}; // Namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user