found=1
fi
+ if [[ $EBUILD_PHASE = depend ]] ; then
+ # Skip this for older EAPIs since lots of ebuilds/eclasses
+ # have stuff in global scope that really belongs somewhere
+ # like pkg_setup or src_configure.
+ if [[ -n $EAPI ]] && ! hasq "$EAPI" 0 1 2 ; then
+ die "use() called during invalid phase: $EBUILD_PHASE"
+ fi
+
# Make sure we have this USE flag in IUSE
- if [[ -n $PORTAGE_IUSE && -n $EBUILD_PHASE ]] ; then
+ elif [[ -n $PORTAGE_IUSE && -n $EBUILD_PHASE ]] ; then
[[ $u =~ $PORTAGE_IUSE ]] || \
eqawarn "QA Notice: USE Flag '${u}' not" \
"in IUSE for ${CATEGORY}/${PF}"
\-\-sysconfdir="${EPREFIX}"/etc \\
\-\-localstatedir="${EPREFIX}"/var/lib \\
\fI${EXTRA_ECONF}\fR \\
- \fIconfigure options\fR
+ \fIconfigure options\fR || die "econf failed"
.fi
Note that the \fIEXTRA_ECONF\fR is for users only, not for ebuild
writers. If you wish to pass more options to configure, just pass the
-extra arguements to \fBeconf\fR.
+extra arguments to \fBeconf\fR. Also note that \fBeconf\fR automatically
+calls \fBdie\fR if the configure script fails.
.TP
\fBemake\fR \fI[make options]\fR
This is used as a replacement for make. Performs 'make ${MAKEOPTS}
.BR "Quality is job zero."
.BR repoman
-is meant for Gentoo developers only due to the fact it does not work on a per-ebuild basis.
-It checks the quality of CVS repositories.
+checks the quality of ebuild repositories.
-Note: \fBrepoman commit\fR only works \fIinside local\fR CVS repositories.
+Note: \fBrepoman commit\fR only works \fIinside local\fR cvs, git, or subversion repositories.
.SH OPTIONS
.TP
\fB--force\fR
Attributes Hardness
- not satisfied and buildtime 8
- not satisfied and runtime 7
- not satisfied and runtime_post 6
- satisfied and buildtime and rebuild 5
- satisfied and buildtime 4
- satisfied and runtime 3
- satisfied and runtime_post 2
- optional 1
- (none of the above) 0
+ buildtime 0
+ runtime -1
+ runtime_post -2
+ optional -3
+ (none of the above) -4
"""
- if not self.satisfied:
- if self.buildtime:
- return 8
- if self.runtime:
- return 7
- if self.runtime_post:
- return 6
+
if self.buildtime:
- if self.rebuild:
- return 5
- return 4
+ return 0
if self.runtime:
- return 3
+ return -1
if self.runtime_post:
- return 2
+ return -2
if self.optional:
- return 1
- return 0
+ return -3
+ return -4
def __str__(self):
if self.optional:
myopts["--pretend"] = True
del myopts["--ask"]
print ("%s access is required... " + \
- "adding --pretend to options.\n") % access_desc
+ "adding --pretend to options\n") % access_desc
if portage.secpass < 1 and not need_superuser:
portage_group_warning()
else:
- sys.stderr.write(("emerge: %s access is " + \
- "required.\n\n") % access_desc)
+ sys.stderr.write(("emerge: %s access is required\n") \
+ % access_desc)
if portage.secpass < 1 and not need_superuser:
portage_group_warning()
return 1
except exception.InvalidDependString:
licenses = set()
licenses.discard('||')
- if '*' not in settings._accept_license:
- licenses.intersection_update(settings._accept_license)
+ # Do not expand * here, since that would make it appear to the
+ # check_license() function as if the user has accepted licenses
+ # which have not really been explicitly accepted.
+ licenses.intersection_update(settings._accept_license)
return ' '.join(sorted(licenses))
def _restrict(self, use, settings):
myfile_path = os.path.join(mysettings["DISTDIR"], myfile)
has_space = True
- has_space_superuser = False
+ has_space_superuser = True
file_lock = None
if listonly:
writemsg_stdout("\n", noiselevel=-1)
if (size - mysize + vfs_stat.f_bsize) >= \
(vfs_stat.f_bsize * vfs_stat.f_bfree):
- has_space_superuser = True
+ has_space_superuser = False
if not has_space_superuser:
has_space = False
eout.eend(0)
for f in myfiles:
eout.ebegin("checking %s ;-)" % f)
- mf.checkFileHashes(mf.findFile(f), f)
+ ftype = mf.findFile(f)
+ if ftype is None:
+ raise KeyError(f)
+ mf.checkFileHashes(ftype, f)
eout.eend(0)
except KeyError, e:
eout.eend(1)
mysettings.setcpv(mypkg, mydb=self)
useflags = mysettings["PORTAGE_USE"].split()
uri_map = self.getFetchMap(mypkg, useflags=useflags, mytree=mytree)
- uris = set()
- for uri_set in uri_map.itervalues():
- uris.update(uri_set)
- return [list(uris), uri_map.keys()]
+
+ all_uris = []
+ all_files = []
+ for filename, uris in uri_map.iteritems():
+ for uri in uris:
+ all_uris.append(uri)
+ all_files.append(filename)
+
+ return [all_uris, all_files]
def getfetchsizes(self, mypkg, useflags=None, debug=0):
# returns a filename:size dictionnary of remaining downloads
class SrcUnpackPatches(LineCheck):
repoman_check_name = 'ebuild.minorsyn'
+ ignore_line = re.compile(r'(^\s*#)')
src_unpack_re = re.compile(r'^src_unpack\(\)')
func_end_re = re.compile(r'^\}$')
src_prepare_tools_re = re.compile(r'\s(e?patch|sed)\s')