aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-07-01 15:11:08 +0200
committerFabian Groffen <grobian@gentoo.org>2019-07-01 15:11:08 +0200
commit9d65486e25c731330509fa29e8d92c776f70987e (patch)
tree3a1ac9c3b4717e981b7c883fe5933fbb40677937
parentbin/chmod-lite: fix shebang (diff)
parentUpdates for portage-2.3.68 release (diff)
downloadportage-9d65486e.tar.gz
portage-9d65486e.tar.bz2
portage-9d65486e.zip
Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--RELEASE-NOTES8
-rwxr-xr-xbin/ebuild.sh1
-rw-r--r--cnf/make.globals2
-rw-r--r--lib/portage/_compat_upgrade/default_locations.py13
-rw-r--r--lib/portage/dbapi/porttree.py12
-rw-r--r--lib/portage/package/ebuild/config.py7
-rw-r--r--lib/portage/package/ebuild/doebuild.py18
-rw-r--r--lib/portage/sync/syncbase.py3
-rw-r--r--lib/portage/util/install_mask.py8
-rw-r--r--man/emerge.13
-rw-r--r--man/make.conf.54
-rw-r--r--repoman/RELEASE-NOTES18
-rw-r--r--repoman/cnf/linechecks/linechecks.yaml1
-rw-r--r--repoman/lib/repoman/modules/linechecks/gentoo_header/header.py51
-rw-r--r--repoman/lib/repoman/modules/scan/metadata/ebuild_metadata.py4
-rwxr-xr-xrepoman/setup.py2
-rwxr-xr-xsetup.py2
17 files changed, 102 insertions, 55 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index cb220be35..8cec50a3c 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,6 +1,14 @@
Release Notes; upgrade information mainly.
Features/major bugfixes are listed in NEWS
+portage-2.3.68
+==================================
+* Bug Fixes:
+ - Bug 687814 config: don't swallow IOError for "packages" files
+ - Bug 688124 fix emerge fetch download size calculation for resume
+ - Bug 688648 fix emerge --sync keyserver None message
+
+
portage-2.3.67
==================================
* Bug Fixes:
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index ce3120d19..f8955d2da 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -8,6 +8,7 @@ unalias -a
# Make sure this isn't exported to scripts we execute.
unset BASH_COMPAT
+export -n -f ___in_portage_iuse
source "${PORTAGE_BIN_PATH}/isolated-functions.sh" || exit 1
diff --git a/cnf/make.globals b/cnf/make.globals
index 6a1d3b952..d16f14636 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -29,7 +29,7 @@ ACCEPT_RESTRICT="*"
# Miscellaneous paths
DISTDIR="@PORTAGE_EPREFIX@/var/cache/distfiles"
PKGDIR="@PORTAGE_EPREFIX@/var/cache/binpkgs"
-RPMDIR="@PORTAGE_EPREFIX@/usr/portage/rpm"
+RPMDIR="@PORTAGE_EPREFIX@/var/cache/rpm"
# Temporary build directory
PORTAGE_TMPDIR="@PORTAGE_EPREFIX@/var/tmp"
diff --git a/lib/portage/_compat_upgrade/default_locations.py b/lib/portage/_compat_upgrade/default_locations.py
index 91f300637..e61a72e3d 100644
--- a/lib/portage/_compat_upgrade/default_locations.py
+++ b/lib/portage/_compat_upgrade/default_locations.py
@@ -9,6 +9,7 @@ from portage.const import GLOBAL_CONFIG_PATH
COMPAT_DISTDIR = 'usr/portage/distfiles'
COMPAT_PKGDIR = 'usr/portage/packages'
+COMPAT_RPMDIR = 'usr/portage/rpm'
COMPAT_MAIN_REPO = 'usr/portage'
@@ -46,13 +47,19 @@ def main():
except OSError:
do_pkgdir = False
+ compat_rpmdir = os.path.join(portage.const.EPREFIX or '/', COMPAT_RPMDIR)
+ try:
+ do_rpmdir = os.path.samefile(config['RPMDIR'], compat_rpmdir)
+ except OSError:
+ do_rpmdir = False
+
compat_main_repo = os.path.join(portage.const.EPREFIX or '/', COMPAT_MAIN_REPO)
try:
do_main_repo = os.path.samefile(config.repositories.mainRepoLocation(), compat_main_repo)
except OSError:
do_main_repo = False
- if do_distdir or do_pkgdir:
+ if do_distdir or do_pkgdir or do_rpmdir:
config_path = os.path.join(os.environ['ED'], GLOBAL_CONFIG_PATH.lstrip(os.sep), 'make.globals')
with open(config_path) as f:
content = f.read()
@@ -64,6 +71,10 @@ def main():
compat_setting = 'PKGDIR="{}"'.format(compat_pkgdir)
out.einfo('Setting make.globals default {} for backward compatibility'.format(compat_setting))
content = re.sub('^PKGDIR=.*$', compat_setting, content, flags=re.MULTILINE)
+ if do_rpmdir:
+ compat_setting = 'RPMDIR="{}"'.format(compat_rpmdir)
+ out.einfo('Setting make.globals default {} for backward compatibility'.format(compat_setting))
+ content = re.sub('^RPMDIR=.*$', compat_setting, content, flags=re.MULTILINE)
with open(config_path, 'wt') as f:
f.write(content)
diff --git a/lib/portage/dbapi/porttree.py b/lib/portage/dbapi/porttree.py
index edff0c2f2..e4b688b9a 100644
--- a/lib/portage/dbapi/porttree.py
+++ b/lib/portage/dbapi/porttree.py
@@ -14,6 +14,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
'portage.dbapi.dep_expand:dep_expand',
'portage.dep:Atom,dep_getkey,match_from_list,use_reduce,_match_slot',
'portage.package.ebuild.doebuild:doebuild',
+ 'portage.package.ebuild.fetch:_download_suffix',
'portage.util:ensure_dirs,shlex_split,writemsg,writemsg_level',
'portage.util.listdir:listdir',
'portage.versions:best,catsplit,catpkgsplit,_pkgsplit@pkgsplit,ver_regexp,_pkg_str',
@@ -844,6 +845,17 @@ class portdbapi(dbapi):
mystat = os.stat(file_path)
except OSError:
pass
+ else:
+ if mystat.st_size != fetch_size:
+ # Use file with _download_suffix instead.
+ mystat = None
+
+ if mystat is None:
+ try:
+ mystat = os.stat(file_path + _download_suffix)
+ except OSError:
+ pass
+
if mystat is None:
existing_size = 0
ro_distdirs = self.settings.get("PORTAGE_RO_DISTDIRS")
diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py
index 137d18d75..7912407c3 100644
--- a/lib/portage/package/ebuild/config.py
+++ b/lib/portage/package/ebuild/config.py
@@ -51,6 +51,7 @@ from portage.util import ensure_dirs, getconfig, grabdict, \
grabdict_package, grabfile, grabfile_package, LazyItemsDict, \
normalize_path, shlex_split, stack_dictlist, stack_dicts, stack_lists, \
writemsg, writemsg_level, _eapi_cache
+from portage.util.install_mask import _raise_exc
from portage.util.path import first_existing
from portage.util._path import exists_raise_eaccess, isdir_raise_eaccess
from portage.versions import catpkgsplit, catsplit, cpv_getkey, _pkg_str
@@ -596,10 +597,8 @@ class config(object):
verify_eapi=True, eapi=x.eapi, eapi_default=None,
allow_build_id=x.allow_build_id)
for x in profiles_complex]
- except IOError as e:
- if e.errno == IsADirectory.errno:
- raise IsADirectory(os.path.join(self.profile_path,
- "packages"))
+ except EnvironmentError as e:
+ _raise_exc(e)
self.packages = tuple(stack_lists(packages_list, incremental=1))
diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py
index 8bef9336b..6671ac1e4 100644
--- a/lib/portage/package/ebuild/doebuild.py
+++ b/lib/portage/package/ebuild/doebuild.py
@@ -2353,7 +2353,7 @@ def _post_src_install_soname_symlinks(mysettings, out):
f.close()
metadata = {}
- for k in ("QA_PREBUILT", "QA_NO_SYMLINK"):
+ for k in ("QA_PREBUILT", "QA_SONAME_NO_SYMLINK"):
try:
with io.open(_unicode_encode(os.path.join(
mysettings["PORTAGE_BUILDDIR"],
@@ -2374,14 +2374,14 @@ def _post_src_install_soname_symlinks(mysettings, out):
fnmatch.translate(x.lstrip(os.sep))
for x in portage.util.shlex_split(qa_prebuilt)))
- qa_no_symlink = metadata.get("QA_NO_SYMLINK", "").split()
- if qa_no_symlink:
- if len(qa_no_symlink) > 1:
- qa_no_symlink = "|".join("(%s)" % x for x in qa_no_symlink)
- qa_no_symlink = "^(%s)$" % qa_no_symlink
+ qa_soname_no_symlink = metadata.get("QA_SONAME_NO_SYMLINK", "").split()
+ if qa_soname_no_symlink:
+ if len(qa_soname_no_symlink) > 1:
+ qa_soname_no_symlink = "|".join("(%s)" % x for x in qa_soname_no_symlink)
+ qa_soname_no_symlink = "^(%s)$" % qa_soname_no_symlink
else:
- qa_no_symlink = "^%s$" % qa_no_symlink[0]
- qa_no_symlink = re.compile(qa_no_symlink)
+ qa_soname_no_symlink = "^%s$" % qa_soname_no_symlink[0]
+ qa_soname_no_symlink = re.compile(qa_soname_no_symlink)
libpaths = set(portage.util.getlibpaths(
mysettings["ROOT"], env=mysettings))
@@ -2490,7 +2490,7 @@ def _post_src_install_soname_symlinks(mysettings, out):
continue
if not is_libdir(os.path.dirname(obj)):
continue
- if qa_no_symlink and qa_no_symlink.match(obj.strip(os.sep)) is not None:
+ if qa_soname_no_symlink and qa_soname_no_symlink.match(obj.strip(os.sep)) is not None:
continue
obj_file_path = os.path.join(image_dir, obj.lstrip(os.sep))
diff --git a/lib/portage/sync/syncbase.py b/lib/portage/sync/syncbase.py
index ae9ec938e..d15bb6d14 100644
--- a/lib/portage/sync/syncbase.py
+++ b/lib/portage/sync/syncbase.py
@@ -252,7 +252,8 @@ class SyncBase(object):
@type openpgp_env: gemato.openpgp.OpenPGPEnvironment
"""
out = portage.output.EOutput(quiet=('--quiet' in self.options['emerge_config'].opts))
- out.ebegin('Refreshing keys from keyserver {s}'.format(s=self.repo.sync_openpgp_keyserver))
+ out.ebegin('Refreshing keys from keyserver{}'.format(
+ ('' if self.repo.sync_openpgp_keyserver is None else ' ' + self.repo.sync_openpgp_keyserver)))
retry_decorator = self._key_refresh_retry_decorator()
if retry_decorator is None:
openpgp_env.refresh_keys(keyserver=self.repo.sync_openpgp_keyserver)
diff --git a/lib/portage/util/install_mask.py b/lib/portage/util/install_mask.py
index 037fc8bc3..0013effa1 100644
--- a/lib/portage/util/install_mask.py
+++ b/lib/portage/util/install_mask.py
@@ -12,7 +12,12 @@ import sys
from portage import os, _unicode_decode
from portage.exception import (
- OperationNotPermitted, PermissionDenied, ReadOnlyFileSystem, FileNotFound)
+ FileNotFound,
+ IsADirectory,
+ OperationNotPermitted,
+ PermissionDenied,
+ ReadOnlyFileSystem,
+)
from portage.util import normalize_path
if sys.hexversion >= 0x3000000:
@@ -127,6 +132,7 @@ class InstallMask(object):
_exc_map = {
+ errno.EISDIR: IsADirectory,
errno.ENOENT: FileNotFound,
errno.EPERM: OperationNotPermitted,
errno.EACCES: PermissionDenied,
diff --git a/man/emerge.1 b/man/emerge.1
index 5dce441f5..f17c01c3b 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -1,4 +1,4 @@
-.TH "EMERGE" "1" "Apr 2019" "Portage VERSION" "Portage"
+.TH "EMERGE" "1" "Jun 2019" "Portage VERSION" "Portage"
.SH "NAME"
emerge \- Command\-line interface to the Portage system
.SH "SYNOPSIS"
@@ -992,6 +992,7 @@ not always be the highest version number due to masking
for testing and development. Package atoms specified on
the command line are greedy, meaning that unspecific
atoms may match multiple versions of slotted packages.
+This option also implies the \fB\-\-selective\fR option.
.TP
.BR "\-\-use\-ebuild\-visibility [ y | n ]"
Use unbuilt ebuild metadata for visibility
diff --git a/man/make.conf.5 b/man/make.conf.5
index 03d24ed4d..4a6c6f401 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -1,4 +1,4 @@
-.TH "MAKE.CONF" "5" "Apr 2019" "Portage VERSION" "Portage"
+.TH "MAKE.CONF" "5" "Jun 2019" "Portage VERSION" "Portage"
.SH "NAME"
make.conf \- custom settings for Portage
.SH "SYNOPSIS"
@@ -1131,7 +1131,7 @@ Defaults to /.
\fBRPMDIR\fR = \fI[path]\fR
Defines the location where created RPM packages will be stored.
.br
-Defaults to /usr/portage/rpm.
+Defaults to /var/cache/rpm.
.TP
\fBSYNC\fR = \fI[RSYNC]\fR
Insert your preferred rsync mirror here. This rsync server
diff --git a/repoman/RELEASE-NOTES b/repoman/RELEASE-NOTES
index 235bb06fb..6f6341748 100644
--- a/repoman/RELEASE-NOTES
+++ b/repoman/RELEASE-NOTES
@@ -1,6 +1,24 @@
Release Notes; upgrade information mainly.
Features/major bugfixes are listed in NEWS
+repoman-2.3.16
+==================================
+* Bug Fixes:
+ - Bug 687420 Allow empty LICENSE in acct-* packages for GLEP 81
+
+
+repoman-2.3.15
+==================================
+* Bug Fixes:
+ - Bug 688278 Accept 'Gentoo Foundation' copyright for old ebuilds
+
+
+repoman-2.3.14
+==================================
+* Bug Fixes:
+ - Bug 666330 Update for new copyright policy
+
+
repoman-2.3.13
==================================
* Bug Fixes:
diff --git a/repoman/cnf/linechecks/linechecks.yaml b/repoman/cnf/linechecks/linechecks.yaml
index 32b1bf82f..c452af07d 100644
--- a/repoman/cnf/linechecks/linechecks.yaml
+++ b/repoman/cnf/linechecks/linechecks.yaml
@@ -10,7 +10,6 @@ repoman_version: 2.3.3
# scan module
errors:
COPYRIGHT_ERROR: 'Invalid Copyright on line: %d'
- COPYRIGHT_DATE_ERROR: 'No copyright for last modification date before line %d'
LICENSE_ERROR: 'Invalid Gentoo/GPL License on line: %d'
ID_HEADER_ERROR: 'Stale CVS header on line: %d'
NO_BLANK_LINE_ERROR: 'Non-blank line after header on line: %d'
diff --git a/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py b/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py
index c64674319..1f035a97e 100644
--- a/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py
+++ b/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py
@@ -17,46 +17,37 @@ class EbuildHeader(LineCheck):
repoman_check_name = 'ebuild.badheader'
- copyright_re = re.compile(r'^# Copyright ((1999|2\d\d\d)-)?(?P<year>2\d\d\d) \w')
+ gentoo_copyright = (
+ r'^# Copyright ((1999|2\d\d\d)-)?(?P<year2>%s) (?P<author>.*)$')
gentoo_license = (
'# Distributed under the terms'
' of the GNU General Public License v2')
id_header_re = re.compile(r'.*\$(Id|Header)(:.*)?\$.*')
+ blank_line_re = re.compile(r'^$')
ignore_comment = False
def new(self, pkg):
if pkg.mtime is None:
- self.modification_year = None
+ self.modification_year = r'2\d\d\d'
else:
- self.modification_year = time.gmtime(pkg.mtime)[0]
- self.last_copyright_line = -1
- self.last_copyright_year = -1
+ self.modification_year = str(time.gmtime(pkg.mtime)[0])
+ self.gentoo_copyright_re = re.compile(
+ self.gentoo_copyright % self.modification_year)
def check(self, num, line):
- if num > self.last_copyright_line + 2:
+ if num > 2:
return
- elif num == self.last_copyright_line + 1:
- # copyright can extend for a few initial lines
- copy_match = self.copyright_re.match(line)
- if copy_match is not None:
- self.last_copyright_line = num
- self.last_copyright_year = max(self.last_copyright_year,
- int(copy_match.group('year')))
- # no copyright lines found?
- elif self.last_copyright_line == -1:
+ elif num == 0:
+ match = self.gentoo_copyright_re.match(line)
+ if match is None:
return self.errors['COPYRIGHT_ERROR']
- else:
- # verify that the newest copyright line found
- # matches the year of last modification
- if (self.modification_year is not None
- and self.last_copyright_year != self.modification_year):
- return self.errors['COPYRIGHT_DATE_ERROR']
-
- # copyright is immediately followed by license
- if line.rstrip('\n') != self.gentoo_license:
- return self.errors['LICENSE_ERROR']
- elif num == self.last_copyright_line + 2:
- if self.id_header_re.match(line):
- return self.errors['ID_HEADER_ERROR']
- elif line.rstrip('\n') != '':
- return self.errors['NO_BLANK_LINE_ERROR']
+ if not (match.group('author') == 'Gentoo Authors' or
+ (int(match.group('year2')) < 2019 and
+ match.group('author') == 'Gentoo Foundation')):
+ return self.errors['COPYRIGHT_ERROR']
+ elif num == 1 and line.rstrip('\n') != self.gentoo_license:
+ return self.errors['LICENSE_ERROR']
+ elif num == 2 and self.id_header_re.match(line):
+ return self.errors['ID_HEADER_ERROR']
+ elif num == 2 and not self.blank_line_re.match(line):
+ return self.errors['NO_BLANK_LINE_ERROR']
diff --git a/repoman/lib/repoman/modules/scan/metadata/ebuild_metadata.py b/repoman/lib/repoman/modules/scan/metadata/ebuild_metadata.py
index 4c35bbc12..2edf8f7f2 100644
--- a/repoman/lib/repoman/modules/scan/metadata/ebuild_metadata.py
+++ b/repoman/lib/repoman/modules/scan/metadata/ebuild_metadata.py
@@ -39,8 +39,8 @@ class EbuildMetadata(ScanBase):
ebuild = kwargs.get('ebuild').get()
for pos, missing_var in enumerate(self.repo_settings.qadata.missingvars):
if not ebuild.metadata.get(missing_var):
- if kwargs.get('catdir') == "virtual" and \
- missing_var in ("HOMEPAGE", "LICENSE"):
+ if (kwargs.get('catdir') in ("acct-group", "acct-user", "virtual")
+ and missing_var in ("HOMEPAGE", "LICENSE")):
continue
if ebuild.live_ebuild and missing_var == "KEYWORDS":
continue
diff --git a/repoman/setup.py b/repoman/setup.py
index a8a7702d3..c7bc29740 100755
--- a/repoman/setup.py
+++ b/repoman/setup.py
@@ -450,7 +450,7 @@ def get_manpages():
setup(
name = 'repoman',
- version = '2.3.13',
+ version = '2.3.16',
url = 'https://wiki.gentoo.org/wiki/Project:Portage',
author = 'Gentoo Portage Development Team',
author_email = 'dev-portage@gentoo.org',
diff --git a/setup.py b/setup.py
index 3e6ea8caa..b9f674d7b 100755
--- a/setup.py
+++ b/setup.py
@@ -662,7 +662,7 @@ class build_ext(_build_ext):
setup(
name = 'portage',
- version = '2.3.67',
+ version = '2.3.68',
url = 'https://wiki.gentoo.org/wiki/Project:Portage',
author = 'Gentoo Portage Development Team',
author_email = 'dev-portage@gentoo.org',