Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 911276 | Differences between
and this patch

Collapse All | Expand All

(-)a/bin/ebuild (-3 / +7 lines)
Lines 75-81 try: Link Here
75
        "When used together with the digest or manifest "
75
        "When used together with the digest or manifest "
76
        + "command, this option forces regeneration of digests for all "
76
        + "command, this option forces regeneration of digests for all "
77
        + "distfiles associated with the current ebuild. Any distfiles "
77
        + "distfiles associated with the current ebuild. Any distfiles "
78
        + "that do not already exist in ${DISTDIR} will be automatically fetched."
78
        + "that do not already exist in ${DISTDIR} will be automatically fetched. "
79
        + "When used with other commands, forces command execution even if phase "
80
        + "has already ran.  Enabling force in FEATURES gives this same effect."
79
    )
81
    )
80
82
81
    parser.add_argument("--force", help=force_help, action="store_true")
83
    parser.add_argument("--force", help=force_help, action="store_true")
Lines 113-119 try: Link Here
113
        opts, pargs = parser.parse_known_args(default_opts + sys.argv[1:])
115
        opts, pargs = parser.parse_known_args(default_opts + sys.argv[1:])
114
116
115
    debug = opts.debug
117
    debug = opts.debug
116
    force = opts.force
117
118
118
    if debug:
119
    if debug:
119
        # Ensure that all config instances have this setting,
120
        # Ensure that all config instances have this setting,
Lines 364-369 try: Link Here
364
    # portdb.porttrees in order to accomplish this).
365
    # portdb.porttrees in order to accomplish this).
365
    tmpsettings.setcpv(pkg)
366
    tmpsettings.setcpv(pkg)
366
367
368
    if opts.force:
369
        tmpsettings.features.add("force")
370
367
    def stale_env_warning():
371
    def stale_env_warning():
368
        if (
372
        if (
369
            "clean" not in pargs
373
            "clean" not in pargs
Lines 401-407 try: Link Here
401
                stale_env_warning()
405
                stale_env_warning()
402
                checked_for_stale_env = True
406
                checked_for_stale_env = True
403
407
404
            if arg in ("digest", "manifest") and force:
408
            if arg in ("digest", "manifest") and "force" in tmpsettings.features:
405
                discard_digests(ebuild, tmpsettings, portage.portdb)
409
                discard_digests(ebuild, tmpsettings, portage.portdb)
406
            a = portage.doebuild(
410
            a = portage.doebuild(
407
                ebuild,
411
                ebuild,
(-)a/bin/phase-functions.sh (-7 / +7 lines)
Lines 227-233 __ebuild_phase_with_hooks() { Link Here
227
}
227
}
228
228
229
__dyn_pretend() {
229
__dyn_pretend() {
230
	if [[ -e ${PORTAGE_BUILDDIR}/.pretended ]] ; then
230
	if [[ -e ${PORTAGE_BUILDDIR}/.pretended ]] && ! has force ${FEATURES} ; then
231
		__vecho ">>> It appears that '${PF}' is already pretended; skipping."
231
		__vecho ">>> It appears that '${PF}' is already pretended; skipping."
232
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.pretended' to force pretend."
232
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.pretended' to force pretend."
233
		return 0
233
		return 0
Lines 241-247 __dyn_pretend() { Link Here
241
}
241
}
242
242
243
__dyn_setup() {
243
__dyn_setup() {
244
	if [[ -e ${PORTAGE_BUILDDIR}/.setuped ]] ; then
244
	if [[ -e ${PORTAGE_BUILDDIR}/.setuped ]] && ! has force ${FEATURES} ; then
245
		__vecho ">>> It appears that '${PF}' is already setup; skipping."
245
		__vecho ">>> It appears that '${PF}' is already setup; skipping."
246
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.setuped' to force setup."
246
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.setuped' to force setup."
247
		return 0
247
		return 0
Lines 384-390 __has_phase_defined_up_to() { Link Here
384
384
385
__dyn_prepare() {
385
__dyn_prepare() {
386
386
387
	if [[ -e ${PORTAGE_BUILDDIR}/.prepared ]] ; then
387
	if [[ -e ${PORTAGE_BUILDDIR}/.prepared ]] && ! has force ${FEATURES} ; then
388
		__vecho ">>> It appears that '${PF}' is already prepared; skipping."
388
		__vecho ">>> It appears that '${PF}' is already prepared; skipping."
389
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.prepared' to force prepare."
389
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.prepared' to force prepare."
390
		return 0
390
		return 0
Lines 420-426 __dyn_prepare() { Link Here
420
}
420
}
421
421
422
__dyn_configure() {
422
__dyn_configure() {
423
	if [[ -e ${PORTAGE_BUILDDIR}/.configured ]] ; then
423
	if [[ -e ${PORTAGE_BUILDDIR}/.configured ]] && ! has force ${FEATURES} ; then
424
		__vecho ">>> It appears that '${PF}' is already configured; skipping."
424
		__vecho ">>> It appears that '${PF}' is already configured; skipping."
425
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.configured' to force configuration."
425
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.configured' to force configuration."
426
		return 0
426
		return 0
Lines 452-458 __dyn_configure() { Link Here
452
}
452
}
453
453
454
__dyn_compile() {
454
__dyn_compile() {
455
	if [[ -e ${PORTAGE_BUILDDIR}/.compiled ]] ; then
455
	if [[ -e ${PORTAGE_BUILDDIR}/.compiled ]] && ! has force ${FEATURES} ; then
456
		__vecho ">>> It appears that '${PF}' is already compiled; skipping."
456
		__vecho ">>> It appears that '${PF}' is already compiled; skipping."
457
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.compiled' to force compilation."
457
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.compiled' to force compilation."
458
		return 0
458
		return 0
Lines 484-490 __dyn_compile() { Link Here
484
}
484
}
485
485
486
__dyn_test() {
486
__dyn_test() {
487
	if [[ -e ${PORTAGE_BUILDDIR}/.tested ]] ; then
487
	if [[ -e ${PORTAGE_BUILDDIR}/.tested ]] && ! has force ${FEATURES} ; then
488
		__vecho ">>> It appears that ${PN} has already been tested; skipping."
488
		__vecho ">>> It appears that ${PN} has already been tested; skipping."
489
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.tested' to force test."
489
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.tested' to force test."
490
		return
490
		return
Lines 535-541 __dyn_install() { Link Here
535
535
536
	if has noauto ${FEATURES} ; then
536
	if has noauto ${FEATURES} ; then
537
		rm -f "${PORTAGE_BUILDDIR}/.installed"
537
		rm -f "${PORTAGE_BUILDDIR}/.installed"
538
	elif [[ -e ${PORTAGE_BUILDDIR}/.installed ]] ; then
538
	elif [[ -e ${PORTAGE_BUILDDIR}/.installed ]] && ! has force ${FEATURES} ; then
539
		__vecho ">>> It appears that '${PF}' is already installed; skipping."
539
		__vecho ">>> It appears that '${PF}' is already installed; skipping."
540
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.installed' to force install."
540
		__vecho ">>> Remove '${PORTAGE_BUILDDIR}/.installed' to force install."
541
		return 0
541
		return 0
(-)a/lib/portage/const.py (+1 lines)
Lines 155-160 SUPPORTED_FEATURES = frozenset( Link Here
155
        "fail-clean",
155
        "fail-clean",
156
        "fakeroot",
156
        "fakeroot",
157
        "fixlafiles",
157
        "fixlafiles",
158
        "force",
158
        "force-mirror",
159
        "force-mirror",
159
        "getbinpkg",
160
        "getbinpkg",
160
        "gpg-keepalive",
161
        "gpg-keepalive",
(-)a/lib/portage/package/ebuild/doebuild.py (-1 / +2 lines)
Lines 2163-2169 def spawnebuild( Link Here
2163
    if mydo == "pretend" and not eapi_has_pkg_pretend(eapi):
2163
    if mydo == "pretend" and not eapi_has_pkg_pretend(eapi):
2164
        return os.EX_OK
2164
        return os.EX_OK
2165
2165
2166
    if not (mydo == "install" and "noauto" in mysettings.features):
2166
    if (not (mydo == "install" and "noauto" in mysettings.features) and "force" not in
2167
            mysettings.features):
2167
        check_file = os.path.join(
2168
        check_file = os.path.join(
2168
            mysettings["PORTAGE_BUILDDIR"], f".{mydo.rstrip('e')}ed"
2169
            mysettings["PORTAGE_BUILDDIR"], f".{mydo.rstrip('e')}ed"
2169
        )
2170
        )

Return to bug 911276