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 (-2 / +4 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 already ran."
79
    )
80
    )
80
81
81
    parser.add_argument("--force", help=force_help, action="store_true")
82
    parser.add_argument("--force", help=force_help, action="store_true")
Lines 371-377 try: Link Here
371
            and build_dir_phases.intersection(pargs)
372
            and build_dir_phases.intersection(pargs)
372
        ):
373
        ):
373
            portage.doebuild_environment(
374
            portage.doebuild_environment(
374
                ebuild, "setup", portage.root, tmpsettings, debug, 1, portage.portdb
375
                ebuild, "setup", portage.root, tmpsettings, debug, 1, portage.portdb, force
375
            )
376
            )
376
            env_filename = os.path.join(tmpsettings["T"], "environment")
377
            env_filename = os.path.join(tmpsettings["T"], "environment")
377
            if os.path.exists(env_filename):
378
            if os.path.exists(env_filename):
Lines 410-415 try: Link Here
410
                debug=debug,
411
                debug=debug,
411
                tree=mytree,
412
                tree=mytree,
412
                vartree=portage.db[portage.root]["vartree"],
413
                vartree=portage.db[portage.root]["vartree"],
414
                force=force,
413
            )
415
            )
414
        except PortageKeyError:
416
        except PortageKeyError:
415
            # aux_get error
417
            # aux_get error
(-)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 && ${PORTAGE_FORCE} != 1 ]] ; 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 && ${PORTAGE_FORCE} != 1 ]] ; 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 && ${PORTAGE_FORCE} != 1 ]] ; 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 && ${PORTAGE_FORCE} != 1 ]] ; 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 && ${PORTAGE_FORCE} != 1 ]] ; 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 && ${PORTAGE_FORCE} != 1 ]] ; 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 && ${PORTAGE_FORCE} != 1 ]] ; 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/package/ebuild/doebuild.py (-3 / +8 lines)
Lines 323-329 def _doebuild_path(settings, eapi=None): Link Here
323
323
324
324
325
def doebuild_environment(
325
def doebuild_environment(
326
    myebuild, mydo, myroot=None, settings=None, debug=False, use_cache=None, db=None
326
    myebuild, mydo, myroot=None, settings=None, debug=False, use_cache=None, db=None, force=False
327
):
327
):
328
    """
328
    """
329
    Create and store environment variable in the config instance
329
    Create and store environment variable in the config instance
Lines 419-424 def doebuild_environment( Link Here
419
        # due to how it's coded... Don't overwrite this so we can use it.
419
        # due to how it's coded... Don't overwrite this so we can use it.
420
        mysettings["PORTAGE_DEBUG"] = "1"
420
        mysettings["PORTAGE_DEBUG"] = "1"
421
421
422
    if force:
423
        mysettings["PORTAGE_FORCE"] = "1"
424
422
    mysettings["EBUILD"] = ebuild_path
425
    mysettings["EBUILD"] = ebuild_path
423
    mysettings["O"] = pkg_dir
426
    mysettings["O"] = pkg_dir
424
    mysettings.configdict["pkg"]["CATEGORY"] = cat
427
    mysettings.configdict["pkg"]["CATEGORY"] = cat
Lines 722-727 def doebuild( Link Here
722
    prev_mtimes=None,
725
    prev_mtimes=None,
723
    fd_pipes=None,
726
    fd_pipes=None,
724
    returnpid=False,
727
    returnpid=False,
728
    force=False
725
):
729
):
726
    """
730
    """
727
    Wrapper function that invokes specific ebuild phases through the spawning
731
    Wrapper function that invokes specific ebuild phases through the spawning
Lines 1002-1008 def doebuild( Link Here
1002
            mysettings["PORTAGE_TMPDIR"] = tmpdir
1006
            mysettings["PORTAGE_TMPDIR"] = tmpdir
1003
1007
1004
        doebuild_environment(
1008
        doebuild_environment(
1005
            myebuild, mydo, myroot, mysettings, debug, use_cache, mydbapi
1009
            myebuild, mydo, myroot, mysettings, debug, use_cache, mydbapi, force
1006
        )
1010
        )
1007
1011
1008
        if mydo in clean_phases:
1012
        if mydo in clean_phases:
Lines 2163-2169 def spawnebuild( Link Here
2163
    if mydo == "pretend" and not eapi_has_pkg_pretend(eapi):
2167
    if mydo == "pretend" and not eapi_has_pkg_pretend(eapi):
2164
        return os.EX_OK
2168
        return os.EX_OK
2165
2169
2166
    if not (mydo == "install" and "noauto" in mysettings.features):
2170
    if (not (mydo == "install" and "noauto" in mysettings.features) and not
2171
            mysettings.get("PORTAGE_FORCE") == "1"):
2167
        check_file = os.path.join(
2172
        check_file = os.path.join(
2168
            mysettings["PORTAGE_BUILDDIR"], f".{mydo.rstrip('e')}ed"
2173
            mysettings["PORTAGE_BUILDDIR"], f".{mydo.rstrip('e')}ed"
2169
        )
2174
        )

Return to bug 911276