diff -Nru /tmp/filecubLGc/dpkg-1.10.18/Makefile.in /tmp/fileu6fzcf/dpkg-1.10.18/Makefile.in --- /tmp/filecubLGc/dpkg-1.10.18/Makefile.in 2003-04-26 12:26:19.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/Makefile.in 2003-11-28 19:57:09.000000000 -0500 @@ -19,6 +19,7 @@ $(mkinstalldirs) $(DESTDIR)$(dpkgsharedir)/origins $(INSTALL_DATA) $(srcdir)/origin $(DESTDIR)$(dpkgconfdir)/origins/debian $(INSTALL_DATA) $(srcdir)/archtable $(DESTDIR)$(dpkgsharedir)/archtable + $(INSTALL_DATA) $(srcdir)/subarchtable $(DESTDIR)$(dpkgsharedir)/subarchtable clean: clean-recursive rm -f $(GENFILES) diff -Nru /tmp/filecubLGc/dpkg-1.10.18/archtable /tmp/fileu6fzcf/dpkg-1.10.18/archtable --- /tmp/filecubLGc/dpkg-1.10.18/archtable 2003-09-13 19:43:49.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/archtable 2003-11-28 19:57:09.000000000 -0500 @@ -7,11 +7,11 @@ # returned by `dpkg --print-installation-architecture'. # Column 3 is returned by `dpkg --print-architecture'. -i386-linux-gnu i386 i486 -i486-linux-gnu i386 i486 -i586-linux-gnu i386 i486 -i686-linux-gnu i386 i486 -pentium-linux-gnu i386 i486 +i386-linux-gnu i386 i386 +i486-linux-gnu i486 i486 +i586-linux-gnu i586 i586 +i686-linux-gnu i686 i686 +pentium-linux-gnu i686 i686 sparc-linux-gnu sparc sparc sparc64-linux-gnu sparc sparc alpha-linux-gnu alpha alpha @@ -60,3 +60,5 @@ s390x-linux-gnu s390x s390x s390x-ibm-linux-gnu s390x s390x s390x-unknown-linux-gnu s390x s390x +amd64-linux-gnu amd64 amd64 +x86_64-linux-gnu amd64 amd64 diff -Nru /tmp/filecubLGc/dpkg-1.10.18/debian/changelog /tmp/fileu6fzcf/dpkg-1.10.18/debian/changelog --- /tmp/filecubLGc/dpkg-1.10.18/debian/changelog 2003-10-27 14:42:05.000000000 -0500 +++ /tmp/fileu6fzcf/dpkg-1.10.18/debian/changelog 2003-12-11 16:05:12.000000000 -0500 @@ -1,3 +1,19 @@ +dpkg (1.10.18-subarch2) unstable; urgency=low + + * subarchtable format changed to only use [A-Z_] variable names. + * dpkg-subarchitecture updated to above mentioned format. + * dpkg no longer fork()s dpkg-subarchitecture.pl when testing + compatibility two architectures; a C parser was written to parse the + subarchtable. + + -- Bart Trojanowski Thu, 11 Dec 2003 16:04:20 -0500 + +dpkg (1.10.18-subarch1) unstable; urgency=low + + * merged in subarchitecture additions. + + -- Bart Trojanowski Nov, 27 Sep 2003 19:25:00 -0400 + dpkg (1.10.18) unstable; urgency=medium * Rebuild, tagging and releasing correctly from cvs this time. @@ -289,6 +305,26 @@ After opening files, set binmode. Closes: #175363 -- Adam Heath Tue, 16 Sep 2003 12:52:11 -0500 +dpkg (1.10.10.0-subarch.3) unstable; urgency=low + + * added /usr/bin/dpkg-subarchitecture utility, + * extended the knowledge held by /usr/share/dpkg/subarchtable, + * dpkg currently requires dpkg-dev to function, + * fixed the package version (was kind of messy). + + -- Bart Trojanowski Fri, 8 Aug 2003 22:39:15 -0400 + +dpkg (1.10.10.0lib641+subarch) unstable; urgency=low + + * added primitive subarchitecture support for dpkg + + -- Bart Trojanowski Sat, 12 Jul 2003 16:10:23 -0400 + +dpkg (1.10.10.0lib641) unstable; urgency=low + + * lib64 support added. + + -- Gerhard Tonn Thu, 9 Jun 2003 15:10:24 +0200 dpkg (1.10.10) unstable; urgency=low diff -Nru /tmp/filecubLGc/dpkg-1.10.18/debian/dselect.substvars /tmp/fileu6fzcf/dpkg-1.10.18/debian/dselect.substvars --- /tmp/filecubLGc/dpkg-1.10.18/debian/dselect.substvars 1969-12-31 19:00:00.000000000 -0500 +++ /tmp/fileu6fzcf/dpkg-1.10.18/debian/dselect.substvars 2003-12-11 16:06:16.000000000 -0500 @@ -0,0 +1 @@ +shlibs:Depends=lib64c6 (>= 2.3.2-1), lib64gcc1 (>= 1:3.3-1), lib64stdc++5 (>= 1:3.3-1) diff -Nru /tmp/filecubLGc/dpkg-1.10.18/debian/rules /tmp/fileu6fzcf/dpkg-1.10.18/debian/rules --- /tmp/filecubLGc/dpkg-1.10.18/debian/rules 2003-09-19 13:29:09.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/debian/rules 2003-11-28 19:57:09.000000000 -0500 @@ -198,7 +198,8 @@ set -e ; for i in dpkg-name dpkg-source dpkg-genchanges dpkg-gencontrol \ dpkg-shlibdeps dpkg-buildpackage dpkg-distaddfile 822-date \ dpkg-scanpackages dpkg-scansources dpkg-architecture \ - dpkg-parsechangelog dpkg-checkbuilddeps ; do \ + dpkg-parsechangelog dpkg-checkbuilddeps dpkg-libinfo \ + dpkg-subarchitecture ; do \ mv $(INSTALL_TMP)/usr/bin/$$i $(TMP_DPKG_DEV)/usr/bin/ ; \ done set -e ; for i in "" de fr ja sv ; do \ @@ -206,7 +207,7 @@ for m in dpkg-name.1 dpkg-source.1 822-date.1 dpkg-architecture.1 \ dpkg-buildpackage.1 dpkg-distaddfile.1 dpkg-genchanges.1 \ dpkg-gencontrol.1 dpkg-parsechangelog.1 dpkg-shlibdeps.1 \ - dpkg-checkbuilddeps.1 ; do \ + dpkg-checkbuilddeps.1 dpkg-libinfo.1 dpkg-subarchitecture.1 ; do \ if [ -e $(INSTALL_TMP)/usr/share/man/$$i/man1/$$m ] ; then \ mv $(INSTALL_TMP)/usr/share/man/$$i/man1/$$m $(TMP_DPKG_DEV)/usr/share/man/$$i/man1/$$m ; \ fi ; \ diff -Nru /tmp/filecubLGc/dpkg-1.10.18/dpkg-deb/build.c /tmp/fileu6fzcf/dpkg-1.10.18/dpkg-deb/build.c --- /tmp/filecubLGc/dpkg-1.10.18/dpkg-deb/build.c 2003-10-25 16:03:20.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/dpkg-deb/build.c 2003-11-28 19:57:09.000000000 -0500 @@ -44,6 +44,8 @@ #include #include "dpkg-deb.h" +#include + #ifndef S_ISLNK # define S_ISLNK(mode) ((mode&0xF000) == S_IFLNK) #endif @@ -286,6 +288,21 @@ if (subdir) { versionstring= versiondescribe(&checkedinfo->available.version,vdew_never); arch= checkedinfo->available.architecture; if (!arch) arch= ""; +#if 1 /* bart's hack */ +fprintf (stderr, "arch=%s\n", arch); +if (0==strcmp (arch,"amd64")) { + struct utsname utsname; + int rc = uname (&utsname); +fprintf (stderr, "machine=%s\n", utsname.machine); + if (rc == 0 && utsname.machine[0]=='i' && 0==strcmp(utsname.machine+2,"86")) { + static char architecture32[128]; + //arch="i386"; + snprintf (architecture32, 127, "%s", utsname.machine); + arch = architecture32; +fprintf (stderr, "using arch=%s\n", arch); + } +} +#endif m= m_malloc(sizeof(DEBEXT)+1+strlen(debar)+1+strlen(checkedinfo->name)+ strlen(versionstring)+1+strlen(arch)); sprintf(m,"%s/%s_%s%s%s" DEBEXT,debar,checkedinfo->name,versionstring, diff -Nru /tmp/filecubLGc/dpkg-1.10.18/dselect/helpmsgs.src /tmp/fileu6fzcf/dpkg-1.10.18/dselect/helpmsgs.src --- /tmp/filecubLGc/dpkg-1.10.18/dselect/helpmsgs.src 1969-12-31 19:00:00.000000000 -0500 +++ /tmp/fileu6fzcf/dpkg-1.10.18/dselect/helpmsgs.src 2003-11-27 23:15:52.000000000 -0500 @@ -0,0 +1,181 @@ +@@@ listkeys Keystrokes + +Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards: + n, Down-arrow, j p, Up-arrow, k move highlight + N, Page-down, Space P, Page-up, Backspace scroll list by 1 page + ^n ^p scroll list by 1 line + t, Home e, End jump to top/end of list + u d scroll info by 1 page + ^u ^d scroll info by 1 line + B, Left-arrow F, Right-arrow pan display by 1/3 screen + ^b ^f pan display by 1 character + +Mark packages for later processing: + +, Insert install or upgrade =, H hold in present state + -, Delete remove :, G unhold: upgrade or leave uninstalled + _ remove & purge config + Miscellaneous: +Quit, exit, overwrite (note capitals!): ?, F1 request help (also Help) + Return Confirm, quit (check dependencies) i, I toggle/cycle info displays + Q Confirm, quit (override dep.s) o, O cycle through sort options + X, Esc eXit, abandoning any changes made v, V change status display opts + R Revert to state before this list ^l redraw display + U set all to sUggested state / search (Return to cancel) + D set all to Directly requested state \\ repeat last search + +@@@ mainintro Introduction to package selections + +Welcome to dselect's main package listing. + +You will be presented with a list of packages which are installed or available +for installation. You can navigate around the list using the cursor keys, +mark packages for installation (using `+') or deinstallation (using `-'). +Packages can be marked either singly or in groups; initially you will see that +the line `All packages' is selected. `+', `-' and so on will affect all the +packages described by the highlighted line. + +Some of your choices will cause conflicts or dependency problems; you will be +given a sub-list of the relevant packages, so that you can solve the problems. + +You should read the list of keys and the explanations of the display. +Much on-line help is available, please make use of it - press `?' at +any time for help. + +When you have finished selecting packages, press to confirm changes, +or `Q' to quit without saving changes. A final check on conflicts and +dependencies will be done - here too you may see a sublist. + +Press to leave help and enter the list now. + +@@@ readonlyintro Introduction to read-only package list browser + +Welcome to dselect's main package listing. + +You will be presented with a list of packages which are installed or available +for installation. Since you do not have the privilege necessary to update +package states, you are in a read-only mode. You can navigate around the +list using the cursor keys (please see the `Keystrokes' help screen), observe +the status of the packages and read information about them. + +You should read the list of keys and the explanations of the display. +Much on-line help is available, please make use of it - press `?' at +any time for help. + +When you have finished browsing, press `Q' or to quit. + +Press to leave help and enter the list now. + +@@@ recurintro Introduction to conflict/dependency resolution sub-list + +Dependency/conflict resolution - introduction. + +One or more of your choices have raised a conflict or dependency problem - +some packages should only be installed in conjunction with certain others, and +some combinations of packages may not be installed together. + +You will see a sub-list containing the packages involved. The bottom half of +the display shows relevant conflicts and dependencies; use `i' to cycle between +that, the package descriptions and the internal control information. + +A set of `suggested' packages has been calculated, and the initial markings in +this sub-list have been set to match those, so you can just hit Return to +accept the suggestions if you wish. You may abort the change(s) which caused +the problem(s), and go back to the main list, by pressing capital `X'. + +You can also move around the list and change the markings so that they are more +like what you want, and you can `reject' my suggestions by using the capital +`D' or `R' keys (see the keybindings help screen). You can use capital `Q' to +force me to accept the situation currently displayed, in case you want to +override a recommendation or think that the program is mistaken. + +Press to leave help and enter the sub-list; remember: press `?' for help. + +@@@ displayexplain1 Display, part 1: package listing and status chars + +The top half of the screen shows a list of packages. For each package you see +four columns for its current status on the system and mark. In terse mode (use +`v' to toggle verbose display) these are single characters, from left to right: + + Error flag: Space - no error (but package may be in broken state - see below) + `R' - serious error during installation, needs reinstallation; + Installed state: Space - not installed; + `*' - installed; + `-' - not installed but config files remain; + packages in { `U' - unpacked but not yet configured; + these states { `C' - half-configured (an error happened); + are broken { `I' - half-installed (an error happened). + Old mark: what was requested for this package before presenting this list; + Mark: what is requested for this package: + `*': marked for installation or upgrade; + `-': marked for removal, but any configuration files will remain; + `=': on hold: package will not be processed at all; + `_': marked for purge completely - even remove configuration; + `n': package is new and has yet to be marked for install/remove/&c. + +Also displayed are each package's Priority, Section, name, installed and +available version numbers (shift-V to display/hide) and summary description. + +@@@ displayexplain2 Display, part 2: list highlight; information display + +* Highlight: One line in the package list will be highlighted. It indicates + which package(s) will be affected by presses of `+', `-' and `_'. + +* The dividing line in the middle of the screen shows a brief explanation of + the status of the currently-highlighted package, or a description of which + group is highlighted if a group line is. If you don't understand the + meaning of some of the status characters displayed, go to the relevant + package and look at this divider line, or use the `v' key for a verbose + display (press `v' again to go back to the terse display). + +* The bottom of the screen shows more information about the + currently-highlighted package (if there is only one). + + It can show an extended description of the package, the internal package + control details (either for the installed or available version of the + package), or information about conflicts and dependencies involving the + current package (in conflict/dependency resolution sublists). + + Use the `i' key to cycle through the displays, and `I' to hide the + information display or expand it to use almost all of the screen. + +@@@ methintro Introduction to method selection display + +dselect and dpkg can do automatic installation, loading the package files to be +installed from one of a number of different possible places. + +This list allows you to select one of these installation methods. + +Move the highlight to the method you wish to use, and hit Enter. You will then +be prompted for the information required to do the installation. + +As you move the highlight a description of each method, where available, is +displayed in the bottom half of the screen. + +If you wish to quit without changing anything use the `x' key while in the list +of installation methods. + +A full list of keystrokes is available by pressing `k' now, or from the help +menu reachable by pressing `?'. + +@@@ methkeys Keystrokes for method selection + +Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards: + n, Down-arrow p, Up-arrow move highlight + N, Page-down, Space P, Page-up, Backspace scroll list by 1 page + ^n ^p scroll list by 1 line + t, Home e, End jump to top/end of list + u d scroll info by 1 page + ^u ^d scroll info by 1 line + B, Left-arrow F, Right-arrow pan display by 1/3 screen + ^b ^f pan display by 1 character +(These are the same motion keys as in the package list display.) + +Quit: + Return, Enter select this method and go to its configuration dialogue + x, X exit without changing or setting up the installation method + +Miscellaneous: + ?, Help, F1 request help + ^l redraw display + / search (just return to cancel) + \\ repeat last search diff -Nru /tmp/filecubLGc/dpkg-1.10.18/dselect/mkhelpmsgs.pl /tmp/fileu6fzcf/dpkg-1.10.18/dselect/mkhelpmsgs.pl --- /tmp/filecubLGc/dpkg-1.10.18/dselect/mkhelpmsgs.pl 1969-12-31 19:00:00.000000000 -0500 +++ /tmp/fileu6fzcf/dpkg-1.10.18/dselect/mkhelpmsgs.pl 2003-11-27 23:15:52.000000000 -0500 @@ -0,0 +1,78 @@ +#!/usr/bin/perl + +$maxnlines= 22; + +open(SRC,$ARGV[0]) || die $!; +open(NC,">helpmsgs.cc.new") || die $!; +open(NH,">helpmsgs.h.new") || die $!; + +&autowarn('NC'); &autowarn('NH'); + +print(NC "#include \"helpmsgs.h\"\n") || die $!; +print(NH <<'END') || die $!; +#ifndef HELPMSGS_H +#define HELPMSGS_H +extern "C" { +#include +#include +} +struct helpmessage { const char *title; const char *text; }; +END + +$state= 'start'; +$nblanks= 0; $nlines= 0; +while () { + s/\"/\\\"/g; + if (m/^\@\@\@ (\w+)\s+(\S.*\S)\s+$/) { + &finishif; + $currentname= $1; $currenttitle= $2; + print(NH "extern const struct helpmessage hlp_$currentname;\n") || die $!; + print(NC + "const struct helpmessage hlp_$currentname = {\n". + " N_(\"$currenttitle\"), N_(\"") || die $!; + } elsif (m/^\@\@\@/) { + die; + } elsif (!m/\S/) { + $nblanks++; + } else { + if ($state ne 'start' && $nblanks) { + print(NC ("\\n"x$nblanks)."\\\n") || die $!; + $nlines+= $nblanks; + } + $state= 'middle'; $nblanks= 0; + s/\s*\n$//; + print(NC "\\\n".$_."\\n") || die $!; + $nlines++; + } +} + +&finishif; + +close(NC) || die $!; +print(NH "#endif /* HELPMSGS_H */\n") || die $!; +close(NH) || die $!; + +rename("helpmsgs.cc.new","helpmsgs.cc") || die $!; +rename("helpmsgs.h.new","helpmsgs.h") || die $!; + +sub finishif { + if ($state ne 'start') { + print(NC "\")\n};\n") || die $!; + printf "\t\t%s: %d lines\n",$currentname,$nlines; + if ($nlines > $maxnlines) { warn "Too many lines in $currentname"; } + } + $state= 'start'; + $nblanks= 0; $nlines= 0; +} + + +sub autowarn { + $fh= $_[0]; + print($fh <<'END') || die $!; +/* + * WARNING - THIS FILE IS GENERATED AUTOMATICALLY - DO NOT EDIT + * It is generated by mkhelpmsgs.pl from helpmsgs.src. + */ + +END +} diff -Nru /tmp/filecubLGc/dpkg-1.10.18/lib/startup.c /tmp/fileu6fzcf/dpkg-1.10.18/lib/startup.c --- /tmp/filecubLGc/dpkg-1.10.18/lib/startup.c 1969-12-31 19:00:00.000000000 -0500 +++ /tmp/fileu6fzcf/dpkg-1.10.18/lib/startup.c 2003-11-27 23:15:52.000000000 -0500 @@ -0,0 +1,65 @@ +/* + * dpkg - main program for package management + * main.c - main program + * + * Copyright (C) 1994,1995 Ian Jackson + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +void standard_startup(jmp_buf *ejbuf, int argc, const char *const **argv, const char *prog, int loadcfg, const struct cmdinfo cmdinfos[]) { + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + if (setjmp(*ejbuf)) { /* expect warning about possible clobbering of argv */ + error_unwind(ehflag_bombout); exit(2); + } + push_error_handler(ejbuf,print_error_fatal,0); + + umask(022); /* Make sure all our status databases are readable. */ + + if (loadcfg) + loadcfgfile(prog, cmdinfos); + + myopt(argv,cmdinfos); +} + +void standard_shutdown(int freemem) { + set_error_display(0,0); + error_unwind(ehflag_normaltidy); + if (freemem) + nffreeall(); +} Binary files /tmp/filecubLGc/dpkg-1.10.18/main/.subarch.c.swp and /tmp/fileu6fzcf/dpkg-1.10.18/main/.subarch.c.swp differ diff -Nru /tmp/filecubLGc/dpkg-1.10.18/main/Makefile.in /tmp/fileu6fzcf/dpkg-1.10.18/main/Makefile.in --- /tmp/filecubLGc/dpkg-1.10.18/main/Makefile.in 2002-08-24 15:54:18.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/main/Makefile.in 2003-11-28 19:57:09.000000000 -0500 @@ -8,7 +8,7 @@ SOURCES = main.c enquiry.c filesdb.c archives.c processarc.c \ cleanup.c select.c packages.c configure.c remove.c \ - help.c depcon.c errors.c update.c + help.c depcon.c errors.c update.c subarch.c MAN8PAGES = dpkg.8 dpkg-query.8 diff -Nru /tmp/filecubLGc/dpkg-1.10.18/main/main.c /tmp/fileu6fzcf/dpkg-1.10.18/main/main.c --- /tmp/filecubLGc/dpkg-1.10.18/main/main.c 2003-10-25 16:03:21.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/main/main.c 2003-11-28 19:57:09.000000000 -0500 @@ -38,6 +38,8 @@ #include #include +#include + #include "main.h" static void printversion(void) { @@ -116,7 +118,7 @@ } const char thisname[]= "dpkg"; -const char architecture[]= ARCHITECTURE; +const char *architecture= ARCHITECTURE; const char printforhelp[]= N_("\ Type dpkg --help for help about installing and deinstalling packages [*];\n\ Use dselect for user-friendly package management;\n\ @@ -327,7 +329,7 @@ for (;;) { comma= strchr(value,','); - l= comma ? (int)(comma-value) : strlen(value); + l= comma ? (size_t)(comma-value) : (size_t)strlen(value); for (fip=forceinfos; fip->name; fip++) if (!strncmp(fip->name,value,l) && strlen(fip->name)==l) break; if (!fip->name) @@ -546,11 +548,35 @@ } } +/* this hack allows dpkg to belive that it's running on an i386 when + * in the 32bit personality */ +static void +revert_arch32 (void) +{ +#if 1 /* bart's hack */ + //fprintf (stderr, "architecture=%s\n", architecture); + if (0==strcmp (architecture,"amd64")) { + struct utsname utsname; + int rc = uname (&utsname); + //fprintf (stderr, "machine=%s\n", utsname.machine); + if (rc == 0 && utsname.machine[0]=='i' && 0==strcmp(utsname.machine+2,"86")) { + static char architecture32[128]; + //architecture="i386"; + snprintf (architecture32, 127, "%s", utsname.machine); + architecture = architecture32; + //fprintf (stderr, "using architecture=%s\n", + // architecture); + } + } +#endif +} int main(int argc, const char *const *argv) { jmp_buf ejbuf; static void (*actionfunction)(const char *const *argv); + revert_arch32(); + standard_startup(&ejbuf, argc, &argv, DPKG, 1, cmdinfos); if (!cipaction) badusage(_("need an action option")); diff -Nru /tmp/filecubLGc/dpkg-1.10.18/main/main.h /tmp/fileu6fzcf/dpkg-1.10.18/main/main.h --- /tmp/filecubLGc/dpkg-1.10.18/main/main.h 2002-05-20 01:56:01.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/main/main.h 2003-11-28 19:57:09.000000000 -0500 @@ -92,12 +92,16 @@ extern const char *admindir; extern const char *instdir; extern struct packageinlist *ignoredependss; -extern const char architecture[]; +extern const char *architecture; /* from filesdb.c */ void filesdbinit(void); +/* from subarch.c */ + +void assert_support_for_arch (const char *const arch); + /* from archives.c */ void archivefiles(const char *const *argv); diff -Nru /tmp/filecubLGc/dpkg-1.10.18/main/processarc.c /tmp/fileu6fzcf/dpkg-1.10.18/main/processarc.c --- /tmp/filecubLGc/dpkg-1.10.18/main/processarc.c 2003-10-25 16:03:21.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/main/processarc.c 2003-11-28 19:57:09.000000000 -0500 @@ -207,12 +207,7 @@ return; } - if (pkg->available.architecture && *pkg->available.architecture && - strcmp(pkg->available.architecture,"all") && - strcmp(pkg->available.architecture,architecture)) - forcibleerr(fc_architecture, - _("package architecture (%s) does not match system (%s)"), - pkg->available.architecture,architecture); + assert_support_for_arch (pkg->available.architecture); if (!pkg->installed.valid) blankpackageperfile(&pkg->installed); assert(pkg->available.valid); diff -Nru /tmp/filecubLGc/dpkg-1.10.18/main/subarch.c /tmp/fileu6fzcf/dpkg-1.10.18/main/subarch.c --- /tmp/filecubLGc/dpkg-1.10.18/main/subarch.c 1969-12-31 19:00:00.000000000 -0500 +++ /tmp/fileu6fzcf/dpkg-1.10.18/main/subarch.c 2003-12-11 15:54:09.000000000 -0500 @@ -0,0 +1,604 @@ +/* + * dpkg - main program for package management + * subarch.c - support for subarchitectures + * + * Copyright (C) 2003 Bart Trojanowski + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "filesdb.h" +#include "main.h" +#include "archives.h" + +#undef FORK_SUBARCHITECTURE_SCRIPT + +/* ======================================================================== */ +/* this cheats a bit... we use perl script to do the work. */ + +#ifdef FORK_SUBARCHITECTURE_SCRIPT + +#define SANAME "dpkg-subarchitecture" +#define SAPATH "/usr/bin/" SANAME + +void +assert_support_for_arch (const char *const deb_arch) +{ + int rc, pid, status; + char arch_param[128]; + char subarch_param[128]; + + if (!deb_arch || !(*deb_arch)) + goto fail; + + if (0 == strcmp(deb_arch, "all")) + return; + + rc = snprintf (arch_param, 128, "-a%s", architecture); + if (rc<0) { + ohshite(_("subarch test setup failed (snprintf -a...)")); + } + + rc = snprintf (subarch_param, 128, "-S%s", deb_arch); + if (rc<0) { + ohshite(_("subarch test setup failed (snprintf -S...)")); + } + + if ((pid = fork()) == -1) { + ohshite(_("failed to fork for subarch test")); + } + + if (!pid) { + /* child */ + fprintf (stderr, "%s %s %s %s\n", + SAPATH, SANAME, arch_param, subarch_param); + execlp (SAPATH, SANAME, arch_param, subarch_param, (char*)0); + perror(_("failed to exec for subarch test")); + _exit(1); + } + + if (waitpid(pid,&status,0) != pid) { + ohshite(_("failed to wait for subarch test")); + } + + if (status) { + fprintf(stderr,_("subarch test failed, code %d\n"),status); + goto fail; + } + + /* it looks ok */ + return; + +fail: + forcibleerr(fc_architecture, + _("package architecture (%s) does not " + "match system (%s)"), + deb_arch, architecture); +} + +#endif /* FORK_SUBARCHITECTURE_SCRIPT */ + + +/* ======================================================================== */ +/* this variant will parse the subarchtable */ + +#ifndef FORK_SUBARCHITECTURE_SCRIPT + +#define DPKG_SUBARCHTABLE "/usr/share/dpkg/subarchtable" +//#define DPKG_SUBARCHTABLE "./subarchtable" + +/* the database storage */ +static char *archs_buf = NULL; +typedef struct arch_s { + char *name; + int subarch_cnt; + char **subarchs; +} arch_t; +static arch_t *archs = NULL; +static int arch_cnt = 0; + +/* local function prototypes */ +static int test_support_for_arch (const char *const deb_arch, + const char *const sys_arch); +static int parse_subarchs (void); +static int split_rfc822_line (char *line, char **tag, char **value); +static int parse_line (const char *tag, char *value, arch_t *arch); +static int parse_compat_line (char *compat, arch_t *arch); + +static inline int assert_arch_valid (const char *arch); +static inline int assert_token_valid (const char *token); + +#if 0 +#define prsdbg(f,a...) fprintf (stderr, f, ## a) +#else +#define prsdbg(f,a...) ({ /* do nothing */ }) +#endif + +/* ------------------------------------------------------------------------ */ +/* main entry point into this module */ + +/* this function returns only if the deb_arch can be installed on the running + * system. */ +void +assert_support_for_arch (const char *const deb_arch) +{ + if (deb_arch && *deb_arch + && strcmp(deb_arch, "all") + && ! test_support_for_arch (deb_arch, architecture)) { + forcibleerr(fc_architecture, + _("package architecture (%s) does not " + "match system (%s)"), + deb_arch, architecture); + } +} + +/* ------------------------------------------------------------------------ */ +/* helper functions */ + +/* do a recursive test on subarchtable, parse DPKG_SUBARCHTABLE if needed; + * return non-zero if deb_arch can be installed on sys_arch */ +static int +test_support_for_arch (const char *const deb_arch, const char *const sys_arch) +{ + int a, s; + arch_t *arch; + + /* do we have a direct match */ + if (0 == strcmp(deb_arch, sys_arch)) + return 1; + + /* continue only if we can parse the architectures file; + * or have parsed it already */ + if (! parse_subarchs ()) + return 0; + + for (a=0; aname)) + continue; + + /* compare the debian architecture with each subarch */ + for (s=0; ssubarch_cnt; s++) { + + /* if we find a match return success */ + if (test_support_for_arch (deb_arch, + arch->subarchs[s])) { + + prsdbg ("_%s.deb can be installed on %s\n", + deb_arch, arch->name); + + return 1; + } + } + } + + /* we found nothing compatible */ + return 0; +} + +/* parse the DPKG_SUBARCHTABLE file and store results in archs table; + * return 0 on failure, 1 on success */ +static int +parse_subarchs (void) +{ + int rc, fd, max, line_no, last_empty; + struct stat st; + size_t archs_alloc; + arch_t arch_defaults = {0,}; + arch_t *arch; + char *p, *t; + + /* return success if we have a valid table already */ + if (arch_cnt>0 && archs && archs_buf) + return 1; + + /* return ailure if we failed previously */ + if (arch_cnt==-1) + return 0; + + /* get the file */ + fd = open (DPKG_SUBARCHTABLE, O_RDONLY); + if (fd < 0) { + fprintf (stderr, "open(\"%s\"): %s\n", + DPKG_SUBARCHTABLE, + strerror (errno)); + goto error_on_open; + } + + rc = fstat (fd, &st); + if (rc < 0) + goto error_with_file; + + /* get the flat file into a buffer */ + archs_buf = malloc (st.st_size+1); + if (NULL == archs_buf) { + fprintf (stderr, "failed to allocate %ld byte buffer\n", + st.st_size+1); + goto error_with_file; + } + + rc = read (fd, archs_buf, st.st_size); + if (rc < 0) { + perror ("read(subarchtable)"); + goto error_with_archs_buf; + } + archs_buf[rc] = 0; + + /* count the maximum number of lines - we will assume we have this + * many arches at maxium */ + p = archs_buf; + max = 2; + while (*p) { + if (*p == '\n' || *p == '\r') + max ++; + p++; + } + + if (!max) { + fprintf (stderr, "%s is empty\n", DPKG_SUBARCHTABLE); + goto error_with_archs_buf; + } + + /* build the array of architectures */ + archs_alloc = (max+1) * sizeof (arch_t); + archs = malloc (archs_alloc); + if (NULL == archs) { + fprintf (stderr, "failed to allocate %ld byte buffer\n", + archs_alloc); + goto error_with_archs_buf; + } + + memset (archs, 0, archs_alloc); + + p = archs_buf; + arch_cnt = -1; + arch = NULL; + line_no = 0; + last_empty = !0; + while ( (t = strsep (&p, "\n\r")) != NULL ) { + + char *tag, *value; + + line_no ++; + + /* empty line or invalid length... skip it */ + if (!*t || t>=p) { + last_empty = !0; + continue; + } + + /* split it into the tag and value */ + rc = split_rfc822_line (t, &tag, &value); + if (rc) { + /* bail if we cannot parse the line */ + ohshit(_("%s: invalid line format:\n\t%s\n"), + DPKG_SUBARCHTABLE, t); + } + + if (!tag || !*tag || *tag == '#') { + last_empty = !0; + continue; + } + + /* defaults? */ + if (0 == strcmp (tag, "DEFAULTS")) { + if (!last_empty || arch_cnt>=0 || arch) + ohshit(_("%s: DEFAULTS must be the first line " + "of first block if defined\n"), + DPKG_SUBARCHTABLE); + + arch = &arch_defaults; + memset (arch, 0, sizeof (arch_t)); + //arch->name = NULL; + + continue; + } + + /* new architecture? */ + if (0 == strcmp (tag, "ARCHITECTURE")) { + if (!last_empty) + ohshit(_("%s: ARCHITECTURE must be the first line " + "of first block if defined\n"), + DPKG_SUBARCHTABLE); + + /* initialize the new architecture */ + arch_cnt++; + arch = &archs[arch_cnt]; + memcpy (arch, &arch_defaults, sizeof (arch_t)); + + rc = assert_arch_valid (value); + if (rc) + ohshit(_("%s: architecture name '%s' is invalid \n"), + DPKG_SUBARCHTABLE, value); + + arch->name = value; + + continue; + } + + /* anything else belongs to the current architecture block */ + rc = parse_line (tag, value, arch); + if (rc) { + /* bail if we cannot parse the line */ + ohshit(_("%s: could not parse line:\n\t%s\n"), + DPKG_SUBARCHTABLE, t); + } + + } + archs[arch_cnt].name = NULL; + + /* and we are done */ + close (fd); + return 1; + + //free (archs); + //archs = NULL; +error_with_archs_buf: + free (archs_buf); + archs_buf = NULL; +error_with_file: + close (fd); +error_on_open: + fprintf (stderr, "WARNING: ignoring subarch support\n"); + arch_cnt = -1; /* this will cause the parser to not parse again */ + return 0; +} + +static inline char * +ltrim (char *str) +{ + char *p = str; + while (*p && isspace(*p)) p++; + return p; +} + +static inline char * +rtrim (char *str) +{ + char *p = str; + while (*p && !isspace(*p)) p++; + *p=0; + return str; +} + +static inline char * +trim (char *str) +{ + return rtrim (ltrim (str)); +} + +/** 0 on success, unix error code on error */ +static inline int +assert_token_valid (const char *token) +{ + const char *p = token; + int rc; + + /* assume invalid */ + rc = -EINVAL; + + /* test first character */ + if ( !(*p >= 'A' && *p <= 'Z') + && !(*p >= '0' && *p <= '9') ) { + prsdbg ("don't like '%c' (1st)\n", *p); + goto bail; + } + + /* test teh rest of the token */ + for (++p; *p; p++) { + + if ( *p == '_' || (*p >= 'A' && *p <= 'Z') + || (*p >= 'a' && *p <= 'z') + || (*p >= '0' && *p <= '9') ) + continue; + + prsdbg ("don't like '%c' (%ld)\n", *p, p-token); + + goto bail; + } + + + rc = 0; +bail: + return rc; +} + +/** 0 on success, unix error code on error */ +static inline int +assert_arch_valid (const char *arch) +{ + int rc; + const char *p; + + rc = -EINVAL; + + for (p=arch; *p; p++) { + + if ( (*p >= 'a' && *p <= 'z') || (*p >= '0' && *p <= '9') ) + continue; + + prsdbg ("don't like '%c' (%ld)\n", *p, p-arch); + + goto bail; + } + + + rc = 0; +bail: + return rc; +} + +/** modify the 'line' in place and return pointers to the tag and value. + * Given something like "foo: bar\n" this function will return pointers to + * "foo\0" and "bar\0" but line will be consumed. */ +static int +split_rfc822_line (char *line, char **tag, char **value) +{ + int rc; + char *str = line; + char *tok; + + prsdbg ("S: %s\n", line); + + /* comment */ + if (*str == '#') { + *tag = str; + *(str+1) = 0; + *value = str+2; + return 0; + } + + /* invalid first character */ + if (!isalpha(*str)) { + /* bail if we get a bad token */ + ohshit(_("%s: invalid first char in line:\n\t%s\n"), + DPKG_SUBARCHTABLE, line); + } + + /* assume failure */ + rc = -EINVAL; + + /* get the token name */ + tok = strsep (&str, ":"); + if (tok == NULL || str == NULL) + goto error_splitting; + + /* remove leading and trailing spaces of token */ + tok = trim (tok); + + if (!*tok || isspace (*tok)) + goto error_token; + + rc = assert_token_valid (tok); + if (rc) { + ohshit(_("%s: invalid token in:\n\t%s\n"), + DPKG_SUBARCHTABLE, line); + } + + *tag = tok; + + /* remove leading and trailing spaces of value */ + str = trim (str); + + *value = str; + + return 0; + +error_token: +error_splitting: + return rc; +} + +static int +parse_line (const char *tag, char *value, arch_t *arch) +{ + int rc; + + prsdbg ("P: %s.%s = %s\n", arch->name, tag, value); + + /* assume failure */ + rc = -EINVAL; + + if (0 == strcmp (tag, "COMPAT")) { + rc = parse_compat_line (value, arch); + if (rc) + ohshit( _("failed to parse COMPAT line\n")); + } + + return 0; +} + +static int +parse_compat_line (char *compat, arch_t *arch) +{ + int rc; + char *p = trim (compat); + char *sub, *t; + int max, cnt; + + /* assume failure */ + rc = -EINVAL; + + /* guess number of words */ + t = p; + max = 1; + while (*t && *t!='#') { + max ++; + while (*t && isspace(*t)) t++; + while (*t && *t!='#' && !isspace(*t)) t++; + } + *t = 0; + + /* allocate the array of pointers for this */ + arch->subarchs = malloc (max * sizeof (char*)); + + /* parse for real */ + cnt = 0; + while ( (sub = strsep (&p, ",")) != NULL ) { + + sub = trim (sub); + + /* comment on rest of line */ + if (*sub == '#') + break; + + /* invalid first character */ + rc = assert_arch_valid (sub); + if (rc) { + fprintf (stderr, "%s has an invalid subarch '%s'\n", + arch->name, sub); + goto error_parsing_line; + } + + /* store and advance */ + arch->subarchs[cnt++] = sub; + } + arch->subarch_cnt = cnt; + arch->subarchs[cnt] = NULL; + + return 0; + +error_parsing_line: + arch->subarch_cnt = 0; + free (arch->subarchs); + arch->subarchs = NULL; + return rc; +} + +#endif /* FORK_SUBARCHITECTURE_SCRIPT */ + diff -Nru /tmp/filecubLGc/dpkg-1.10.18/scripts/Makefile.in /tmp/fileu6fzcf/dpkg-1.10.18/scripts/Makefile.in --- /tmp/filecubLGc/dpkg-1.10.18/scripts/Makefile.in 2002-05-20 00:40:27.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/scripts/Makefile.in 2003-11-28 19:57:09.000000000 -0500 @@ -9,7 +9,8 @@ dpkg-gencontrol dpkg-shlibdeps dpkg-buildpackage \ dpkg-parsechangelog dpkg-distaddfile 822-date \ dpkg-scanpackages dpkg-scansources \ - dpkg-architecture dpkg-checkbuilddeps + dpkg-architecture dpkg-checkbuilddeps \ + dpkg-libinfo dpkg-subarchitecture SBIN_SCRIPTS = update-alternatives install-info \ dpkg-divert dpkg-statoverride cleanup-info diff -Nru /tmp/filecubLGc/dpkg-1.10.18/scripts/controllib.pl /tmp/fileu6fzcf/dpkg-1.10.18/scripts/controllib.pl --- /tmp/filecubLGc/dpkg-1.10.18/scripts/controllib.pl 2003-09-19 13:29:09.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/scripts/controllib.pl 2003-11-28 19:57:09.000000000 -0500 @@ -134,11 +134,25 @@ binmode(CDATA); $indices= &parsecdata('C',1,"control file $controlfile"); $indices >= 2 || &error("control file must have at least one binary package part"); + $lib64_arch=`dpkg-libinfo -qDEB_LIB64_ARCH`; for ($i=1;$i<$indices;$i++) { defined($fi{"C$i Package"}) || &error("per-package paragraph $i in control info file is ". "missing Package line"); + if (defined($fi{"C$i Package.64"}) && $lib64_arch == 1) { + if (defined($fi{"C$i Substvarname"})) { + $substvar{$fi{"C$i Substvarname"}} = $fi{"C$i Package.64"}; + } else { + $substvar{$fi{"C$i Package"}} = $fi{"C$i Package.64"}; + } + } else { + if (defined($fi{"C$i Substvarname"})) { + $substvar{$fi{"C$i Substvarname"}} = $fi{"C$i Package"}; + } else { + $substvar{$fi{"C$i Package"}} = $fi{"C$i Package"}; + } + } } defined($fi{"C Source"}) || &error("source paragraph in control info file is ". @@ -257,7 +271,10 @@ # many=1: many paragraphs like in source control file # many=-1: single paragraph of control data optionally signed local ($index,$cf,$paraborder); + local ($pkg,$pkg64,$vold,$lib64_arch); $index=''; $cf=''; $paraborder=1; + $pkg=0; $pkg64=0; + $lib64_arch=`dpkg-libinfo -qDEB_LIB64_ARCH`; while () { s/\s*\n$//; next if (m/^$/ and $paraborder); @@ -268,7 +285,8 @@ $cf= &capit($cf); $fi{"$source$index $cf"}= $v; $fi{"o:$source$index $cf"}= $1; - if (lc $cf eq 'package') { $p2i{"$source $v"}= $index; } + if (lc $cf eq 'package.64' && $lib64_arch == 1) { if ($pkg == 1) { $vold = $fi{"$source$index Package"}; delete $p2i{"$source $vold"}; } $p2i{"$source $v"}= $index; $pkg64 = 1;} + elsif (lc $cf eq 'package' && $pkg64 == 0) { $p2i{"$source $v"}= $index; $pkg = 1;} } elsif (m/^\s+\S/) { length($cf) || &syntax("continued value line not in field"); $fi{"$source$index $cf"}.= "\n$_"; @@ -278,6 +296,7 @@ $many= -2; } elsif (m/^$/) { $paraborder = 1; + $pkg=0; $pkg64=0; if ($many>0) { $index++; $cf=''; } elsif ($many == -2) { diff -Nru /tmp/filecubLGc/dpkg-1.10.18/scripts/dpkg-architecture.pl /tmp/fileu6fzcf/dpkg-1.10.18/scripts/dpkg-architecture.pl --- /tmp/filecubLGc/dpkg-1.10.18/scripts/dpkg-architecture.pl 2003-09-13 21:49:08.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/scripts/dpkg-architecture.pl 2003-11-28 19:57:09.000000000 -0500 @@ -40,7 +40,7 @@ # 1.0.7 -q should not imply -f, because this prevents setting # make variables with non-standard names correctly. -$version="1.0.0"; +$version="1.10.10"; $0 = `basename $0`; chomp $0; $dpkglibdir="/usr/lib/dpkg"; @@ -48,6 +48,9 @@ require 'controllib.pl'; %archtable=('i386', 'i386-linux', + 'i486', 'i486-linux', + 'i586', 'i586-linux', + 'i686', 'i686-linux', 'sparc', 'sparc-linux', 'sparc64', 'sparc64-linux', 'alpha', 'alpha-linux', @@ -69,7 +72,8 @@ 'freebsd-i386', 'i386-freebsd', 'netbsd-i386', 'i386-netbsdelf-gnu', 'darwin-powerpc', 'powerpc-darwin', - 'darwin-i386', 'i386-darwin'); + 'darwin-i386', 'i386-darwin', + 'amd64', 'x86_64-linux'); sub usageversion { print STDERR diff -Nru /tmp/filecubLGc/dpkg-1.10.18/scripts/dpkg-genchanges.pl /tmp/fileu6fzcf/dpkg-1.10.18/scripts/dpkg-genchanges.pl --- /tmp/filecubLGc/dpkg-1.10.18/scripts/dpkg-genchanges.pl 2003-09-16 14:06:27.000000000 -0400 +++ /tmp/fileu6fzcf/dpkg-1.10.18/scripts/dpkg-genchanges.pl 2003-11-28 19:57:09.000000000 -0500 @@ -156,6 +156,8 @@ close(FL); } +$lib64_arch=`dpkg-libinfo -qDEB_LIB64_ARCH`; + for $_ (keys %fi) { $v= $fi{$_}; if (s/^C //) { @@ -166,7 +168,10 @@ elsif (m/|^X[BS]+-|^Standards-Version$/i) { } else { &unknown('general section of control info file'); } } elsif (s/^C(\d+) //) { - $i=$1; $p=$fi{"C$i Package"}; $a=$fi{"C$i Architecture"}; + $i=$1; + if (defined($fi{"C$i Package.64"}) && $lib64_arch==1) { $p=$fi{"C$i Package.64"}; } + else { $p=$fi{"C$i Package"}; } + $a=$fi{"C$i Architecture"}; if (!defined($p2f{$p}) && not $sourceonly) { if ($a eq 'any' || ($a eq 'all' && !$archspecific) || grep($_ eq $substvar{'Arch'}, split(/\s+/, $a))) { @@ -200,7 +205,7 @@ $v = ''; } push(@archvalues,$v) unless !$v || $archadded{$v}++; - } elsif (m/^(Package|Essential|Pre-Depends|Depends|Provides)$/ || + } elsif (m/^(Package|Package.64|Substvarname|Essential|Pre-Depends|Depends|Provides)$/ || m/^(Recommends|Suggests|Enhances|Optional|Conflicts|Replaces)$/ || m/^X[CS]+-/i) { } else { diff -Nru /tmp/filecubLGc/dpkg-1.10.18/scripts/dpkg-gencontrol.pl /tmp/fileu6fzcf/dpkg-1.10.18/scripts/dpkg-gencontrol.pl --- /tmp/filecubLGc/dpkg-1.10.18/scripts/dpkg-gencontrol.pl 2003-10-27 14:04:07.000000000 -0500 +++ /tmp/fileu6fzcf/dpkg-1.10.18/scripts/dpkg-gencontrol.pl 2003-11-28 19:57:09.000000000 -0500 @@ -46,7 +46,7 @@ } $i=100;grep($fieldimps{$_}=$i--, - qw(Package Version Section Priority Architecture Essential + qw(Package Package.64 Substvarname Version Section Priority Architecture Essential Pre-Depends Depends Recommends Suggests Enhances Optional Conflicts Replaces Provides Installed-Size Origin Maintainer Bugs Source Description Build-Depends Build-Depends-Indep @@ -96,6 +96,8 @@ } } +$lib64_arch=`dpkg-libinfo -qDEB_LIB64_ARCH`; + &findarch; &parsechangelog; &parsesubstvars; @@ -127,9 +129,15 @@ else { $_ = "C $_"; &unknown('general section of control info file'); } } elsif (s/^C$myindex //) { #print STDERR "P key >$_< value >$v<\n"; - if (m/^(Package|Description|Essential|Optional)$/) { + if (m/^(Description|Essential|Optional)$/) { $f{$_}= $v; + } elsif (m/^Package$/) { + if (defined($fi{"C$myindex Package.64"}) && $lib64_arch==1) { $f{$_}= $fi{"C$myindex Package.64"}; } + else { $f{$_}= $v; } + } elsif (m/^Package.64$|^Substvarname$/) { + # do nothing more } elsif (exists($pkg_dep_fields{$_})) { + $f{$_}= showdep(parsedep(substvars($v)), 0); } elsif (m/^Section$|^Priority$/) { $spvalue{$_}= $v; } elsif (m/^Architecture$/) { diff -Nru /tmp/filecubLGc/dpkg-1.10.18/scripts/dpkg-libinfo.pl /tmp/fileu6fzcf/dpkg-1.10.18/scripts/dpkg-libinfo.pl --- /tmp/filecubLGc/dpkg-1.10.18/scripts/dpkg-libinfo.pl 1969-12-31 19:00:00.000000000 -0500 +++ /tmp/fileu6fzcf/dpkg-1.10.18/scripts/dpkg-libinfo.pl 2003-12-11 11:51:26.000000000 -0500 @@ -0,0 +1,147 @@ +#! /usr/bin/perl +# +# dpkg-libinfo +# +# Copyright 2003 Gerhard Tonn +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# History +# 0.0.1 Initial release. + +$version="0.0.1"; +$0 = `basename $0`; chomp $0; + +$dpkglibdir="/usr/lib/dpkg"; +push(@INC,$dpkglibdir); +require 'controllib.pl'; + +%archtable=('i386', 'i386-linux', + 'sparc', 'sparc-linux', + 'sparc64', 'sparc64-linux', + 'alpha', 'alpha-linux', + 'm68k', 'm68k-linux', + 'arm', 'arm-linux', + 'powerpc', 'powerpc-linux', + 'mips', 'mips-linux', + 'mipsel', 'mipsel-linux', + 'sh3', 'sh3-linux', + 'sh4', 'sh4-linux', + 'sh3eb', 'sh3eb-linux', + 'sh4eb', 'sh4eb-linux', + 'hppa', 'hppa-linux', + 'hurd-i386', 'i386-gnu', + 's390', 's390-linux', + 's390x', 's390x-linux', + 'ia64', 'ia64-linux', + 'openbsd-i386', 'i386-openbsd', + 'freebsd-i386', 'i386-freebsd', + 'netbsd-i386', 'i386-netbsdelf-gnu', + 'darwin-powerpc', 'powerpc-darwin', + 'darwin-i386', 'i386-darwin', + 'amd64', 'x86_64-linux'); + +sub usageversion { + print STDERR +"Debian $0 $version. Copyright (C) 2003 Gerhard Tonn. +This is free software; see the GNU General Public Licence version 2 +or later for copying conditions. There is NO warranty. + +Usage: + $0 [