Giter VIP home page Giter VIP logo

portmaster's Introduction

This script uses the existing ports infrastructure to track dependencies, and keep them up to date. It is written in /bin/sh so it has no dependencies.

Portmaster has the following features:

  • Updates and repairs (as needed) entries for dependencies in both +CONTENTS and +REQUIRED_BY files for both the port that is being updated, and any ports that depend on it
  • Runs make config recursively through all ports before starting build
  • Downloads distfiles in the background
  • Recursively checks and upgrades (or installs) all dependencies
  • User can force upgrades of all dependent ports
  • Offers the user the opportunity to delete stale distfiles
  • Supports ports/MOVED and non-default settings of PORTSDIR and PKG_DBDIR
  • Interactive update mode (prompts for each update)
  • Option to rebuild port, and ports that depend on it
  • Options to make packages out of installed, and new ports
  • Option to clean out stale port dependencies
  • Options to list installed ports by category, and those with new versions
  • Packages can be used for installation either exclusively, if available, or only for build dependencies

WWW: http://portmaster.github.com

IRC: ircs://irc.libera.chat:6697/#portmaster

portmaster's People

Contributors

amishhammer avatar bapt avatar battleblow avatar bdrewery avatar dimitryandric avatar farrokhi avatar grimreaper avatar infracaninophile avatar koobs avatar p avatar stesser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

portmaster's Issues

Add or document switches for fully automated upgrade operation

I'd like to have the ability to upgrade all ports in a fully automated manner without user interaction. Currently I can get close to this using the command

portmaster -aG --no-confirm

...however, the process still halts when asking to delete tarballs such is this message

===>>> Delete Socket-2.016.tar.gz? y/n [n]

Saving old shared libraries should be a default

I think it'd be wiser to enable shared libraries saving by default. Needless to say that it saves from downtime (time between some library is updated with shver bump and ports depending on it are updated) or system breakage (when one tries to only update library, but not ports that depend on it), and the safe behavior should be the default. It is also consistent with portupgrade behavior.

Dependencies are installed when not needed.

For all of the _DEPENDS lists the first column defines when the dependency is needed. It may be a binary in the path, a package, or a library. Portmaster is ignoring this field and always installing the dependency when the ports framework may have actually skipped installing it. This is easily seen with base utility dependencies such as in security/keychain. It has a dependency on ssh-agent:${PORTSDIR}/security/openssh-portable that is only needed to be installed if ssh-agent is not installed.

[FR] Ignore binary ports

Pkg does not have a "binary" flag, so I've asked for them to include one (freebsd/pkg#1000), but packages which were not compiled have annotations which mention they're binary packages, so it would still be possible for portmaster to ignore those automatically when being asked which packages need to be updated per example.

Export PACKAGES as an environment variable breaks libbluray

When using portmaster to install the multimedia/libbluray port, the Requires.private line in libbluray.pc is broken because the configure script of libbluray appends things to PACKAGES variable and set the value of Requires.private to PACKAGES when generating libbluray.pc.

libbluray.pc installed by typing make install:

Requires.private:  libxml-2.0 freetype2 fontconfig

libbluray.pc installed by portmaster:

Requires.private: /usr/ports/packages libxml-2.0 freetype2 fontconfig

The latter one causes gvfs to fail to find libbluray because pkg-config doesn't know what /usr/ports/packages is:

$ pkg-config --cflags libbluray
Package /usr/ports/packages was not found in the pkg-config search path.
Perhaps you should add the directory containing `/usr/ports/packages.pc'
to the PKG_CONFIG_PATH environment variable
Package '/usr/ports/packages', required by 'libbluray', not found

Improve non-interactive usage for pkg messages

I am trying to automate jail creation with Bastille which shall install ports via portmaster. Unfortunately portmaster uses PAGER with less(1) and does not document that unless you look into source code. I was able to circumvent this:

CMD env PAGER="/usr/bin/true" portmaster -dG -m -s --no-confirm --no-term-title $(cat /files/ports)

I would expect that either --no-confirm would disable the pager or a new flag --non-interactive would stop asking for any user input.

portmaster creating corrupt legacy pkg db entries

This happens with any application that is upgraded using portmaster. pkgng db entries are not corrupt.

Environment:
FreeNAS-9.2.1.3-RELEASE-x64 standard FreeBSD 9.2 x64 jail
portmaster-3.17.4

/etc/make.conf
WITH_PKGNG=yes
WITH_OPENSSL_PORT=yes
NO_WARNING_PKG_INSTALL_EOL=yes

Step to reproduce:

# pkg_info
pkg_info: no packages installed

# portmaster -r pkg-1.2.7
===>>> Working on:        pkg-1.2.7
===>>> Gathering distinfo list for installed ports
===>>> pkg-1.2.7 1/1
===>>> Currently installed version: pkg-1.2.7
<snip>
===>>> The following actions were performed:
        Upgrade of pkg-1.2.7 to pkg-1.2.7_2
===>>> Exiting

 # pkg_info
pkg_info: the package info for package 'pkg-1.2.7_2' is corrupt

portmaster -o to replace multiple ports with 1 (e.g., xorgproto)?

Recently a bunch of x11 *proto ports were consolidated with x11/xorgproto. See /usr/ports/MOVED.

Running portmaster -o x11/xorgproto bigreqsproto xproto xextproto xfixesproto (... and so on, enumerating all the installed ports that xorgproto replaces) fails with this kind of problem:

=========================================
.
.
.
===> Registering installation for xorgproto-2018.4 as automatic
Installing xorgproto-2018.4...
pkg-static: xorgproto-2018.4 conflicts with xproto-7.0.31 (installs files into the same place). Problematic file: /usr/local/include/X11/DECkeysym.h
*** Error code 70

Stop.
make: stopped in /usr/ports/x11/xorgproto

===>>> A backup package for bigreqsproto-1.1.2 should
be located in /local/usr/ports/packages/portmaster-backup

===>>> Installation of xorgproto-2018.4 (x11/xorgproto) failed
===>>> Aborting update

=========================================

Is there currently a way to get portmaster to support a rename from N to 1 port like this? I suspect not. Looking at the current code, I think -o only supports 1:1 port replacing.

portmaster --check-port-dbdir doesn't understand new OPTIONS_FILE locations

Since late June the default location for new options files has changed from a simple /var/db/portname/options to /var/db/category_portname/options. When looking for obsolete port options directories portmaster doesn't understand that the new directories correspond to installed ports and offers to delete them e.g.

    ===>>> archivers_gtar does not seem to be installed
    ===>>> Delete /var/db/ports/archivers_gtar? y/n [n]
    ===>>> audio_alsa-plugins does not seem to be installed
    ===>>> Delete /var/db/ports/audio_alsa-plugins? y/n [n] 

...

make -V OPTIONS_NAME
in a port dir shows the name of the dir under /var/db/ports under which to store options. I guess portmaster will have to evaluate this for every installed port to know what are valid directories. (Note: old ports which had a directory before this framework came in still seem to stored under the port name. Not sure what happens if both dirs exist).

There may be effects beyond --check-port-dbdir :(

Port upgrading leaves system unusable

When a port is upgraded it is:

  1. Deinstalled
  2. Dependencies are then upgraded
  3. Dependencies are deleted as their own dependencies are upgraded
  4. As the chain is walked back up then the various ports are installed

This leaves the system missing many packages for a long period of time.

It would be much better if this upgraded dependencies first and then deinstalled/installed the upgraded port.

missing 'I' (capital letter i) in getops string

portmaster/portmaster

Lines 743 to 752 in b375cf0

while getopts 'BCDFGHKLPRabde:fghilm:nop:r:stvwx:y' COMMAND_LINE_ARGUMENT ; do
case "${COMMAND_LINE_ARGUMENT}" in
B) NO_BACKUP=Bopt; ARGS="-B $ARGS" ;;
C) DONT_PRE_CLEAN=Copt; ARGS="-C $ARGS" ;;
D) DONT_SCRUB_DISTFILES=Dopt; ARGS="-D $ARGS" ;;
F) FETCH_ONLY=Fopt; ARGS="-F $ARGS" ;;
G) [ -z "$PM_FORCE_CONFIG" ] && {
PM_NO_MAKE_CONFIG=Gopt; ARGS="-G $ARGS"; } ;;
H) HIDE_BUILD=Hopt; ARGS="-H $ARGS" ;;
I) NON_INTERACTIVE=Iopt; ARGS="-I $ARGS" ;;
See also 01f51ec

Add yes to all option to --clean-distfiles

For ports like editors/vim that have an absurd number of distfiles (one for each revision), can you add an option to say yes to all future Delete stale file questions?

Broken MOVED handling

textproc/p5-ack was moved to textproc/ack:

 ===>>> Starting check of installed ports for available updates
 ===>>> The textproc/p5-ack port moved to textproc/ack ===>>> Reason: Not just a perl module
 ===>>> Update p5-ack-1.96_1? y/n [y]
 ===>>> Launching child to reinstall p5-ack-1.96_1
 ===>>> All >> p5-ack-1.96_1 (1/1)
 ...
 ===>>> Port directory: /usr/ports/textproc/ack
 ===>>> The following actions will be taken if you choose to proceed:
         Install textproc/ack
 ===>>> Proceed? y/n [y]

Afterwards, both p5-ack and ack are installed.

Backup package compression

It would be nice to be able to customize the compression used in creating backup packages (including to none). On slow boxes and big packages, this can burn minutes, just to compress something that's gonna be deleted in 30 seconds. Perhaps no compression should even be the default.

Recursive update by packages

When portmaster recursively updates installed port using packages, it get dependencies list from the port or INDEX file, not from the package itself. This lead to the problem: some packages has dependencies not matched defaults ones for the port. For example, when I try to update libslang library from package, portmaster also trying to install png library, though my package doesn't has this dependency. For some ports it will try to install half of X-Windows, which pretty confusing.

But things become much worse when package has dependencies, which not "on" by default in the port. In this case portmaster doesn't updates needed dependencies at all, which could lead to the broken installation. I suggest that portmaster have to get dependencies from packages when they used for updating. It can be done by simple grep of +CONTENT file for strings "@pkgdep" or "@comment DEPORIGIN". It also allow portmaster recursively install and update ports by packages without ports tree - it's very useful for cases when packages built on one server and then installed on many..

Wrong linker (base) is being used when using Clang from ports

Env

FreeBSD 10.2, amd64
Toolchain from ports: llvm37, clang37, binutils

Problem

When using portmaster to install ports (some of which were first installed as packages), the wrong linker is being used.

configure:3960: clang37 -O2 -pipe -D_FORTIFY_SOURCE=2 -flto -march=native  -fstack-protector-strong --param ssp-buffer-size=4 -fno-strict-aliasing   -Wl,-z,relro,-z,now -Wl,-rpath=/usr/local/lib -fstack-protector conftest.c -lpthread >&5
/usr/bin/ld: unrecognized option '-plugin'

If I don't use portmaster and do a make reinstall, then the correct linker is being used.
I can't find a portmaster variable which could fix the problem.

Conf

MAKE_SHELL?=sh
OPTIONS_SET= INET6 IPV6 THREADS OPTIMIZED_CFLAGS ICONV_PORT
OPTIONS_UNSET= X11 NLS DOCS DEBUG EXAMPLES
WITH_UTF8=YES
WITH_CCACHE_BUILD=yes
OPTIMIZED_CFLAGS=YES
CPUTYPE?=native
CCVER=clang37
CC=clang37
CXX=clang++37
CPP=clang-cpp37

portmaster -avDBGfR fails with 'Argument list too long'

I have more than 2000 ports installed on this system, and it seems the problem is that portmaster exports too many data into environment variables. Adding --no-confirm can help sometimes because build_l isn't set, but it still fails after building a few ports.

===>>> All >> py27-MutatorMath-2.1.1 >> print/py-defcon@py27 (1486/1486)

===>>> Port directory: /usr/ports/print/py-defcon@py27

===>>> Launching 'make checksum' for print/py-defcon@py27 in background
===>>> Gathering dependency list for print/py-defcon@py27 from ports
===>>> Starting dependency check
===>>> Checking dependency: devel/py-setuptools@py27
/usr/local/sbin/portmaster: /usr/bin/make: Argument list too long
/usr/local/sbin/portmaster: rm: Argument list too long
===>>> The update for py27-setuptools-40.6.2 is already done

===>>> Checking dependency: lang/python27
===>>> The update for python27-2.7.15 is already done

===>>> Checking dependency: ports-mgmt/pkg
===>>> Checking dependency: print/py-fonttools@py27
/usr/local/sbin/portmaster: /usr/local/sbin/pkg-static: Argument list too long
===>>> Launching child to install print/py-fonttools@py27

===>>> All >> py27-MutatorMath-2.1.1 >> print/py-defcon@py27 >> print/py-fonttools@py27 (1487/1487)
/usr/local/sbin/portmaster: /usr/local/sbin/portmaster: Argument list too long

===>>> Update for print/py-fonttools@py27 failed
===>>> Aborting update

===>>> Update for print/py-defcon@py27 failed
===>>> Aborting update

===>>> Update for py27-MutatorMath-2.1.1 failed
===>>> Aborting update

Confirm+SIGINT = "yes"

[mat_] bdrewery, there's a bug in portmaster :-p                                                                                                  
[mat_] when it has finished looking at what it's going to do and asks "proceed ? y/n" if you hit control-C it will take it as a yes :-)

Portmaster ignores overlays

I have the following:

# grep OVERLAYS /etc/make.conf
OVERLAYS+=/usr/ports-overlays/ldadw-custom

with the overlay tree:

root@deblndw011x:/usr/ports-overlays/ldadw-custom
# tree -d
.
└── security
    ├── nss-siemens-cacerts-java
    │   └── files
    └── siemens-cacerts
        └── files

trying to install via portmaster:

root@deblndw011x:/usr/ports-overlays/ldadw-custom
# portmaster security/siemens-cacerts

        ===>>> No /usr/ports/security/siemens-cacerts exists, and no information
        ===>>> about security/siemens-cacerts can be found in /usr/ports/MOVED

make: chdir /usr/ports/security/siemens-cacerts: No such file or directory
===>>> No valid installed port, or port directory given
===>>> Try portmaster --help

It seems like portmaster completely ignores ports overlays.

Running portmaster in / tries to build /

# cd /
# portmaster
Assertion failed: (match == MATCH_ALL || (pattern != NULL && pattern[0] != '\0')), function pkgdb_query, file pkgdb.c, line 1031.

===>>> Currently installed version: Abort trap
===>>> Port directory: /usr/ports//


===>>> Gathering distinfo list for installed ports

make: don't know how to make config-conditional. Stop
===>>> Gathering dependency list for / from ports
make: don't know how to make build-depends-list. Stop
===>>> No dependencies for /


===>>> Starting build for / <<<===

===>>> All dependencies are up to date

^C
===>>> Build/Install for / exiting due to signal

===>>> You can restart from the point of failure with this command line:
       portmaster  /

feature request for patch-only option

This issue is a feature request for a new "patch-only" option, similar to -F (fetch-only) or (--force-configure) but will fetch, configure, extract, and patch the selected ports and their dependencies. This will allow an administrator to perform this operation ahead of time, in preparation for "portmaster -aCK" later, which will run faster by eliminating the unnecessary disk operations incurred by the extract and patch ports targets during critical downtime while building potentially hundreds of ports during a system upgrade.

Wrong path in postmaster(8)

index 8044e15..db2a8d7 100644
--- a/files/portmaster.8
+++ b/files/portmaster.8
@@ -766,7 +766,7 @@ You will then need to install and configure
 This can easily be done with
 .Pa /usr/ports/security/sudo .
 Then you will need to define PM_SU_CMD in your
-.Pa /etc/portmaster.rc
+.Pa /usr/local/etc/portmaster.rc
 file, or your
 .Pa $HOME/.portmasterrc
 file.

portmaster -s does not respect the pkgng automatic flag when it is set to 0

For example, pkgng says:

# pkg autoremove
Nothing to do.
# pkg query '%n %a' apache-ant
apache-ant 0

But, portmaster says:

# portmaster -s

Name           : apache-ant
Version        : 1.8.4
Origin         : devel/apache-ant
Prefix         : /usr/local
Categories     : java devel
Licenses       : AL2
Maintainer     : [email protected]
WWW            : http://ant.apache.org/
Comment        : Java- and XML-based build tool, conceptually similar to make
Flat size      : 33 MB
Description    :
Apache Ant, a Java-based build tool, conceptually similar to make.

Ant uses XML build files that defines a set of targets. Each target
has dependencies (other targets) and contains a set of tasks to
perform.

There are tasks for various things, like compiling ("javac"),
copying ("copy"), deleting ("delete"), executing other programs
("java", "exec", "execon", etc.), stylesheet transformations
("style") and so on.

WWW: http://ant.apache.org/


        ===>>> apache-ant-1.8.4 is no longer depended on, delete? y/n [n]

Working with FLAVOR

===>>> The accessibility/py3-atspi port moved to accessibility/py-atspi@py36
===>>> Reason: Moved to a flavored, generic, version

Now it doesn't works with ports moved to a flavored version

Portmaster should use 'make reinstall' to update/reinstall ports when needed.

In its default configuration portmaster will fail to reinstall ports that are required by other installed ports with errors like:

===>   libffi-3.2.1 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of libffi
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.

The obvious fix is to set FORCE_PKG_REGISTER in /usr/local/etc/portmaster.rc but this is not something the users should need to do. The proper fix would be to use 'make reinstall' for already installed ports, this would make sure the already installed port gets deleted, by force if required.

Portmaster ignores rebuilding dependent ports

Hello
I use portmaster on FreeBSD 11.1
The latest version of the portmaster does not rebuild the dependent ports with -r option
For example
portmaster version 3.19_8

portmaster -n -r pcre
/usr/local/sbin/portmaster: match_flavor: not found

===>>> Working on:
        pcre-8.40_1

===>>> Gathering distinfo list for installed ports


===>>> pcre-8.40_1 1/1

===>>> Currently installed version: pcre-8.40_1
===>>> Port directory: /usr/ports/devel/pcre

===>>> Gathering dependency list for devel/pcre from ports
===>>> Initial dependency check complete for devel/pcre


===>>> Checking ports that depend on pcre-8.40_1 

===>>> No ports depend on pcre-8.40_1 


===>>> Checking done for ports that depend on pcre-8.40_1 


===>>> Total ports: 1

===>>> Starting build for multiple ports <<<===


===>>> pcre-8.40_1 1/1

===>>> Currently installed version: pcre-8.40_1
===>>> Port directory: /usr/ports/devel/pcre


===>>> Updating ports that depend on pcre-8.40_1 

===>>> No ports depend on pcre-8.40_1 


===>>> Updating done for ports that depend on pcre-8.40_1

earlier it worked like this:
portmaster version 3.17.10
`portmaster -n -r pcre

===>>> Working on:
pcre-8.40_1

===>>> Gathering distinfo list for installed ports

===>>> pcre-8.40_1 1/1

===>>> Currently installed version: pcre-8.40_1
===>>> Port directory: /usr/ports/devel/pcre

===>>> Gathering dependency list for devel/pcre from ports
===>>> Initial dependency check complete for devel/pcre

===>>> Checking ports that depend on pcre-8.40_1

===>>> Launching child to reinstall kannel-1.4.4_6,1

===>>> Checking dependent ports >> kannel-1.4.4_6,1 (1/1)

===>>> Currently installed version: kannel-1.4.4_6,1
===>>> Port directory: /usr/ports/www/kannel

===>>> Gathering dependency list for www/kannel from ports
===>>> Initial dependency check complete for www/kannel

===>>> Returning to list of ports depending on pcre-8.40_1
===>>> Launching child to reinstall libslang2-2.3.1_3

===>>> Checking dependent ports >> libslang2-2.3.1_3 (2/2)

===>>> Currently installed version: libslang2-2.3.1_3
===>>> Port directory: /usr/ports/devel/libslang2

===>>> Gathering dependency list for devel/libslang2 from ports
===>>> Initial dependency check complete for devel/libslang2

===>>> Returning to list of ports depending on pcre-8.40_1
===>>> Launching child to reinstall php56-5.6.36

===>>> Checking dependent ports >> php56-5.6.36 (3/3)

===>>> Currently installed version: php56-5.6.36
===>>> Port directory: /usr/ports/lang/php56

===>>> Gathering dependency list for lang/php56 from ports
===>>> Initial dependency check complete for lang/php56

===>>> Returning to list of ports depending on pcre-8.40_1
===>>> Launching child to reinstall glib-2.50.3_3,1

===>>> Checking dependent ports >> glib-2.50.3_3,1 (4/4)

===>>> Currently installed version: glib-2.50.3_3,1
===>>> Port directory: /usr/ports/devel/glib20

===>>> Gathering dependency list for devel/glib20 from ports
===>>> Initial dependency check complete for devel/glib20

===>>> Returning to list of ports depending on pcre-8.40_1
===>>> Launching child to reinstall nginx-1.14.0_2,2

===>>> Checking dependent ports >> nginx-1.14.0_2,2 (5/5)

===>>> Currently installed version: nginx-1.14.0_2,2
===>>> Port directory: /usr/ports/www/nginx

===>>> Gathering dependency list for www/nginx from ports
===>>> Initial dependency check complete for www/nginx

===>>> Returning to list of ports depending on pcre-8.40_1

===>>> Checking done for ports that depend on pcre-8.40_1

===>>> Total ports: 1 >> (5)

===>>> The following actions will be taken if you choose to proceed:
Re-install pcre-8.40_1
Re-install kannel-1.4.4_6,1
Re-install libslang2-2.3.1_3
Re-install php56-5.6.36
Re-install glib-2.50.3_3,1
Re-install nginx-1.14.0_2,2

===>>> Proceed? y/n [y]
`
What am I doing wrong?

automatically adjust MASTER_SITE_INDEX and INDEXFILE if PACKAGESITE overrides the defaults

 ===>>> The newest available package (gnuls-8.12)
        is older than the version in ports (gnuls-8.20)
 ===>>> Try --packages-if-newer, or do not use -PP/--packages-only
 ===>>> Aborting update
 can i force portmaster to just install the package and not care about version in ports?
 portmaster should automatically adjust MASTER_SITE_INDEX and INDEXFILE if PACKAGESITE overrides the defaults

Tries to pull in ports-mgmt/pkg despite base pkg being setup

I converted a system to the pkgng format using the handbook guide using /usr/sbin/pkg, rebuilt portmaster and now every time I want to install something, it tries to install ports-mgmt/pkg whenever I want to build anything. Since ports-mgmt/pkg conflicts with the base system, this means I can't install anything with portmaster.

Running make install clean in a port folder works just fine, so I don't think that my ports system is broken. Is there something else I need to do with portmaster after converting to pkgng?

portmaster tries to replace/upgrade ports that already have their replaced origin installed

On my system, I still have the obsolete ports diablo-jdk-1.6.0.07.02_20
and jdk-1.6.0.3p4_29 installed. In /usr/ports/MOVED, there are pointers
to the java/openjdk6 port. I have that too.

Now, when I run portmaster -a, portmaster wants to rebuild/reinstall
java/openjdk6, even though I actually have the latest version, like
this:

===>>> All >> (9)

===>>> The following actions will be taken if you choose to proceed:
        Re-install openjdk6-b27
[...]

Since openjdk is already installed, there is no need to try upgrading/replacing diablo-jdk or jdk.

Delete stale distfiles should be no by default

The default setting of prompting the user makes portmaster virtually unusable.

Presumably one would use portmaster to install/update a package with dependencies. If I know a package has no dependencies I can just as easily make install it.

With the current default behavior, after each dependency is built portmaster stops to ask the "delete XXX?" question. Which means, it's not installing the remaining packages that I want.

I must be missing something as I cannot imagine who would want to have this behavior by default.

There are tools for cleaning up stale distfiles.

Portmaster should use its own /var/db directory for distfiles information

I feel that "piggybacking" on /var/db/pkg is wrong for couple of reasons:

  • No other tools are making use of /var/db/pkg/$PKGNAME/distfiles information.
  • The distfiles information is ports build time information and shouldn't be mixed with package database or other package related metadata.

My suggestion is to change the distfiles directory to /var/db/portmaster/$PKGNAME.

Portmaster propose to keep outdated packages but delete packages which are up to date

This is a log of routine "portmaster --clean-packages" run:

===>>> libcheck-0.9.8.tbz is up to date

===>>> libevent-1.4.14b_2.tbz is up to date
===>>> libevent-1.4.14b_2 is not installed
===>>> Path: /arc/pkg/All/libevent-1.4.14b_2.tbz
===>>> Delete stale package: libevent-1.4.14b_2.tbz? y/n [y]
===>>> Deleting /arc/pkg/All/libevent-1.4.14b_2.tbz

===>>> Package version: libevent2-2.0.20
Latest version: libevent2-2.0.21
===>>> libevent2-2.0.20.tbz is not installed
===>>> Path: /arc/pkg/All/libevent2-2.0.20.tbz
===>>> Delete stale package: libevent2-2.0.20.tbz? y/n [n] y
===>>> Deleting /arc/pkg/All/libevent2-2.0.20.tbz

===>>> libexecinfo-1.1_3.tbz is up to date```

I think that default behaviour must be opposite: propose to keep packages which are up to date and delete packages which are outdated.

Argument list too long

I ran: portmaster -r pcre

I also have the following set via the config file: -D --delete-build-only

Portmaster dies with:

===>>> Launching 'make checksum' for accessibility/mousetweaks in background
===> No options to configure
===>>> Gathering dependency list for accessibility/mousetweaks from ports
/usr/local/sbin/portmaster: grep: Argument list too long
/usr/local/sbin/portmaster: pkg_info: Argument list too long
===>>> Launching child to install devel/gmake

===>>> Checking dependent ports >> mousetweaks-2.32.1_1 >> devel/gmake (270/270)
/usr/local/sbin/portmaster: /usr/local/sbin/portmaster: Argument list too long

===>>> Update for devel/gmake failed
===>>> Aborting update

===>>> Update for mousetweaks-2.32.1_1 failed
===>>> Aborting update

===>>> Update for gnome2-2.32.1_4 failed
===>>> Aborting update

Terminated

I've been having this problem for some time. It only seems to happen when using the -r option.

Building multiple ports fails when port directories have a trailing slash

When installing multiple ports by specifying their paths in /usr/ports, portmaster (version 3.16) doesn't count ports that have trailing slashes:

# portmaster -n www/lighttpd/ devel/git/

===>>> Working on:
        www/lighttpd/
        devel/git/


===>>> www/lighttpd/ 1/2
===>>> Gathering distinfo list for installed ports


===>>> Port directory: /usr/ports/www/lighttpd

===>>> Gathering dependency list for www/lighttpd from ports
===>>> Initial dependency check complete for www/lighttpd


===>>> devel/git/ 2/1

===>>> Currently installed version: git-1.8.2.3
===>>> Port directory: /usr/ports/devel/git

===>>> Gathering dependency list for devel/git from ports
===>>> Initial dependency check complete for devel/git


===>>> Total ports: 0

If I remove the trailing slash from one of the arguments, that port does get counted and is properly added to the queue:

# portmaster -n www/lighttpd/ devel/git 

===>>> Working on:
        www/lighttpd/
        devel/git


===>>> www/lighttpd/ 1/2
===>>> Gathering distinfo list for installed ports


===>>> Port directory: /usr/ports/www/lighttpd

===>>> Gathering dependency list for www/lighttpd from ports
===>>> Initial dependency check complete for www/lighttpd


===>>> devel/git 2/1

===>>> Currently installed version: git-1.8.2.3
===>>> Port directory: /usr/ports/devel/git

===>>> Gathering dependency list for devel/git from ports
===>>> Initial dependency check complete for devel/git


===>>> Total ports: 1

===>>> Starting build for multiple ports <<<===


===>>> devel/git 1/1

===>>> Currently installed version: git-1.8.2.3
===>>> Port directory: /usr/ports/devel/git

===>>> Killing background jobs
Terminated
===>>> Exiting

When it starts, it seems to be aware that there are two ports to install, but the trailing slash is throwing off the accounting somewhere. The trailing slash is automatically added by bash's auto-completion, so it'd be convenient if I could leave it on.

[Feature request] Option to skip package building for build-only dependencies

Portmaster currently has an option "-g" that instructs it to build packages. However, in its current state it's all or nothing: either build packages for everything or don't build any packages. I would very much like to see an option that excludes build-only dependencies from having packages built for them. (In other words: "build packages for the port and its run-time dependencies, but not for its build-only dependencies".)

WRKDIRPREFIX cleanup should be optional

I'm talking about this: p@c0e147a

On my systems this tends to make portmaster effectively hang for anywhere between 3 to 15 seconds after aborting installs/updates.

Considering that relatively large and possibly huge amounts of disk are required for building ports, any savings that can be obtained from deleting empty directories ought to be irrelevant. But it makes quitting (and therefore using) portmaster quite annoying.

--no-confirm ignored on package creation

portmaster/portmaster

Lines 1689 to 1697 in b375cf0

echo -e "\n===>>> Package creation failed for ${2}!\n"
[ -n "$backup" -a -n "$PM_IGNORE_FAILED_BACKUP_PACKAGE" ] && return
echo "===>>> Ignore this error [i]"
echo "===>>> Abort update [a]"
echo "===>>> Retry [r]"
echo -e "\n===>>> How would you like to proceed? [i] \c"
read answer ; echo ''

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.