[gentoo-dev] [PATCH] bash-completion-r1: support for aliasing completions for commands

2014-08-27 Thread Michał Górny
Hi,

One of the requirements of the completion autoloading is that there is
a file or symlink in ${completionsdir} for every completed command. For
example, if 'bakefile' completion provides completions for both
bakefile and bakefile_gen, there should be an extra symlink
from bakefile_gen to bakefile.

To make it easy to accommodate this requirements for Gentoo-originating
completions and to fix issues with upstream completions, I would like
to add a new bashcomp_alias() function.

It is to be used like:

  newbashcomp bash_completion bakefile
  bashcomp_alias bakefile bakefile_gen

or:

  bashcomp_alias emerge ebuild revdep-rebuild metagen ...

Please review.

diff -u -B -r1.13 bash-completion-r1.eclass
--- bash-completion-r1.eclass   27 Aug 2014 08:15:27 -  1.13
+++ bash-completion-r1.eclass   27 Aug 2014 14:47:01 -
@@ -116,3 +116,19 @@
newins ${@}
)
 }
+
+# @FUNCTION: bashcomp_alias
+# @USAGE: basename alias...
+# @DESCRIPTION:
+# Alias basename completion to one or more commands (aliases).
+bashcomp_alias() {
+   debug-print-function ${FUNCNAME} ${@}
+
+   [[ ${#} -lt 2 ]]  die Usage: ${FUNCNAME} basename alias...
+   local base=${1} f
+   shift
+
+   for f; do
+   dosym ${base} $(_bash-completion-r1_get_bashcompdir)/${f}
+   done
+}

-- 
Best regards,
Michał Górny


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH] bash-completion-r1: support for aliasing completions for commands

2014-08-27 Thread Bertrand Jacquin

Hi Michał,

On 2014-08-27 17:06, Michał Górny wrote:


Please review.



+bashcomp_alias() {
+   debug-print-function ${FUNCNAME} ${@}
+
+   [[ ${#} -lt 2 ]]  die Usage: ${FUNCNAME} basename alias...
+   local base=${1} f
+   shift
+
+   for f; do


is there a missing 'in $@ after 'for f' ? f is never initialized.


+   dosym ${base} $(_bash-completion-r1_get_bashcompdir)/${f}
+   done
+}


--
Beber



Re: [gentoo-dev] don't rely on dynamic deps

2014-08-27 Thread Jan Matejka
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On Wed, 23 Jul 2014 00:05:32 +0200
Tom Wijsman tom...@gentoo.org wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Mon, 21 Jul 2014 16:41:39 -0400
 Ian Stakenvicius a...@gentoo.org wrote:
 
  I wonder if there may be some form of extension we could add to
  portage, such that it could do a VDB-only re-emerge somehow, when
  the in-tree ebuild doesn't match the in-VDB one.  If that could be
  implemented properly (and i'm not sure that it could, tbh), maybe
  that would help reduce issues with dynamic deps, too...
 
 Hmm, dynamic dependencies ... dynamic rebuilds ... dynamic
 compilation; one day we will have hot code pushes where upstream
 changes immediately reflects itself upon one's system. Does such a
 gimmick succeed? Meteor!

https://en.wikipedia.org/wiki/KGraft

- --
Jan Matějka| Developer
https://gentoo.org | Gentoo Linux
GPG: A33E F5BC A9F6 DAFD 2021  6FB6 3EBF D45B EEB6 CA8B
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAEBCgAGBQJT/gT1AAoJEIN+7RD5ejahISgIAKbVgqLmuJADmJ37TddtmPPP
7WPq5UYdGT4wq9rElrU3GCu10u+pxQqOOKzVjnXiSlcCF1xqkG07caaYO/Xw/ccS
VclMPDngRU7YUSl9F6UeDkDK9l+48qE/1/ohrSL9f8giA5H5SZ3G3fanWN/oFp6W
FsGx7J6ddRmM/LaSHrso4ngbMU7XIMFZgUeR5X3t5bWef/Si9adxJzfbMoCQFUDN
7qXT8EkY9U9Po5/aAqtsriyGWZttuIvjGbmiNdrdJI/IT/Rshlqzqy/viqcK2aOX
bCO1dn5wRLxfV7JBgmg14UJqcDK6HgkSkl4rrl574M4arq7kZtbMEKbSvDcpurw=
=Wphr
-END PGP SIGNATURE-


Re: [gentoo-dev] [PATCH] bash-completion-r1: support for aliasing completions for commands

2014-08-27 Thread Alexander Kapshuk
On Wed, Aug 27, 2014 at 7:01 PM, Bertrand Jacquin be...@meleeweb.net wrote:
 Hi Michał,

 On 2014-08-27 17:06, Michał Górny wrote:

 Please review.


 +bashcomp_alias() {
 +   debug-print-function ${FUNCNAME} ${@}
 +
 +   [[ ${#} -lt 2 ]]  die Usage: ${FUNCNAME} basename alias...
 +   local base=${1} f
 +   shift
 +
 +   for f; do


 is there a missing 'in $@ after 'for f' ? f is never initialized.


 +   dosym ${base}
 $(_bash-completion-r1_get_bashcompdir)/${f}
 +   done
 +}


 --
 Beber


bash(1)
for name [ [ in [ word ... ] ] ; ] do list ; done
  snip
  If the in word  is  omitted,  the  for  command
executes  list once for each positional
  parameter that is set (see PARAMETERS below).



[gentoo-dev] Bugzilla maintenance, for a few hours

2014-08-27 Thread Robin H. Johnson
FYI

I'm taking Bugzilla down for migration and maintenance.

Expected completion by Aug 28 00:00 UTC.

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Infrastructure Lead
E-Mail : robb...@gentoo.org
GnuPG FP   : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85



Re: [gentoo-dev] [PATCH] bash-completion-r1: support for aliasing completions for commands

2014-08-27 Thread Alexander Kapshuk
On Wed, Aug 27, 2014 at 7:32 PM, Alexander Kapshuk
alexander.kaps...@gmail.com wrote:
 On Wed, Aug 27, 2014 at 7:01 PM, Bertrand Jacquin be...@meleeweb.net wrote:
 Hi Michał,

 On 2014-08-27 17:06, Michał Górny wrote:

 Please review.


 +bashcomp_alias() {
 +   debug-print-function ${FUNCNAME} ${@}
 +
 +   [[ ${#} -lt 2 ]]  die Usage: ${FUNCNAME} basename alias...
 +   local base=${1} f
 +   shift
 +
 +   for f; do


 is there a missing 'in $@ after 'for f' ? f is never initialized.


 +   dosym ${base}
 $(_bash-completion-r1_get_bashcompdir)/${f}
 +   done
 +}


 --
 Beber


 bash(1)
 for name [ [ in [ word ... ] ] ; ] do list ; done
   snip
   If the in word  is  omitted,  the  for  command
 executes  list once for each positional
   parameter that is set (see PARAMETERS below).

Here's a test run:
cat test4loop
#!/bin/sh
for f
do echo $f
done

sh -x test4loop 1 2 3
+ for f in '$@'
+ echo 1
1
+ for f in '$@'
+ echo 2
2
+ for f in '$@'
+ echo 3
3



[gentoo-dev] The future of dohtml

2014-08-27 Thread Michał Górny
Fellow developers,

I would like you to answer three questions, without looking at some
cheatsheet:

a. what does dohtml do, exactly?

b. what are the default file suffixes installed by dohtml?

c. what are the options accepted by dohtml? what do they do?

I doubt that most of the developers can answer those questions. Long
story short, dohtml is a terribly overcomplex, confusing function that
shouldn't really live in its current form.


Bug #520546 gives some insight and numbers on the issues with dohtml
and the scope of it. Most importantly:

1. Many ebuilds use it as some kind of 'docinto html; dodoc -r ...'
without even knowing that it does filtering by suffix. Some ebuilds
fail to install some of the files because of that...

2. The default suffix list will never fit everyone. Most people don't
have an idea what's there, bugs asking to change it will keep
happening, and requests for even more features [2,3].

3. The number of options exceeds any other PM command. Some of them are
not used even once, some of them are used scarcely. Having so many
options only increases confusion and makes reading ebuilds harder.

4. By default, dohtml installs into $docdir/html. However, once docinto
is used, it installs to whatever directory was specified there (without
html subdir). One of the most confusing ideas ever invented.

5. dohtml has pretty powerful filtering. doins doesn't have any. This
is really upside-down that HTML documentation install command is more
powerful than generic file install command...


We've (me and ulm) have come up with the following ideas:

1. make HTML_DOCS in EAPI6 use plain 'docinto html; dodoc -r ...'
instead of dohtml,

2. possibly remove dohtml from EAPI6 completely,

3. ulm wants to reintroduce dohtml in an eclass for people who want to
use it. I'd rather cover it with warnings signs and tell people not to
touch it. IMHO a better replacement is the plain 'docinto html; dodoc
-r ...', possibly with some extra filtering applied before or after
install.

What do you think?


[1]:https://bugs.gentoo.org/show_bug.cgi?id=520546
[2]:https://bugs.gentoo.org/show_bug.cgi?id=423245
[3]:https://bugs.gentoo.org/show_bug.cgi?id=263808

-- 
Best regards,
Michał Górny


signature.asc
Description: PGP signature


Re: [gentoo-dev] The future of dohtml

2014-08-27 Thread Ciaran McCreesh
On Thu, 28 Aug 2014 00:37:48 +0200
Michał Górny mgo...@gentoo.org wrote:
 What do you think?

Kill it! With fire! And blood!

-- 
Ciaran McCreesh


signature.asc
Description: PGP signature


Re: [gentoo-portage-dev] [PATCHES] @changed-deps + missing slot check reposted for bernalex

2014-08-27 Thread Brian Dolbec
On Wed, 13 Aug 2014 19:20:32 +0200
Michał Górny mgo...@gentoo.org wrote:

 Hello, Friend!
 
 This is a repost of my previous patches that I'd like to see applied
 soon. I've also fixed the commit messages.
 
 Short description:
 
 1. fixes Portage not to replace non-installed 'dev-foo/bar:=' deps
 with plain 'dev-foo/bar'. This affects e.g. || () dependencies where
 the remaining branches may have referred to non-installed packages. By
 keeping the := operator in those dependencies, @changed-deps is able
 to correctly match old and new depstring.
 
 2. adds a @changed-deps set to rebuild packages for which dependencies
 have changed (ebuild compared to vdb).
 


Your clear to merge 1  2



 3. adds a repoman check for dependencies that refer to packages that
 have more than one slot yet do not specify a slot explicitly or use
 a proper slot operator. This is meant to help fixing mistakes like:
 
   dev-libs/openssl - dev-libs/openssl:0
 [:0.9.8 comes with no headers]
 
 --
 Best regards,
 Michał Górny
 
 

You need to get an ack from Chris and/or Tom for the repoman check

-- 
Brian Dolbec dolsen