diff options
| author | skvidal <skvidal> | 2005-06-16 20:07:51 +0000 |
|---|---|---|
| committer | skvidal <skvidal> | 2005-06-16 20:07:51 +0000 |
| commit | d4b15286d03862f05e4e69570e10ba5aeb282e6e (patch) | |
| tree | 461c9c7447aa1dad1bf149cca503fbd90958e858 | |
| parent | 79d8855472cf6202ff08ab62ef2db12b45524cae (diff) | |
- catch srpm not found traceback
- fix fc4 config files
| -rw-r--r-- | etc/fedora-4-i386-core.cfg | 8 | ||||
| -rw-r--r-- | etc/fedora-4-ppc-core.cfg | 7 | ||||
| -rw-r--r-- | etc/fedora-4-x86_64-core.cfg | 8 | ||||
| -rw-r--r-- | mock.py | 9 |
4 files changed, 28 insertions, 4 deletions
diff --git a/etc/fedora-4-i386-core.cfg b/etc/fedora-4-i386-core.cfg index e0e5403..6bdc6e3 100644 --- a/etc/fedora-4-i386-core.cfg +++ b/etc/fedora-4-i386-core.cfg @@ -35,7 +35,13 @@ assumeyes=1 [core] name=core -baseurl=http://newmirror.linux.duke.edu/pub/fedora/linux/core/4/i386 +baseurl=http://newmirror.linux.duke.edu/pub/fedora/linux/core/4/i386/os/ + + +[updates-released] +name=updates +baseurl=http://newmirror.linux.duke.edu/pub/fedora/linux/core/updates/4/i386/ + [groups] name=groups diff --git a/etc/fedora-4-ppc-core.cfg b/etc/fedora-4-ppc-core.cfg index cefd55b..b3229a7 100644 --- a/etc/fedora-4-ppc-core.cfg +++ b/etc/fedora-4-ppc-core.cfg @@ -34,7 +34,12 @@ assumeyes=1 [core] name=core -baseurl=http://newmirror.linux.duke.edu/pub/fedora/linux/core/4/ppc +baseurl=http://newmirror.linux.duke.edu/pub/fedora/linux/core/4/ppc/os + + +[updates-released] +name=updates +baseurl=http://newmirror.linux.duke.edu/pub/fedora/linux/core/updates/4/ppc/ [groups] name=groups diff --git a/etc/fedora-4-x86_64-core.cfg b/etc/fedora-4-x86_64-core.cfg index bb61171..d6b6e7b 100644 --- a/etc/fedora-4-x86_64-core.cfg +++ b/etc/fedora-4-x86_64-core.cfg @@ -36,7 +36,13 @@ exclude=*.i386 *.486 *.586 *.i686 *.athlon [core] name=core -baseurl=http://newmirror.linux.duke.edu/pub/fedora/linux/core/4/x86_64 +baseurl=http://newmirror.linux.duke.edu/pub/fedora/linux/core/4/x86_64/os/ + + +[updates-released] +name=updates +baseurl=http://newmirror.linux.duke.edu/pub/fedora/linux/core/updates/4/x86_64/ + [groups] name=groups @@ -631,14 +631,21 @@ def main(): if len(args) < 1: error("No srpm specified - nothing to do") sys.exit(50) + srpm = args[0] # we only take one and I don't care. :) ts = rpmUtils.transaction.initReadOnlyTransaction() - hdr = rpmUtils.miscutils.hdrFromPackage(ts, srpm) + try: + hdr = rpmUtils.miscutils.hdrFromPackage(ts, srpm) + except rpmUtils.RpmUtilsError, e: + error("Specified srpm %s cannot be found/opened" % srpm) + sys.exit(50) + if hdr[rpm.RPMTAG_SOURCEPACKAGE] != 1: error("Specified srpm isn't a srpm! Can't go on") sys.exit(50) + # read in the config file by chroot name if options.chroot.endswith('.cfg'): cfg = '%s/%s' % (config_path, options.chroot) |
