* [gentoo-dev] repoman - I cannot handle it...
@ 2007-10-20 12:45 Markus Rothe
2007-10-20 18:47 ` Zac Medico
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Markus Rothe @ 2007-10-20 12:45 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 1068 bytes --]
Hello fellow developers,
I have a problem with repoman. I keep breaking the dependency tree. Jabub
knows what I'm talking about. Latest examples are bugs #196470, #196472 and
#196474. On a side note I actually don't want to break the dependency tree...
Attached are the scripts I use to commit packages stable/unstable. Somewhere
must be a bug!
'name_split.cpp' splits a package name like sys-devel/gcc-4.1.2 into category,
package name and version number. It's done in c++ as that's the only language
I do more with than 'hello world' programms. Not much more, just more. ;-)
'mp.sh' is the script which calls name_split, repoman etc. It's pretty
straight forward and only does the things I would also do by hand.
So if I want to mark for example sys-devel/gcc-4.1.2 stable on ppc64 I call
mp.sh like this: mp.sh ppc64 sys-devel/gcc-4.1.2 "Stable on ppc64"
If someone has a hint where the problem is, I would really appreciate that.
Best regards,
-markus
P.S.: yes, I do 'cvs up' on the whole tree, before starting a commit.
[-- Attachment #1.2: mp.sh --]
[-- Type: application/x-shellscript, Size: 813 bytes --]
[-- Attachment #1.3: name_split.cpp --]
[-- Type: text/x-c++src, Size: 2663 bytes --]
#include <iostream>
#include <string>
using namespace std;
class splitted_names
{
public:
splitted_names(string name);
string get_category() {return category;}
string get_package() {return package;}
string get_version() {return version;}
private:
string category,
package,
version;
};
int main(int argc, char* argv[])
{
if (argc != 3 || argv[1] == "-h")
{
cout << "Useage: " << argv[0]
<< " -[cpv] category/package-version" << endl
<< "Options:" << endl
<< " -c : print the category" << endl
<< " -p : print the package name" << endl
<< " -v : print the package version" << endl
<< " -h : print this help" << endl
<< "NOTE: Only one of -c, -p, -v is allowed" << endl;
return EXIT_FAILURE;
}
splitted_names the_string((string)argv[2]);
string option = (string)argv[1];
if (option == "-c")
{
cout << the_string.get_category() << endl;
}
else if (option == "-p")
{
cout << the_string.get_package() << endl;
}
else if (option == "-v")
{
cout << the_string.get_version() << endl;
}
return EXIT_SUCCESS;
}
splitted_names::splitted_names (string name)
{
category = "";
package = "";
version = "";
int start_copy = 0,
stop_copy = 0;
// do not copy a leading '='
if (name[0] == '=')
{
start_copy = 1;
}
stop_copy = name.find('/');
category.assign(name, start_copy, stop_copy-start_copy);
if (name.length() > stop_copy)
{
start_copy = stop_copy+1;
}
for (int i = start_copy; i < name.length(); i++)
{
if (name.at(i) == '-')
{
if (name.at(i+1) == '0'
|| name.at(i+1) == '1'
|| name.at(i+1) == '2'
|| name.at(i+1) == '3'
|| name.at(i+1) == '4'
|| name.at(i+1) == '5'
|| name.at(i+1) == '6'
|| name.at(i+1) == '7'
|| name.at(i+1) == '8'
|| name.at(i+1) == '9' )
{
stop_copy = i-1;
break;
}
}
}
package.assign(name, start_copy, stop_copy-start_copy+1);
if (name.length() > stop_copy)
{
start_copy = stop_copy+2;
}
stop_copy = name.length();
version.assign(name, start_copy, stop_copy-start_copy);
}
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] repoman - I cannot handle it...
2007-10-20 12:45 [gentoo-dev] repoman - I cannot handle it Markus Rothe
@ 2007-10-20 18:47 ` Zac Medico
2007-10-20 21:35 ` Markus Rothe
2007-10-20 21:55 ` Jeroen Roovers
2007-10-21 10:44 ` [gentoo-dev] " Steve Long
2 siblings, 1 reply; 17+ messages in thread
From: Zac Medico @ 2007-10-20 18:47 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Markus Rothe wrote:
> So if I want to mark for example sys-devel/gcc-4.1.2 stable on ppc64 I call
> mp.sh like this: mp.sh ppc64 sys-devel/gcc-4.1.2 "Stable on ppc64"
If that mp.sh script fails then you have keyworded an ebuild but it
hasn't been committed. If you're cvs tree is left in that state and
you move on to other packages, repoman will see those keywords in
it's dependency checks it treat them the same as if they had really
been committed, which can lead to invalid results. Perhaps your
mp.sh script should clean up after itself if the commit fails.
Zac
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
iD8DBQFHGk0z/ejvha5XGaMRArk9AJ42vBDcYe1eayhWRAaTNB5Fgop1FgCfU9yg
vqENF1g6ZoKw0sq99k8ZJmY=
=HleO
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] repoman - I cannot handle it...
2007-10-20 12:45 [gentoo-dev] repoman - I cannot handle it Markus Rothe
2007-10-20 18:47 ` Zac Medico
@ 2007-10-20 21:55 ` Jeroen Roovers
2007-10-21 18:49 ` Markus Rothe
2007-10-21 19:06 ` [gentoo-dev] " Ciaran McCreesh
2007-10-21 10:44 ` [gentoo-dev] " Steve Long
2 siblings, 2 replies; 17+ messages in thread
From: Jeroen Roovers @ 2007-10-20 21:55 UTC (permalink / raw
To: gentoo-dev
On Sat, 20 Oct 2007 14:45:49 +0200
Markus Rothe <corsair@gentoo.org> wrote:
> Hello fellow developers,
>
> I have a problem with repoman.
You have a problem with your scripts. I must admit that in keywording
for hppa I do use bash aliases and scripts as helpers but nothing too
fancy, let alone automated. I've been doing this for almost two years
now and I don't think any script could really automate the CVS work
that's involved in resolving dependencies and in finding stale files -
not even for jobs that require keywording dozens of ebuilds. We could
set up a project to share our tools of course, use a common repository
to develop them and so on. Maybe even write some documentation...
Kind regards,
JeR
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] repoman - I cannot handle it...
2007-10-20 21:55 ` Jeroen Roovers
@ 2007-10-21 18:49 ` Markus Rothe
2007-10-21 21:42 ` [gentoo-dev] " Christian Faulhammer
2007-10-21 19:06 ` [gentoo-dev] " Ciaran McCreesh
1 sibling, 1 reply; 17+ messages in thread
From: Markus Rothe @ 2007-10-21 18:49 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]
On Saturday 20 October 2007 23:55:42 Jeroen Roovers wrote:
> On Sat, 20 Oct 2007 14:45:49 +0200
>
> Markus Rothe <corsair@gentoo.org> wrote:
> > Hello fellow developers,
> >
> > I have a problem with repoman.
>
> You have a problem with your scripts.
Ok, that's more precise. I thought this would be a problem with repoman as I
was calling 'repoman scan'.
> I must admit that in keywording
> for hppa I do use bash aliases and scripts as helpers but nothing too
> fancy, let alone automated. I've been doing this for almost two years
> now and I don't think any script could really automate the CVS work
> that's involved in resolving dependencies and in finding stale files -
> not even for jobs that require keywording dozens of ebuilds.
I don't do automatic dependency resolving, too. All I automate is keywording
exactly one ebuild. If I have an ebuild that needs another four dependencies
stable I call five times mp.sh with the according ebuilds.
> We could
> set up a project to share our tools of course, use a common repository
> to develop them and so on. Maybe even write some documentation...
As you can see I am neither a good programmer (didn't even know about
std::isdigit until jkt told me..) nor do I write good scripts. Although I am
willing to educate on both issues. Maybe we can really start such a project.
Anyone else interested? Stable marking monkeys from sparc, x86 and amd64
might be interested in this.
Regards,
-corsair
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] repoman - I cannot handle it...
2007-10-20 21:55 ` Jeroen Roovers
2007-10-21 18:49 ` Markus Rothe
@ 2007-10-21 19:06 ` Ciaran McCreesh
2007-10-22 1:06 ` Jeroen Roovers
1 sibling, 1 reply; 17+ messages in thread
From: Ciaran McCreesh @ 2007-10-21 19:06 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 10151 bytes --]
On Sat, 20 Oct 2007 23:55:42 +0200
Jeroen Roovers <jer@gentoo.org> wrote:
> You have a problem with your scripts. I must admit that in keywording
> for hppa I do use bash aliases and scripts as helpers but nothing too
> fancy, let alone automated. I've been doing this for almost two years
> now and I don't think any script could really automate the CVS work
> that's involved in resolving dependencies and in finding stale files -
> not even for jobs that require keywording dozens of ebuilds. We could
> set up a project to share our tools of course, use a common repository
> to develop them and so on. Maybe even write some documentation...
Paludis has adjutrix --what-needs-keywording already... Might be a good
starting point...
Package Version Current Keywords Masks
============================= =================== ================= =========
app-accessibility/orca 2.20.0.1 ~hppa K
app-accessibility/gok 1.3.7 ~hppa K
app-accessibility/gnome-mag 0.14.10 ~hppa K
gnome-extra/at-spi 1.20.1 ~hppa K
gnome-extra/libgail-gnome 1.20.0 ~hppa K
gnome-extra/gnome-power-manager2.20.0 ~hppa K
gnome-extra/gnome-screensaver 2.20.0 K
app-admin/sabayon 2.20.1 ~hppa K
app-admin/pessulus 2.16.3 ~hppa K
net-misc/vino 2.20.0 ~hppa K
net-misc/vino 2.20.1 ~hppa K
gnome-extra/evolution-webcal 2.12.0 ~hppa K
gnome-extra/evolution-data-server1.12.0 ~hppa K
gnome-extra/evolution-data-server1.12.1 ~hppa K
mail-client/evolution 2.12.0 ~hppa K
mail-client/evolution 2.12.1 ~hppa K
gnome-extra/gtkhtml 3.16.0 ~hppa K
gnome-extra/gtkhtml 3.16.1 ~hppa K
gnome-extra/nautilus-cd-burner2.20.0 ~hppa K
net-analyzer/gnome-nettool 2.20.0 ~hppa K
gnome-extra/zenity 2.20.0 ~hppa K
app-text/rarian 0.6.0 K
app-text/gnome-doc-utils 0.12.0 ~hppa K
gnome-extra/yelp 2.20.0 K
gnome-extra/gnome2-user-docs 2.20.1 ~hppa K
gnome-base/libgtop 2.20.0 ~hppa K
gnome-extra/gnome-system-monitor2.20.0 ~hppa K
gnome-extra/gnome-system-monitor2.20.1 ~hppa K
gnome-base/librsvg 2.18.2 ~hppa K
gnome-extra/gnome-games 2.20.0.1 ~hppa K
gnome-extra/gnome-games 2.20.1 ~hppa K
gnome-extra/gnome-utils 2.20.0.1 ~hppa K
gnome-base/libgnomeprintui 2.18.1 ~hppa K
gnome-base/libgnomeprint 2.18.2 ~hppa K
gnome-extra/gucharmap 1.10.1 ~hppa K
x11-terms/gnome-terminal 2.18.2 ~hppa K
x11-libs/vte 0.16.9 ~hppa K
x11-themes/gnome-backgrounds 2.20.0 ~hppa K
x11-themes/gtk-engines 2.12.1 ~hppa K
x11-themes/gtk-engines 2.12.2 ~hppa K
gnome-extra/deskbar-applet 2.20.0 ~hppa K
gnome-extra/deskbar-applet 2.20.1 ~hppa K
x11-themes/gnome-themes 2.20.0 ~hppa K
x11-themes/gnome-themes 2.20.1 ~hppa K
gnome-base/gnome-menus 2.20.0 ~hppa K
gnome-base/gnome-menus 2.20.1 ~hppa K
gnome-base/gnome-panel 2.20.0.1 ~hppa K
gnome-base/gnome-panel 2.20.1 ~hppa K
gnome-base/gnome-applets 2.20.0 ~hppa K
gnome-base/gnome-session 2.20.1 ~hppa K
gnome-base/gnome-desktop 2.20.0 ~hppa K
gnome-base/gnome-desktop 2.20.1 ~hppa K
app-text/poppler 0.6 ~hppa K
app-text/poppler-bindings 0.6 ~hppa K
app-text/poppler-bindings 0.6.1 ~hppa K
app-text/evince 2.20.0 ~hppa K
app-text/evince 2.20.1 ~hppa K
dev-python/pygtksourceview 2.0.0 ~hppa K
dev-libs/libpcre 7.4 ~hppa K
x11-libs/gtksourceview 2.0.1 ~hppa K
app-editors/gedit 2.20.2 ~hppa K
gnome-base/gdm 2.20.0 ~hppa K
gnome-base/gdm 2.20.1 ~hppa K
gnome-extra/gconf-editor 2.20.0 ~hppa K
gnome-extra/gcalctool 5.20.0 ~hppa K
gnome-extra/gcalctool 5.20.1 ~hppa K
gnome-extra/gcalctool 5.20.2 ~hppa K
app-arch/file-roller 2.20.0 ~hppa K
app-arch/file-roller 2.20.1 ~hppa K
www-client/epiphany 2.20.0 ~hppa K
www-client/epiphany 2.20.1 ~hppa K
x11-themes/gnome-icon-theme 2.20.0 ~hppa K
media-gfx/eog 2.20.0 ~hppa K
media-gfx/eog 2.20.1 ~hppa K
sys-apps/galago-daemon 0.5.1 K
dev-libs/libgalago 0.5.2 K
media-video/totem 2.20.0 ~hppa K
media-sound/sound-juicer 2.20.0 ~hppa K
media-sound/sound-juicer 2.20.1 ~hppa K
gnome-extra/gnome-media 2.20.1 ~hppa K
gnome-base/nautilus 2.20.0 ~hppa K
gnome-base/eel 2.20.0 ~hppa K
gnome-base/control-center 2.20.0.1 ~hppa K
gnome-base/control-center 2.20.1 ~hppa K
gnome-extra/bug-buddy 2.20.0-r1 ~hppa K
gnome-extra/bug-buddy 2.20.1 ~hppa K
gnome-base/libglade 2.6.2 ~hppa K
gnome-base/gail 1.20.1 ~hppa K
gnome-base/libgnomecanvas 2.20.0 ~hppa K
gnome-base/libgnomecanvas 2.20.1 ~hppa K
gnome-base/libgnomeui 2.20.1.1 ~hppa K
gnome-base/libgnome 2.20.1.1 ~hppa K
gnome-base/libbonoboui 2.20.0 ~hppa K
gnome-base/libbonobo 2.20.0 ~hppa K
gnome-base/libbonobo 2.20.1 ~hppa K
gnome-base/gconf 2.20.0 ~hppa K
gnome-base/gconf 2.20.1 ~hppa K
gnome-base/gnome-vfs 2.20.0 ~hppa K
gnome-extra/gnome-keyring-manager2.20.0 ~hppa K
gnome-base/gnome-keyring 2.20.1 ~hppa K
x11-wm/metacity 2.20.0 ~hppa K
x11-libs/libwnck 2.20.1 ~hppa K
gnome-base/orbit 2.14.9 ~hppa K
gnome-base/orbit 2.14.10 ~hppa K
dev-libs/libxslt 1.1.22 ~hppa K
dev-libs/libxml2 2.6.30 ~hppa K
dev-libs/atk 1.20.0 ~hppa K
x11-libs/pango 1.18.2 ~hppa K
x11-libs/pango 1.18.3 ~hppa K
x11-libs/gtk+ 2.12.0 ~hppa K
x11-libs/gtk+ 2.12.0-r1 ~hppa K
x11-libs/gtk+ 2.12.0-r2 ~hppa K
dev-libs/glib 2.14.1 ~hppa K
dev-libs/glib 2.14.2 ~hppa K
gnome-base/gnome 2.20.0 ~hppa K
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] repoman - I cannot handle it...
2007-10-21 19:06 ` [gentoo-dev] " Ciaran McCreesh
@ 2007-10-22 1:06 ` Jeroen Roovers
2007-10-22 1:18 ` Ciaran McCreesh
0 siblings, 1 reply; 17+ messages in thread
From: Jeroen Roovers @ 2007-10-22 1:06 UTC (permalink / raw
To: gentoo-dev
On Sun, 21 Oct 2007 20:06:25 +0100
Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk> wrote:
> On Sat, 20 Oct 2007 23:55:42 +0200
> Jeroen Roovers <jer@gentoo.org> wrote:
[...]
> Paludis has adjutrix --what-needs-keywording already... Might be a
> good starting point...
I don't see how one is a response to the other, except for the obvious
plug.
Kind regards,
JeR
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* [gentoo-dev] Re: repoman - I cannot handle it...
2007-10-20 12:45 [gentoo-dev] repoman - I cannot handle it Markus Rothe
2007-10-20 18:47 ` Zac Medico
2007-10-20 21:55 ` Jeroen Roovers
@ 2007-10-21 10:44 ` Steve Long
2007-10-21 11:35 ` Marius Mauch
2 siblings, 1 reply; 17+ messages in thread
From: Steve Long @ 2007-10-21 10:44 UTC (permalink / raw
To: gentoo-dev
Markus Rothe wrote:
> Attached are the scripts I use to commit packages stable/unstable.
> Somewhere must be a bug!
>
> 'name_split.cpp' splits a package name like sys-devel/gcc-4.1.2 into
> category, package name and version number. It's done in c++ as that's the
> only language I do more with than 'hello world' programms. Not much more,
> just more. ;-)
>
You can do this quite easily with a shell function. Here's a slightly modded
version of the one we use in update:
# returns true if there was a version
getPkgNameVer() {
case "$1" in
*-cvs[0-9]*)
pName=${1%-cvs[0-9]*}
pVer=${1#$pName-}
;; *-[0-9]*)
pName=${1%%-[0-9]*} # from first -N
pVer=${1#$pName-}
;; *)
pName=$1
pVer=
;; esac
pCat=${pName%/*}; pN=${pName#*/}
[ "$pVer" ] && return 0
return 1
}
..which leaves the results in globals pName (which includes cat) pVer, pCat
and pN (no category.) It handles cvs ebuilds as well, and is in sh.
> 'mp.sh' is the script which calls name_split, repoman etc. It's pretty
> straight forward and only does the things I would also do by hand.
>
> So if I want to mark for example sys-devel/gcc-4.1.2 stable on ppc64 I
> call mp.sh like this: mp.sh ppc64 sys-devel/gcc-4.1.2 "Stable on ppc64"
>
> If someone has a hint where the problem is, I would really appreciate
> that.
>
>From the bugs, it appears that, while you are keywording the packages
themselves, the dependencies are not being so marked. This is very similar
to the problem autounmask solves, unmasking all deps of a packages. I'd
suggest taking a look at it/asking ian about it; I never got into it as
it's in Perl, but we do use it as an external for update.
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] Re: repoman - I cannot handle it...
2007-10-21 10:44 ` [gentoo-dev] " Steve Long
@ 2007-10-21 11:35 ` Marius Mauch
2007-10-21 13:08 ` Marijn Schouten (hkBst)
2007-10-21 22:13 ` [gentoo-dev] " Steve Long
0 siblings, 2 replies; 17+ messages in thread
From: Marius Mauch @ 2007-10-21 11:35 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1864 bytes --]
On Sun, 21 Oct 2007 11:44:46 +0100
Steve Long <slong@rathaus.eclipse.co.uk> wrote:
> Markus Rothe wrote:
>
> > Attached are the scripts I use to commit packages stable/unstable.
> > Somewhere must be a bug!
> >
> > 'name_split.cpp' splits a package name like sys-devel/gcc-4.1.2 into
> > category, package name and version number. It's done in c++ as
> > that's the only language I do more with than 'hello world'
> > programms. Not much more, just more. ;-)
> >
> You can do this quite easily with a shell function. Here's a slightly
> modded version of the one we use in update:
> # returns true if there was a version
> getPkgNameVer() {
> case "$1" in
> *-cvs[0-9]*)
> pName=${1%-cvs[0-9]*}
> pVer=${1#$pName-}
> ;; *-[0-9]*)
> pName=${1%%-[0-9]*} # from first -N
> pVer=${1#$pName-}
> ;; *)
> pName=$1
> pVer=
> ;; esac
> pCat=${pName%/*}; pN=${pName#*/}
> [ "$pVer" ] && return 0
> return 1
> }
> ..which leaves the results in globals pName (which includes cat)
> pVer, pCat and pN (no category.) It handles cvs ebuilds as well, and
> is in sh.
But like name_splitted.cpp is buggy as it assumes that a dash followed
by a digit starts the version part. See
echo ${PORTDIR}/*-*/* | tr ' ' '\n' | grep '\-[[:digit:]]'
for some names that break the assumption.
And no clue what that cvs stuff is supposed to do, as there are no
packages using that naming pattern, and the (unused) cvs versioning
extension in portage-2.1 also uses a different pattern.
Marius
--
Public Key at http://www.genone.de/info/gpg-key.pub
In the beginning, there was nothing. And God said, 'Let there be
Light.' And there was still nothing, but you could see a bit better.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] Re: repoman - I cannot handle it...
2007-10-21 11:35 ` Marius Mauch
@ 2007-10-21 13:08 ` Marijn Schouten (hkBst)
2007-10-21 14:49 ` Elias Pipping
2007-10-21 22:13 ` [gentoo-dev] " Steve Long
1 sibling, 1 reply; 17+ messages in thread
From: Marijn Schouten (hkBst) @ 2007-10-21 13:08 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marius Mauch wrote:
> But like name_splitted.cpp is buggy as it assumes that a dash followed
> by a digit starts the version part. See
> echo ${PORTDIR}/*-*/* | tr ' ' '\n' | grep '\-[[:digit:]]'
No output here.
Marijn
- --
Marijn Schouten (hkBst), Gentoo Lisp project
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHG089p/VmCx0OL2wRAuQcAJ9mhWlkGGgheBdnfRbDe+iz/VgXJQCfeakI
a5U8au4Z5GwWdezAfK7/zso=
=4omD
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] Re: repoman - I cannot handle it...
2007-10-21 13:08 ` Marijn Schouten (hkBst)
@ 2007-10-21 14:49 ` Elias Pipping
0 siblings, 0 replies; 17+ messages in thread
From: Elias Pipping @ 2007-10-21 14:49 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 943 bytes --]
On Sun, Oct 21, 2007 at 03:08:13PM +0200, Marijn Schouten (hkBst) wrote:
> Marius Mauch wrote:
> > But like name_splitted.cpp is buggy as it assumes that a dash followed
> > by a digit starts the version part. See
> > echo ${PORTDIR}/*-*/* | tr ' ' '\n' | grep '\-[[:digit:]]'
>
> No output here.
This is what you're supposed to see:
% echo *-*/* | tr ' ' '\n' | grep '\-[[:digit:]]'
app-dicts/canna-2ch
media-fonts/font-adobe-100dpi
media-fonts/font-adobe-75dpi
media-fonts/font-adobe-utopia-100dpi
media-fonts/font-adobe-utopia-75dpi
media-fonts/font-bh-100dpi
media-fonts/font-bh-75dpi
media-fonts/font-bh-lucidatypewriter-100dpi
media-fonts/font-bh-lucidatypewriter-75dpi
media-fonts/font-bitstream-100dpi
media-fonts/font-bitstream-75dpi
net-dialup/intel-536ep
net-misc/cisco-vpnclient-3des
net-misc/nxclient-2xterminalserver
net-misc/nxserver-2xterminalserver
-- Elias
[-- Attachment #2: Type: application/pgp-signature, Size: 186 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [gentoo-dev] Re: Re: repoman - I cannot handle it...
2007-10-21 11:35 ` Marius Mauch
2007-10-21 13:08 ` Marijn Schouten (hkBst)
@ 2007-10-21 22:13 ` Steve Long
2007-10-22 1:36 ` Marius Mauch
1 sibling, 1 reply; 17+ messages in thread
From: Steve Long @ 2007-10-21 22:13 UTC (permalink / raw
To: gentoo-dev
Marius Mauch wrote:
> But like name_splitted.cpp is buggy as it assumes that a dash followed
> by a digit starts the version part. See
> echo ${PORTDIR}/*-*/* | tr ' ' '\n' | grep '\-[[:digit:]]'
> for some names that break the assumption.
>
Whoops :S Guess I need to change that then :)
> And no clue what that cvs stuff is supposed to do, as there are no
> packages using that naming pattern, and the (unused) cvs versioning
> extension in portage-2.1 also uses a different pattern.
>
Well the line from portage_versions.py is:
ver_regexp = re.compile("^(cvs\\.)?(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|p|beta
alpha|rc)\\d*)*)(-r(\\d+))?$")
- which means that a version begins with either a digit or cvs followed by
digit.
We represented this in bash (for verCompare) as:
ver='^(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta|alpha|rc)[0-9]*)*
(-r([0-9]+))?$'
For inter-rev compatibility, we changed the last term to: (-r([0-9.]+))?
(we check that there's only one . later.) [We should also use [[:digit:]]
instead of [0-9] for i18n.]
I think we can use:
CPV='^(.*-.*)/(.*)-(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta
alpha|rc)[0-9]*)*)(-r([0-9.]+))?$'
- as a regex to check against. If it doesn't match, it isn't a valid cpv (I
think.) I've tested it on the whole (non-overlay) tree with the following
script:
http://dev.gentooexperimental.org/~igli/src/verCheck
md5: 53ef36ffd9388308ff02306f301382c1
It's called with ./verCheck to check the whole tree, or with an optional
[cat-search] parameter, eg ./verCheck media-fonts or ./verCheck 'media-*'
Adding -v as the first parameter means it will output version info for all
ebuilds it finds, otherwise it will only output for packages with the
tricky pattern -[0-9]
Any ebuilds that don't match, get output to stderr. I didn't find any, and
for all the ones it found with -N in the package name, it seemed to get the
correct version numbers, afaict:
$ ./verCheck
app-dicts:
canna-2ch 20030827
media-fonts:
font-adobe-100dpi 1.0.0
font-adobe-75dpi 1.0.0
font-adobe-utopia-100dpi 1.0.1
font-adobe-utopia-75dpi 1.0.1
font-bh-100dpi 1.0.0
font-bh-75dpi 1.0.0
font-bh-lucidatypewriter-100dpi 1.0.0
font-bh-lucidatypewriter-75dpi 1.0.0
font-bitstream-100dpi 1.0.0
font-bitstream-75dpi 1.0.0
net-dialup:
intel-536ep 4.71
net-misc:
cisco-vpnclient-3des 4.6.02.0030 4.6.03.01901 4.7.00.0640 4.7.00.06401
4.8.00.0490
nxclient-2xterminalserver 1.5.0
nxserver-2xterminalserver 1.5.0
(No, UberLord: it /won't/ work in sh ;p)
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] Re: Re: repoman - I cannot handle it...
2007-10-21 22:13 ` [gentoo-dev] " Steve Long
@ 2007-10-22 1:36 ` Marius Mauch
2007-10-22 1:47 ` Ciaran McCreesh
2007-10-22 7:24 ` [gentoo-dev] " Steve Long
0 siblings, 2 replies; 17+ messages in thread
From: Marius Mauch @ 2007-10-22 1:36 UTC (permalink / raw
To: gentoo-dev
On Sun, 21 Oct 2007 23:13:58 +0100
Steve Long <slong@rathaus.eclipse.co.uk> wrote:
> Marius Mauch wrote:
> > But like name_splitted.cpp is buggy as it assumes that a dash
> > followed by a digit starts the version part. See
> > echo ${PORTDIR}/*-*/* | tr ' ' '\n' | grep '\-[[:digit:]]'
> > for some names that break the assumption.
> >
> Whoops :S Guess I need to change that then :)
>
> > And no clue what that cvs stuff is supposed to do, as there are no
> > packages using that naming pattern, and the (unused) cvs versioning
> > extension in portage-2.1 also uses a different pattern.
> >
> Well the line from portage_versions.py is:
> ver_regexp = re.compile("^(cvs\\.)?(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|
> p|beta
> alpha|rc)\\d*)*)(-r(\\d+))?$")
> - which means that a version begins with either a digit or cvs
> followed by digit.
Not precisely: a digit, or "cvs" followed by a dot and a digit (you got
it right in the following, but not in the code posted earlier)
> We represented this in bash (for verCompare) as:
> ver='^(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta|alpha|rc)
> [0-9]*)* (-r([0-9]+))?$'
>
> I think we can use:
> CPV='^(.*-.*)/(.*)-(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta
> alpha|rc)[0-9]*)*)(-r([0-9.]+))?$'
Well, categories don't necessarily have to contain a dash (though all
official ones do currently).
Marius
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] Re: Re: repoman - I cannot handle it...
2007-10-22 1:36 ` Marius Mauch
@ 2007-10-22 1:47 ` Ciaran McCreesh
2007-10-22 7:24 ` [gentoo-dev] " Steve Long
1 sibling, 0 replies; 17+ messages in thread
From: Ciaran McCreesh @ 2007-10-22 1:47 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
On Mon, 22 Oct 2007 03:36:48 +0200
Marius Mauch <genone@gentoo.org> wrote:
> Well, categories don't necessarily have to contain a dash (though all
> official ones do currently).
Like virtual/?
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [gentoo-dev] Re: Re: Re: repoman - I cannot handle it...
2007-10-22 1:36 ` Marius Mauch
2007-10-22 1:47 ` Ciaran McCreesh
@ 2007-10-22 7:24 ` Steve Long
1 sibling, 0 replies; 17+ messages in thread
From: Steve Long @ 2007-10-22 7:24 UTC (permalink / raw
To: gentoo-dev
Marius Mauch wrote:
> On Sun, 21 Oct 2007 23:13:58 +0100
> Steve Long <slong@rathaus.eclipse.co.uk> wrote:
>> Well the line from portage_versions.py is:
>> ver_regexp = re.compile("^(cvs\\.)?(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|
>> p|beta
>> alpha|rc)\\d*)*)(-r(\\d+))?$")
>> - which means that a version begins with either a digit or cvs
>> followed by digit.
>
> Not precisely: a digit, or "cvs" followed by a dot and a digit (you got
> it right in the following, but not in the code posted earlier)
>
Bleh, thanks: code review FTW! Sleep-loss er FTL :p
>> We represented this in bash (for verCompare) as:
>> ver='^(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta|alpha|rc)
>> [0-9]*)* (-r([0-9]+))?$'
>>
>> I think we can use:
>> CPV='^(.*-.*)/(.*)-(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta
>> alpha|rc)[0-9]*)*)(-r([0-9.]+))?$'
>
> Well, categories don't necessarily have to contain a dash (though all
> official ones do currently).
>
Ah OK, excellent!
^(([[:alpha:]]+-[[:alpha:]]+)|virtual)/.. and
^([[:alpha:]]+(-[[:alpha:]]+)?)/.. (if other single-terms are to be allowed)
- would add one to every subsequent term index (for the general case, not
when globbing the tree.)
If we can correctly reduce this to a single regex match, it'll make my life
a lot easier :)
(For update there's no need to check the category exists, since the strings
are taken from portage output, but such a check could be performed after
the match.)
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2007-10-22 7:22 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-20 12:45 [gentoo-dev] repoman - I cannot handle it Markus Rothe
2007-10-20 18:47 ` Zac Medico
2007-10-20 21:35 ` Markus Rothe
2007-10-20 21:55 ` Jeroen Roovers
2007-10-21 18:49 ` Markus Rothe
2007-10-21 21:42 ` [gentoo-dev] " Christian Faulhammer
2007-10-21 19:06 ` [gentoo-dev] " Ciaran McCreesh
2007-10-22 1:06 ` Jeroen Roovers
2007-10-22 1:18 ` Ciaran McCreesh
2007-10-21 10:44 ` [gentoo-dev] " Steve Long
2007-10-21 11:35 ` Marius Mauch
2007-10-21 13:08 ` Marijn Schouten (hkBst)
2007-10-21 14:49 ` Elias Pipping
2007-10-21 22:13 ` [gentoo-dev] " Steve Long
2007-10-22 1:36 ` Marius Mauch
2007-10-22 1:47 ` Ciaran McCreesh
2007-10-22 7:24 ` [gentoo-dev] " Steve Long
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox