Re: [gentoo-dev] RFC: vcs-snapshot-r1.eclass -- a better eclass for VCS snapshots (and others)

2012-06-12 Thread Michael Weber
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 06/11/2012 04:25 PM, Michał Górny wrote:
 
 Committed onto vcs-snapshot.eclass after fixing all in-tree users.
 

Thanks for the update.

One suggestion:

Have you thought about using bsdtar from app-arch/libarchive instead
of GNU ones? You'll need an additional dependency, but it has zip file
support and I've verified the options you use work [1].

To be clear, I prefer tar over zip, too, but you can restore do not
prefer zip over tar, but you can restore the lost zip functionality
(plus others i assume).

Michael

[1] bsdtar -C /tmp/xxx -x --strip-components 1 -f
~/keithw-mosh-mosh-1.2.1-0-g778b5af.zip


- --
Gentoo Dev
http://xmw.de/


-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAk/XP6IACgkQknrdDGLu8JBx4QD/dcCp2zdAAjz0kMEVmmdIgQn3
dqU6wv4vBhipVrlaJRYA/R1LAd8lfPBh3uiUEvJ7MY/m1ExTkDXA64QQ5LC61jOA
=CAmK
-END PGP SIGNATURE-



Re: [gentoo-dev] RFC: vcs-snapshot-r1.eclass -- a better eclass for VCS snapshots (and others)

2012-06-12 Thread Michael Weber
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

- From the eclass:

# XXX: check whether the directory structure inside is
# fine? i.e. if the tarball has actually a parent dir.

This should work with gnu and bsd tar, and sed+sort+wc from
sys-apps/coreutils as well as busybox.

[ $(bsdtar -t -f ~/keithw-mosh-mosh-1.2.1-0-g778b5af.zip \
| sed 's:/.*::' | sort -u | wc -l) == 1 ]

I'm totally sure if we have to handle leading slashes and ./ in
obscure tars/zips but I'd say this tests qualifies for an
|| ewarn Please check $f for an single parent directory
or something like that.

My 2 cents

- --
Gentoo Dev
http://xmw.de/


-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAk/XQ6IACgkQknrdDGLu8JCXrQD/esMpA3z4jiZIsI3qkiz3zM7X
0I2ck7tG6WHGqTP/HEQA/jCAxkDt2hUXM+govuZaKrNHj5pBNvJIQNUF7VnzYKYr
=Lf4O
-END PGP SIGNATURE-



Re: [gentoo-dev] RFC: vcs-snapshot-r1.eclass -- a better eclass for VCS snapshots (and others)

2012-06-12 Thread Michał Górny
On Tue, 12 Jun 2012 15:09:54 +0200
Michael Weber x...@gentoo.org wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 On 06/11/2012 04:25 PM, Michał Górny wrote:
  
  Committed onto vcs-snapshot.eclass after fixing all in-tree users.
  
 
 Thanks for the update.
 
 One suggestion:
 
 Have you thought about using bsdtar from app-arch/libarchive instead
 of GNU ones? You'll need an additional dependency, but it has zip file
 support and I've verified the options you use work [1].
 
 To be clear, I prefer tar over zip, too, but you can restore do not
 prefer zip over tar, but you can restore the lost zip functionality
 (plus others i assume).

Thanks for the idea. I will be happy to go that way if someone actually
requests zipfile support.

-- 
Best regards,
Michał Górny


signature.asc
Description: PGP signature


Re: [gentoo-dev] RFC: vcs-snapshot-r1.eclass -- a better eclass for VCS snapshots (and others)

2012-06-12 Thread Michał Górny
On Tue, 12 Jun 2012 15:26:58 +0200
Michael Weber x...@gentoo.org wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 - From the eclass:
 
   # XXX: check whether the directory structure inside is
   # fine? i.e. if the tarball has actually a parent dir.
 
 This should work with gnu and bsd tar, and sed+sort+wc from
 sys-apps/coreutils as well as busybox.
 
 [ $(bsdtar -t -f ~/keithw-mosh-mosh-1.2.1-0-g778b5af.zip \
   | sed 's:/.*::' | sort -u | wc -l) == 1 ]
 
 I'm totally sure if we have to handle leading slashes and ./ in
 obscure tars/zips but I'd say this tests qualifies for an
 || ewarn Please check $f for an single parent directory
 or something like that.

Well, I was hoping to come up with something which doesn't involve
running additional 'tar -t', to be honest. I have to think about it
some more time.

-- 
Best regards,
Michał Górny


signature.asc
Description: PGP signature


Re: [gentoo-dev] About forcing rebuilds of other packages issue

2012-06-12 Thread Ian Stakenvicius
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 10/06/12 06:49 PM, Brian Harring wrote:
 On Sun, Jun 10, 2012 at 01:25:55PM +0100, Ciaran McCreesh wrote:
 On Sat, 09 Jun 2012 13:55:53 -0700 Zac Medico
 zmed...@gentoo.org wrote:
 A dependency atom will have optional SLOT and ABI_SLOT parts.
 Using the dbus-glib depedency on glib:2 as an example [1], the
 dbus-glib dependency will be expressed with an atom such as
 dev-libs/glib:2:= and the package manager will translate that
 atom to dev-libs/glib:2:=2.32 at build time. So, ':' is always
 used to distinguish SLOT deps, and ':=' is always used to
 distinguish ABI_SLOT deps. Is that syntax good?
 
 Here's a nicer syntax: no ABI_SLOT variable, and SLOT=2/2.32.
 
 Hate the slash; just looks ugly to me (so starts the bikeshed).
 
 Sans that naggle, notions fine however; not sure I'm a fan of
 people being able to specify the exact ABI they need from an ebuild
 while it's in source form, but may be of use for emul-* packages.
 
 ~harring
 

It's power will come from detection of the different SLOT= assignment
between ebuilds of a particular library package.  I don't forsee that
there is going to be very much usage of the '/[ABI]' part in *DEPEND.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)

iF4EAREIAAYFAk/XX7QACgkQ2ugaI38ACPDo6QD/XqsVP0UWmLrzxwFF1f2W6UsM
aA3wM6aqYX+wc+uHGTAA/jk8jz6kCs5rEudSWWXYndg6LEKp1Rj+YC/C7tLlk9uW
=tDdT
-END PGP SIGNATURE-



[gentoo-dev] [RFC] Setting F(C)FLAGS=${CFLAGS} in profiles

2012-06-12 Thread Justin
Hi,

these days still FFLAGS and FCFLAGS are unset by default.
Any objections to to default to CFLAGS of the profile equally to CXXFLAGS?


Thanks justin



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] [RFC] Setting F(C)FLAGS=${CFLAGS} in profiles

2012-06-12 Thread Markos Chandras
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 06/12/2012 06:55 PM, Justin wrote:
 Hi,
 
 these days still FFLAGS and FCFLAGS are unset by default. Any
 objections to to default to CFLAGS of the profile equally to
 CXXFLAGS?
 
 
 Thanks justin
 

This is the first time I see these variables. Where are they being used?

- -- 
Regards,
Markos Chandras / Gentoo Linux Developer / Key ID: B4AFF2C2


-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)

iQIcBAEBCgAGBQJP15jLAAoJEPqDWhW0r/LCaUsP/3spyhcrqi5uESLSutQkdEoo
7rBkO8VTW0aatq84VEWgIbwAfqOWo5wJbWcWL4uiuXlOgC+kwZra7mCCevcXBn+d
31z5pkDHbZ8guNxYsl+Jslj3QK0qepeNWRdFrJUdKFglPPDxKb6NTve1Ywv47Mak
+Gc9t9lNzTXAJuJ07IfNzblqoV4UMb4beglk1ddgWYOxaDIl+MRW25kDVOtrFMF/
gJ+IkHfef29ln/ytVWt1plRT10SXrL3riDA1b6NwDmnll7lbSdroEwlyH9eZy8V4
Wdy/LPh4OpJ/1f40tYyrCKGVhdxchd2/kgYxdOcFiLvN7Y3tXY4TqYetz5kv+Dul
41/BBXWRNP9/2tBMO4RQsEVzAdR11JA7jcN0m3AjwpKUhXxFjROKjVsGRKMborDL
9m73j4AWJlhGuhEbBV9mv703hJ9Xu/HIUX/K/Vp3SIJ8AizXurSbjwiACM74eboN
8v0Mr855/Ar5+gx/fKh9lRU0m75LNg8Pe087cpS+Xcyl+AeJDwgP2Dn+IZNXsH9y
Z4N3Pasf7p7tSb0XRFNy+tRTnj9DLjdup0bJIVlS5BoeCv1KNmhsJqYqPUoIfHp8
xwHxzaXvdl4CjuUZKLZoGONiYrOtH4p4dS0e6yi1CWHyVVDLY9pfd+XlpYDEi86y
trqyxc1FetTN31r4NeU6
=RKzC
-END PGP SIGNATURE-



Re: [gentoo-dev] [RFC] Setting F(C)FLAGS=${CFLAGS} in profiles

2012-06-12 Thread Justin
On 12.06.2012 21:30, Markos Chandras wrote:
 On 06/12/2012 06:55 PM, Justin wrote:
 Hi,
 
 these days still FFLAGS and FCFLAGS are unset by default. Any
 objections to to default to CFLAGS of the profile equally to
 CXXFLAGS?
 
 
 Thanks justin
 
 
 This is the first time I see these variables. Where are they being used?
 
 

They are compiler flags for fortran compiler. g77 used to use FFLAGS and
implicit makerule for .f file use this one. FCFLAGS are used by gfortran
and for newer dialects (see man make.conf).
So in case you like to compile fortran code, even potentially you might
want to have them set.



signature.asc
Description: OpenPGP digital signature


[gentoo-dev] Last rites: dev-python/apiextractor, dev-python/generatorrunner

2012-06-12 Thread Davide Pesavento
# Both have been merged into =dev-python/shiboken-1.1.1.
# Removal in 30 days.
dev-python/apiextractor
dev-python/generatorrunner


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


Re: [gentoo-dev] RFC: vcs-snapshot-r1.eclass -- a better eclass for VCS snapshots (and others)

2012-06-12 Thread Michael Weber
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 06/12/2012 04:46 PM, Michał Górny wrote:
 Well, I was hoping to come up with something which doesn't involve 
 running additional 'tar -t', to be honest. I have to think about
 it some more time.
 

FTR,

filelist=$(tar xvC /tmp/xxx --strip-components 1 \
-f ~/keithw-mosh-mosh-1.2.1-0-g778b5af.tar.gz 21) || die

[ $(echo $filelist | sed 's:/.*::' | sort -u | wc -l) == 1 ] \
|| ewarn ...

does work with GNU tar, but not with bsdtar, which displays the
stripped filenames, plus an leading x .

Michael

- --
Gentoo Dev
http://xmw.de/


-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAk/XrOwACgkQknrdDGLu8JCbwwD+InGUaLTki1W6gYwy+O2zAEek
peIoy1cjDig3EWqRtacA/RVFf3P5y8MBRKaE7yeyzypTUomvXq6tWqVZSUywnjYL
=3Zw6
-END PGP SIGNATURE-



[gentoo-dev] ebuild laziness and binpkg overhead

2012-06-12 Thread Mike Frysinger
i've noticed a growing trend where people put setup of variables into 
pkg_setup that only matter to src_* funcs presumably so they don't have to 
call the respective src_* func from an inherited eclass.  unfortunately this 
adds pointless overhead to binpkgs.  can we please move away from this 
practice ?

i've seen this with a good number of the GNOME packages like:
pkg_setup() {
G2CONF=${G2CONF}
--disable-bash-completion
--disable-hal
--disable-schemas-compile
--with-dbus-service-dir=/usr/share/dbus-1/services
$(use_enable afp)
$(use_enable archive)
$(use_enable avahi)
$(use_enable bluetooth obexftp)
$(use_enable bluray)
$(use_enable cdda)
$(use_enable fuse)
$(use_enable gdu)
$(use_enable gphoto2)
$(use_enable ios afc)
$(use_enable udev)
$(use_enable udev gudev)
$(use_enable http)
$(use_enable gnome-keyring keyring)
$(use_enable samba)
}

ugh
-mike


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


Re: [gentoo-dev] [RFC] Setting F(C)FLAGS=${CFLAGS} in profiles

2012-06-12 Thread Mike Frysinger
On Tuesday 12 June 2012 13:55:45 Justin wrote:
 these days still FFLAGS and FCFLAGS are unset by default.
 Any objections to to default to CFLAGS of the profile equally to CXXFLAGS?

sounds fine
-mike


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


Re: [gentoo-dev] ebuild laziness and binpkg overhead

2012-06-12 Thread Michael Sterrett
Calling use in global scope isn't allowed so what are you suggesting
they do instead?

On Tue, Jun 12, 2012 at 11:02 PM, Mike Frysinger vap...@gentoo.org wrote:
 i've noticed a growing trend where people put setup of variables into
 pkg_setup that only matter to src_* funcs presumably so they don't have to
 call the respective src_* func from an inherited eclass.  unfortunately this
 adds pointless overhead to binpkgs.  can we please move away from this
 practice ?

 i've seen this with a good number of the GNOME packages like:
 pkg_setup() {
    G2CONF=${G2CONF}
        --disable-bash-completion
        --disable-hal
        --disable-schemas-compile
        --with-dbus-service-dir=/usr/share/dbus-1/services
        $(use_enable afp)
        $(use_enable archive)
        $(use_enable avahi)
        $(use_enable bluetooth obexftp)
        $(use_enable bluray)
        $(use_enable cdda)
        $(use_enable fuse)
        $(use_enable gdu)
        $(use_enable gphoto2)
        $(use_enable ios afc)
        $(use_enable udev)
        $(use_enable udev gudev)
        $(use_enable http)
        $(use_enable gnome-keyring keyring)
        $(use_enable samba)
 }

 ugh
 -mike



Re: [gentoo-dev] ebuild laziness and binpkg overhead

2012-06-12 Thread Tim Harder
On 2012-06-12 Tue 20:20, Michael Sterrett wrote:
 Calling use in global scope isn't allowed so what are you suggesting
 they do instead?

Can't they just do something similar to how most cmake-utils and
autotools-utils users do things? For example:

src_configure() {
   G2CONF=${G2CONF}
       --disable-bash-completion
       --disable-hal
       --disable-schemas-compile
       --with-dbus-service-dir=/usr/share/dbus-1/services
       $(use_enable afp)
       $(use_enable archive)
       $(use_enable avahi)
       $(use_enable bluetooth obexftp)
       $(use_enable bluray)
       $(use_enable cdda)
       $(use_enable fuse)
       $(use_enable gdu)
       $(use_enable gphoto2)
       $(use_enable ios afc)
       $(use_enable udev)
       $(use_enable udev gudev)
       $(use_enable http)
       $(use_enable gnome-keyring keyring)
       $(use_enable samba)

gnome2_src_configure
}

Seems like that should work fine.

Tim


pgptmeIZLBJc0.pgp
Description: PGP signature


Re: [gentoo-dev] ebuild laziness and binpkg overhead

2012-06-12 Thread Mike Frysinger
On Tuesday 12 June 2012 23:20:53 Michael Sterrett wrote:
 Calling use in global scope isn't allowed so what are you suggesting
 they do instead?

as implied in the body of my message, put it into the relevant src_* func.  in 
this case, src_prepare.
-mike


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


Re: [gentoo-dev] ebuild laziness and binpkg overhead

2012-06-12 Thread Mike Frysinger
On Tuesday 12 June 2012 23:54:45 Mike Frysinger wrote:
 On Tuesday 12 June 2012 23:20:53 Michael Sterrett wrote:
  Calling use in global scope isn't allowed so what are you suggesting
  they do instead?
 
 as implied in the body of my message, put it into the relevant src_* func. 
 in this case, src_prepare.

err i meant src_configure :P.  the ebuild i took this from defined a 
src_prepare 
already.
-mike


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


[gentoo-portage-dev] [PATCH 2/2] repoman: handle trailing newlines better

2012-06-12 Thread Mike Frysinger
Automatically strip trailing newlines from the ChangeLog, and be
better about not adding them in the first place (still not perfect,
but getting there).

Signed-off-by: Mike Frysinger vap...@gentoo.org
---
 pym/portage/tests/repoman/test_echangelog.py |9 +
 pym/repoman/utilities.py |   11 ---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/pym/portage/tests/repoman/test_echangelog.py 
b/pym/portage/tests/repoman/test_echangelog.py
index 71d6d5e..74aa1c5 100644
--- a/pym/portage/tests/repoman/test_echangelog.py
+++ b/pym/portage/tests/repoman/test_echangelog.py
@@ -83,6 +83,7 @@ class RepomanEchangelogTestCase(TestCase):
UpdateChangeLog(self.pkgdir, self.user, 'test!', 
self.skel_changelog, self.cat, self.pkg, quiet=True)
actual_cl = self._readlines(self.changelog)
self.assertEqual(actual_cl[0], self.header_pkg)
+   self.assertNotEqual(actual_cl[-1], '\n')
 
def testExistingGoodHeader(self):
# Test existing ChangeLog (correct values)
@@ -99,3 +100,11 @@ class RepomanEchangelogTestCase(TestCase):
UpdateChangeLog(self.pkgdir, self.user, 'test!', 
self.skel_changelog, self.cat, self.pkg, quiet=True)
actual_cl = self._readlines(self.changelog)
self.assertEqual(actual_cl[0], self.header_pkg)
+
+   def testTrailingNewlines(self):
+   # Make sure trailing newlines get chomped.
+   self._writelines(self.changelog, ['#\n', 'foo\n', '\n', 
'bar\n', '\n', '\n'])
+
+   UpdateChangeLog(self.pkgdir, self.user, 'test!', 
self.skel_changelog, self.cat, self.pkg, quiet=True)
+   actual_cl = self._readlines(self.changelog)
+   self.assertNotEqual(actual_cl[-1], '\n')
diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py
index 1e07bad..013858a 100644
--- a/pym/repoman/utilities.py
+++ b/pym/repoman/utilities.py
@@ -807,7 +807,9 @@ def UpdateChangeLog(pkgdir, user, msg, skel_path, category, 
package,
for line in textwrap.wrap(msg, 80, \
initial_indent='  ', subsequent_indent='  '):
clnew_lines.append(_unicode_decode('%s\n' % line))
-   clnew_lines.append(_unicode_decode('\n'))
+   # Don't append a trailing newline if the file is new.
+   if clold_file is not None:
+   clnew_lines.append(_unicode_decode('\n'))
 
f = io.open(f, mode='w', encoding=_encodings['repo.content'],
errors='backslashreplace')
@@ -839,9 +841,12 @@ def UpdateChangeLog(pkgdir, user, msg, skel_path, 
category, package,
# in the unified_diff call below.
clold_lines = old_header_lines + clold_lines
 
-   for line in clold_file:
-   f.write(line)
+   # Trim any trailing newlines.
+   lines = clold_file.readlines()
clold_file.close()
+   while lines and lines[-1] == '\n':
+   del lines[-1]
+   f.writelines(lines)
f.close()
 
# show diff
-- 
1.7.9.7




Re: [gentoo-portage-dev] [PATCH 1/2] repoman: update cat/pkg info in header all the time

2012-06-12 Thread Zac Medico
On 06/12/2012 03:13 PM, Mike Frysinger wrote:
 There are edge cases where repoman's changelog code is not as good as
 the existing echangelog.  Mostly related to out of date headers.  Have
 the code check the header in more cases not just for missing lines, but
 also outdated values all the time.
 
 While we're at it, write some tests!
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  pym/portage/tests/repoman/test_echangelog.py |  101 
 ++
  pym/repoman/utilities.py |   57 ---
  2 files changed, 133 insertions(+), 25 deletions(-)
  create mode 100644 pym/portage/tests/repoman/test_echangelog.py

Looks good to me.
-- 
Thanks,
Zac




Re: [gentoo-portage-dev] [PATCH 2/2] repoman: handle trailing newlines better

2012-06-12 Thread Zac Medico
On 06/12/2012 03:13 PM, Mike Frysinger wrote:
 Automatically strip trailing newlines from the ChangeLog, and be
 better about not adding them in the first place (still not perfect,
 but getting there).
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  pym/portage/tests/repoman/test_echangelog.py |9 +
  pym/repoman/utilities.py |   11 ---
  2 files changed, 17 insertions(+), 3 deletions(-)

Looks good to me.
-- 
Thanks,
Zac