diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-02-22 13:18:09 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-02-22 13:18:09 +0000 |
commit | 584edcc22102046a6289d3d91fd88afd0f299aa9 (patch) | |
tree | 7865b5618cf0cf083f08fcad604e10008c78b31b | |
parent | ea4ab01794f3c1faab20966a16af990aaa3c7510 (diff) | |
download | portage-584edcc22102046a6289d3d91fd88afd0f299aa9.tar.gz portage-584edcc22102046a6289d3d91fd88afd0f299aa9.tar.bz2 portage-584edcc22102046a6289d3d91fd88afd0f299aa9.zip |
Add some sanity checks for file list handling when repolevel < 3.
svn path=/main/trunk/; revision=6036
-rwxr-xr-x | bin/repoman | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman index 7006620b0..73db1b987 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1671,24 +1671,32 @@ else: elif repolevel==2: # In a category dir for x in myfiles: xs=x.split("/") + if len(xs) < 4-repolevel: + continue if xs[0]==".": xs=xs[1:] if xs[0] in mydone: continue mydone.append(xs[0]) repoman_settings["O"] = os.path.join(startdir, xs[0]) + if not os.path.isdir(repoman_settings["O"]): + continue portage.digestgen([], repoman_settings, manifestonly=1, myportdb=portdb) elif repolevel==1: # repo-cvsroot print green("RepoMan sez:"), "\"You're rather crazy... doing the entire repository.\"\n" for x in myfiles: xs=x.split("/") + if len(xs) < 4-repolevel: + continue if xs[0]==".": xs=xs[1:] if "/".join(xs[:2]) in mydone: continue mydone.append("/".join(xs[:2])) repoman_settings["O"] = os.path.join(startdir, xs[0], xs[1]) + if not os.path.isdir(repoman_settings["O"]): + continue portage.digestgen([], repoman_settings, manifestonly=1, myportdb=portdb) else: @@ -1735,6 +1743,8 @@ else: continue mydone.append(xs[0]) repoman_settings["O"] = os.path.join(".", xs[0]) + if not os.path.isdir(repoman_settings["O"]): + continue gpgsign(os.path.join(repoman_settings["O"], "Manifest")) elif repolevel==1: # repo-cvsroot print green("RepoMan sez:"), "\"You're rather crazy... doing the entire repository.\"\n" @@ -1749,6 +1759,8 @@ else: continue mydone.append("/".join(xs[:2])) repoman_settings["O"] = os.path.join(".", xs[0], xs[1]) + if not os.path.isdir(repoman_settings["O"]): + continue gpgsign(os.path.join(repoman_settings["O"], "Manifest")) except portage.exception.PortageException, e: portage.writemsg("!!! %s\n" % str(e)) |