From: Markus Rothe <corsair@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] repoman - I cannot handle it...
Date: Sat, 20 Oct 2007 14:45:49 +0200 [thread overview]
Message-ID: <200710201445.56961.corsair@gentoo.org> (raw)
[-- 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 --]
next reply other threads:[~2007-10-20 13:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-20 12:45 Markus Rothe [this message]
2007-10-20 18:47 ` [gentoo-dev] repoman - I cannot handle it 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710201445.56961.corsair@gentoo.org \
--to=corsair@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox