From 35bad4e5651c6c4a48d497ef1f2bda430862f860 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Fri, 14 Sep 2007 20:21:37 +0000 Subject: [PATCH] Merged from trunk 7773:7780 | 7774 | Bug #192321 - Clean dir.old cruft so that they don't prevent | | zmedico | unmerge of otherwise empty directories. | | 7775 | Bug #110443 - Add a KEYWORDS.stable check for ebuilds that | | zmedico | are added directly with stable KEYWORDS. | | 7776 | Bug #191645 - Document the --force option. | | zmedico | | | 7777 | Add some additional notes about the behavior of | | zmedico | FEATURES=assume-digests under various conditions. | | 7778 | Bug #191645 - Cross-reference the `ebuild --force digest` | | zmedico | docs with the FEATURES=assume-digests docs. | | 7779 | Bug #192346 - The emerge --help shows a -i option that does | | zmedico | not exist. | | 7780 | Bug #192341 - Make emerge bail out on FreeBSD if the freebsd | | zmedico | python module fails to import. Display a notification that | | | "ignore-missing-freebsd-module" can be added to FEATURES in | | | order to bypass the error. If that feature is enabled but | | | the freebsd python module imported successfully, show a | | | warning message since the user should remove if from | | | FEATURES asap. | svn path=/main/branches/prefix/; revision=7783 --- man/ebuild.1 | 13 ++++++++++-- man/make.conf.5 | 7 ++++++- man/repoman.1 | 3 +++ pym/emerge/__init__.py | 47 ++++++++++++++++++++++++++++++++++++++++++ pym/emerge/help.py | 2 +- 5 files changed, 68 insertions(+), 4 deletions(-) diff --git a/man/ebuild.1 b/man/ebuild.1 index 8e4a0d67d..e7ebabfe0 100644 --- a/man/ebuild.1 +++ b/man/ebuild.1 @@ -66,8 +66,11 @@ and ebuild exits with an error code of 1. .BR digest Creates a digest file for the package in /usr/portage/[category]/[package]/files/. This digest file lists the -md5sums of all the files found in the SRC_URI. If the fetched source -of the package is corrupt/bogus in some way, the md5sum will catch this. +checksums of all the files found in the SRC_URI. See the \fB\-\-force\fR +option if you would like to prevent digests from being assumed. For further +information regarding the behavior of this command, see the documentation for +the \fIassume\-digests\fR value of the \fBFEATURES\fR variable in +\fBmake.conf\fR(5). .TP .BR manifest Updates the manifest file for the package. This performs the second half @@ -167,6 +170,12 @@ ${PKGDIR}/${CATEGORY} that points to the package in ${PKGDIR}/All. Builds a RedHat RPM package from the files in the temporary \fIinstall directory\fR. At the moment, the ebuild's dependency information is not incorporated into the RPM. +.SH OPTIONS +.TP +\fB--force\fR +When used together with the digest command, this option forces regeneration of +digests for all distfiles associated with the current ebuild. Any distfiles +that do not already exist in ${DISTDIR} will be automatically fetched. .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .SH "AUTHORS" diff --git a/man/make.conf.5 b/man/make.conf.5 index 0071a480f..02bc326f1 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -135,7 +135,12 @@ an incremental variable. When commiting work to cvs with \fBrepoman\fR(1), assume that all existing SRC_URI digests are correct. This feature also affects digest generation via \fBebuild\fR(1) and \fBemerge\fR(1) (emerge generates digests only when the -\fIdigest\fR feature is enabled). +\fIdigest\fR feature is enabled). Existing digests for files that do not exist +in ${DISTDIR} will be automatically assumed even when \fIassume\-digests\fR is +not enabled. If a file exists in ${DISTDIR} but it's size does not match the +existing digest, the digest will be regenerated regardless of the whether or +not \fIassume\-digests\fR is enabled. The \fBebuild\fR(1) \fBdigest\fR command +has a \fB\-\-force\fR option that can be used to force regeneration of digests. .TP .B buildpkg Binary packages will be created for all packages that are merged. diff --git a/man/repoman.1 b/man/repoman.1 index 31fc3efea..98efbed09 100644 --- a/man/repoman.1 +++ b/man/repoman.1 @@ -105,6 +105,9 @@ This ebuild contains KEYWORDS that are not listed in profiles/arch.list or for w .B KEYWORDS.missing Ebuilds that have a missing or empty KEYWORDS variable .TP +.B KEYWORDS.stable +Ebuilds that have been added directly with stable KEYWORDS +.TP .B KEYWORDS.stupid Ebuilds that use KEYWORDS=-* instead of package.mask .TP diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index c22c11c60..f6d97fdad 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -4367,6 +4367,16 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval): raise del e + # Clean dir.old cruft so that they don't prevent + # unmerge of otherwise empty directories. + for ext in dir_extensions: + try: + os.unlink(dir_file + ext + ".old") + except EnvironmentError, e: + if e.errno != errno.ENOENT: + raise + del e + #update mtime so we can potentially avoid regenerating. prev_mtimes[inforoot] = long(os.stat(inforoot).st_mtime) @@ -6143,6 +6153,43 @@ def validate_ebuild_environment(trees): print >> sys.stderr, bad("\a!!! Is the symlink correct? " + \ "Is your portage tree complete?\n") sys.exit(9) + if myroot == "/" and \ + portage.data.ostype == "FreeBSD": + ignore_missing = "ignore-missing-freebsd-module" + msg = None + die = False + if portage.bsd_chflags is not None and \ + ignore_missing in mysettings.features: + msg = \ + "Do NOT forget to remove \"%s\" " % ignore_missing + \ + "from FEATURES as soon as " + \ + "the freebsd python module has been properly " + \ + "installed." + elif portage.bsd_chflags is None and \ + ignore_missing not in mysettings.features: + die = True + msg = \ + "An error occurred while attempting to import the " + \ + "freebsd python module. This usually means that " + \ + "python has just been upgraded and the py-freebsd " + \ + "package has not yet been rebuilt by python-updater. " + \ + "The freebsd python module is required for proper " + \ + "operation. Please install or rebuild py-freebsd as " + \ + "soon as possible. In order to bypass this error, " + \ + "add \"%s\" to FEATURES. " % ignore_missing + \ + "Do NOT forget to remove it from FEATURES as soon as " + \ + "the freebsd python module has been properly " + \ + "installed." + if msg: + width = 72 # leave room for the " * " prefix + from textwrap import wrap + for line in wrap(msg, width): + sys.stderr.write(bad(" * ")) + sys.stderr.write(line) + sys.stderr.write("\n") + sys.stderr.flush() + if die: + sys.exit(9) del myroot, mysettings def load_emerge_config(trees=None): diff --git a/pym/emerge/help.py b/pym/emerge/help.py index ee0ba19ee..5bb93a1f4 100644 --- a/pym/emerge/help.py +++ b/pym/emerge/help.py @@ -14,7 +14,7 @@ def shorthelp(): print " "+turquoise("emerge")+" < "+turquoise("--sync")+" | "+turquoise("--metadata")+" | "+turquoise("--info")+" >" print " "+turquoise("emerge")+" "+turquoise("--resume")+" [ "+green("--pretend")+" | "+green("--ask")+" | "+green("--skipfirst")+" ]" print " "+turquoise("emerge")+" "+turquoise("--help")+" [ "+green("system")+" | "+green("world")+" | "+green("--sync")+" ] " - print bold("Options:")+" "+green("-")+"["+green("abBcCdDefgGhikKlnNoOpqPsStuvV")+"] ["+green("--oneshot")+"] ["+green("--newuse")+"] ["+green("--noconfmem")+"]" + print bold("Options:")+" "+green("-")+"["+green("abBcCdDefgGhkKlnNoOpqPsStuvV")+"] ["+green("--oneshot")+"] ["+green("--newuse")+"] ["+green("--noconfmem")+"]" print " [ " + green("--color")+" < " + turquoise("y") + " | "+ turquoise("n")+" > ] [ "+green("--columns")+" ]" print " [ "+green("--reinstall ")+turquoise("changed-use")+" ] ["+green("--nospinner")+"]" print " [ "+green("--deep")+" ] [" + green("--with-bdeps")+" < " + turquoise("y") + " | "+ turquoise("n")+" > ]" -- 2.26.2