[Pypt-offline-general] SF.net SVN: pypt-offline: [164] trunk
Status: Beta
Brought to you by:
riteshsarraf
|
From: <rit...@us...> - 2007-08-02 19:11:38
|
Revision: 164
http://pypt-offline.svn.sourceforge.net/pypt-offline/?rev=164&view=rev
Author: riteshsarraf
Date: 2007-08-02 12:11:41 -0700 (Thu, 02 Aug 2007)
Log Message:
-----------
[fetch_bugy.py]
* Strip the carriage returns
* Move bugTypes to global
* Align FetchBugReports() call
[pypt_core.py]
* Bring bugTypes to global
* Some stupid fixes in the offline bug support in syncer()
* syncer() offline bug report is broken currently.
* syncer() wasn't used for long and was completely broken. options wasn't supposed to be passed to it. Only install_upgrade and apt_$$_$$_type was required.
Modified Paths:
--------------
trunk/fetch_bugs.py
trunk/pypt_core.py
Modified: trunk/fetch_bugs.py
===================================================================
--- trunk/fetch_bugs.py 2007-08-02 09:52:09 UTC (rev 163)
+++ trunk/fetch_bugs.py 2007-08-02 19:11:41 UTC (rev 164)
@@ -3,13 +3,17 @@
import pypt_core
package = raw_input("Please enter the Debian package name: ")
+package = package.rstrip("\r")
file = raw_input("Please enter the filename with full path: ")
+file = file.rstrip("\r")
+bugTypes = ["Resolved bugs", "Normal bugs", "Minor bugs", "Wishlist items", "FIXED"]
+
#if pypt_core.FetchBugReportsDebian(package, file) is True:
# print "Wrote bug report details for package %s to file %s.\n" % (package, file)
-BugReportDebian = pypt_core.FetchBugReports()
+BugReportDebian = pypt_core.FetchBugReports(file, bugTypes)
if BugReportDebian.FetchBugsDebian(package, file) is True:
print "Wrote bug report details for package %s to file %s.\n" % (package, file)
Modified: trunk/pypt_core.py
===================================================================
--- trunk/pypt_core.py 2007-08-02 09:52:09 UTC (rev 163)
+++ trunk/pypt_core.py 2007-08-02 19:11:41 UTC (rev 164)
@@ -46,6 +46,7 @@
#apt_package_target_path = 'C:\\temp'
pypt_bug_file_format = "__pypt__bug__report"
+bugTypes = ["Resolved bugs", "Normal bugs", "Minor bugs", "Wishlist items", "FIXED"]
#These are spaces which will overwrite the progressbar left mess
LINE_OVERWRITE_MID = " " * 30
@@ -336,7 +337,7 @@
class FetchBugReports(Archiver):
- def __init__(self, pypt_bug_file_format, bugTypes=["Resolved bugs", "Normal bugs", "Minor bugs", "Wishlist items", "FIXED"], lock=False, ArchiveFile=None):
+ def __init__(self, pypt_bug_file_format, bugTypes, ArchiveFile=None, lock=False):
self.bugsList = []
self.bugTypes = bugTypes
@@ -649,9 +650,9 @@
if ArgumentOptions.deb_bugs:
if ArgumentOptions.zip_it:
- FetchBugReportsDebian = FetchBugReports(pypt_bug_file_format, ArgumentOptions.zip_upgrade_file, lock=True)
+ FetchBugReportsDebian = FetchBugReports(pypt_bug_file_format, bugTypes, ArgumentOptions.zip_upgrade_file, lock=True)
else:
- FetchBugReportsDebian = FetchBugReports(pypt_bug_file_format)
+ FetchBugReportsDebian = FetchBugReports(pypt_bug_file_format, bugTypes)
if ArgumentOptions.download_dir is None:
if os.access("pypt-downloads", os.W_OK) is True:
@@ -1105,9 +1106,27 @@
bugs_number = []
for filename in file.namelist():
if filename.endswith(pypt_bug_file_format):
- bugs_number += filename
+ bugs_number.append(filename)
if bugs_number:
+ log.msg("\n\nFollowing are the list of bugs present.\n")
+ for each_bug in bugs_number:
+ each_bug = each_bug.split('.')[1]
+ log.msg("%s\n" % (each_bug) )
+ response = raw_input("What would you like to do next:\t (y, N, Bug Number, ?)" )
+ response = response.rstrip("\r")
+ if response == "?":
+ log.msg("(yY) Yes. Proceed with installation\n")
+ log.msg("(nN) No, Abort.\n")
+ log.msg("(Bug Number) Display the bug report.\n")
+ log.msg("(?) Display this help message.\n")
+ elif respone == 'y' or response == 'Y':
+ pass
+ elif response == 'n' or response == 'N':
+ pass
+ elif response == 'Number':
+ pass
+
printf("I found %d number of bugs.\n" % len(bugs_number) )
pass
@@ -1364,9 +1383,9 @@
log.err("\nYou need superuser privileges to execute this option\n")
sys.exit(1)
if os.path.isfile(options.install_upgrade) is True:
- syncer(options, 1)
+ syncer(options.install_upgrade, apt_package_target_path, 1)
elif os.path.isdir(options.install_upgrade) is True:
- syncer(options, 2)
+ syncer(options.install_upgrade, apt_package_target_path, 2)
else:
log.err("Aieee! %s is unsupported format\n" % (options.install_upgrade))
sys.exit(0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|