if "new" in params:
glsalist = todolist
params.remove("new")
-
+
if "all" in params:
glsalist = completelist
params.remove("all")
fd1.write(")")
if list_cve:
fd1.write(" "+(",".join([r[:13] for r in myglsa.references if r[:4] in ["CAN-", "CVE-"]])))
- fd1.write("\n")
+ fd1.write("\n")
return 0
if mode == "list":
import portage.mail, socket
from io import StringIO
from email.mime.text import MIMEText
-
+
# color doesn't make any sense for mail
nocolor()
myrecipient = portage.settings["PORTAGE_ELOG_MAILURI"].split()[0]
else:
myrecipient = "root@localhost"
-
+
if "PORTAGE_ELOG_MAILFROM" in portage.settings:
myfrom = portage.settings["PORTAGE_ELOG_MAILFROM"]
else:
myglsa.dump(outstream=myfd)
myattachments.append(MIMEText(str(myfd.getvalue()), _charset="utf8"))
myfd.close()
-
+
mymessage = portage.mail.create_message(myfrom, myrecipient, mysubject, summary, myattachments)
portage.mail.send_mail(portage.settings, mymessage)
-
+
sys.exit(0)
-
+
# something wrong here, all valid paths are covered with sys.exit()
sys.stderr.write("nothing more to do\n")
sys.exit(2)
# Check for files built without respecting LDFLAGS
if [[ "${LDFLAGS}" == *,--hash-style=gnu* ]] && \
- ! has binchecks ${RESTRICT} ; then
+ ! has binchecks ${RESTRICT} ; then
f=$(scanelf -qyRF '%k %p' -k .hash "${ED}" | sed -e "s:\.hash ::")
if [[ -n ${f} ]] ; then
echo "${f}" > "${T}"/scanelf-ignored-LDFLAGS.log
done
done
- # When installing static libraries into /usr/lib and shared libraries into
- # /lib, we have to make sure we have a linker script in /usr/lib along side
+ # When installing static libraries into /usr/lib and shared libraries into
+ # /lib, we have to make sure we have a linker script in /usr/lib along side
# the static library, or gcc will utilize the static lib when linking :(.
# http://bugs.gentoo.org/4411
abort="no"
(
eval "$(/usr/sbin/selinuxconfig)" || \
die "Failed to determine SELinux policy paths.";
-
+
addwrite /selinux/context
addwrite /sys/fs/selinux/context
-
+
/usr/sbin/setfiles "${file_contexts_path}" -r "${D}" "${D}"
) || die "Failed to set SELinux security labels."
else
class RepomanHelpFormatter(optparse.IndentedHelpFormatter):
"""Repoman needs it's own HelpFormatter for now, because the default ones
murder the help text."""
-
+
def __init__(self, indent_increment=1, max_help_position=24, width=150, short_first=1):
optparse.HelpFormatter.__init__(self, indent_increment, max_help_position, width, short_first)
class RepomanOptionParser(optparse.OptionParser):
"""Add the on_tail function, ruby has it, optionParser should too
"""
-
+
def __init__(self, *args, **kwargs):
optparse.OptionParser.__init__(self, *args, **kwargs)
self.tail = ""
'help' : 'Show this screen',
'manifest' : 'Generate a Manifest (fetches files if necessary)',
'manifest-check' : 'Check Manifests for missing or incorrect digests',
- 'scan' : 'Scan directory tree for QA issues'
+ 'scan' : 'Scan directory tree for QA issues'
}
mode_keys = list(modes)
parser.add_option('-p', '--pretend', dest='pretend', default=False,
action='store_true', help='don\'t commit or fix anything; just show what would be done')
-
+
parser.add_option('-q', '--quiet', dest="quiet", action="count", default=0,
help='do not print unnecessary messages')
parser.add_option('--without-mask', dest='without_mask', action='store_true',
default=False, help='behave as if no package.mask entries exist (not allowed with commit mode)')
- parser.add_option('--mode', type='choice', dest='mode', choices=list(modes),
+ parser.add_option('--mode', type='choice', dest='mode', choices=list(modes),
help='specify which mode repoman will run in (default=full)')
parser.on_tail("\n " + green("Modes".ljust(20) + " Description\n"))
if not opts.mode:
opts.mode = 'full'
-
+
if opts.mode == 'ci':
opts.mode = 'commit' # backwards compat shortcut
"KEYWORDS.dropped":"Ebuilds that appear to have dropped KEYWORDS for some arch",
"KEYWORDS.missing":"Ebuilds that have a missing or empty KEYWORDS variable",
"KEYWORDS.stable":"Ebuilds that have been added directly with stable KEYWORDS",
- "KEYWORDS.stupid":"Ebuilds that use KEYWORDS=-* instead of package.mask",
+ "KEYWORDS.stupid":"Ebuilds that use KEYWORDS=-* instead of package.mask",
"LICENSE.missing":"Ebuilds that have a missing or empty LICENSE variable",
"LICENSE.virtual":"Virtuals that have a non-empty LICENSE variable",
"DESCRIPTION.missing":"Ebuilds that have a missing or empty DESCRIPTION variable",
if check_changelog and "ChangeLog" not in checkdirlist:
stats["changelog.missing"]+=1
fails["changelog.missing"].append(x+"/ChangeLog")
-
+
musedict = {}
#metadata.xml file check
if "metadata.xml" not in checkdirlist:
badlicsyntax = len([z for z in type_list if z == "LICENSE"])
badprovsyntax = len([z for z in type_list if z == "PROVIDE"])
- baddepsyntax = len(type_list) != badlicsyntax + badprovsyntax
+ baddepsyntax = len(type_list) != badlicsyntax + badprovsyntax
badlicsyntax = badlicsyntax > 0
badprovsyntax = badprovsyntax > 0
for mypos in range(len(myuse)):
stats["IUSE.invalid"]=stats["IUSE.invalid"]+1
- fails["IUSE.invalid"].append(x+"/"+y+".ebuild: %s" % myuse[mypos])
+ fails["IUSE.invalid"].append(x+"/"+y+".ebuild: %s" % myuse[mypos])
# license checks
if not badlicsyntax:
# A missing profile will create an error further down
# during the KEYWORDS verification.
continue
-
+
for prof in profiles[arch]:
if prof.status not in ("stable", "dev") or \
suffix=suffix+"indev"
for mytype in Package._dep_keys:
-
+
mykey = "dependency.bad" + suffix
myvalue = myaux[mytype]
if not myvalue:
with repoman_popen("hg status --no-status --unknown .") as f:
myunadded = f.readlines()
myunadded = ["./" + elem.rstrip() for elem in myunadded]
-
+
# Mercurial doesn't handle manually deleted files as removed from
# the repository, so the user need to remove them before commit,
# using "hg remove [FILES]"
elif vcs == "svn":
if myfile not in expansion:
continue
-
+
# Subversion keywords are case-insensitive in svn:keywords properties, but case-sensitive in contents of files.
enabled_keywords = []
for k in expansion[myfile]: