# New Ticket Created by  Reini Urban 
# Please include the string:  [perl #56542]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=56542 >


disassemble is too generic when being packaged into /usr/bin/.

Two versions:
Full CVS-style version: disassemble-long.patch
I don't know how svn handles file renames.
After svn renaming it would just be the shorter disassemble_rename.patch
-- 
Reini Urban
http://phpwiki.org/  http://murbreak.at/
2008-07-03 00:19:03 rurban

	* config/gen/makefiles/root.in, tools/util/dump_pbc.pl:
	Rename disassemble to pbc_diassemble. This is too generic.
	* src/disassemble.c: removed
	* src/pbc_disassemble.c: added

diff -u  src/parrot-0.6.3/config/gen/makefiles/root.in.orig
--- src/parrot-0.6.3/config/gen/makefiles/root.in.orig	2008-06-16 13:06:01.000000000 +0000
+++ src/parrot-0.6.3/config/gen/makefiles/root.in	2008-07-02 22:14:43.765625000 +0000
@@ -462,7 +462,7 @@
 # Executables
 PARROT              = $(CUR_DIR)/@[EMAIL PROTECTED](EXE)
 MINIPARROT          = $(CUR_DIR)/miniparrot$(EXE)
-DIS                 = $(CUR_DIR)/disassemble$(EXE)
+DIS                 = $(CUR_DIR)/pbc_disassemble$(EXE)
 PDUMP               = $(CUR_DIR)/pdump$(EXE)
 PINFO               = $(CUR_DIR)/pbc_info$(EXE)
 PBCMERGE            = $(CUR_DIR)/pbc_merge$(EXE)
@@ -474,7 +474,7 @@
 
 # Installable executables
 INSTALLABLEPARROT   = $(CUR_DIR)/installable_parrot$(EXE)
-INSTALLABLEDIS      = $(CUR_DIR)/installable_disassemble$(EXE)
+INSTALLABLEDIS      = $(CUR_DIR)/installable_pbc_disassemble$(EXE)
 INSTALLABLEPDUMP    = $(CUR_DIR)/installable_pdump$(EXE)
 INSTALLABLEPINFO    = $(CUR_DIR)/installable_pbc_info$(EXE)
 INSTALLABLEPBCMERGE = $(CUR_DIR)/installable_pbc_merge$(EXE)
@@ -894,16 +894,16 @@
 # Parrot Disassembler
 #
 
-$(SRC_DIR)/disassemble$(O) : $(GENERAL_H_FILES)
+$(SRC_DIR)/pbc_disassemble$(O) : $(GENERAL_H_FILES)
 
-$(DIS) : $(SRC_DIR)/disassemble$(O) $(LIBPARROT)
+$(DIS) : $(SRC_DIR)/pbc_disassemble$(O) $(LIBPARROT)
 	$(LINK) @[EMAIL PROTECTED]@ \
-    $(SRC_DIR)/disassemble$(O) \
+    $(SRC_DIR)/pbc_disassemble$(O) \
     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 
-$(INSTALLABLEDIS) : $(SRC_DIR)/disassemble$(O) $(LIBPARROT)
+$(INSTALLABLEDIS) : $(SRC_DIR)/pbc_disassemble$(O) $(LIBPARROT)
 	$(LINK) @[EMAIL PROTECTED]@ \
-    $(SRC_DIR)/disassemble$(O) \
+    $(SRC_DIR)/pbc_disassemble$(O) \
     $(ALL_PARROT_LIBS) $(LINKFLAGS)
 
 #
@@ -1597,7 +1597,7 @@
     $(SRC_DIR)/pbc_info$(O) $(PINFO) \
     $(PDB) $(SRC_DIR)/pdb$(O) \
     $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \
-    $(DIS) $(SRC_DIR)/disassemble$(O) \
+    $(DIS) $(SRC_DIR)/pbc_disassemble$(O) \
     $(SRC_DIR)/main$(O) \
     $(SRC_DIR)/null_config$(O) \
     $(SRC_DIR)/parrot_config$(O) \
@@ -1633,7 +1633,7 @@
     $(SRC_DIR)/pbc_info$(O) $(PINFO) \
     $(PDB) $(SRC_DIR)/pdb$(O) \
     $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \
-    $(DIS) $(SRC_DIR)/disassemble$(O) \
+    $(DIS) $(SRC_DIR)/pbc_disassemble$(O) \
     $(SRC_DIR)/null_config$(O) \
     $(SRC_DIR)/parrot_config$(O) \
     $(SRC_DIR)/install_config$(O) \
diff -u  src/parrot-0.6.3/src/disassemble.c.orig
--- src/parrot-0.6.3/src/disassemble.c.orig	2008-05-07 23:32:46.000000000 +0000
+++ src/parrot-0.6.3/src/disassemble.c	2008-07-02 22:28:37.562500000 +0000
@@ -1,124 +0,0 @@
-/*
-Copyright (C) 2001-2003, The Perl Foundation.
-$Id: disassemble.c 26465 2008-03-18 07:30:24Z chromatic $
-
-=head1 NAME
-
-disassemble - Parrot disassembler
-
-=head1 SYNOPSIS
-
-    disassemble file.pbc
-
-=head1 DESCRIPTION
-
-This uses the C<Parrot_disassemble()> function from F<src/embed.c>,
-which in turn uses the C<PDB_disassemble()> function from
-F<src/debug.c>.
-
-=head2 Functions
-
-=over 4
-
-=cut
-
-*/
-
-#include <parrot/parrot.h>
-#include "parrot/embed.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-static void do_dis(Parrot_Interp);
-
-/*
-
-=item C<int main(int argc, char *argv[])>
-
-The run-loop. Starts up an interpreter, loads the bytecode from the
-command-line and disassembles it.
-
-=cut
-
-*/
-
-int
-main(int argc, char *argv[])
-{
-    Parrot_Interp interp;
-    char *filename;
-    Parrot_PackFile pf;
-
-    interp = Parrot_new(NULL);
-
-    if (!interp) {
-        return 1;
-    }
-
-    /* set the top of the stack so GC can trace it for GC-able pointers
-     * see trace_system_areas() in src/cpu_dep.c */
-    interp->lo_var_ptr = &interp;
-
-    if (argc != 2) {
-        fprintf(stderr, "Usage: disassemble programfile \n");
-        Parrot_exit(interp, 1);
-    }
-
-    filename = argv[1];
-
-    pf = Parrot_readbc(interp, filename);
-
-    if (!pf) {
-        return 1;
-    }
-
-    Parrot_loadbc(interp, pf);
-
-    do_dis(interp);
-
-    Parrot_exit(interp, 0);
-}
-
-/*
-
-=item C<static void do_dis(Parrot_Interp interp)>
-
-Do the disassembling.
-
-=cut
-
-*/
-
-static void
-do_dis(Parrot_Interp interp)
-{
-    Parrot_disassemble(interp);
-}
-
-/*
-
-=back
-
-=head1 SEE ALSO
-
-F<src/embed.c> and F<src/debug.c>.
-
-=head1 HISTORY
-
-Initial version by Daniel Grunblatt on 2002.5.26.
-
-Florian Ragwitz: Moved POD documentation that's not necessary to know how to
-actually run the disassembler to normal C comments (Wed, 16 Nov 2005).
-
-=cut
-
-*/
-
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
diff -u  src/parrot-0.6.3/src/pbc_disassemble.c.orig
--- src/parrot-0.6.3/src/pbc_disassemble.c.orig	2008-07-02 22:28:50.390625000 +0000
+++ src/parrot-0.6.3/src/pbc_disassemble.c	2008-07-02 22:29:44.703125000 +0000
@@ -0,0 +1,126 @@
+/*
+Copyright (C) 2001-2003, The Perl Foundation.
+$Id: disassemble.c 26465 2008-03-18 07:30:24Z chromatic $
+
+=head1 NAME
+
+pbc_disassemble - Parrot disassembler
+
+=head1 SYNOPSIS
+
+    pbc_disassemble file.pbc
+
+=head1 DESCRIPTION
+
+This uses the C<Parrot_disassemble()> function from F<src/embed.c>,
+which in turn uses the C<PDB_disassemble()> function from
+F<src/debug.c>.
+
+=head2 Functions
+
+=over 4
+
+=cut
+
+*/
+
+#include <parrot/parrot.h>
+#include "parrot/embed.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+static void do_dis(Parrot_Interp);
+
+/*
+
+=item C<int main(int argc, char *argv[])>
+
+The run-loop. Starts up an interpreter, loads the bytecode from the
+command-line and disassembles it.
+
+=cut
+
+*/
+
+int
+main(int argc, char *argv[])
+{
+    Parrot_Interp interp;
+    char *filename;
+    Parrot_PackFile pf;
+
+    interp = Parrot_new(NULL);
+
+    if (!interp) {
+        return 1;
+    }
+
+    /* set the top of the stack so GC can trace it for GC-able pointers
+     * see trace_system_areas() in src/cpu_dep.c */
+    interp->lo_var_ptr = &interp;
+
+    if (argc != 2) {
+        fprintf(stderr, "Usage: pbc_disassemble programfile \n");
+        Parrot_exit(interp, 1);
+    }
+
+    filename = argv[1];
+
+    pf = Parrot_readbc(interp, filename);
+
+    if (!pf) {
+        return 1;
+    }
+
+    Parrot_loadbc(interp, pf);
+
+    do_dis(interp);
+
+    Parrot_exit(interp, 0);
+}
+
+/*
+
+=item C<static void do_dis(Parrot_Interp interp)>
+
+Do the disassembling.
+
+=cut
+
+*/
+
+static void
+do_dis(Parrot_Interp interp)
+{
+    Parrot_disassemble(interp);
+}
+
+/*
+
+=back
+
+=head1 SEE ALSO
+
+F<src/embed.c> and F<src/debug.c>.
+
+=head1 HISTORY
+
+Initial version by Daniel Grunblatt on 2002.5.26.
+
+Florian Ragwitz: Moved POD documentation that's not necessary to know how to
+actually run the disassembler to normal C comments (Wed, 16 Nov 2005).
+
+Reini Urban: Renamed from disassemble to pbc_disassemble (2008-07-03).
+
+=cut
+
+*/
+
+
+/*
+ * Local variables:
+ *   c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
diff -u  src/parrot-0.6.3/tools/util/dump_pbc.pl.orig
--- src/parrot-0.6.3/tools/util/dump_pbc.pl.orig	2008-06-04 22:29:37.000000000 +0000
+++ src/parrot-0.6.3/tools/util/dump_pbc.pl	2008-07-02 22:12:10.015625000 +0000
@@ -13,7 +13,7 @@
 
 =head1 DESCRIPTION
 
-dump_pbc.pl uses Parrot's F<disassemble> program to disassemble the opcodes
+dump_pbc.pl uses Parrot's F<pbc_disassemble> program to disassemble the opcodes
 in a PBC (Parrot ByteCode) file, then weaves the disassembly together with
 the original PIR source file(s).  This makes it easier to see how the PIR
 syntactic sugar is desugared into raw Parrot opcodes.
@@ -45,7 +45,7 @@
 use lib "$PARROT_ROOT/lib";
 use Parrot::Config '%PConfig';
 
-my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}disassemble$PConfig{exe}";
+my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}pbc_disassemble$PConfig{exe}";
 
 go(@ARGV);
 
2008-07-03 00:19:03 rurban

	* rename src/disassemble.c to src/pbc_diassemble before
	* config/gen/makefiles/root.in, tools/util/dump_pbc.pl:
	Rename disassemble to pbc_diassemble. This is too generic.

diff -u  src/parrot-0.6.3/config/gen/makefiles/root.in.orig
--- src/parrot-0.6.3/config/gen/makefiles/root.in.orig	2008-06-16 13:06:01.000000000 +0000
+++ src/parrot-0.6.3/config/gen/makefiles/root.in	2008-07-02 22:14:43.765625000 +0000
@@ -462,7 +462,7 @@
 # Executables
 PARROT              = $(CUR_DIR)/@[EMAIL PROTECTED](EXE)
 MINIPARROT          = $(CUR_DIR)/miniparrot$(EXE)
-DIS                 = $(CUR_DIR)/disassemble$(EXE)
+DIS                 = $(CUR_DIR)/pbc_disassemble$(EXE)
 PDUMP               = $(CUR_DIR)/pdump$(EXE)
 PINFO               = $(CUR_DIR)/pbc_info$(EXE)
 PBCMERGE            = $(CUR_DIR)/pbc_merge$(EXE)
@@ -474,7 +474,7 @@
 
 # Installable executables
 INSTALLABLEPARROT   = $(CUR_DIR)/installable_parrot$(EXE)
-INSTALLABLEDIS      = $(CUR_DIR)/installable_disassemble$(EXE)
+INSTALLABLEDIS      = $(CUR_DIR)/installable_pbc_disassemble$(EXE)
 INSTALLABLEPDUMP    = $(CUR_DIR)/installable_pdump$(EXE)
 INSTALLABLEPINFO    = $(CUR_DIR)/installable_pbc_info$(EXE)
 INSTALLABLEPBCMERGE = $(CUR_DIR)/installable_pbc_merge$(EXE)
@@ -894,16 +894,16 @@
 # Parrot Disassembler
 #
 
-$(SRC_DIR)/disassemble$(O) : $(GENERAL_H_FILES)
+$(SRC_DIR)/pbc_disassemble$(O) : $(GENERAL_H_FILES)
 
-$(DIS) : $(SRC_DIR)/disassemble$(O) $(LIBPARROT)
+$(DIS) : $(SRC_DIR)/pbc_disassemble$(O) $(LIBPARROT)
 	$(LINK) @[EMAIL PROTECTED]@ \
-    $(SRC_DIR)/disassemble$(O) \
+    $(SRC_DIR)/pbc_disassemble$(O) \
     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 
-$(INSTALLABLEDIS) : $(SRC_DIR)/disassemble$(O) $(LIBPARROT)
+$(INSTALLABLEDIS) : $(SRC_DIR)/pbc_disassemble$(O) $(LIBPARROT)
 	$(LINK) @[EMAIL PROTECTED]@ \
-    $(SRC_DIR)/disassemble$(O) \
+    $(SRC_DIR)/pbc_disassemble$(O) \
     $(ALL_PARROT_LIBS) $(LINKFLAGS)
 
 #
@@ -1597,7 +1597,7 @@
     $(SRC_DIR)/pbc_info$(O) $(PINFO) \
     $(PDB) $(SRC_DIR)/pdb$(O) \
     $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \
-    $(DIS) $(SRC_DIR)/disassemble$(O) \
+    $(DIS) $(SRC_DIR)/pbc_disassemble$(O) \
     $(SRC_DIR)/main$(O) \
     $(SRC_DIR)/null_config$(O) \
     $(SRC_DIR)/parrot_config$(O) \
@@ -1633,7 +1633,7 @@
     $(SRC_DIR)/pbc_info$(O) $(PINFO) \
     $(PDB) $(SRC_DIR)/pdb$(O) \
     $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \
-    $(DIS) $(SRC_DIR)/disassemble$(O) \
+    $(DIS) $(SRC_DIR)/pbc_disassemble$(O) \
     $(SRC_DIR)/null_config$(O) \
     $(SRC_DIR)/parrot_config$(O) \
     $(SRC_DIR)/install_config$(O) \
diff -u  src/parrot-0.6.3/src/pbc_disassemble.c.orig
--- src/parrot-0.6.3/src/pbc_disassemble.c.orig	2008-05-07 23:32:46.000000000 +0000
+++ src/parrot-0.6.3/src/pbc_disassemble.c	2008-07-02 22:29:44.703125000 +0000
@@ -4,11 +4,11 @@
 
 =head1 NAME
 
-disassemble - Parrot disassembler
+pbc_disassemble - Parrot disassembler
 
 =head1 SYNOPSIS
 
-    disassemble file.pbc
+    pbc_disassemble file.pbc
 
 =head1 DESCRIPTION
 
@@ -61,7 +61,7 @@
     interp->lo_var_ptr = &interp;
 
     if (argc != 2) {
-        fprintf(stderr, "Usage: disassemble programfile \n");
+        fprintf(stderr, "Usage: pbc_disassemble programfile \n");
         Parrot_exit(interp, 1);
     }
 
@@ -111,6 +111,8 @@
 Florian Ragwitz: Moved POD documentation that's not necessary to know how to
 actually run the disassembler to normal C comments (Wed, 16 Nov 2005).
 
+Reini Urban: Renamed from disassemble to pbc_disassemble (2008-07-03).
+
 =cut
 
 */
diff -u  src/parrot-0.6.3/tools/util/dump_pbc.pl.orig
--- src/parrot-0.6.3/tools/util/dump_pbc.pl.orig	2008-06-04 22:29:37.000000000 +0000
+++ src/parrot-0.6.3/tools/util/dump_pbc.pl	2008-07-02 22:12:10.015625000 +0000
@@ -13,7 +13,7 @@
 
 =head1 DESCRIPTION
 
-dump_pbc.pl uses Parrot's F<disassemble> program to disassemble the opcodes
+dump_pbc.pl uses Parrot's F<pbc_disassemble> program to disassemble the opcodes
 in a PBC (Parrot ByteCode) file, then weaves the disassembly together with
 the original PIR source file(s).  This makes it easier to see how the PIR
 syntactic sugar is desugared into raw Parrot opcodes.
@@ -45,7 +45,7 @@
 use lib "$PARROT_ROOT/lib";
 use Parrot::Config '%PConfig';
 
-my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}disassemble$PConfig{exe}";
+my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}pbc_disassemble$PConfig{exe}";
 
 go(@ARGV);
 

Reply via email to