View | Details | Raw Unified | Return to bug 80831
Collapse All | Expand All

(-)/home/hsn/hacked/pkg_trackinst/Makefile (-1 / +2 lines)
Lines 6-18 Link Here
6
6
7
PORTNAME=	pkg_trackinst
7
PORTNAME=	pkg_trackinst
8
PORTVERSION=	1.1
8
PORTVERSION=	1.1
9
PORTREVISION=	1
9
CATEGORIES=	sysutils
10
CATEGORIES=	sysutils
10
MASTER_SITES=	http://people.freebsd.org/~perky/distfiles/
11
MASTER_SITES=	http://people.freebsd.org/~perky/distfiles/
11
12
12
MAINTAINER=	perky@FreeBSD.org
13
MAINTAINER=	perky@FreeBSD.org
13
COMMENT=	PkgDB/pkg-plist generator by tracking installation
14
COMMENT=	PkgDB/pkg-plist generator by tracking installation
14
15
15
USE_PYTHON=	2.4+
16
USE_PYTHON=	2.3+
16
USE_REINPLACE=	yes
17
USE_REINPLACE=	yes
17
MAKE_ENV=	PYTHON_CMD=${PYTHON_CMD}
18
MAKE_ENV=	PYTHON_CMD=${PYTHON_CMD}
18
19
(-)/home/hsn/hacked/pkg_trackinst/files/patch-python23 (+28 lines)
Line 0 Link Here
1
--- PkgTrackInst/Trackers.py.orig	Sun May  8 23:10:35 2005
2
+++ PkgTrackInst/Trackers.py	Sun May  8 23:14:08 2005
3
@@ -29,11 +29,11 @@
4
     def __init__(self, created=False):
5
         self.created = created
6
 
7
-    @staticmethod
8
     def create_root():
9
         InstEntry.root = InstDirectory()
10
         InstEntry.root.abspath = '/'
11
         return InstEntry.root
12
+    create_root=staticmethod(create_root)
13
 
14
     def traverse(self, depth=0):
15
         print '  ' * depth + repr(self)
16
--- PkgTrackInst/InstallSession.py.orig	Sun May  8 04:28:29 2005
17
+++ PkgTrackInst/InstallSession.py	Sun May  8 23:09:45 2005
18
@@ -17,8 +17,8 @@
19
 import os, sys
20
 from PkgTrackInst import options
21
 from PkgTrackInst.cmd_support import errx
22
-from PkgTrackInst.Trackers import (
23
-        InstFile, InstDirectory, InstSymbolicLink, TrackRoot)
24
+from PkgTrackInst.Trackers import InstFile, InstDirectory, \
25
+                                  InstSymbolicLink, TrackRoot
26
 
27
 DELIM = '\x01'
28
 
(-)/home/hsn/hacked/pkg_trackinst/files/patch-sortfix (+59 lines)
Line 0 Link Here
1
--- PkgTrackInst/PlistWriter.py.orig	Sat May  7 02:08:20 2005
2
+++ PkgTrackInst/PlistWriter.py	Mon May  9 11:27:29 2005
3
@@ -52,7 +52,7 @@
4
         for var, raw, stripped in pat_subst.findall(substlist):
5
             if var not in SUBST_IGNORE:
6
                 self.plist_subst.append((stripped or raw, var))
7
-        self.plist_subst.sort(reverse=True)
8
+        self.plist_subst.sort(lambda x,y:-cmp(x,y))
9
 
10
     def write(self):
11
         if os.path.exists(options.output):
12
@@ -111,7 +111,9 @@
13
             f = self.open_manlist_output()
14
             for cate, pages in manpages.iteritems():
15
                 out = ['']
16
-                for page in sorted(pages):
17
+                tmp=pages[:]
18
+                tmp.sort()
19
+                for page in tmp:
20
                     item = page + '.' + cate
21
                     if (len(item) + len(out[-1]) > MANPAGELIST_LINEWIDTH and
22
                             out[-1]): # put 1 at least
23
@@ -136,8 +138,8 @@
24
                     fileents.append(ent)
25
         TrackRoot.walk(gather_entries)
26
 
27
-        fileents.sort(key=lambda ent: ent.abspath)
28
-        dirents.sort(key=lambda ent: ent.abspath)
29
+        fileents.sort(lambda ent,ent2: cmp(ent.abspath,ent2.abspath))
30
+        dirents.sort(lambda ent,ent2: cmp(ent.abspath,ent2.abspath))
31
 
32
         if relsub:
33
             translatepath = self.relpath
34
@@ -146,7 +148,9 @@
35
 
36
         for ent in fileents:
37
             print >> out, translatepath(ent.abspath)
38
-        for ent in reversed(dirents):
39
+        tmp=dirents[:]            
40
+        tmp.sort(lambda x,y:-cmp(x,y))
41
+        for ent in tmp:
42
             print >> out, '@dirrm ' + translatepath(ent.abspath)
43
 
44
 
45
@@ -236,8 +240,13 @@
46
     def print_listing(self, content, title, isdir, relsub):
47
         print
48
         print "=== %s ===" % title
49
+        tmp=content[:]
50
+        if isdir: 
51
+            tmp.sort(lambda x,y:-cmp(x,y))
52
+        else:
53
+            tmp.sort()
54
 
55
-        for entry in sorted(content, reverse=isdir):
56
+        for entry in tmp:
57
             if relsub:
58
                 outname = self.relpath(entry)
59
             else:

Return to bug 80831