Re: [gentoo-portage-dev] [PATCH] install-qa-check.d: remove check that bans libtool files and static libs from /

2019-10-27 Thread Michał Górny
On Sun, 2019-10-27 at 13:49 -0500, William Hubbs wrote:
> On Sun, Oct 27, 2019 at 06:58:00PM +0100, Michał Górny wrote:
> > On Sun, 2019-10-27 at 12:40 -0500, William Hubbs wrote:
> > > Most upstreams and build systems do not make this distinction, so this
> > > causes unnecessary hacks in ebuilds.
> > > 
> > 
> > The hacks aren't 'unnecessary'.  There is a very good reason that files
> > that are used *purely at build time* don't land in /.  That reason is
> > disk space.  Even if people nowadays are forced to use initramfs with
> > separate /usr, it doesn't mean you should just let their rootfs fill up
> > with useless files.
> 
> The useless files argument really holds no water with me. We install
> many files on / that are useless in one situation or another.
> Some examples are logrotate files when logrotate isn't installed,

Do we really install logrotate files to /?

> systemd units for openrc systems and openrc init scripts for systemd
> systems.

Those files are at least needed in some scenarios.  You're talking about
files that are never used without /usr mounted.  And that can't be used
because they depend on headers in /usr/include.

> 
> Talk to me about useless files on / after we put all of these, and
> possibly others I can't think of,  behind use flags.
> 
> > Do you have any *real* argument?  Because 'unnecessary hack' is
> > basically your feeling of ebuild aesthetics.  My aesthetics is more
> > worried about useless clutter in /lib*.  FHS agrees with me, as you
> > yourself admitted yesterday.
> 
> Any downstream hack means that we are being lazy and not reporting the
> bug upstream and asking them to fix it.
> 
> This particular issue is not a big deal to any other distro and has
> never been. Shouldn't we try to get upstreams to do this if it is so
> important?
> 

Because 'any other distro' usually means a binary distro that moves
files around after installing.  And splits static libraries into
separate packages.

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


[gentoo-portage-dev] [PATCH] emerge: fix error message for unknown options (bug 673400)

2019-10-27 Thread Zac Medico
Do not use parse_known_args to parse positional arguments, since that
causes unknown options to be handled like unknown positional arguments.

Bug: https://bugs.gentoo.org/673400
Signed-off-by: Zac Medico 
---
 lib/_emerge/main.py | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py
index 486664c84..0d2c45a4f 100644
--- a/lib/_emerge/main.py
+++ b/lib/_emerge/main.py
@@ -299,7 +299,6 @@ def _find_bad_atoms(atoms, less_strict=False):
 def parse_opts(tmpcmdline, silent=False):
myaction=None
myopts = {}
-   myfiles=[]
 
actions = frozenset([
"clean", "check-news", "config", "depclean", "help",
@@ -810,9 +809,11 @@ def parse_opts(tmpcmdline, silent=False):
parser.add_argument(dest=myopt.lstrip("--").replace("-", "_"),
*args, **kwargs)
 
+   parser.add_argument('positional_args', nargs='*')
+
tmpcmdline = insert_optional_args(tmpcmdline)
 
-   myoptions, myargs = parser.parse_known_args(args=tmpcmdline)
+   myoptions = parser.parse_args(args=tmpcmdline)
 
if myoptions.alert in true_y:
myoptions.alert = True
@@ -1165,9 +1166,7 @@ def parse_opts(tmpcmdline, silent=False):
if myaction is None and myoptions.deselect is True:
myaction = 'deselect'
 
-   myfiles += myargs
-
-   return myaction, myopts, myfiles
+   return myaction, myopts, myoptions.positional_args
 
 def profile_check(trees, myaction):
if myaction in ("help", "info", "search", "sync", "version"):
-- 
2.21.0




Re: [gentoo-portage-dev] [PATCH] install-qa-check.d: remove check that bans libtool files and static libs from /

2019-10-27 Thread William Hubbs
On Sun, Oct 27, 2019 at 06:58:00PM +0100, Michał Górny wrote:
> On Sun, 2019-10-27 at 12:40 -0500, William Hubbs wrote:
> > Most upstreams and build systems do not make this distinction, so this
> > causes unnecessary hacks in ebuilds.
> > 
> 
> The hacks aren't 'unnecessary'.  There is a very good reason that files
> that are used *purely at build time* don't land in /.  That reason is
> disk space.  Even if people nowadays are forced to use initramfs with
> separate /usr, it doesn't mean you should just let their rootfs fill up
> with useless files.

The useless files argument really holds no water with me. We install
many files on / that are useless in one situation or another.
Some examples are logrotate files when logrotate isn't installed,
systemd units for openrc systems and openrc init scripts for systemd
systems.

Talk to me about useless files on / after we put all of these, and
possibly others I can't think of,  behind use flags.

> Do you have any *real* argument?  Because 'unnecessary hack' is
> basically your feeling of ebuild aesthetics.  My aesthetics is more
> worried about useless clutter in /lib*.  FHS agrees with me, as you
> yourself admitted yesterday.

Any downstream hack means that we are being lazy and not reporting the
bug upstream and asking them to fix it.

This particular issue is not a big deal to any other distro and has
never been. Shouldn't we try to get upstreams to do this if it is so
important?

> So why do you believe we should introduce this regression?  And why are
> you trying to sneak it past most of the developers via gentoo-portage-
> dev instead of gentoo-dev?

This attack is un called for. This list is as open as any other,
and there is no need for you to make this out to be some kind of
conspiracy theory to "sneak" something past the developers.

William



signature.asc
Description: Digital signature


Re: [gentoo-portage-dev] [PATCH] install-qa-check.d: remove check that bans libtool files and static libs from /

2019-10-27 Thread Michał Górny
On Sun, 2019-10-27 at 12:40 -0500, William Hubbs wrote:
> Most upstreams and build systems do not make this distinction, so this
> causes unnecessary hacks in ebuilds.
> 

The hacks aren't 'unnecessary'.  There is a very good reason that files
that are used *purely at build time* don't land in /.  That reason is
disk space.  Even if people nowadays are forced to use initramfs with
separate /usr, it doesn't mean you should just let their rootfs fill up
with useless files.

Do you have any *real* argument?  Because 'unnecessary hack' is
basically your feeling of ebuild aesthetics.  My aesthetics is more
worried about useless clutter in /lib*.  FHS agrees with me, as you
yourself admitted yesterday.

So why do you believe we should introduce this regression?  And why are
you trying to sneak it past most of the developers via gentoo-portage-
dev instead of gentoo-dev?

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


[gentoo-portage-dev] [PATCH] install-qa-check.d: remove check that bans libtool files and static libs from /

2019-10-27 Thread William Hubbs
Most upstreams and build systems do not make this distinction, so this
causes unnecessary hacks in ebuilds.

Signed-off-by: William Hubbs 
---
 bin/install-qa-check.d/80libraries | 10 --
 1 file changed, 10 deletions(-)

diff --git a/bin/install-qa-check.d/80libraries 
b/bin/install-qa-check.d/80libraries
index d1d2c4fdd..e59369bf6 100644
--- a/bin/install-qa-check.d/80libraries
+++ b/bin/install-qa-check.d/80libraries
@@ -152,16 +152,6 @@ lib_check() {
done
[[ ${abort} == "yes" ]] && die "add those ldscripts"
 
-   # Make sure people don't store libtool files or static libs in /lib
-   f=$(ls "${ED%/}"/lib*/*.{a,la} 2>/dev/null)
-   if [[ -n ${f} ]] ; then
-   __vecho -ne '\n'
-   eqawarn "QA Notice: Excessive files found in the / partition"
-   eqawarn "${f}"
-   __vecho -ne '\n'
-   die "static archives (*.a) and libtool library files (*.la) 
belong in /usr/lib*, not /lib*"
-   fi
-
# Verify that the libtool files don't contain bogus $D entries.
local abort=no gentoo_bug=no always_overflow=no
for a in "${ED%/}"/usr/lib*/*.la ; do
-- 
2.23.0